diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-09-09 11:45:13 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-09-09 11:45:13 +0200 |
commit | f088879bac7cb8149b116eea22a51cfb54012b3c (patch) | |
tree | 7fe914382ccef332b3c7579ba6dc09eeb8b3657f | |
parent | dependency errorneously removed (diff) | |
parent | Create DEV300_m57 milestone tag from trunk@275796 (diff) | |
download | core-f088879bac7cb8149b116eea22a51cfb54012b3c.tar.gz core-f088879bac7cb8149b116eea22a51cfb54012b3c.zip |
merge commit to DEV300_m57
239 files changed, 17192 insertions, 5113 deletions
diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst index 2288410ffba8..351473e38450 100755 --- a/accessibility/prj/build.lst +++ b/accessibility/prj/build.lst @@ -9,3 +9,9 @@ ac accessibility\source\helper nmake - all ac_h ac accessibility\source\standard nmake - all ac_standard ac_helper ac_inc NULL ac accessibility\source\extended nmake - all ac_extended ac_inc NULL ac accessibility\util nmake - all ac_util ac_helper ac_standard ac_extended NULL +ac accessibility\workben\org\openoffice\accessibility\awb nmake - all ac_awb_main ac_awb_misc ac_awb_canvas ac_awb_view ac_awb_tree NULL +ac accessibility\workben\org\openoffice\accessibility\misc nmake - all ac_awb_misc NULL +ac accessibility\workben\org\openoffice\accessibility\awb\canvas nmake - all ac_awb_canvas ac_awb_tree NULL +ac accessibility\workben\org\openoffice\accessibility\awb\tree nmake - all ac_awb_tree ac_awb_misc NULL +ac accessibility\workben\org\openoffice\accessibility\awb\view nmake - all ac_awb_view ac_awb_view_text NULL +ac accessibility\workben\org\openoffice\accessibility\awb\view\text nmake - all ac_awb_view_text NULL diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index f75f9a1b265f..2db3debe33a4 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -132,6 +132,32 @@ namespace accessibility } } break; + + // --> OD 2009-04-01 #i92103# + case VCLEVENT_LISTBOX_ENTRY_EXPANDED : + case VCLEVENT_LISTBOX_ENTRY_COLLAPSED : + { + SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() ); + if ( pEntry ) + { + AccessibleListBoxEntry* pAccListBoxEntry = + new AccessibleListBoxEntry( *getListBox(), pEntry, this ); + Reference< XAccessible > xChild = pAccListBoxEntry; + const short nAccEvent = + ( rVclWindowEvent.GetId() == VCLEVENT_LISTBOX_ENTRY_EXPANDED ) + ? AccessibleEventId::LISTBOX_ENTRY_EXPANDED + : AccessibleEventId::LISTBOX_ENTRY_COLLAPSED; + uno::Any aListBoxEntry; + aListBoxEntry <<= xChild; + NotifyAccessibleEvent( nAccEvent, Any(), aListBoxEntry ); + if ( getListBox() && getListBox()->HasFocus() ) + { + NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), aListBoxEntry ); + } + } + break; + } + // <-- } default: VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent); diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index bc6e77ab6191..ad1f4ab2e01b 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -155,7 +155,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven // combobox, however, we have to help the list with providing // the text of the currently selected item. VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get()); - if (pList != NULL) + if (pList != NULL && m_xText.is()) { Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY); if ( xText.is() ) diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index f89dbe1767c3..76507d22e3cf 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -47,6 +47,7 @@ #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> #include <vcl/unohelp2.hxx> +#include <vcl/help.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/externallock.hxx> #include <unotools/accessiblestatesethelper.hxx> @@ -618,9 +619,12 @@ awt::FontDescriptor SAL_CALL VCLXAccessibleToolBoxItem::getFontMetrics( const Re ::rtl::OUString sRet; if ( m_pToolBox ) { - sRet = m_pToolBox->GetQuickHelpText( m_nItemId ); + if ( Help::IsExtHelpEnabled() ) + sRet = m_pToolBox->GetHelpText( m_nItemId ); + else + sRet = m_pToolBox->GetQuickHelpText( m_nItemId ); if ( !sRet.getLength() ) - // no quick help text set, so use item text + // no help text set, so use item text sRet = m_pToolBox->GetItemText( m_nItemId ); } return sRet; diff --git a/accessibility/workben/TODO b/accessibility/workben/TODO new file mode 100644 index 000000000000..6fdfd5cb81aa --- /dev/null +++ b/accessibility/workben/TODO @@ -0,0 +1,13 @@ +This is a unsorted list of TODO's and idea regarding the Accessibility Workbench + +* increase repaint performance +* fix paint problems in ObjectViewContainer for e.g. File menu +* change package structure to be flat (apps don't need deep package names) +* add ant build script(s) +* evaluate TreeTable as enhanced overview +* add error panel and a bunch of consistency checks +* add focus tracking mode +* evaluate drawing transparent frames at screen coordinates of an object +* enhance text view (colors) +* add table view +* more generic view loading (Class.forName()) diff --git a/accessibility/workben/makefile b/accessibility/workben/makefile new file mode 100644 index 000000000000..4bd7c05e44dd --- /dev/null +++ b/accessibility/workben/makefile @@ -0,0 +1,9 @@ +all: + cd source/org/openoffice/accessibility ; $(MAKE) all + +ROOT=source +SUBDIRS=source/org/openoffice/accessibility +include source/makefile.in + +run: all + $(JAVA) -classpath $(CLASSPATH) org.openoffice.accessibility.awb.AccessibilityWorkBench diff --git a/accessibility/workben/makefile.in b/accessibility/workben/makefile.in new file mode 100644 index 000000000000..ad97448e7780 --- /dev/null +++ b/accessibility/workben/makefile.in @@ -0,0 +1,32 @@ +PRJ=$(ROOT)/.. +SETTINGS=$(OO_SDK_HOME)/settings +include $(SETTINGS)/settings.mk +include $(SETTINGS)/std.mk +include $(SETTINGS)/dk.mk + +OUT_COMP_JAVA = $(OUT_CLASS)/$(patsubst .,/,$(PACKAGE)) +JAVAC=$(JAVA_HOME)/bin/javac +JAVA=$(JAVA_HOME)/bin/java +CLASS_FILES = $(patsubst %.java, %.class, $(JAVAFILES)) +CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(OFFICE_CLASSES_DIR)/jurt.jar\ + $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/unoil.jar\ + $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/ridl.jar\ + $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/sandbox.jar\ + $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/juh.jar\ + $(PATH_SEPARATOR)$(OUT_COMP_JAVA)\ + $(PATH_SEPARATOR).\ + $(PATH_SEPARATOR)$(ROOT)\ + ) + +subdirs: + $(foreach dir,$(SUBDIRS), cd $(dir);$(MAKE);cd ..;) + +clean: + -rm *.class *.jar + $(foreach dir,$(SUBDIRS), cd $(dir);$(MAKE) clean ; cd ..;) + + +%.class : %.java + $(JAVAC) -classpath $(CLASSPATH) $< + +.PHONY: all package clean subdirs diff --git a/accessibility/workben/makefile.mk b/accessibility/workben/makefile.mk new file mode 100644 index 000000000000..33c1e2a0ef5e --- /dev/null +++ b/accessibility/workben/makefile.mk @@ -0,0 +1,40 @@ +# copied from settings.mk +SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) + +# Please modify the following lines to match your environment: +# If you use the run: target at the end of the file, then adapt pipe name +PIPE_NAME = $(USER) + +# The following variables probably don't need to be changed. +JAVA = java +# The JAR_PATH points to the jar files of your local office installation. +JAR_PATH = $(SOLARBINDIR)$/ + + +# The rest of this makefile should not need to be touched. + +JAR_FILES = \ + unoil.jar \ + sandbox.jar \ + ridl.jar \ + jurt.jar \ + juh.jar \ + java_uno.jar + + +JAVA_CLASSPATHS := \ + ..$/$(INPATH)$/class \ + $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ + $(CLASSPATH) + +CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) + +all: + build + +# Example of how to run the work bench. +run: + +$(JAVA) -classpath "$(CLASSPATH)" org/openoffice/accessibility/awb/AccessibilityWorkBench -p $(PIPE_NAME) + +runjar: + +$(JAVA) -classpath "$(CLASSPATH)" -jar AccessibilityWorkBench.jar -p $(PIPE_NAME) diff --git a/accessibility/workben/org/openoffice/accessibility/Makefile b/accessibility/workben/org/openoffice/accessibility/Makefile new file mode 100644 index 000000000000..a6db6a05ab4b --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/Makefile @@ -0,0 +1,6 @@ +all : subdirs + +ROOT=../../../ +SUBDIRS=misc awb +include $(ROOT)/makefile.in + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java b/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java new file mode 100644 index 000000000000..fd1d0e1fa13d --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java @@ -0,0 +1,724 @@ +/************************************************************************* + * + * $RCSfile: AccessibilityWorkBench.java,v $ + * + * $Revision: 1.3 $ + * + * last change: $Author: obr $ $Date: 2008/05/14 13:21:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb; + +import java.awt.Cursor; +import java.awt.GridBagConstraints; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.ButtonGroup; +import javax.swing.JButton; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.event.TreeSelectionListener; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeExpansionListener; +import javax.swing.event.TreeWillExpandListener; +import javax.swing.tree.TreeNode; +import javax.swing.tree.TreePath; + +import com.sun.star.accessibility.XAccessible; +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.frame.XFrame; +import com.sun.star.frame.XTerminateListener; +import com.sun.star.lang.EventObject; +import com.sun.star.uno.UnoRuntime; + +import org.openoffice.accessibility.misc.MessageArea; +import org.openoffice.accessibility.misc.Options; +import org.openoffice.accessibility.misc.OfficeConnection; +import org.openoffice.accessibility.misc.SimpleOffice; +import org.openoffice.accessibility.awb.canvas.Canvas; +import org.openoffice.accessibility.awb.tree.AccessibilityTree; +import org.openoffice.accessibility.awb.tree.AccessibilityModel; +import org.openoffice.accessibility.awb.tree.DynamicAccessibilityModel; +import org.openoffice.accessibility.awb.view.ObjectViewContainer; +import org.openoffice.accessibility.awb.view.ObjectViewContainerWindow; + + + +/** This class manages the GUI of the work bench. + @see AccessibilityTreeModel + for the implementation of the tree view on the left side which also + manages the registration of accessibility listeners. + @see Canvas + for the graphical view of the accessible objects. +*/ +public class AccessibilityWorkBench + extends JFrame + implements XTerminateListener, + ActionListener, + TreeSelectionListener +{ + public static final String msVersion = "v1.9"; + public String msOptionsFileName = ".AWBrc"; + + public static void main (String args[]) + { + String sPipeName = System.getenv( "USER" ); + + for (int i=0; i<args.length; i++) + { + if (args[i].equals ("-h") || args[i].equals ("--help") || args[i].equals ("-?")) + { + System.out.println ("usage: AccessibilityWorkBench <option>*"); + System.out.println ("options:"); + System.out.println (" -p <pipe-name> name of the pipe to use to connect to OpenOffice.org."); + System.out.println (" Defaults to $USER."); + System.exit (0); + } + else if (args[i].equals ("-p")) + { + sPipeName = args[++i]; + } + } + + saWorkBench = new AccessibilityWorkBench (sPipeName); + } + + + + + /** Return the one instance of the AccessibilityWorkBench + @return + Returns null when the AccessibilityWorkBench could not be + created successfully. + */ + public static AccessibilityWorkBench Instance () + { + return saWorkBench; + } + + + + /** Create an accessibility work bench that listens at the specified + port to Office applications. + */ + private AccessibilityWorkBench (String sPipeName) + { + mbInitialized = false; + + OfficeConnection.SetPipeName (sPipeName); + Options.Instance().Load (msOptionsFileName); + Layout (); + + MessageArea.println (System.getProperty ("os.name") + " / " + + System.getProperty ("os.arch") + " / " + + System.getProperty ("os.version")); + MessageArea.println ("Using pipe name " + sPipeName); + + maTree.addTreeSelectionListener (this); + + addWindowListener (new WindowAdapter () + { public void windowClosing (WindowEvent e) {Quit();} } + ); + + OfficeConnection.Instance().AddConnectionListener (this); + Initialize (); + } + + + + + /** Create and arrange the widgets of the GUI. + */ + public void Layout () + { + setSize (new java.awt.Dimension (800,600)); + + JScrollPane aScrollPane; + GridBagConstraints constraints; + + // Create new layout. + java.awt.GridBagLayout aLayout = new java.awt.GridBagLayout (); + getContentPane().setLayout (aLayout); + + // Accessible Tree. + javax.swing.tree.TreeModel treeModel = new DynamicAccessibilityModel(); + maTree = new AccessibilityTree(treeModel); + // Add the model as tree listeners to be able to populate/clear the + // child lists on demand. + maTree.addTreeExpansionListener((TreeExpansionListener) treeModel); + maTree.addTreeWillExpandListener((TreeWillExpandListener) treeModel); + + JScrollPane aTreeScrollPane = new JScrollPane( + maTree, + JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, + JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + aTreeScrollPane.setPreferredSize (new java.awt.Dimension (400,300)); + + // Object view shows details about the currently selected accessible + // object. + maObjectViewContainer = new ObjectViewContainer (); + JScrollPane aObjectViewContainerScrollPane = new JScrollPane( + maObjectViewContainer, + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + aObjectViewContainerScrollPane.setPreferredSize ( + new java.awt.Dimension (400,300)); + JButton aCornerButton = new JButton ("CreateNewViewWindow"); + aCornerButton.addActionListener (this); + aObjectViewContainerScrollPane.setCorner ( + JScrollPane.LOWER_RIGHT_CORNER, + aCornerButton); + + // Split pane for tree view and object view. + JSplitPane aLeftViewSplitPane = new JSplitPane ( + JSplitPane.VERTICAL_SPLIT, + aTreeScrollPane, + aObjectViewContainerScrollPane + ); + aLeftViewSplitPane.setDividerLocation (300); + aLeftViewSplitPane.setContinuousLayout (true); + + // Canvas. + maCanvas = new Canvas (); + maCanvas.SetTree (maTree); + JScrollPane aScrolledCanvas = new JScrollPane(maCanvas, + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + aScrolledCanvas.getViewport().setBackground (java.awt.Color.RED); + aScrolledCanvas.setPreferredSize (new java.awt.Dimension(600,400)); + + // Split pane for tree view and canvas. + JSplitPane aViewSplitPane = new JSplitPane ( + JSplitPane.HORIZONTAL_SPLIT, + aLeftViewSplitPane, + aScrolledCanvas + ); + aViewSplitPane.setOneTouchExpandable(true); + aViewSplitPane.setDividerLocation (400); + aViewSplitPane.setContinuousLayout (true); + + // Split pane for the three views at the top and the message area. + MessageArea.Instance().setPreferredSize (new java.awt.Dimension(600,50)); + JSplitPane aSplitPane = new JSplitPane ( + JSplitPane.VERTICAL_SPLIT, + aViewSplitPane, + MessageArea.Instance()); + aSplitPane.setOneTouchExpandable(true); + aSplitPane.setContinuousLayout (true); + addGridElement (aSplitPane, 0,0, 2,1, 3,3, + GridBagConstraints.CENTER, GridBagConstraints.BOTH); + + // Button bar. + maButtonBar = new javax.swing.JPanel(); + java.awt.GridBagLayout aButtonLayout = new java.awt.GridBagLayout (); + maButtonBar.setLayout (new java.awt.FlowLayout()); + addGridElement (maButtonBar, 0,3, 2,1, 1,0, + GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL); + + // Buttons. + // maConnectButton = createButton ("Connect", "connect"); + // maUpdateButton = createButton ("Update", "update"); + // maShapesButton = createButton ("Expand Shapes", "shapes"); + maExpandButton = createButton ("Expand All", "expand"); + maQuitButton = createButton ("Quit", "quit"); + UpdateButtonStates (); + + setJMenuBar (CreateMenuBar ()); + + setTitle("Accessibility Workbench " + msVersion); + + setVisible (true); + pack (); + aSplitPane.setDividerLocation (1.0); + validate (); + repaint(); + } + + + + + /** Shortcut method for adding an object to a GridBagLayout. + */ + void addGridElement (JComponent object, + int x, int y, + int width, int height, + int weightx, int weighty, + int anchor, int fill) + { + GridBagConstraints constraints = new GridBagConstraints (); + constraints.gridx = x; + constraints.gridy = y; + constraints.gridwidth = width; + constraints.gridheight = height; + constraints.weightx = weightx; + constraints.weighty = weighty; + constraints.anchor = anchor; + constraints.fill = fill; + getContentPane().add (object, constraints); + } + + + + + /** Create a new button and place at the right most position into the + button bar. + */ + public JButton createButton (String title, String command) + { + JButton aButton = new JButton (title); + aButton.setEnabled (false); + aButton.setActionCommand (command); + aButton.addActionListener (this); + + maButtonBar.add (aButton); + return aButton; + } + + + + + /** Create a menu bar for the application. + @return + Returns the new menu bar. The returned reference is also + remembered in the data member <member>maMenuBar</member>. + */ + javax.swing.JMenuBar CreateMenuBar() + { + // Menu bar. + maMenuBar = new JMenuBar (); + + // File menu. + JMenu aFileMenu = new JMenu ("File"); + maMenuBar.add (aFileMenu); + JMenuItem aItem; + aItem = new JMenuItem ("Quit"); + aFileMenu.add (aItem); + aItem.addActionListener (this); + + // View menu. + JMenu aViewMenu = new JMenu ("View"); + maMenuBar.add (aViewMenu); + ButtonGroup aGroup = new ButtonGroup (); + int nZoomMode = Options.GetInteger ("ZoomMode", Canvas.WHOLE_SCREEN); + JRadioButtonMenuItem aRadioButton = new JRadioButtonMenuItem ( + "Whole Screen", nZoomMode==Canvas.WHOLE_SCREEN); + aGroup.add (aRadioButton); + aViewMenu.add (aRadioButton); + aRadioButton.addActionListener (this); + aRadioButton = new JRadioButtonMenuItem ("200%", nZoomMode==200); + aGroup.add (aRadioButton); + aViewMenu.add (aRadioButton); + aRadioButton.addActionListener (this); + aRadioButton = new JRadioButtonMenuItem ("100%", nZoomMode==100); + aGroup.add (aRadioButton); + aViewMenu.add (aRadioButton); + aRadioButton.addActionListener (this); + aRadioButton = new JRadioButtonMenuItem ("50%", nZoomMode==50); + aGroup.add (aRadioButton); + aViewMenu.add (aRadioButton); + aRadioButton.addActionListener (this); + aRadioButton = new JRadioButtonMenuItem ("25%", nZoomMode==25); + aGroup.add (aRadioButton); + aViewMenu.add (aRadioButton); + aRadioButton.addActionListener (this); + aRadioButton = new JRadioButtonMenuItem ("10%", nZoomMode==10); + aGroup.add (aRadioButton); + aViewMenu.add (aRadioButton); + aRadioButton.addActionListener (this); + + // Options menu. + JMenu aOptionsMenu = new JMenu ("Options"); + maMenuBar.add (aOptionsMenu); + JCheckBoxMenuItem aCBItem; + aCBItem = new JCheckBoxMenuItem ("Show Descriptions", + Options.GetBoolean("ShowDescriptions")); + aOptionsMenu.add (aCBItem); + aCBItem.addActionListener (this); + + aCBItem = new JCheckBoxMenuItem ("Show Names", + Options.GetBoolean ("ShowNames")); + aOptionsMenu.add (aCBItem); + aCBItem.addActionListener (this); + + aCBItem = new JCheckBoxMenuItem ("Show Text", + Options.GetBoolean ("ShowText")); + aOptionsMenu.add (aCBItem); + aCBItem.addActionListener (this); + + aCBItem = new JCheckBoxMenuItem ("Antialiased Rendering", + Options.GetBoolean ("Antialiasing")); + aOptionsMenu.add (aCBItem); + aCBItem.addActionListener (this); + + // Help menu. + JMenu aHelpMenu = new JMenu ("Help"); + maMenuBar.add (aHelpMenu); + + aItem = new JMenuItem ("Help"); + aHelpMenu.add (aItem); + aItem.addActionListener (this); + + aItem = new JMenuItem ("News"); + aHelpMenu.add (aItem); + aItem.addActionListener (this); + + aItem = new JMenuItem ("About"); + aHelpMenu.add (aItem); + aItem.addActionListener (this); + + return maMenuBar; + } + + + + + /** Initialize the AWB. This includes clearing the canvas, add + listeners, creation of a new tree model for the tree list box and + the update of the button states. + + This method may be called any number of times. Note that all + actions will be carried out every time. The main purpose of a + second call is that of a re-initialization after a reconnect. + */ + protected void Initialize () + { + maCanvas.SetTree (maTree); + + SimpleOffice aOffice = SimpleOffice.Instance (); + if (aOffice != null) + { + // Add terminate listener. + if (aOffice.GetDesktop() != null) + aOffice.GetDesktop().addTerminateListener (this); + + } + + mbInitialized = true; + UpdateButtonStates (); + } + + + + + /** Update the states of the buttons according to the internal state of + the AWB. + */ + protected void UpdateButtonStates () + { + // maConnectButton.setEnabled (mbInitialized); + maQuitButton.setEnabled (true); + // maUpdateButton.setEnabled (mbInitialized); + maExpandButton.setEnabled (mbInitialized); + // maShapesButton.setEnabled (mbInitialized); + } + + + + /** Callback for GUI actions from the buttons. + */ + public void actionPerformed (ActionEvent aEvent) + { + String sCommand = aEvent.getActionCommand(); + if (sCommand.equals("connect")) + { + SimpleOffice.Clear(); + Initialize (); + } + else if (sCommand.equals("quit")) + { + Quit (); + } + else if (sCommand.equals("update")) + { +// maTree.Dispose(); + Initialize (); + } + else if (sCommand.equals("shapes")) + { + Cursor aCursor = getCursor(); + setCursor (new Cursor (Cursor.WAIT_CURSOR)); + // maTree.expandShapes(); + setCursor (aCursor); + } + else if (sCommand.equals("expand")) + { + Cursor aCursor = getCursor(); + setCursor (new Cursor (Cursor.WAIT_CURSOR)); + + for (int i=0; i<maTree.getRowCount(); i++) + maTree.expandRow (i); + // maAccessibilityTree.expandAll(); + setCursor (aCursor); + } + else if (sCommand.equals ("Quit")) + { + System.out.println ("exiting"); + System.exit (0); + } + else if (sCommand.equals ("Show Descriptions")) + { + Options.SetBoolean ("ShowDescriptions", + ((JCheckBoxMenuItem)aEvent.getSource()).getState()); + maCanvas.repaint(); + } + else if (sCommand.equals ("Show Names")) + { + Options.SetBoolean ("ShowNames", + ((JCheckBoxMenuItem)aEvent.getSource()).getState()); + maCanvas.repaint(); + } + else if (sCommand.equals ("Show Text")) + { + Options.SetBoolean ("ShowText", + ((JCheckBoxMenuItem)aEvent.getSource()).getState()); + maCanvas.repaint(); + } + else if (sCommand.equals ("Antialiased Rendering")) + { + Options.SetBoolean ("Antialiasing", + ((JCheckBoxMenuItem)aEvent.getSource()).getState()); + maCanvas.repaint(); + } + else if (sCommand.equals ("Help")) + { + HelpWindow.Instance().loadFile ("help.html"); + } + else if (sCommand.equals ("News")) + { + try{ + HelpWindow.Instance().loadFile ("news.html"); + } catch (Exception ex) {} + } + else if (sCommand.equals ("About")) + { + HelpWindow.Instance().loadFile ("about.html"); + } + else if (sCommand.equals ("Whole Screen")) + { + Options.SetInteger ("ZoomMode", Canvas.WHOLE_SCREEN); + maCanvas.repaint(); + } + else if (sCommand.equals ("200%")) + { + Options.SetInteger ("ZoomMode", 200); + maCanvas.repaint(); + } + else if (sCommand.equals ("100%")) + { + Options.SetInteger ("ZoomMode", 100); + maCanvas.repaint(); + } + else if (sCommand.equals ("50%")) + { + Options.SetInteger ("ZoomMode", 50); + maCanvas.repaint(); + } + else if (sCommand.equals ("25%")) + { + Options.SetInteger ("ZoomMode", 25); + maCanvas.repaint(); + } + else if (sCommand.equals ("10%")) + { + Options.SetInteger ("ZoomMode", 10); + maCanvas.repaint(); + } + else if (sCommand.equals ("<connected>")) + { + Connected (); + } + else if (sCommand.equals ("CreateNewViewWindow")) + { + TreePath aSelectionPath = maTree.getSelectionPath(); + if (aSelectionPath != null) + { + javax.swing.tree.TreeNode aSelectedNode = + (javax.swing.tree.TreeNode)aSelectionPath.getLastPathComponent(); + if (aSelectedNode instanceof XAccessible) { + new ObjectViewContainerWindow (((XAccessible) aSelectedNode).getAccessibleContext()); + } + } + } + else + { + System.err.println("unknown command " + sCommand); + } + } + + + + + /** TreeSelectionListener + Tell the object view and the canvas about the selected object. + */ + public void valueChanged (TreeSelectionEvent aEvent) { + + if (aEvent.isAddedPath()) { + Cursor aCursor = getCursor(); + setCursor (new Cursor (Cursor.WAIT_CURSOR)); + + javax.swing.tree.TreePath aPath = aEvent.getPath(); + maTree.scrollPathToVisible (aPath); + Object aObject = aPath.getLastPathComponent(); + if (aObject instanceof XAccessible) { + XAccessible xAccessible = (XAccessible) aObject; + if (maObjectViewContainer != null) { + ((AccessibilityModel) maTree.getModel()).addEventListener((TreeNode) aObject, maObjectViewContainer); + maObjectViewContainer.SetObject (xAccessible.getAccessibleContext()); + } + } + if (maCanvas != null) + maCanvas.SelectObject ((TreeNode) aObject); + setCursor (aCursor); + } else { + if (maObjectViewContainer != null) { + ((AccessibilityModel) maTree.getModel()).removeEventListener((TreeNode) aEvent.getPath().getLastPathComponent(), maObjectViewContainer); + maObjectViewContainer.SetObject (null); + } + if (maCanvas != null) + maCanvas.SelectObject (null); + } + } + + + + + // XEventListener + public void disposing (EventObject aSourceObj) + { + XFrame xFrame = (XFrame)UnoRuntime.queryInterface( + XFrame.class, aSourceObj.Source); + + if( xFrame != null ) + System.out.println("frame disposed"); + else + System.out.println("controller disposed"); + } + + + + + // XTerminateListener + public void queryTermination(final EventObject aEvent) throws com.sun.star.frame.TerminationVetoException + { + System.out.println ("Terminate Event : " + aEvent); + } + + + + + // XTerminateListener + public void notifyTermination(final EventObject aEvent) + { + System.out.println ("Notifiy Termination Event : " + aEvent); + } + + + /** Called after the AWB is connected to an Office application. + */ + private void Connected () + { + // Clear the tree and by expanding the root node initiate the + // scanning and insertion of nodes for the top-level windows. +// maTree.Clear(); +// maTree.collapseRow (0); +// maTree.expandRow (0); + + // Register the top window listener. + XExtendedToolkit xToolkit = + SimpleOffice.Instance().GetExtendedToolkit(); + if (xToolkit != null) + { + maTree.setToolkit(xToolkit); + } + } + + + /** Called when shutting down the AWB tool. + */ + private void Quit () + { +// maTree.Dispose(); + System.exit (0); + } + + /// The Singleton Workbench object. + private static AccessibilityWorkBench + saWorkBench = null; + + private JPanel maMainPanel; + private JPanel maButtonBar; + private Canvas maCanvas; + private AccessibilityTree maTree; + private ObjectViewContainer maObjectViewContainer; + private JButton + maConnectButton, + maQuitButton, + maUpdateButton, + maExpandButton, + maShapesButton; + private JMenuBar maMenuBar; + private boolean mbInitialized; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java b/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java new file mode 100644 index 000000000000..2f9671d191e5 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java @@ -0,0 +1,187 @@ +package org.openoffice.accessibility.awb; + +import javax.swing.JFrame; +import javax.swing.JScrollPane; +import javax.swing.JEditorPane; +import javax.swing.JButton; +import java.net.URL; +import javax.swing.event.HyperlinkListener; +import javax.swing.event.HyperlinkEvent; +import java.net.MalformedURLException; +import java.io.IOException; +import java.io.File; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import java.awt.event.ActionListener; +import java.util.LinkedList; + +public class HelpWindow + implements ActionListener +{ + public static synchronized HelpWindow Instance () + { + if (maInstance == null) + maInstance = new HelpWindow(); + return maInstance; + } + + public void loadFile (String sFilename) + { + File aFile = new File (sFilename); + try + { + loadURL (aFile.toURL()); + } + catch (MalformedURLException e) + { + e.printStackTrace (System.err); + } + } + public void loadURL (String sURL) + { + try + { + loadURL (new URL (sURL)); + } + catch (MalformedURLException e) + { + e.printStackTrace (System.err); + } + } + + + + + public void loadURL (URL aURL) + { + maHistory.addLast (aURL); + selectHistoryPage (maHistory.size()-1); + maFrame.toFront (); + } + + + + + private HelpWindow () + { + try + { + maCurrentHistoryEntry = -1; + maHistory = new LinkedList(); + + maFrame = new JFrame (); + maFrame.addWindowListener (new WindowAdapter () + { + public void windowClosing (WindowEvent e) + { + maInstance = null; + } + }); + maContent = createContentWidget(); + + maFrame.getContentPane().setLayout (new GridBagLayout()); + GridBagConstraints aConstraints = new GridBagConstraints (); + aConstraints.gridx = 0; + aConstraints.gridy = 0; + aConstraints.gridwidth = 3; + aConstraints.weightx = 1; + aConstraints.weighty = 1; + aConstraints.fill = GridBagConstraints.BOTH; + maFrame.getContentPane().add (new JScrollPane (maContent), aConstraints); + + aConstraints = new GridBagConstraints(); + aConstraints.gridx = 0; + aConstraints.gridy = 1; + maPrevButton = new JButton ("Prev"); + maFrame.getContentPane().add (maPrevButton, aConstraints); + maPrevButton.addActionListener (this); + + aConstraints = new GridBagConstraints(); + aConstraints.gridx = 1; + aConstraints.gridy = 1; + maNextButton = new JButton ("Next"); + maFrame.getContentPane().add (maNextButton, aConstraints); + maNextButton.addActionListener (this); + + aConstraints = new GridBagConstraints(); + aConstraints.gridx = 2; + aConstraints.gridy = 1; + aConstraints.anchor = GridBagConstraints.EAST; + JButton aButton = new JButton ("Close"); + maFrame.getContentPane().add (aButton, aConstraints); + aButton.addActionListener (this); + + maFrame.setSize (600,400); + maFrame.setVisible (true); + } + catch (Exception e) + {} + } + + public void actionPerformed (java.awt.event.ActionEvent e) + { + if (e.getActionCommand().equals("Prev")) + { + selectHistoryPage (maCurrentHistoryEntry - 1); + } + else if (e.getActionCommand().equals("Next")) + { + selectHistoryPage (maCurrentHistoryEntry + 1); + } + else if (e.getActionCommand().equals("Close")) + { + maFrame.dispose (); + maInstance = null; + } + } + + private JEditorPane createContentWidget () + { + JEditorPane aContent = new JEditorPane (); + aContent.setEditable (false); + aContent.addHyperlinkListener (new HyperlinkListener() + { + public void hyperlinkUpdate (HyperlinkEvent e) + { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) + HelpWindow.Instance().loadURL (e.getURL()); + } + }); + return aContent; + } + + private void selectHistoryPage (int i) + { + if (i < 0) + i = 0; + else if (i >= maHistory.size()-1) + i = maHistory.size()-1; + if (i != maCurrentHistoryEntry) + { + URL aURL = (URL)maHistory.get (i); + try + { + maContent.setPage (aURL); + } + catch (java.io.IOException ex) + { + ex.printStackTrace(System.err); + } + + maCurrentHistoryEntry = i; + } + + maPrevButton.setEnabled (maCurrentHistoryEntry > 0); + maNextButton.setEnabled (maCurrentHistoryEntry < maHistory.size()-1); + } + + private static HelpWindow maInstance = null; + private JFrame maFrame; + private JEditorPane maContent; + private LinkedList maHistory; + private int maCurrentHistoryEntry; + private JButton maPrevButton; + private JButton maNextButton; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/Makefile b/accessibility/workben/org/openoffice/accessibility/awb/Makefile new file mode 100644 index 000000000000..d38799bed109 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/Makefile @@ -0,0 +1,13 @@ +# $Id: Makefile,v 1.1 2003/06/13 16:30:18 af Exp $ + +all : package + +ROOT=../../../.. +PACKAGE = org.openoffice.accessibility.awb +SUBDIRS = canvas event tree view + +include makefile.common + +include $(ROOT)/makefile.in + +package: subdirs $(CLASS_FILES) diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java new file mode 100644 index 000000000000..9edf5dd928ae --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java @@ -0,0 +1,356 @@ +/************************************************************************* + * + * $RCSfile: Canvas.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:35 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.canvas; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Rectangle; +import java.awt.RenderingHints; +import java.awt.Toolkit; +import java.awt.geom.Rectangle2D; +import java.util.Iterator; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JViewport; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.tree.TreePath; + +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleComponent; + +import org.openoffice.accessibility.misc.Options; + +/** This canvas displays accessible objects graphically. Each accessible + object with graphical representation is represented by an + CanvasShape object and has to be added by the + <member>addAccessible</member> member function. + + <p>The canvas listens to selection events of the associated JTree and + highlights the first selected node of that tree.</p> +*/ +public class Canvas + extends JPanel +{ + // This constant can be passed to SetZoomMode to always show the whole screen. + public static final int WHOLE_SCREEN = -1; + + public Canvas () + { + super (true); + maShapeList = new ShapeContainer (this); + maMouseObserver = new MouseObserver (this); + maTree = null; + mnHOffset = 0; + mnVOffset = 0; + mnScale = 1; + maLastWidgetSize = new Dimension (0,0); + } + + + + /** Tell the canvas which tree to use to highlight accessible + objects and to observe for changes in the tree structure. + */ + public void SetTree (javax.swing.JTree aTree) + { + if (aTree != maTree) + { + maTree = aTree; + maShapeList.SetTree (maTree); + maMouseObserver.SetTree (maTree); + } + } + + + + + private void Clear () + { + maShapeList.Clear(); + } + + + + + public Iterator GetShapeIterator () + { + return maShapeList.GetIterator(); + } + + + + + public void paintComponent (Graphics g) + { + synchronized (g) + { + super.paintComponent (g); + + Graphics2D g2 = (Graphics2D)g; + if (Options.GetBoolean("Antialiasing")) + g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + else + g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_OFF); + + setupTransformation (); + g2.translate (mnHOffset, mnVOffset); + g2.scale (mnScale, mnScale); + + // Draw the screen representation to give a hint of the location of the + // accessible object on the screen. + Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Rectangle2D.Double aScreen = new Rectangle2D.Double ( + 0, + 0, + aScreenSize.getWidth(), + aScreenSize.getHeight()); + // Fill the screen rectangle and draw a frame arround it to increase its visibility. + g2.setColor (new Color (250,240,230)); + g2.fill (aScreen); + g2.setColor (Color.BLACK); + g2.draw (aScreen); + + synchronized (maShapeList) + { + Iterator aShapeIterator = maShapeList.GetIterator(); + boolean bShowDescriptions = Options.GetBoolean ("ShowDescriptions"); + boolean bShowNames = Options.GetBoolean ("ShowNames"); + boolean bShowText = Options.GetBoolean ("ShowText"); + while (aShapeIterator.hasNext()) + { + CanvasShape aCanvasShape = + (CanvasShape)aShapeIterator.next(); + try + { + aCanvasShape.paint ( + g2, + bShowDescriptions, bShowNames, bShowText); + } + catch (Exception aException) + { + System.err.println ("caught exception while painting a shape:" + + aException); + aException.printStackTrace (System.err); + } + } + } + + // Paint highlighted frame around active object as the last thing. + if (maActiveObject != null) + maActiveObject.paint_highlight (g2); + } + } + + + + + /** Set up the transformation so that the graphical display can show a + centered representation of the whole screen. + */ + private void setupTransformation () + { + // Turn off scrollbars when showing the whole screen. Otherwise show them when needed. + JViewport aViewport = (JViewport)getParent(); + JScrollPane aScrollPane = (JScrollPane)aViewport.getParent(); + int nZoomMode = Options.GetInteger ("ZoomMode", WHOLE_SCREEN); + if (nZoomMode == WHOLE_SCREEN) + { + if (aScrollPane.getHorizontalScrollBarPolicy() + != JScrollPane.HORIZONTAL_SCROLLBAR_NEVER) + aScrollPane.setHorizontalScrollBarPolicy ( + JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + if (aScrollPane.getVerticalScrollBarPolicy() + != JScrollPane.VERTICAL_SCROLLBAR_NEVER) + aScrollPane.setVerticalScrollBarPolicy ( + JScrollPane.VERTICAL_SCROLLBAR_NEVER); + } + else + { + if (aScrollPane.getHorizontalScrollBarPolicy() + != JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) + aScrollPane.setHorizontalScrollBarPolicy ( + JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + if (aScrollPane.getVerticalScrollBarPolicy() + != JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED) + aScrollPane.setVerticalScrollBarPolicy ( + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); + } + + Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Dimension aWidgetSize = aViewport.getSize(); + { + if ((aScreenSize.getWidth() > 0) && (aScreenSize.getHeight() > 0)) + { + if (nZoomMode == WHOLE_SCREEN) + { + // Calculate the scales that would map the screen onto the + // widget in both of the coordinate axes and select the + // smaller + // of the two: it maps the screen onto the widget in both + // axes at the same time. + double nHScale = (aWidgetSize.getWidth() - 10) + / aScreenSize.getWidth(); + double nVScale = (aWidgetSize.getHeight() - 10) + / aScreenSize.getHeight(); + if (nHScale < nVScale) + mnScale = nHScale; + else + mnScale = nVScale; + } + else + { + mnScale = nZoomMode / 100.0; + } + + // Calculate offsets that center the scaled screen inside + // the widget. + mnHOffset = (aWidgetSize.getWidth() + - mnScale*aScreenSize.getWidth()) / 2.0; + mnVOffset = (aWidgetSize.getHeight() + - mnScale*aScreenSize.getHeight()) / 2.0; + if (mnHOffset < 0) + mnHOffset = 0; + if (mnVOffset < 0) + mnVOffset = 0; + + setPreferredSize (new Dimension ( + (int)(2*mnHOffset + mnScale * aScreenSize.getWidth()), + (int)(2*mnVOffset + mnScale * aScreenSize.getHeight()))); + revalidate (); + } + else + { + // In case of a degenerate (not yet initialized?) screen size + // use some meaningless default values. + mnScale = 1; + mnHOffset = 0; + mnVOffset = 0; + } + } + maLastWidgetSize = aWidgetSize; + } + + + + protected boolean HighlightObject (CanvasShape aNewActiveObject) + { + if (aNewActiveObject != maActiveObject) + { + if (maActiveObject != null) + maActiveObject.Highlight (false); + + maActiveObject = aNewActiveObject; + if (maActiveObject != null) + { + /* if (maTree != null) + { + TreePath aPath = new TreePath ( + maActiveObject.GetNode().GetPath()); + maTree.scrollPathToVisible (aPath); + maTree.setSelectionPath (aPath); + maTree.repaint (); + } + */ + maActiveObject.Highlight (true); + } + repaint (); + return true; + } + else + return false; + } + + + + + /** Called when the selection of the tree changes. Highlight the + corresponding graphical representation of the object. + */ + public void SelectObject (javax.swing.tree.TreeNode aNode) + { + CanvasShape aCanvasShape = maShapeList.Get (aNode); + HighlightObject (aCanvasShape); + } + + + + + private int + mnXAnchor, + mnYAnchor, + maResizeFlag; + private double + mnHOffset, + mnVOffset, + mnScale; + private CanvasShape maActiveObject; + private javax.swing.JTree maTree; + // The size of the widget at the last call of setupTransformation() + private Dimension maLastWidgetSize; + private ShapeContainer maShapeList; + private MouseObserver maMouseObserver; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java new file mode 100644 index 000000000000..5b1b2fb1f4e2 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java @@ -0,0 +1,446 @@ +/************************************************************************* + * + * $RCSfile: CanvasShape.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:35 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.canvas; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics2D; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; +import java.awt.geom.AffineTransform; +import java.awt.geom.NoninvertibleTransformException; + + +import com.sun.star.accessibility.*; +import com.sun.star.lang.EventObject; +import com.sun.star.uno.UnoRuntime; + + +class CanvasShape implements XAccessibleEventListener +{ + public final Color maHighlightColor = Color.red; + public final Color maSelectionColor = Color.green; + public final Color maFocusColor = Color.blue; + + public CanvasShape (javax.swing.tree.TreeNode aNode, Canvas aCanvas) + { + maNode = aNode; + msName = "<no name>"; + msDescription = "<no description>"; + maShape = new Rectangle2D.Double (-10,-10,10,10); + maPosition = new Point (-10,-10); + maSize = new Dimension (10,10); + maFgColor = java.awt.Color.black; + maBgColor = Color.blue; + mnRole = -1; + mbHighlighted = false; + mbSelected = false; + mbFocused = false; + maCanvas = aCanvas; + + Update (); + } + + + + + public javax.swing.tree.TreePath getNodePath (javax.swing.tree.TreeNode node) + { + javax.swing.tree.TreeNode parent = node.getParent(); + return (parent != null) ? + getNodePath(parent).pathByAddingChild(node) : + new javax.swing.tree.TreePath(node); + } + + public javax.swing.tree.TreePath getNodePath () + { + return getNodePath(maNode); + } + + + + /** Update the data obtained from the <type>AccessibilityNode</type> + object. + */ + public void Update () + { + if (maNode instanceof XAccessible) { + mxContext = ((XAccessible) maNode).getAccessibleContext(); + mxComponent = (XAccessibleComponent)UnoRuntime.queryInterface( + XAccessibleComponent.class, mxContext); + } + + if (mxContext != null) + { + msName = mxContext.getAccessibleName(); + msDescription = mxContext.getAccessibleDescription(); + mnRole = mxContext.getAccessibleRole(); + + // Extract the selected and focused flag. + XAccessibleStateSet xStateSet = mxContext.getAccessibleStateSet (); + if (xStateSet != null) + { + mbSelected = xStateSet.contains (AccessibleStateType.SELECTED); + mbFocused = xStateSet.contains (AccessibleStateType.FOCUSED); + } + } + + UpdateGeometry (); + + if (mxComponent != null) + { + // Note: alpha values in office 0..255 have to be mapped to + // 255..0 in Java + Color aCol = new Color (mxComponent.getForeground(), true); + maFgColor = new Color (aCol.getRed (), + aCol.getGreen (), + aCol.getBlue (), + 0xff - aCol.getAlpha ()); + aCol = new Color (mxComponent.getBackground(), true); + maBgColor = new Color (aCol.getRed (), + aCol.getGreen (), + aCol.getBlue (), + 0xff - aCol.getAlpha ()); + } + } + + + + public void UpdateGeometry () + { + if (mxComponent != null) + { + com.sun.star.awt.Point aLocationOnScreen = + mxComponent.getLocationOnScreen(); + com.sun.star.awt.Size aSizeOnScreen = mxComponent.getSize(); + maPosition = new Point ( + aLocationOnScreen.X, + aLocationOnScreen.Y); + maSize = new Dimension ( + aSizeOnScreen.Width, + aSizeOnScreen.Height); + } + } + + + + /** Paint the object into the specified canvas. It is transformed + according to the specified offset and scale. + */ + public void paint ( + Graphics2D g, + boolean bShowDescription, + boolean bShowName, + boolean bShowText) + { + try{ + // Transform the object's position and size according to the + // specified offset and scale. + Point aLocation = new Point(); + maShape = new Rectangle2D.Double ( + maPosition.x, + maPosition.y, + maSize.width, + maSize.height); + maTransformation = g.getTransform(); + + // Fill the object's bounding box with its background color if it + // has no children. + if (mxContext.getAccessibleChildCount() == 0) + { + g.setColor (maBgColor); + g.fill (maShape); + } + + // Remove alpha channel from color before drawing the frame. + Color color = maFgColor; + if (maFgColor.getAlpha()<128) + color = new Color (maFgColor.getRed(), maFgColor.getGreen(), maFgColor.getBlue()); + g.setColor (color); + g.draw (maShape); + + if (mbFocused) + { + g.setColor (maFocusColor); + for (int x=0; x<=2; x++) + for (int y=0; y<=2; y++) + g.fill ( + new Rectangle2D.Double ( + maShape.x + x/2.0 * maShape.width-3, + maShape.y + y/2.0 * maShape.height-3, + 6, + 6)); + } + if (mbSelected) + { + g.setColor (maSelectionColor); + for (int x=0; x<=2; x++) + for (int y=0; y<=2; y++) + g.draw ( + new Rectangle2D.Double ( + maShape.x + x/2.0 * maShape.width-2, + maShape.y + y/2.0 * maShape.height-2, + 4, + 4)); + } + + // Write the object's text OR name and description. + g.setColor (maFgColor); + if (bShowName) + paintName (g); + if (bShowDescription) + paintDescription (g); + if (bShowText) + paintText (g); + } + catch (Exception e) + { // don't care + } + } + + + public void paint_highlight (Graphics2D g) + { + if (mbHighlighted) + g.setColor (maHighlightColor); + else + g.setColor (maFgColor); + g.draw (maShape); + } + + + + + private void paintName (Graphics2D g) + { + g.drawString ("Name: " + msName, + (float)maShape.x+5, + (float)maShape.y+15); + } + + + + private void paintDescription (Graphics2D g) + { + g.drawString ("Description: " + msDescription, + (float)maShape.x+5, + (float)maShape.y+35); + } + + + + + private void paintText (Graphics2D g) + { + XAccessibleText xText = null; + // get XAccessibleText + xText = (XAccessibleText)UnoRuntime.queryInterface( + XAccessibleText.class, mxContext); + + // Draw every character in the text string. + if (xText != null) + { + String sText = xText.getText(); + try + { + for(int i = 0; i < sText.length(); i++) + { + com.sun.star.awt.Rectangle aRect = + xText.getCharacterBounds(i); + + double x = maShape.x + aRect.X; + double y = maShape.y + aRect.Y + aRect.Height; + + g.drawString (sText.substring(i, i+1), (float)x, (float)y); + } + } + catch (com.sun.star.lang.IndexOutOfBoundsException e) + {} + } + } + + + /** Compute whether the specified point lies inside the object's + bounding box. + */ + public boolean Contains (int x, int y) + { + Point2D aPosition = new Point2D.Double (x,y); + try + { + maTransformation.inverseTransform (aPosition, aPosition); + // System.out.println ("transformed "+x+","+y+" to "+aPosition); + } + catch (NoninvertibleTransformException aException) + { + return false; + } + return (maShape.contains (aPosition)); + } + + public void Highlight (boolean bFlag) + { + mbHighlighted = bFlag; + } + + public boolean IsHighlighted () + { + return mbHighlighted; + } + + public Rectangle GetBBox () + { + return new Rectangle (maPosition, maSize); + } + + public Point getOrigin () + { + return maPosition; + } + + public Dimension GetSize () + { + return maSize; + } + + public int getRole () + { + return mnRole; + } + + public XAccessibleContext getContext () + { + return mxContext; + } + + public XAccessibleComponent getComponent () + { + return mxComponent; + } + + public String toString () + { + return ">"+msName+", "+msDescription+" +"+maPosition.x+"+"+maPosition.y + +"x"+maSize.width+"x"+maSize.height+"<"; + } + + /** */ + public void notifyEvent(com.sun.star.accessibility.AccessibleEventObject aEvent) { + try { + switch (aEvent.EventId) { + case AccessibleEventId.BOUNDRECT_CHANGED: + case AccessibleEventId.VISIBLE_DATA_CHANGED: + UpdateGeometry (); + maCanvas.repaint(); + break; + default: + break; + } + } catch (Exception aException) { + System.err.println ("caught exception while updating a shape:" + + aException); + aException.printStackTrace (System.err); + } + } + + /** Callback for disposing events. + */ + public void disposing (com.sun.star.lang.EventObject e) + { + System.out.println ("Disposing"); + } + + + + + private Canvas + maCanvas; + private javax.swing.tree.TreeNode + maNode; + private XAccessibleContext + mxContext; + private XAccessibleComponent + mxComponent; + private String + msDescription, + msName; + private Rectangle2D.Double maShape; + private AffineTransform maTransformation; + private Point maPosition; + private Dimension + maTransformedSize, + maSize; + private Color + maFgColor, + maBgColor; + private boolean + // Highlighting objects is an internal concept. Corresponds to selection in the tree view. + mbHighlighted, + // Set when the accessible object is selected. + mbSelected, + // Set when the accessible object is focused. + mbFocused; + private int + mnRole; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/Makefile b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Makefile new file mode 100644 index 000000000000..8d9688433ff9 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Makefile @@ -0,0 +1,15 @@ +# $Id: Makefile,v 1.1 2003/06/13 16:30:21 af Exp $ + +all : package + +ROOT=../../../../.. +PACKAGE = org.openoffice.accessibility.awb.canvas +SUBDIRS = +include makefile.common + +include $(ROOT)/makefile.in + + +package : $(CLASS_FILES) + + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java new file mode 100644 index 000000000000..3e7e2807906d --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java @@ -0,0 +1,104 @@ +package org.openoffice.accessibility.awb.canvas; + +import java.awt.Dimension; +import java.awt.event.InputEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.util.Iterator; +import javax.swing.tree.TreePath; + + +/** Observe the mouse and highlight shapes of the canvas when clicked. +*/ +public class MouseObserver + implements MouseListener, + MouseMotionListener +{ + public MouseObserver (Canvas aCanvas) + { + maCanvas = aCanvas; + maCanvas.addMouseListener (this); + maCanvas.addMouseMotionListener (this); + } + + + public void SetTree (javax.swing.JTree aTree) + { + maTree = aTree; + } + + public void mouseClicked (MouseEvent e) + {} + + public void mousePressed (MouseEvent e) + { + CanvasShape aObjectUnderMouse = FindCanvasShapeUnderMouse (e); + maTree.clearSelection(); + if (aObjectUnderMouse != null) + { + TreePath aPath = aObjectUnderMouse.getNodePath(); + if ((e.getModifiers() & InputEvent.CTRL_MASK) != 0) + maTree.expandPath (aPath); + // Selecting the entry will eventually highlight the shape. + maTree.setSelectionPath (aPath); + maTree.makeVisible (aPath); + } + } + + public void mouseReleased (MouseEvent e) + {} + + public void mouseEntered (MouseEvent e) + {} + + public void mouseExited (MouseEvent e) + {} + + public void mouseDragged (MouseEvent e) + { + } + + public void mouseMoved (MouseEvent e) + { + if ((e.getModifiers() & InputEvent.SHIFT_MASK) != 0) + maCanvas.HighlightObject (FindCanvasShapeUnderMouse (e)); + } + + + /** Search for the smallest shape that contains the mouse position. + */ + protected CanvasShape FindCanvasShapeUnderMouse (MouseEvent e) + { + Dimension aSmallestSize = null; + Iterator maShapeIterator = maCanvas.GetShapeIterator(); + CanvasShape aShapeUnderMouse = null; + while (maShapeIterator.hasNext()) + { + CanvasShape aShape = (CanvasShape)maShapeIterator.next(); + if (aShape != null) + if (aShape.Contains (e.getX(),e.getY())) + { + if (aShapeUnderMouse == null) + { + aSmallestSize = aShape.GetSize(); + aShapeUnderMouse = aShape; + } + else + { + Dimension aSize = aShape.GetSize(); + if (aSize.getWidth()<aSmallestSize.getWidth() + || aSize.getHeight()<aSmallestSize.getHeight()) + { + aSmallestSize = aSize; + aShapeUnderMouse = aShape; + } + } + } + } + return aShapeUnderMouse; + } + + private Canvas maCanvas; + private javax.swing.JTree maTree; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java new file mode 100644 index 000000000000..fd99d5601cc0 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java @@ -0,0 +1,271 @@ +/************************************************************************* + * + * $RCSfile: ShapeContainer.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:35 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.canvas; + +import java.awt.Rectangle; +import java.util.Iterator; +import javax.swing.event.TreeModelListener; +import javax.swing.event.TreeExpansionListener; +import javax.swing.event.TreeWillExpandListener; +import javax.swing.event.TreeExpansionEvent; +import javax.swing.event.TreeModelEvent; +import javax.swing.tree.TreeNode; + +import com.sun.star.accessibility.XAccessibleEventBroadcaster; + +/** Each canvas has a shape container that is responsible for maintaining + a collection of shapes that are displayed by the canvas. +*/ +public class ShapeContainer + implements TreeModelListener, + TreeExpansionListener, + TreeWillExpandListener +{ + public ShapeContainer (Canvas aCanvas) + { + maShapeList = new java.util.Hashtable(); + maBoundingBox = new Rectangle (0,0,100,100); + maCanvas = aCanvas; + maTree = null; + } + + + + + public synchronized void SetTree (javax.swing.JTree aTree) + { + if (aTree != maTree) + { + if (maTree != null) + { + maTree.getModel().removeTreeModelListener (this); + maTree.removeTreeExpansionListener (this); + maTree.removeTreeWillExpandListener (this); + } + + Clear(); + + maTree = aTree; + + maTree.getModel().addTreeModelListener (this); + maTree.addTreeExpansionListener (this); + maTree.addTreeWillExpandListener (this); + } + } + + + + + public synchronized boolean AddNode (TreeNode aNode) + { + CanvasShape aShape = (CanvasShape)maShapeList.get (aNode); + if (aShape == null) + { + aShape = new CanvasShape (aNode, maCanvas); + + if (aNode instanceof XAccessibleEventBroadcaster) + ((XAccessibleEventBroadcaster) aNode).addEventListener(aShape); + + // Update bounding box that includes all objects. + if (maShapeList.size() == 0) + maBoundingBox = aShape.GetBBox(); + else + maBoundingBox = maBoundingBox.union (aShape.GetBBox()); + + maShapeList.put (aNode, aShape); + + maCanvas.repaint(); + + return true; + } + else + return false; + } + + + /** + */ + public synchronized boolean RemoveNode (TreeNode aNode) + { + CanvasShape aShape = (CanvasShape)maShapeList.get (aNode); + if (aShape != null) + { + if (aNode instanceof XAccessibleEventBroadcaster) + ((XAccessibleEventBroadcaster) aNode).removeEventListener(aShape); + + maShapeList.remove (aNode); + maCanvas.SelectObject (null); + maCanvas.repaint (); + return true; + } + else + return false; + } + + + + + public synchronized void Clear () + { + maShapeList.clear (); + } + + + + + public Iterator GetIterator () + { + return maShapeList.values().iterator (); + } + + + + + public CanvasShape Get (TreeNode aNode) + { + if (aNode != null) { + return (CanvasShape)maShapeList.get (aNode); + } + return null; + } + + + private void PrintMessage (String aMessage, java.util.EventObject aEvent) + { + // System.out.println ("ShapeContainer: " + aMessage + ": " + aEvent); + } + + public void treeNodesChanged (TreeModelEvent aEvent) + { + PrintMessage ("treeNodesChanged", aEvent); + } + public void treeNodesInserted (TreeModelEvent aEvent) + { + PrintMessage ("treeNodesInserted", aEvent); + Object[] aNewNodes = aEvent.getChildren(); + for (int i=0; i<aNewNodes.length; i++) + AddNode ((TreeNode)aNewNodes[i]); + } + public void treeNodesRemoved (TreeModelEvent aEvent) + { + PrintMessage ("treeNodesRemoved", aEvent); + Object[] aOldNodes = aEvent.getChildren(); + for (int i=0; i<aOldNodes.length; i++) + RemoveNode ((TreeNode)aOldNodes[i]); + } + public void treeStructureChanged (TreeModelEvent aEvent) + { + PrintMessage ("treeStructureChanged", aEvent); + TreeNode aNode = (TreeNode)aEvent.getTreePath().getLastPathComponent(); + RemoveAllChildren(aNode); + AddAllChildren(aNode); + } + + public void treeWillExpand (TreeExpansionEvent aEvent) + { + PrintMessage ("treeWillExpand", aEvent); + } + public void treeWillCollapse (TreeExpansionEvent aEvent) + { + PrintMessage ("treeWillCollapse", aEvent); + TreeNode aNode = (TreeNode)aEvent.getPath().getLastPathComponent(); + RemoveAllChildren (aNode); + } + public void treeExpanded (TreeExpansionEvent aEvent) + { + PrintMessage ("treeExpanded", aEvent); + TreeNode aNode = (TreeNode)aEvent.getPath().getLastPathComponent(); + AddAllChildren (aNode); + } + public void treeCollapsed (TreeExpansionEvent aEvent) + { + PrintMessage ("treeCollapsed", aEvent); + } + + private void AddAllChildren (TreeNode aNode) { + java.util.Enumeration aChildList = aNode.children(); + while (aChildList.hasMoreElements()) { + TreeNode aChild = (TreeNode) aChildList.nextElement(); + if (aChild != null) { + AddAllChildren (aChild); + AddNode (aChild); + } + } + } + + private void RemoveAllChildren (TreeNode aNode) { + java.util.Enumeration aChildList = aNode.children(); + while (aChildList.hasMoreElements()) { + TreeNode aChild = (TreeNode) aChildList.nextElement(); + if (aChild != null) { + RemoveAllChildren (aChild); + RemoveNode (aChild); + } + } + } + + + private java.util.Hashtable maShapeList; + private Rectangle maBoundingBox; + private Canvas maCanvas; + private javax.swing.JTree maTree; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common new file mode 100644 index 000000000000..3b7262a8489d --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common @@ -0,0 +1,65 @@ +#************************************************************************* +# +# $RCSfile: makefile.common,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar +JAVAFILES = \ + CanvasShape.java \ + Canvas.java \ + MouseObserver.java \ + ShapeContainer.java + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.mk b/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.mk new file mode 100644 index 000000000000..6e3ef06aab8b --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = awb +PRJ = ..$/..$/..$/..$/..$/.. +TARGET = awb_canvas +PACKAGE = org$/openoffice$/accessibility$/awb$/canvas + +USE_JAVAVER:=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(JAVAVER:s/.//)" >= "140" + +.INCLUDE : makefile.common + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +#JARTARGET = $(TARGET).jar +#JARCOMPRESS = TRUE +JARCLASSDIRS = $(PACKAGE) org/openoffice/java/accessibility/awb +#CUSTOMMANIFESTFILE = manifest +.ENDIF + +# --- Targets ------------------------------------------------------ + + +.INCLUDE : target.mk + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/makefile.common new file mode 100644 index 000000000000..80633d7e66ea --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/makefile.common @@ -0,0 +1,3 @@ +JAVAFILES = \ + AccessibilityWorkBench.java \ + HelpWindow.java diff --git a/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk b/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk new file mode 100644 index 000000000000..eb744d465cfb --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk @@ -0,0 +1,88 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = awb +PRJ = ..$/..$/..$/..$/.. +TARGET = java_awb +PACKAGE = org$/openoffice$/accessibility$/awb + +USE_JAVAVER:=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(JAVAVER:s/.//)" >= "140" +JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar + +.INCLUDE : makefile.common + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +JARTARGET = $(TARGET).jar +JARCOMPRESS = TRUE +JARCLASSDIRS = $(PACKAGE) \ + org$/openoffice$/accessibility$/misc +CUSTOMMANIFESTFILE = manifest +.ENDIF + +# --- Targets ------------------------------------------------------ + + +.INCLUDE : target.mk + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/manifest b/accessibility/workben/org/openoffice/accessibility/awb/manifest new file mode 100644 index 000000000000..951f9ec3128f --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/manifest @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: org.openoffice.accessibility.awb.AccessibilityWorkBench +Class-Path: classes.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar xt.jar jaxp.jar diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java new file mode 100644 index 000000000000..6bdb5976f843 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java @@ -0,0 +1,188 @@ +/************************************************************************* + * + * $RCSfile: AccessibilityModel.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:39 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import javax.swing.SwingUtilities; +import javax.swing.tree.TreeNode; +import javax.swing.tree.MutableTreeNode; +import javax.swing.tree.DefaultMutableTreeNode; + +import com.sun.star.uno.UnoRuntime; +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.awt.XTopWindow; +import com.sun.star.awt.XTopWindowListener; +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEventBroadcaster; +import com.sun.star.accessibility.XAccessibleEventListener; + +/** + * + */ +public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeModel { + + protected java.util.Hashtable nodeList; + protected static DefaultMutableTreeNode disconnectedRootNode = + new DefaultMutableTreeNode("<not connected>"); + + /** Creates a new instance of AccessibilityModel */ + public AccessibilityModel() { + super(disconnectedRootNode, false); + nodeList = new java.util.Hashtable(); + } + + /* Convenience method that creates a new Toolkit node from xToolkit + * and sets as the new root object of the tree. + */ + public synchronized void setRoot(XExtendedToolkit xToolkit) { + if (xToolkit != null) { + try { + // remove old root node as topwindow listener + if (getRoot() instanceof ToolkitNode) { + ToolkitNode tn = (ToolkitNode) getRoot(); + if (tn.xToolkit != null) { + tn.xToolkit.removeTopWindowListener(tn); + } + } + nodeList.clear(); + setRoot(new ToolkitNode(xToolkit, this)); + xToolkit.addTopWindowListener((ToolkitNode) getRoot()); + } catch (com.sun.star.uno.RuntimeException e) { + // FIXME: error message ! + } + } + } + + /* Appends the new child to parent's child list */ + public void addNodeInto(MutableTreeNode newChild, MutableTreeNode parent) { + int index = parent.getChildCount(); + if (newChild != null && newChild.getParent() == parent) { + index -= 1; + } + insertNodeInto(newChild, parent, index); + } + + /** Adds listener to the listener chain of node */ + public static void addEventListener(TreeNode node, XAccessibleEventListener listener) { + if (node instanceof AccessibilityNode) { + ((AccessibilityNode) node).addEventListener(listener); + } + } + + /** Removes listener from the listener chain of node */ + public static void removeEventListener(TreeNode node, XAccessibleEventListener listener) { + if (node instanceof AccessibilityNode) { + ((AccessibilityNode) node).removeEventListener(listener); + } + } + + protected abstract AccessibilityNode createWindowNode(XAccessible xAccessible, + XAccessibleContext xAccessibleContext); + protected abstract AccessibilityNode createNode(XAccessible xAccessible); + + /** Adds xAccessible,node to the internal hashtable */ + public AccessibilityNode putNode(XAccessible xAccessible, AccessibilityNode node) { + if (xAccessible != null) { + String oid = UnoRuntime.generateOid(xAccessible); + java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference) + nodeList.put(oid, new java.lang.ref.WeakReference(node)); + if (ref != null) { + return (AccessibilityNode) ref.get(); + } + } + return null; + } + + /** Returns the AccessibilityNode for xAccessible */ + public AccessibilityNode findNode(XAccessible xAccessible) { + if (xAccessible != null) { + String oid = UnoRuntime.generateOid(xAccessible); + java.lang.ref.WeakReference ref = + (java.lang.ref.WeakReference) nodeList.get(oid); + if (ref != null) { + return (AccessibilityNode) ref.get(); + } + } + return null; + } + + /** Removes the AccessibilityNode for xAccessible from the internal hashtable */ + public AccessibilityNode removeNode(XAccessible xAccessible) { + if (xAccessible != null) { + String oid = UnoRuntime.generateOid(xAccessible); + java.lang.ref.WeakReference ref = + (java.lang.ref.WeakReference) nodeList.remove(oid); + if (ref != null) { + return (AccessibilityNode) ref.get(); + } + } + return null; + } + + public AccessibilityNode removeNode(Object o) { + if (o instanceof XAccessible) { + return removeNode((XAccessible) o); + } + return null; + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java new file mode 100644 index 000000000000..36c5d71b240e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java @@ -0,0 +1,200 @@ +/************************************************************************* + * + * $RCSfile: AccessibilityNode.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:39 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import org.openoffice.accessibility.misc.AccessibleEventMulticaster; + +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.SwingUtilities; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEventBroadcaster; +import com.sun.star.accessibility.XAccessibleEventListener; + +import com.sun.star.uno.UnoRuntime; + +class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, + XAccessibleEventListener, XAccessibleEventBroadcaster { + + protected AccessibilityModel treeModel; + protected XAccessibleContext unoAccessibleContext; + + private XAccessibleEventListener listener; + + public AccessibilityNode(AccessibilityModel treeModel) { + this.treeModel = treeModel; + } + + protected void finalize() throws java.lang.Throwable { + if (userObject != null) { + treeModel.removeNode(userObject); + } + } + + /** Sets the XAccessibleContext object of this node */ + public void setAccessibleContext(XAccessibleContext xAccessibleContext) { + unoAccessibleContext = xAccessibleContext; + } + + /** Returns the XAccessibleContext object of this node */ + public XAccessibleContext getAccessibleContext() { + return unoAccessibleContext; + } + + /** Attaches or Detaches the itself as listener to unoAccessibleContext */ + protected void setAttached(boolean attach) { + XAccessibleContext xAccessibleContext = unoAccessibleContext; + if (xAccessibleContext != null) { + try { + XAccessibleEventBroadcaster xAccessibleEventBroadcaster = + (XAccessibleEventBroadcaster) UnoRuntime.queryInterface( + XAccessibleEventBroadcaster.class, xAccessibleContext); + if (xAccessibleEventBroadcaster != null) { + if (attach) { + xAccessibleEventBroadcaster.addEventListener(this); + } else { + xAccessibleEventBroadcaster.removeEventListener(this); + } + } + } catch (com.sun.star.uno.RuntimeException e) { + // FIXME: error message ! + } + } + } + + public void disposing(com.sun.star.lang.EventObject eventObject) { + XAccessibleEventListener listener = this.listener; + if (listener != null) { + listener.disposing(eventObject); + } + + treeModel.removeNode(userObject); + userObject = null; + unoAccessibleContext = null; + // FIXME: mark the object as being disposed in the tree view ! + } + + protected void handleChildRemoved(XAccessible xAccessible) { + final AccessibilityNode node = treeModel.findNode(xAccessible); + if (node != null) { + SwingUtilities.invokeLater(new java.lang.Runnable() { + public void run() { + treeModel.removeNodeFromParent(node); + } + }); + } + } + + protected void handleChildAdded(XAccessible xAccessible) { + final AccessibilityNode parent = this; + final AccessibilityNode node = treeModel.createNode(xAccessible); + if (node != null) { + SwingUtilities.invokeLater(new java.lang.Runnable() { + public void run() { + try { + XAccessibleContext xAC = node.getAccessibleContext(); + if (xAC != null) { + treeModel.insertNodeInto(node, parent, + xAC.getAccessibleIndexInParent()); + } + } catch (com.sun.star.uno.RuntimeException e) { + // FIXME: output + } + } + }); + } + } + + public void notifyEvent(AccessibleEventObject accessibleEventObject) { + if (accessibleEventObject.EventId == AccessibleEventId.CHILD) { + XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface( + XAccessible.class, accessibleEventObject.OldValue); + if (xAccessible != null) { + handleChildRemoved(xAccessible); + } + + xAccessible = (XAccessible) UnoRuntime.queryInterface( + XAccessible.class, accessibleEventObject.NewValue); + if (xAccessible != null) { + handleChildAdded(xAccessible); + } + } + + XAccessibleEventListener listener = this.listener; + if (listener != null) { + listener.notifyEvent(accessibleEventObject); + } + } + + public synchronized void addEventListener(com.sun.star.accessibility.XAccessibleEventListener xAccessibleEventListener) { + listener = AccessibleEventMulticaster.add(listener, xAccessibleEventListener); + } + + public synchronized void removeEventListener(com.sun.star.accessibility.XAccessibleEventListener xAccessibleEventListener) { + listener = AccessibleEventMulticaster.remove(listener, xAccessibleEventListener); + } +} + + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java new file mode 100644 index 000000000000..f7e71d21574e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java @@ -0,0 +1,123 @@ +/************************************************************************* + * + * $RCSfile: AccessibilityTree.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:39 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import org.openoffice.accessibility.misc.NameProvider; + +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.DefaultMutableTreeNode; + +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; + +/** + * + */ +public class AccessibilityTree extends javax.swing.JTree { + + /** Creates a new instance of AccessibilityTree */ + public AccessibilityTree(javax.swing.tree.TreeModel model) { + super(model); + // always show handles to indicate expandable / collapsable + showsRootHandles = true; + } + + public void setToolkit(XExtendedToolkit xToolkit) { + AccessibilityModel model = (AccessibilityModel) getModel(); + if (model != null) { + // hide the root node when connected + setRootVisible(xToolkit == null); + // update the root node + model.setRoot(xToolkit); + model.reload(); + } + } + + public String convertValueToText(Object value, boolean selected, + boolean expanded, boolean leaf, int row, boolean hasFocus) { + + if (value instanceof DefaultMutableTreeNode) { + DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; + + Object userObject = node.getUserObject(); + if (userObject != null && userObject instanceof XAccessible) { + XAccessible xAccessible = (XAccessible) userObject; + try { + XAccessibleContext xAC = xAccessible.getAccessibleContext(); + if (xAC != null) { + String name = xAC.getAccessibleName(); + if (name.length() == 0) { + name = new String ("<no name>"); + } + value = name + " / " + NameProvider.getRoleName(xAC.getAccessibleRole()); + } + } catch (com.sun.star.uno.RuntimeException e) { + value = "???"; + } + } + } + + return super.convertValueToText(value, selected, expanded, leaf, row, hasFocus); + } + +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java new file mode 100644 index 000000000000..acecd0100a2e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java @@ -0,0 +1,251 @@ +/************************************************************************* + * + * $RCSfile: AccessibilityTreeModel.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc.,y October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import com.sun.star.accessibility.XAccessible; +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.lang.DisposedException; +import com.sun.star.lang.IndexOutOfBoundsException; + +import org.openoffice.accessibility.misc.OfficeConnection; +import org.openoffice.accessibility.awb.event.EventQueue; + +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreeNode; + + +public class AccessibilityTreeModel + extends DefaultTreeModel +{ + public AccessibilityTreeModel () + { + super (null); + setAsksAllowsChildren (false); + + SetRootNode(); + } + + + + /** Release all resources. + */ + synchronized public void Dispose () + { + Clear (); + } + + + + /** Calls to this method are dispatched to the given node but are + observed for exceptions. + */ + synchronized public boolean isLeaf (Object aObject) + { + boolean bIsLeaf = true; + + if (aObject != null) + { + AccessibilityNode aNode = (AccessibilityNode)aObject; + try + { + bIsLeaf = aNode.isLeaf(); + } + catch (DisposedException aException) + { + System.out.println ("node is disposed. removing it"); + /* TreeNode aParent = aNode.GetParent(); + int nIndexInParent = aParent.getIndex (aNode); + aNode.removeFromParent (); + System.out.println ("" + aParent + " # " + aNode + " # "+ nIndexInParent); + nodesWereRemoved ( + aParent, new int[]{nIndexInParent}, new + Object[]{aNode}); + */ + } + catch (Exception aException) + { + System.err.println ("caught exception in AccessibilityTreeModel.isLeaf():" + + aException); + aException.printStackTrace (System.err); + } + } + + return bIsLeaf; + } + + + + + synchronized public int getChildCount (Object aObject) + { + AccessibilityNode aNode = (AccessibilityNode)aObject; + return aNode.getChildCount(); + } + + + + + /** Return the requested child of aParent. If that child is not yet + known to the parent then try to create it. + */ + synchronized public Object getChild (Object aParent, final int nIndex) + { + AccessibilityNode aChild = null; + + final AccessibilityNode aParentNode = (AccessibilityNode)aParent; + + // Try to get an existing child from the super class object. + aChild = aParentNode.GetChildNoCreate (nIndex); + + // When the requested child does not yet exist and this node is not a + // special node then create a new node. + if (aChild == null) + { + aChild = aParentNode.CreateChild (nIndex); + aParentNode.SetChild ((AccessibilityNode)aChild, nIndex); + /* EventQueue.Instance().AddEvent (new Runnable() { public void run() { + AccessibilityTreeModel.this.nodeWasInserted ( + aParentNode, nIndex); + }}); + */ } + + return aChild; + } + + + synchronized public void nodeWasInserted (AccessibilityNode aParent, int nIndex) + { + nodesWereInserted (aParent, new int[]{nIndex}); + nodeStructureChanged (aParent); + + } + + + + + /** Clear the tree so that afterwards it has only the root node. + */ + public void Clear () + { + AccessibilityNode aRoot = (AccessibilityNode)getRoot(); + aRoot.RemoveAllChildren(); + SetRootNode(); + nodeStructureChanged (aRoot); + } + + + + + private void SetRootNode () + { + OfficeConnection aConnection = OfficeConnection.Instance(); + AccessibilityNode aRoot; + if (aConnection!=null && aConnection.IsValid()) + aRoot = new AccessibilityNode ("<connected>"); + else + aRoot = new AccessibilityNode ("<not connected>"); + setRoot (aRoot); + } + + + + + /** Add a new child to the root node. + */ + public synchronized void AddTopLevelNode (AccessibilityNode aNode) + { + if (aNode != null) + { + if ( ! OfficeConnection.Instance().IsValid()) + { + setRoot (null); + } + + AccessibilityNode aRoot = (AccessibilityNode)getRoot(); + if (aRoot == null) + { + aRoot = new AccessibilityNode ("<connected>"); + setRoot (aRoot); + } + + aNode.SetParent (aRoot); + aRoot.Append (aNode); + nodesWereInserted (aRoot, new int[]{aRoot.getIndex (aNode)}); + } + } + + + + + /** Remove a node that is a direct child of the root. + */ + public synchronized void RemoveTopLevelNode (AccessibilityNode aNode) + { + AccessibilityNode aRoot = (AccessibilityNode)getRoot(); + if (aRoot != null) + { + int nIndex = aRoot.getIndex (aNode); + aRoot.Remove (aNode); + nodesWereRemoved (aRoot, new int[]{nIndex}, new Object[]{aNode}); + } + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java new file mode 100644 index 000000000000..0f5626852238 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java @@ -0,0 +1,157 @@ +/************************************************************************* + * + * $RCSfile: DynamicAccessibilityModel.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:39 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import javax.swing.tree.TreeNode; +import javax.swing.tree.MutableTreeNode; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.event.TreeExpansionListener; +import javax.swing.event.TreeWillExpandListener; + +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; + +/** + * + */ +public class DynamicAccessibilityModel extends AccessibilityModel implements TreeExpansionListener, TreeWillExpandListener { + + /* Creates a AccessibilityNode object for a window */ + protected AccessibilityNode createWindowNode(XAccessible xAccessible, + XAccessibleContext xAccessibleContext) { + if (xAccessible != null) { + // Some objects inherit XAccessible, but should not appear in + // the hierarchy as toplevels (like sub-menus), so they don't + // return an accessible context. + if (xAccessibleContext != null) { + AccessibilityNode node = new AccessibilityNode(this); + node.setUserObject(xAccessible); + node.setAccessibleContext(xAccessibleContext); + putNode(xAccessible, node); + return node; + } + } + return null; + } + + /* Creates a DynamicAccessibilityNode object */ + protected AccessibilityNode createNode(XAccessible xAccessible) { + if (xAccessible != null) { + try { + // Some objects inherit XAccessible, but should not appear in + // the hierarchy as toplevels (like sub-menus), so they don't + // return an accessible context. + XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext(); + if (xAccessibleContext != null) { + AccessibilityNode node = new DynamicAccessibilityNode(this); + node.setUserObject(xAccessible); + node.setAccessibleContext(xAccessibleContext); + putNode(xAccessible, node); + return node; + } + } catch (com.sun.star.uno.RuntimeException e) { + } + } + return null; + } + + public void treeCollapsed(javax.swing.event.TreeExpansionEvent treeExpansionEvent) { + TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); + if (node instanceof DynamicAccessibilityNode) { + DynamicAccessibilityNode dynode = (DynamicAccessibilityNode) node; + dynode.clear(); + } + } + + public void treeExpanded(javax.swing.event.TreeExpansionEvent treeExpansionEvent) { + TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); + if (node instanceof AccessibilityNode) { + // Calling oneway methods from an UNO thread may cause + // deadlocks, so adding the listeners here. + for (java.util.Enumeration e = node.children(); e.hasMoreElements(); ) { + ((AccessibilityNode) e.nextElement()).setAttached(true); + } + } + } + + public void treeWillCollapse(javax.swing.event.TreeExpansionEvent treeExpansionEvent) + throws javax.swing.tree.ExpandVetoException { + TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); + if (node instanceof AccessibilityNode) { + // Calling oneway methods from an UNO thread may cause + // deadlocks, so adding the listeners here. + for (java.util.Enumeration e = node.children(); e.hasMoreElements(); ) { + ((AccessibilityNode) e.nextElement()).setAttached(false); + } + } + } + + public void treeWillExpand(javax.swing.event.TreeExpansionEvent treeExpansionEvent) + throws javax.swing.tree.ExpandVetoException { + TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); + if (node instanceof DynamicAccessibilityNode) { + DynamicAccessibilityNode dynode = (DynamicAccessibilityNode) node; + dynode.populate(); + } + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java new file mode 100644 index 000000000000..ff6f5ddd45ea --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java @@ -0,0 +1,126 @@ +/************************************************************************* + * + * $RCSfile: DynamicAccessibilityNode.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:40 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import com.sun.star.uno.UnoRuntime; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; + +/* + * This class is dynamic in the way that it does not contain any children + * until the node is going to be expanded. It also releases all children + * as soon as the node is collapsed again. + */ +class DynamicAccessibilityNode extends AccessibilityNode { + + public DynamicAccessibilityNode(AccessibilityModel treeModel) { + super(treeModel); + } + + // Populates the child list. Called by AccessibilityMode.treeWillExpand(). + protected void populate() { + try { + XAccessibleContext xAC = getAccessibleContext(); + if (xAC != null) { + int n = xAC.getAccessibleChildCount(); + for (int i=0; i<n; i++) { + XAccessible xAccessible = xAC.getAccessibleChild(i); + AccessibilityNode node = treeModel.findNode(xAccessible); + if (node == null) { + node = treeModel.createNode(xAccessible); + } + if (node != null) { + // NOTE: do not send any tree notifications here ! + add(node); + } + } + } + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + // This should never happen since we previously checked the child + // count. + // FIXME: error message + } catch (com.sun.star.uno.RuntimeException e) { + // FIXME: error message + } + } + + // Clears the child list. Called by AccessibilityModel.treeCollapsed(). + protected void clear() { + removeAllChildren(); + } + + /* This is called whenever the node is painted, no matter if collapsed + * or expanded. Making this a "life" value seems to be appropriate. + */ + public boolean isLeaf() { + try { + XAccessibleContext xAC = getAccessibleContext(); + if (xAC != null) { + return xAC.getAccessibleChildCount() == 0; + } + return true; + } catch (com.sun.star.uno.RuntimeException e) { + return true; + } + } + +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/Makefile b/accessibility/workben/org/openoffice/accessibility/awb/tree/Makefile new file mode 100644 index 000000000000..8166c0b91312 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/Makefile @@ -0,0 +1,71 @@ +#************************************************************************* +# +# $RCSfile: Makefile,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +all : package + +ROOT=../../../../.. +PACKAGE = org.openoffice.accessibility.awb.tree +SUBDIRS = +include makefile.common + +include $(ROOT)/makefile.in + + +package : $(CLASS_FILES) + + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java new file mode 100644 index 000000000000..30a6f578f06e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java @@ -0,0 +1,249 @@ +/************************************************************************* + * + * $RCSfile: ToolkitNode.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:41 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.tree; + +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; + +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.awt.XTopWindow; + +import com.sun.star.uno.UnoRuntime; + +import javax.swing.SwingUtilities; +import javax.swing.tree.DefaultMutableTreeNode; + +/** + * + */ +public class ToolkitNode extends DefaultMutableTreeNode + implements com.sun.star.awt.XTopWindowListener { + + protected XExtendedToolkit xToolkit; + + private AccessibilityModel treeModel; + + /** Creates a new instance of TopWindowListener */ + public ToolkitNode(XExtendedToolkit xToolkit, AccessibilityModel treeModel) { + super("<connected>"); + this.xToolkit = xToolkit; + this.treeModel = treeModel; + + // Initially fill the child list + try { + for (int i=0,j=xToolkit.getTopWindowCount(); i<j; i++) { + XTopWindow xTopWindow = xToolkit.getTopWindow(i); + if (xTopWindow != null) { + AccessibilityNode an = getTopWindowNode(xTopWindow); + if (an != null) { + add(an); + // Calling oneway methods from an UNO thread may cause + // deadlocks, so adding the listeners here. + an.setAttached(true); + } + } + } + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + // This should never happen since we properly check the count + // before - anyway returning what we got so far. + } + } + + /** Returns an AccessibilityNode if xAccessible has a valid toplevel */ + private AccessibilityNode getTopWindowNode(XAccessible xAccessible) { + XAccessibleContext xAC = xAccessible.getAccessibleContext(); + if (xAC != null) { + short role = xAC.getAccessibleRole(); + if ((role == AccessibleRole.FRAME) || (role == AccessibleRole.DIALOG) || (role == AccessibleRole.WINDOW)) { + return treeModel.createWindowNode(xAccessible, xAC); + } + } + return null; + } + + /** Returns an AccessibilityNode if xAccessible has a valid toplevel */ + private AccessibilityNode getTopWindowNode(XAccessible xAccessible, XAccessibleContext xAC) { + if (xAC != null) { + short role = xAC.getAccessibleRole(); + if ((role == AccessibleRole.FRAME) || (role == AccessibleRole.DIALOG) || (role == AccessibleRole.WINDOW)) { + AccessibilityNode parent = treeModel.createWindowNode(xAccessible, xAC); + if (parent != null) { + try { + int n = xAC.getAccessibleChildCount(); + for (int i=0; i<n; i++) { + AccessibilityNode child = treeModel.createNode(xAC.getAccessibleChild(i)); + if (child != null) { + parent.add(child); + } + } + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + + } + } + return parent; + } + } + return null; + } + + /** Returns the XAccessible interface corresponding to the toplevel window */ + private AccessibilityNode getTopWindowNode(XTopWindow w) { + XAccessible xAccessible = (XAccessible) + UnoRuntime.queryInterface(XAccessible.class, w); + if (xAccessible != null) { + // XTopWindows usually have an accessible parent, which is the + // native container window .. + XAccessibleContext xAC = xAccessible.getAccessibleContext(); + if (xAC != null) { + XAccessible xParent = xAC.getAccessibleParent(); + if (xParent != null) { + AccessibilityNode parent = getTopWindowNode(xParent); + AccessibilityNode child = treeModel.createNode(xAccessible); + if (parent != null && child != null) { + parent.add(child); + } + return parent; + } else { + return getTopWindowNode(xAccessible, xAC); + } + } + } + return null; + } + + public void disposing(com.sun.star.lang.EventObject eventObject) { + // FIXME : message + // prevent setRoot from removing this as event listener + xToolkit = null; + treeModel.setRoot(treeModel.disconnectedRootNode); + } + + public void windowActivated(com.sun.star.lang.EventObject eventObject) { + } + + public void windowClosed(com.sun.star.lang.EventObject eventObject) { + XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface( + XAccessible.class, eventObject.Source); + if (xAccessible != null) { + AccessibilityNode node = treeModel.findNode(xAccessible); + + // The object implementing XTopWindow is often not the toplevel + // accessible object. + if (node != null && node.getParent() != this) { + node = (AccessibilityNode) node.getParent(); + } + + if (node != null) { + final AccessibilityNode an = node; + Runnable removeRun = new Runnable() { + public void run() { + try { + treeModel.removeNodeFromParent(an); + // Calling oneway methods from an UNO thread may cause + // deadlocks, so removing the listeners here. + an.setAttached(false); + } catch (IllegalArgumentException e) { + // for some toplevel we get more than one event - + // ignoring + } + } + }; + SwingUtilities.invokeLater(removeRun); + } + } + } + + public void windowClosing(com.sun.star.lang.EventObject eventObject) { + } + + public void windowDeactivated(com.sun.star.lang.EventObject eventObject) { + } + + public void windowMinimized(com.sun.star.lang.EventObject eventObject) { + } + + public void windowNormalized(com.sun.star.lang.EventObject eventObject) { + } + + public void windowOpened(com.sun.star.lang.EventObject eventObject) { + final XTopWindow xTopWindow = (XTopWindow) UnoRuntime.queryInterface( + XTopWindow.class, eventObject.Source); + if (xTopWindow != null) { + final ToolkitNode tn = this; + Runnable addNodeRun = new Runnable() { + public void run() { + // Note: UNO does not allow to make synchronous callbacks + // to oneway calls, so we have to fetch the node here. + AccessibilityNode an = getTopWindowNode(xTopWindow); + if (an != null) { + treeModel.addNodeInto(an, tn); + // Calling oneway methods from an UNO thread may cause + // deadlocks, so adding the listeners here. + an.setAttached(true); + } + } + }; + SwingUtilities.invokeLater(addNodeRun); + } + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common new file mode 100644 index 000000000000..7a0813b099db --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common @@ -0,0 +1,66 @@ +#************************************************************************* +# +# $RCSfile: makefile.common,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar +JAVAFILES = \ + AccessibilityModel.java \ + AccessibilityNode.java \ + AccessibilityTree.java \ + DynamicAccessibilityModel.java \ + DynamicAccessibilityNode.java \ + ToolkitNode.java diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.mk b/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.mk new file mode 100644 index 000000000000..7867cf1cc672 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = awb +PRJ = ..$/..$/..$/..$/..$/.. +TARGET = java_tree +PACKAGE = org$/openoffice$/accessibility$/awb$/tree + +USE_JAVAVER:=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(JAVAVER:s/.//)" >= "140" + +.INCLUDE : makefile.common + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +.ENDIF + +# --- Targets ------------------------------------------------------ + + +.INCLUDE : target.mk + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java new file mode 100644 index 000000000000..7d3da7c0ac16 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java @@ -0,0 +1,229 @@ +/************************************************************************* + * + * $RCSfile: ComponentView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Dimension; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +import javax.swing.JLabel; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleComponent; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.uno.UnoRuntime; + +import org.openoffice.accessibility.misc.NameProvider; + +/** The <type>ContextView</type> class displays information accessible over + the <type>XAccessibleContext</type> interface. This includes name, + description, and role. +*/ +public class ComponentView + extends ObjectView +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + if (UnoRuntime.queryInterface( + XAccessibleComponent.class, xContext) != null) + return new ComponentView (aContainer); + else + return null; + } + + public ComponentView (ObjectViewContainer aContainer) + { + super (aContainer); + + ViewGridLayout aLayout = new ViewGridLayout (this); + + maRelativeLocationLabel = aLayout.AddLabeledEntry ("Relative Location: "); + maAbsoluteLocationLabel = aLayout.AddLabeledEntry ("Location on Screen: "); + maSizeLabel = aLayout.AddLabeledEntry ("Size"); + maBoundingBoxLabel = aLayout.AddLabeledEntry ("Bounding Box: "); + maConsistencyLabel = aLayout.AddLabeledEntry ("Consistent: "); + maForegroundColorLabel = aLayout.AddLabeledEntry ("Foreground Color: "); + maBackgroundColorLabel = aLayout.AddLabeledEntry ("Background Color: "); + } + + + public void SetObject (XAccessibleContext xContext) + { + mxComponent = (XAccessibleComponent)UnoRuntime.queryInterface( + XAccessibleComponent.class, xContext); + super.SetObject (xContext); + } + + public void Update () + { + if (mxContext == null) + { + maRelativeLocationLabel.setText ("<null object>"); + maAbsoluteLocationLabel.setText ("<null object>"); + maSizeLabel.setText ("<null object>"); + maBoundingBoxLabel.setText ("<null object>"); + maConsistencyLabel.setText ("<null object>"); + maForegroundColorLabel.setText ("<null object>"); + maBackgroundColorLabel.setText ("<null object>"); + } + else + { + com.sun.star.awt.Point aLocation = mxComponent.getLocation(); + maRelativeLocationLabel.setText ( + aLocation.X + ", " + aLocation.Y); + com.sun.star.awt.Point aLocationOnScreen = + mxComponent.getLocationOnScreen(); + maAbsoluteLocationLabel.setText ( + aLocationOnScreen.X + ", " + aLocationOnScreen.Y); + com.sun.star.awt.Size aSize = mxComponent.getSize(); + maSizeLabel.setText ( + aSize.Width + ", " + aSize.Height); + com.sun.star.awt.Rectangle aBBox = mxComponent.getBounds(); + maBoundingBoxLabel.setText ( + aBBox.X + ", " + aBBox.Y + "," + + aBBox.Width + ", " + aBBox.Height); + int nColor = mxComponent.getForeground(); + maForegroundColorLabel.setText ( + "R"+ (nColor>>16&0xff) + + "G" + (nColor>>8&0xff) + + "B" + (nColor>>0&0xff) + + "A" + (nColor>>24&0xff)); + nColor = mxComponent.getBackground(); + maBackgroundColorLabel.setText ( + "R"+ (nColor>>16&0xff) + + "G" + (nColor>>8&0xff) + + "B" + (nColor>>0&0xff) + + "A" + (nColor>>24&0xff)); + + // Check consistency of coordinates. + String sConsistency = new String (); + if (aBBox.X!=aLocation.X || aBBox.Y!=aLocation.Y) + sConsistency += (sConsistency.length()!=0?", ":"") + + "Bounding box conflicts with relative location"; + if (aBBox.Width!=aSize.Width || aBBox.Height!=aSize.Height) + sConsistency += (sConsistency.length()!=0?", ":"") + + "Bounding box conflicts with size"; + XAccessible xParent = mxContext.getAccessibleParent(); + XAccessibleComponent xParentComponent = + (XAccessibleComponent)UnoRuntime.queryInterface( + XAccessibleComponent.class, xParent); + if (xParentComponent == null) + { + if (aLocation.X != aLocationOnScreen.X + || aLocation.Y != aLocationOnScreen.Y) + sConsistency += (sConsistency.length()!=0?", ":"") + + "location on screen does not equal " + + "relative location without parent"; + } + else + { + com.sun.star.awt.Point aParentLocationOnScreen = + xParentComponent.getLocationOnScreen(); + if (aLocation.X+aParentLocationOnScreen.X + != aLocationOnScreen.X + || aLocation.Y+aParentLocationOnScreen.Y + != aLocationOnScreen.Y) + sConsistency += (sConsistency.length()!=0?", ":"") + + "location on screen does not match " + + "relative location"; + } + if (sConsistency.length() == 0) + sConsistency += "yes"; + else + maConsistencyLabel.setBackground (GetContainer().GetErrorColor()); + maConsistencyLabel.setText (sConsistency); + } + } + + public String GetTitle () + { + return ("Component"); + } + + /** Listen for changes regarding displayed values. + */ + public void notifyEvent (AccessibleEventObject aEvent) + { + switch (aEvent.EventId) + { + case AccessibleEventId.BOUNDRECT_CHANGED : + case AccessibleEventId.VISIBLE_DATA_CHANGED : + Update (); + } + } + + private XAccessibleComponent mxComponent; + private JLabel + maRelativeLocationLabel, + maAbsoluteLocationLabel, + maSizeLabel, + maBoundingBoxLabel, + maConsistencyLabel, + maForegroundColorLabel, + maBackgroundColorLabel; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java new file mode 100644 index 000000000000..16d51b6edd97 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java @@ -0,0 +1,149 @@ +/************************************************************************* + * + * $RCSfile: ContextView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Dimension; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +import javax.swing.JLabel; +import javax.swing.JTextField; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessibleContext; + +import org.openoffice.accessibility.misc.NameProvider; + +/** The <type>ContextView</type> class displays information accessible over + the <type>XAccessibleContext</type> interface. This includes name, + description, and role. +*/ +public class ContextView + extends ObjectView + implements ActionListener +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + if (xContext != null) + return new ContextView (aContainer); + else + return null; + } + + public ContextView (ObjectViewContainer aContainer) + { + super (aContainer); + + ViewGridLayout aLayout = new ViewGridLayout (this); + maNameLabel = aLayout.AddLabeledString ("Name:"); + maDescriptionLabel = aLayout.AddLabeledString ("Description:"); + maRoleLabel = aLayout.AddLabeledEntry ("Role:"); + } + + public void Update () + { + if (mxContext == null) + { + maNameLabel.setText ("<null object>"); + maDescriptionLabel.setText ("<null object>"); + maRoleLabel.setText ("<null object>"); + } + else + { + maNameLabel.setText (mxContext.getAccessibleName()); + maDescriptionLabel.setText (mxContext.getAccessibleDescription()); + maRoleLabel.setText (NameProvider.getRoleName (mxContext.getAccessibleRole())); + } + } + + public String GetTitle () + { + return ("Context"); + } + + /** Listen for changes regarding displayed values. + */ + public void notifyEvent (AccessibleEventObject aEvent) + { + switch (aEvent.EventId) + { + case AccessibleEventId.NAME_CHANGED : + case AccessibleEventId.DESCRIPTION_CHANGED : + Update (); + } + } + + public void actionPerformed (ActionEvent aEvent) + { + } + + + private JLabel + maNameLabel, + maDescriptionLabel, + maRoleLabel; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java new file mode 100644 index 000000000000..b60404f22efd --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java @@ -0,0 +1,153 @@ +/************************************************************************* + * + * $RCSfile: EditableTextView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JButton; + +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEditableText; +import com.sun.star.uno.UnoRuntime; + +import org.openoffice.accessibility.awb.view.text.TextDialogFactory; + + +public class EditableTextView + extends ObjectView + implements ActionListener +{ + /** Create a EditableTextView when the given object supports the + XAccessibleEditableText interface. + */ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + XAccessibleEditableText xEditableText = + (XAccessibleEditableText)UnoRuntime.queryInterface( + XAccessibleEditableText.class, xContext); + if (xEditableText != null) + return new EditableTextView (aContainer); + else + return null; + } + + public EditableTextView (ObjectViewContainer aContainer) + { + super (aContainer); + + JButton aButton = new JButton ("cut..."); + aButton.setFont (ViewGridLayout.GetFont()); + aButton.addActionListener (this); + add (aButton); + aButton = new JButton ("paste..."); + aButton.setFont (ViewGridLayout.GetFont()); + aButton.addActionListener (this); + add (aButton); + aButton = new JButton ("edit..."); + aButton.setFont (ViewGridLayout.GetFont()); + aButton.addActionListener (this); + add (aButton); + aButton = new JButton ("format..."); + aButton.setFont (ViewGridLayout.GetFont()); + aButton.addActionListener (this); + add (aButton); + } + + + /** Additionally to the context store a reference to the + XAccessibleEditableText interface. + */ + public void SetObject (XAccessibleContext xObject) + { + mxEditableText = (XAccessibleEditableText)UnoRuntime.queryInterface( + XAccessibleEditableText.class, xObject); + super.SetObject (xObject); + } + + public String GetTitle () + { + return ("Editable Text"); + } + + synchronized public void Destroy () + { + mxEditableText = null; + super.Destroy(); + } + + public void actionPerformed (ActionEvent aEvent) + { + String sCommand = aEvent.getActionCommand(); + if (sCommand.equals ("cut...")) + TextDialogFactory.CreateCutDialog (mxContext); + else if (sCommand.equals ("past...")) + TextDialogFactory.CreatePasteDialog (mxContext); + else if (sCommand.equals ("edit...")) + TextDialogFactory.CreateEditDialog (mxContext); + else if (sCommand.equals ("format...")) + TextDialogFactory.CreateFormatDialog (mxContext); + } + + private XAccessibleEditableText mxEditableText; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java new file mode 100644 index 000000000000..e01f665b5e22 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java @@ -0,0 +1,158 @@ +/************************************************************************* + * + * $RCSfile: EventMonitorView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.BorderLayout; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessibleContext; + +import org.openoffice.accessibility.misc.NameProvider; + + +/** A simple event monitor that shows all events sent to one accessible + object. +*/ +class EventMonitorView + extends ObjectView +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + if (xContext != null) + return new EventMonitorView (aContainer); + else + return null; + } + + public EventMonitorView (ObjectViewContainer aContainer) + { + super (aContainer); + Layout(); + } + + public String GetTitle () + { + return "Event Monitor"; + } + + /** Create and arrange the widgets for this view. + */ + private void Layout () + { + setLayout (new GridBagLayout ()); + + maText = new JTextArea(); + maText.setBackground (new Color (255,250,240)); + maText.setFont (new Font ("Helvetica", Font.PLAIN, 9)); + + maScrollPane = new JScrollPane (maText, + JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, + JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + maScrollPane.setPreferredSize (new Dimension (300,80)); + + GridBagConstraints aConstraints = new GridBagConstraints (); + aConstraints.weightx = 1; + aConstraints.fill = GridBagConstraints.HORIZONTAL; + add (maScrollPane, aConstraints); + } + + + public void Update () + { + } + + + private void UpdateVerticalScrollBar () + { + JScrollBar sb = maScrollPane.getVerticalScrollBar(); + if (sb != null) + { + int nScrollBarValue = sb.getMaximum() - sb.getVisibleAmount() - 1; + sb.setValue (nScrollBarValue); + } + } + + + public void notifyEvent (AccessibleEventObject aEvent) + { + maText.append (NameProvider.getEventName (aEvent.EventId) + " : " + + aEvent.OldValue.toString() + + " -> " + + aEvent.NewValue.toString() + "\n"); + UpdateVerticalScrollBar(); + } + + private JTextArea maText; + private JScrollPane maScrollPane; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java new file mode 100644 index 000000000000..6f3f850aeb14 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java @@ -0,0 +1,182 @@ +/************************************************************************* + * + * $RCSfile: FocusView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +import javax.swing.JButton; +import javax.swing.JLabel; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.AccessibleStateType; +import com.sun.star.accessibility.XAccessibleComponent; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleStateSet; +import com.sun.star.uno.UnoRuntime; + +public class FocusView + extends ObjectView + implements ActionListener +{ + /** Create a FocusView when the given object supports the + XAccessibleComponent interface. + */ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + XAccessibleComponent xComponent = (XAccessibleComponent)UnoRuntime.queryInterface( + XAccessibleComponent.class, xContext); + if (xComponent != null) + return new FocusView (aContainer); + else + return null; + } + + public FocusView (ObjectViewContainer aContainer) + { + super (aContainer); + + setLayout (new GridBagLayout()); + GridBagConstraints aConstraints = new GridBagConstraints (); + + maFocused = new JLabel (); + maFocused.setFont (GetContainer().GetViewFont()); + aConstraints.gridy = 0; + aConstraints.weightx = 1; + aConstraints.fill = GridBagConstraints.HORIZONTAL; + add (maFocused, aConstraints); + + maGrabFocus = new JButton ("grabFocus"); + maGrabFocus.setFont (GetContainer().GetViewFont()); + aConstraints.gridy = 1; + aConstraints.fill = GridBagConstraints.NONE; + aConstraints.anchor = GridBagConstraints.WEST; + add (maGrabFocus, aConstraints); + + maGrabFocus.addActionListener (this); + } + + /** Additionally to the context store a reference to the + XAccessibleComponent interface. + */ + public void SetObject (XAccessibleContext xObject) + { + mxComponent = (XAccessibleComponent)UnoRuntime.queryInterface( + XAccessibleComponent.class, xObject); + super.SetObject (xObject); + } + + synchronized public void Destroy () + { + super.Destroy(); + maGrabFocus.removeActionListener (this); + } + + synchronized public void Update () + { + if (mxContext == null) + { + maFocused.setText ("<null object>"); + maGrabFocus.setEnabled (false); + } + else + { + XAccessibleStateSet aStateSet = mxContext.getAccessibleStateSet(); + if (aStateSet.contains(AccessibleStateType.FOCUSED)) + maFocused.setText ("focused"); + else + maFocused.setText ("not focused"); + if (maGrabFocus != null) + maGrabFocus.setEnabled (true); + } + } + + public String GetTitle () + { + return ("Focus"); + } + + synchronized public void actionPerformed (ActionEvent aEvent) + { + if (aEvent.getActionCommand().equals("grabFocus")) + { + mxComponent.grabFocus(); + } + } + + public void notifyEvent (AccessibleEventObject aEvent) + { + System.out.println (aEvent); + if (aEvent.EventId == AccessibleEventId.STATE_CHANGED) + Update (); + } + + private JLabel maFocused; + private JButton maGrabFocus; + private XAccessibleComponent mxComponent; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java b/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java new file mode 100644 index 000000000000..590d17c94954 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java @@ -0,0 +1,194 @@ +/************************************************************************* + * + * $RCSfile: LayoutManager.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Component; +import java.awt.Cursor; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import java.awt.Point; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.awt.event.MouseEvent; +import javax.swing.JComponent; + +class LayoutManager + implements MouseListener, + MouseMotionListener +{ + public LayoutManager (JComponent aLayoutedComponent) + { + maLayoutedComponent = aLayoutedComponent; + maDraggedView = null; + mbInsertionPending = false; + } + + public void mouseClicked (MouseEvent aEvent) + { + System.out.println (aEvent); + } + public void mousePressed (MouseEvent aEvent) + { + mnOldY = aEvent.getPoint().y; + } + public void mouseReleased (MouseEvent aEvent) + { + if (mbInsertionPending) + { + InsertView (maDraggedView, aEvent.getPoint().y); + mbInsertionPending = false; + maDraggedView = null; + } + } + public void mouseEntered (MouseEvent aEvent) + { + } + public void mouseExited (MouseEvent aEvent) + { + if (mbInsertionPending) + { + InsertView (maDraggedView, mnOldY); + mbInsertionPending = false; + maDraggedView = null; + } + } + public void mouseDragged (MouseEvent aEvent) + { + int dy = mnOldY - aEvent.getPoint().y; + GridBagLayout aLayout = (GridBagLayout)maLayoutedComponent.getLayout(); + if ( ! mbInsertionPending && dy != 0) + { + maDraggedView = RemoveView (mnOldY); + if (maDraggedView != null) + mbInsertionPending = true; + } + } + public void mouseMoved (MouseEvent aEvent) + { + } + + + + + private ObjectView RemoveView (int y) + { + ObjectView aView = null; + GridBagLayout aLayout = (GridBagLayout)maLayoutedComponent.getLayout(); + + Point aGridLocation = aLayout.location (10,y); + Component[] aComponentList = maLayoutedComponent.getComponents(); + System.out.println ("removing view at " + aGridLocation); + for (int i=0; i<aComponentList.length && aView==null; i++) + { + GridBagConstraints aConstraints = aLayout.getConstraints ( + aComponentList[i]); + if (aConstraints.gridy == aGridLocation.y) + aView = (ObjectView)aComponentList[i]; + } + maNormalCursor = maLayoutedComponent.getCursor(); + if (aView != null) + { + System.out.println ("removing view at " + aGridLocation.y); + maLayoutedComponent.setCursor (new Cursor (Cursor.MOVE_CURSOR)); + maLayoutedComponent.remove (aView); + maLayoutedComponent.validate(); + maLayoutedComponent.repaint(); + } + + return aView; + } + + private void InsertView (ObjectView aView, int y) + { + if (aView != null) + { + GridBagLayout aLayout = (GridBagLayout)maLayoutedComponent.getLayout(); + Point aGridLocation = aLayout.location (0,y); + Component[] aComponentList = maLayoutedComponent.getComponents(); + System.out.println ("new position is " + aGridLocation.y); + for (int i=0; i<aComponentList.length; i++) + { + GridBagConstraints aConstraints = aLayout.getConstraints ( + aComponentList[i]); + if (aConstraints.gridy >= aGridLocation.y) + { + if (aConstraints.gridy == aGridLocation.y) + maLayoutedComponent.add (maDraggedView, aConstraints); + aConstraints.gridy += 1; + aLayout.setConstraints (aComponentList[i], aConstraints); + } + } + maLayoutedComponent.validate(); + maLayoutedComponent.repaint(); + } + maLayoutedComponent.setCursor (maNormalCursor); + } + + + + + private JComponent maLayoutedComponent; + private ObjectView maDraggedView; + private int mnOldY; + private boolean mbInsertionPending; + private Cursor maNormalCursor; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/Makefile b/accessibility/workben/org/openoffice/accessibility/awb/view/Makefile new file mode 100644 index 000000000000..2e4eb1566afd --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/Makefile @@ -0,0 +1,13 @@ +# $Id: Makefile,v 1.1 2003/06/13 16:30:34 af Exp $ + +all : package + +ROOT=../../../../.. +PACKAGE = org.openoffice.accessibility.awb.view +SUBDIRS = text +include makefile.common + +include $(ROOT)/makefile.in + + +package : $(CLASS_FILES) diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java new file mode 100644 index 000000000000..3c1b8e90ff26 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java @@ -0,0 +1,90 @@ +package org.openoffice.accessibility.awb.view; + +import javax.swing.JPanel; + +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessibleContext; + +/** This is the base class for all object views that can be placed inside an + object view container. + + <p>When provided with a new accessible object the container will call + the Create method to create a new instance when certain conditions are + met. It then calls SetObject to pass the object to the instance. + Finally it calls Update.</p> + + <p>The SetObject and Update methods may be called for a new object + without calling Create first. In this way an existing instance is + recycled.</p> +*/ +abstract public class ObjectView + extends JPanel +{ + /** This factory method creates a new instance of the (derived) class + when the given accessible object supports all necessary features. + In the ususal case this will be the support of a specific + accessibility interface. + */ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + return null; + } + + public ObjectView (ObjectViewContainer aContainer) + { + maContainer = aContainer; + mxContext = null; + } + + /** Call this when you want the object to be destroyed. Release all + resources when called. + */ + public void Destroy () + { + } + + /** Tell the view to display information for a new accessible object. + @param xObject + The given object may be null. A typical behaviour in this case + would be to display a blank area. But is also possible to show + information about the last object. + */ + public void SetObject (XAccessibleContext xContext) + { + mxContext = xContext; + Update (); + } + + + /** This is a request of a repaint with the current state of the current + object. The current object may or may not be the same as the one + when Update() was called the last time. + */ + public void Update () + { + } + + + /** Return a string that is used as a title of an enclosing frame. + */ + abstract public String GetTitle (); + + + public ObjectViewContainer GetContainer () + { + return maContainer; + } + + + /** Implement this method if you are interested in accessible events. + */ + public void notifyEvent (AccessibleEventObject aEvent) + {} + + /// Reference to the current object to display information about. + protected XAccessibleContext mxContext; + + protected ObjectViewContainer maContainer; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java new file mode 100644 index 000000000000..e5eeec95b41a --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java @@ -0,0 +1,344 @@ +/************************************************************************* + * + * $RCSfile: ObjectViewContainer.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2003/09/19 09:21:42 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Font; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import java.awt.Insets; + +import java.util.Vector; + +import java.lang.reflect.Method; +import java.lang.NoSuchMethodException; +import java.lang.IllegalAccessException; +import java.lang.reflect.InvocationTargetException; + +import javax.swing.JPanel; +import javax.swing.JTree; +import javax.swing.BorderFactory; +import javax.swing.border.Border; +import javax.swing.border.BevelBorder; +import javax.swing.SwingUtilities; + +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleComponent; +import com.sun.star.accessibility.XAccessibleEventBroadcaster; +import com.sun.star.accessibility.XAccessibleEventListener; +import com.sun.star.accessibility.XAccessibleSelection; +import com.sun.star.lang.EventObject; +import com.sun.star.uno.UnoRuntime; + +import org.openoffice.accessibility.awb.view.ObjectView; + + + +/** This container of specialized object views displays information about + one accessible object. + In this it plays several roles: + 1. Object container. + 2. Accessibility event dispatcher. + 3. Object view class registration manager. + 4. Swing widget. +*/ +public class ObjectViewContainer + extends JPanel + implements XAccessibleEventListener +{ + public ObjectViewContainer () + { + maFont = new Font ("Dialog", Font.PLAIN, 11); + maViewTemplates = new Vector (); + maViewBorder = BorderFactory.createBevelBorder (BevelBorder.RAISED); + GridBagLayout aLayout = new GridBagLayout (); + setLayout (aLayout); + // maLayoutManager = new LayoutManager (this); + maLayoutManager = null; + + RegisterView (ContextView.class); + RegisterView (ComponentView.class); + RegisterView (ParentView.class); + RegisterView (StateSetView.class); + RegisterView (FocusView.class); + RegisterView (TextView.class); + RegisterView (EditableTextView.class); + RegisterView (TableView.class); + RegisterView (SelectionView.class); + RegisterView (ServiceInterfaceView.class); + RegisterView (EventMonitorView.class); + + mxContext = null; + + // addMouseListener (maLayoutManager); + // addMouseMotionListener (maLayoutManager); + } + + + + /** Remove all existing views and create new ones according to the + interfaces supported by the given object. + */ + public synchronized void SetObject (XAccessibleContext xContext) + { + // Call Destroy at all views to give them a chance to release their + // resources. + int n = getComponentCount(); + for (int i=0; i<n; i++) + ((ObjectView)getComponent(i)).Destroy(); + // Remove existing views. + removeAll (); + + mxContext = xContext; + + // Add new views. + for (int i=0; i<maViewTemplates.size(); i++) + { + try + { + Class aViewClass = (Class)maViewTemplates.elementAt (i); + Method aCreateMethod = aViewClass.getDeclaredMethod ( + "Create", new Class[] { + ObjectViewContainer.class, + XAccessibleContext.class}); + if (aCreateMethod != null) + { + ObjectView aView = (ObjectView) + aCreateMethod.invoke ( + null, new Object[] {this, xContext}); + Add (aView); + } + } + catch (NoSuchMethodException e) + {System.err.println ("Caught exception while creating view " + + i + " : " + e);} + catch (IllegalAccessException e) + {System.err.println ("Caught exception while creating view " + + i + " : " + e);} + catch (InvocationTargetException e) + {System.err.println ("Caught exception while creating view " + + i + " : " + e);} + } + + UpdateLayoutManager (); + + // Now set the object at all views. + n = getComponentCount(); + for (int i=0; i<n; i++) + ((ObjectView)getComponent(i)).SetObject (xContext); + + setPreferredSize (getLayout().preferredLayoutSize (this)); + ((GridBagLayout) getLayout()).invalidateLayout(this); + validate(); + } + + + + + /** Add the given class to the list of classes which will be + instantiated the next time an accessible object is set. + */ + public void RegisterView (Class aObjectViewClass) + { + maViewTemplates.addElement (aObjectViewClass); + } + + + + + /** Replace one view class with another. + */ + public void ReplaceView (Class aObjectViewClass, Class aSubstitution) + { + int nIndex = maViewTemplates.indexOf (aObjectViewClass); + if (nIndex >= 0) + maViewTemplates.setElementAt (aSubstitution, nIndex); + } + + + /** Return a font that should be used for widgets in the views. + */ + public Font GetViewFont () + { + return maFont; + } + + public Color GetErrorColor () + { + return new Color (255,80,50); + } + + /** Add an object view and place it below all previously added views. + @param aView + This argument may be null. In this case nothing happens. + */ + private void Add (ObjectView aView) + { + if (aView != null) + { + GridBagConstraints constraints = new GridBagConstraints (); + constraints.gridx = 0; + constraints.gridy = getComponentCount(); + constraints.gridwidth = 1; + constraints.gridheight = 1; + constraints.weightx = 1; + constraints.weighty = 0; + constraints.ipadx = 2; + constraints.ipady = 5; + constraints.insets = new Insets (5,5,5,5); + constraints.anchor = GridBagConstraints.NORTH; + constraints.fill = GridBagConstraints.HORIZONTAL; + + aView.setBorder ( + BorderFactory.createTitledBorder ( + maViewBorder, aView.GetTitle())); + + add (aView, constraints); + } + } + + /** Update the layout manager by setting the vertical weight of the + bottom entry to 1 and so make it strech to over the available + space. + + */ + private void UpdateLayoutManager () + { + // Adapt the layout manager. + if (getComponentCount() > 1000) + { + Component aComponent = getComponent (getComponentCount()-1); + GridBagLayout aLayout = (GridBagLayout)getLayout(); + GridBagConstraints aConstraints = aLayout.getConstraints (aComponent); + aConstraints.weighty = 1; + aLayout.setConstraints (aComponent, aConstraints); + } + } + + + + + /** Put the event just received into the event queue which will deliver + it soon asynchronuously to the DispatchEvent method. + */ + public void notifyEvent (final AccessibleEventObject aEvent) + { + SwingUtilities.invokeLater( + new Runnable() + { + public void run() + { + DispatchEvent (aEvent); + } + } + ); + } + + + + + /** Forward accessibility events to all views without them being + registered as event listeners each on their own. + */ + private void DispatchEvent (AccessibleEventObject aEvent) + { + int n = getComponentCount(); + for (int i=0; i<n; i++) + ((ObjectView)getComponent(i)).notifyEvent (aEvent); + } + + + + /** When the object is disposed that is displayed by the views of this + container then tell all views about this. + */ + public void disposing (EventObject aEvent) + { + mxContext = null; + SwingUtilities.invokeLater( + new Runnable() + { + public void run() + { + SetObject (null); + } + } + ); + } + + + + + /// The current accessible context display by the views. + private XAccessibleContext mxContext; + + /// Observe this tree for selection changes and notify them to all + /// children. + private JTree maTree; + private Border maViewBorder; + /// List of view templates which are instantiated when new object is set. + private Vector maViewTemplates; + private Font maFont; + private LayoutManager maLayoutManager; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainerWindow.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainerWindow.java new file mode 100644 index 000000000000..8db9af4f46ca --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainerWindow.java @@ -0,0 +1,35 @@ +package org.openoffice.accessibility.awb.view; + +import java.awt.BorderLayout; +import javax.swing.JFrame; +import com.sun.star.accessibility.XAccessibleContext; + + +/** Top level window that creates a single object view container. This + container shows information about a specific accessible object and is + not affected by the selection of the accessbility tree widget. +*/ +public class ObjectViewContainerWindow + extends JFrame +{ + public ObjectViewContainerWindow (XAccessibleContext xContext) + { + setSize (new java.awt.Dimension (300,600)); + + maContainer = new ObjectViewContainer (); + maContainer.SetObject (xContext); + getContentPane().add (maContainer, BorderLayout.CENTER); + + pack (); + setVisible (true); + } + + /** Set the object that is displayed in this window. + */ + public void SetObject (XAccessibleContext xContext) + { + maContainer.SetObject (xContext); + } + + private ObjectViewContainer maContainer; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java new file mode 100644 index 000000000000..a6fb52a40ecb --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java @@ -0,0 +1,181 @@ +/************************************************************************* + * + * $RCSfile: ParentView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:36 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import java.lang.Integer; +import javax.swing.JLabel; +import javax.swing.JTextField; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.lang.IndexOutOfBoundsException; + +import org.openoffice.accessibility.misc.NameProvider; + + +/** Show informations related to the parent/child relationship. +*/ +public class ParentView + extends ObjectView +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + if (xContext != null) + return new ParentView (aContainer); + else + return null; + } + + public ParentView (ObjectViewContainer aContainer) + { + super (aContainer); + + ViewGridLayout aLayout = new ViewGridLayout (this); + maParentLabel = aLayout.AddLabeledEntry ("Has parent: "); + maIndexLabel = aLayout.AddLabeledEntry ("Index in parent: "); + maValidLabel = aLayout.AddLabeledEntry ("Parent/Child relationship valid: "); + maChildrenLabel = aLayout.AddLabeledEntry ("Child count: "); + } + + public void Update () + { + if (mxContext == null) + { + maParentLabel.setText ("<null object>"); + maIndexLabel.setText ("<null object>"); + maValidLabel.setText ("<null object>"); + maChildrenLabel.setText ("<null object>"); + } + else + { + XAccessible xParent = mxContext.getAccessibleParent(); + int nIndex = mxContext.getAccessibleIndexInParent(); + maIndexLabel.setText (Integer.toString(nIndex)); + if (xParent != null) + { + maParentLabel.setText ("yes"); + XAccessibleContext xParentContext = + xParent.getAccessibleContext(); + if (xParentContext != null) + { + try + { + XAccessible xChild = + xParentContext.getAccessibleChild(nIndex); + if (xChild != mxContext) + maValidLabel.setText ("yes"); + else + { + maValidLabel.setText ("no"); + maValidLabel.setBackground (GetContainer().GetErrorColor()); + } + } + catch (IndexOutOfBoundsException e) + { + maValidLabel.setText ("no: invalid index in parent"); + maValidLabel.setBackground (GetContainer().GetErrorColor()); + } + } + else + { + maValidLabel.setText ("no: parent has no context"); + maValidLabel.setBackground (GetContainer().GetErrorColor()); + } + } + else + maParentLabel.setText ("no"); + maChildrenLabel.setText (Integer.toString(mxContext.getAccessibleChildCount())); + } + } + + public String GetTitle () + { + return ("Parent"); + } + + + /** Listen for changes regarding displayed values. + */ + public void notifyEvent (AccessibleEventObject aEvent) + { + switch (aEvent.EventId) + { + default: + Update (); + } + } + + + private JLabel + maParentLabel, + maIndexLabel, + maValidLabel, + maChildrenLabel; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java new file mode 100644 index 000000000000..5967e4ae1ad4 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java @@ -0,0 +1,301 @@ +/************************************************************************* + * + * $RCSfile: SelectionView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:36 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.util.Vector; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; + +import javax.swing.BoxLayout; +import javax.swing.ButtonGroup; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JOptionPane; +import javax.swing.JRadioButton; +import javax.swing.JScrollPane; +import javax.swing.JToggleButton; +import javax.swing.ListSelectionModel; + + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.AccessibleStateType; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleSelection; +import com.sun.star.accessibility.XAccessibleStateSet; + +import com.sun.star.uno.UnoRuntime; +import com.sun.star.lang.IndexOutOfBoundsException; + + +/** Display a list of children and select/deselect buttons +*/ +class SelectionView + extends ObjectView + implements ActionListener +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + XAccessibleSelection xSelection = (XAccessibleSelection)UnoRuntime.queryInterface( + XAccessibleSelection.class, xContext); + if (xSelection != null) + return new SelectionView(aContainer); + else + return null; + } + + public SelectionView (ObjectViewContainer aContainer) + { + super (aContainer); + Layout(); + } + + public String GetTitle () + { + return "Selection"; + } + + /** Create and arrange the widgets for this view. + */ + private void Layout () + { + setLayout (new GridBagLayout()); + + GridBagConstraints aConstraints = new GridBagConstraints(); + + // Label that shows whether the selection is multi selectable. + aConstraints.gridx = 0; + aConstraints.gridy = 0; + aConstraints.anchor = GridBagConstraints.WEST; + maTypeLabel = new JLabel (); + maTypeLabel.setFont (maContainer.GetViewFont()); + add (maTypeLabel, aConstraints); + + // the JListBox + maChildrenSelector = new JPanel (); + maChildrenSelector.setPreferredSize (new Dimension (100,100)); + maChildrenSelector.setLayout ( + new BoxLayout (maChildrenSelector, BoxLayout.Y_AXIS)); + + aConstraints.gridx = 0; + aConstraints.gridwidth = 4; + aConstraints.gridy = 1; + aConstraints.fill = GridBagConstraints.HORIZONTAL; + add (new JScrollPane (maChildrenSelector, + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED), + aConstraints); + + JButton aButton; + aButton = new JButton( "Select all" ); + aButton.setFont (maContainer.GetViewFont()); + aButton.setActionCommand( "Select all" ); + aButton.addActionListener( this ); + aConstraints.gridx = 0; + aConstraints.gridwidth = 1; + aConstraints.gridy = 2; + aConstraints.fill = GridBagConstraints.NONE; + aConstraints.anchor = GridBagConstraints.WEST; + add (aButton, aConstraints); + + aButton = new JButton( "Clear Selection" ); + aButton.setFont (maContainer.GetViewFont()); + aButton.setActionCommand( "Clear Selection" ); + aButton.addActionListener( this ); + aConstraints.gridx = 1; + aConstraints.gridy = 2; + aConstraints.weightx = 1; + add (aButton, aConstraints); + + setSize (getPreferredSize()); + } + + + public void SetObject (XAccessibleContext xContext) + { + mxSelection = (XAccessibleSelection)UnoRuntime.queryInterface( + XAccessibleSelection.class, xContext); + super.SetObject (xContext); + } + + + public void Update () + { + maChildrenSelector.removeAll (); + + // Determine whether multi selection is possible. + XAccessibleStateSet aStateSet = mxContext.getAccessibleStateSet(); + boolean bMultiSelectable = false; + if (aStateSet!=null && aStateSet.contains( + AccessibleStateType.MULTI_SELECTABLE)) + { + bMultiSelectable = true; + maTypeLabel.setText ("multi selectable"); + } + else + { + maTypeLabel.setText ("single selectable"); + } + + if (mxContext.getAccessibleRole() != AccessibleRole.TABLE) + { + int nCount = mxContext.getAccessibleChildCount(); + for (int i=0; i<nCount; i++) + { + try + { + XAccessible xChild = mxContext.getAccessibleChild(i); + XAccessibleContext xChildContext = xChild.getAccessibleContext(); + + String sName = i + " " + xChildContext.getAccessibleName(); + JToggleButton aChild; + aChild = new JCheckBox (sName); + aChild.setFont (maContainer.GetViewFont()); + + XAccessibleStateSet aChildStateSet = + mxContext.getAccessibleStateSet(); + aChild.setSelected (aChildStateSet!=null + && aChildStateSet.contains(AccessibleStateType.SELECTED)); + + aChild.addActionListener (this); + maChildrenSelector.add (aChild); + + } + catch (IndexOutOfBoundsException e) + { + } + } + } + } + + + void SelectAll() + { + mxSelection.selectAllAccessibleChildren(); + } + + void ClearSelection() + { + mxSelection.clearAccessibleSelection(); + } + + + + /** Call the function associated with the pressed button. + */ + public void actionPerformed (ActionEvent aEvent) + { + String sCommand = aEvent.getActionCommand(); + + if (sCommand.equals ("Clear Selection")) + ClearSelection(); + else if (sCommand.equals ("Select all")) + SelectAll(); + else + { + // Extract the child index from the widget text. + String[] aWords = sCommand.split (" "); + int nIndex = Integer.parseInt(aWords[0]); + try + { + if (((JToggleButton)aEvent.getSource()).isSelected()) + mxSelection.selectAccessibleChild (nIndex); + else + mxSelection.deselectAccessibleChild (nIndex); + } + catch (IndexOutOfBoundsException e) + { + System.err.println ( + "caught exception while changing selection: " + e); + } + } + } + + + public void notifyEvent (AccessibleEventObject aEvent) + { + switch (aEvent.EventId) + { + case AccessibleEventId.SELECTION_CHANGED: + case AccessibleEventId.STATE_CHANGED: + case AccessibleEventId.CHILD: + Update (); + } + } + + private JPanel maChildrenSelector; + private XAccessibleSelection mxSelection; + private JLabel maTypeLabel; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java new file mode 100644 index 000000000000..7c41ff01c97e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java @@ -0,0 +1,150 @@ +package org.openoffice.accessibility.awb.view; + +import java.awt.GridLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import java.lang.Integer; +import javax.swing.JScrollPane; +import javax.swing.JTree; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeModel; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XTypeProvider; +import com.sun.star.uno.Type; +import com.sun.star.uno.UnoRuntime; + +import org.openoffice.accessibility.misc.NameProvider; + + +/** Show all supported services and interfaces. +*/ +public class ServiceInterfaceView + extends ObjectView +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + if (xContext != null) + return new ServiceInterfaceView (aContainer); + else + return null; + } + + + + + public ServiceInterfaceView (ObjectViewContainer aContainer) + { + super (aContainer); + + maImplementationNameRoot = new DefaultMutableTreeNode ("Implementation Name"); + maServiceRoot = new DefaultMutableTreeNode ("Supported Services"); + maInterfaceRoot = new DefaultMutableTreeNode ("Supported Interfaces"); + maTree = new JTree (new DefaultMutableTreeNode[] + {maServiceRoot,maInterfaceRoot}); + JScrollPane aScrollPane = new JScrollPane ( + maTree, + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + + setMinimumSize (new Dimension(300,200)); + setLayout (new GridLayout (1,1)); + add (aScrollPane); + } + + + + + public void Update () + { + DefaultTreeModel aModel = (DefaultTreeModel)maTree.getModel(); + + // Clear old tree. + DefaultMutableTreeNode aRoot =(DefaultMutableTreeNode)aModel.getRoot(); + aRoot.removeAllChildren(); + + // Create the new tree. + CreateImplementationNameTree (); + CreateServiceTree (); + CreateInterfaceTree (); + aRoot.add (maImplementationNameRoot); + aRoot.add (maServiceRoot); + aRoot.add (maInterfaceRoot); + aModel.setRoot (aRoot); + + // Expand whole tree. + for (int i=0; i<maTree.getRowCount(); i++) + maTree.expandRow (i); + } + + private void CreateImplementationNameTree () + { + XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface( + XServiceInfo.class, mxContext); + maImplementationNameRoot.removeAllChildren(); + if (xServiceInfo != null) + { + maImplementationNameRoot.add ( + new DefaultMutableTreeNode ( + (xServiceInfo!=null + ? xServiceInfo.getImplementationName() + : "<XServiceInfo not supported>"))); + } + } + + private void CreateServiceTree () + { + XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface( + XServiceInfo.class, mxContext); + maServiceRoot.removeAllChildren(); + if (xServiceInfo != null) + { + String[] aServiceNames = xServiceInfo.getSupportedServiceNames(); + int nCount = aServiceNames.length; + for (int i=0; i<nCount; i++) + maServiceRoot.add ( + new DefaultMutableTreeNode (aServiceNames[i])); + } + else + maServiceRoot.add ( + new DefaultMutableTreeNode("XServiceInfo not supported")); + } + + private void CreateInterfaceTree () + { + XTypeProvider xTypeProvider = (XTypeProvider)UnoRuntime.queryInterface( + XTypeProvider.class, mxContext); + maInterfaceRoot.removeAllChildren(); + if (xTypeProvider != null) + { + Type[] aTypes = xTypeProvider.getTypes(); + int nCount = aTypes.length; + for (int i=0; i<nCount; i++) + maInterfaceRoot.add ( + new DefaultMutableTreeNode (aTypes[i].getTypeName())); + } + else + maInterfaceRoot.add ( + new DefaultMutableTreeNode("XTypeProvider not supported")); + } + + public String GetTitle () + { + return ("Supported Services and Interfaces"); + } + + + private JTree maTree; + private DefaultMutableTreeNode maImplementationNameRoot; + private DefaultMutableTreeNode maServiceRoot; + private DefaultMutableTreeNode maInterfaceRoot; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java new file mode 100644 index 000000000000..a0d6e289156d --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java @@ -0,0 +1,233 @@ +/************************************************************************* + * + * $RCSfile: StateSetView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:37 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.Rectangle; +import java.awt.RenderingHints; +import java.awt.geom.AffineTransform; + + + +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleStateType; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleStateSet; + +import org.openoffice.accessibility.misc.NameProvider; + +public class StateSetView + extends ObjectView +{ + /** Create a FocusView when the given object supports the + XAccessibleComponent interface. + */ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + ObjectView aView = null; + if (xContext != null) + aView = new StateSetView (aContainer); + + return aView; + } + + public StateSetView (ObjectViewContainer aContainer) + { + super (aContainer); + setPreferredSize (new Dimension(300,110)); + setMinimumSize (new Dimension(200,80)); + } + + public String GetTitle () + { + return ("StateSet"); + } + + public void notifyEvent (AccessibleEventObject aEvent) + { + if (aEvent.EventId == AccessibleEventId.STATE_CHANGED) + Update(); + } + + + public void Update () + { + repaint (); + } + + public void paintChildren (Graphics g) + { + if (g != null) + synchronized (g) + { + super.paintChildren (g); + + // Calculcate the are inside the border. + Insets aInsets = getInsets (); + Dimension aSize = getSize(); + Rectangle aWidgetArea = new Rectangle ( + aInsets.left, + aInsets.top, + aSize.width-aInsets.left-aInsets.right, + aSize.height-aInsets.top-aInsets.bottom); + + PaintAllStates ((Graphics2D)g, aWidgetArea); + } + } + + private void PaintAllStates (Graphics2D g, Rectangle aWidgetArea) + { + Color aTextColor = g.getColor(); + + g.setRenderingHint ( + RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + + XAccessibleStateSet xStateSet = ( mxContext != null ) ? mxContext.getAccessibleStateSet() : null; + if (xStateSet != null) + { + short aStates[] = xStateSet.getStates (); + final int nMaxStateIndex = AccessibleStateType.VISIBLE;//MANAGES_DESCENDANTS; + int nStateWidth = (aWidgetArea.width-12) / (nMaxStateIndex+1); + AffineTransform aTransform = g.getTransform (); + g.setColor (aTextColor); + int y = aWidgetArea.y+aWidgetArea.height - 25; + double nTextRotation = -0.9;//-java.lang.Math.PI/2; + double nScale = 0.6; + + // Create a shape for the boxes. + int nBoxWidth = 8; + Rectangle aCheckBox = new Rectangle (-nBoxWidth/2,0,nBoxWidth,nBoxWidth); + + // For each state draw a box, fill it appropriately, and draw + // thre states name. + for (short i=0; i<=nMaxStateIndex; i++) + { + int x = nStateWidth + i * nStateWidth; + String sStateName = NameProvider.getStateName (i); + if (sStateName == null) + sStateName = new String ("<unknown state " + i + ">"); + boolean bStateSet = xStateSet.contains (i); + g.setTransform (aTransform); + g.translate (x,y); + if (bStateSet) + { + switch (i) + { + case AccessibleStateType.INVALID: + case AccessibleStateType.DEFUNC: + g.setColor (saInvalidColor); + break; + case AccessibleStateType.FOCUSED: + g.setColor (saFocusColor); + break; + case AccessibleStateType.SELECTED: + g.setColor (saSelectionColor); + break; + case AccessibleStateType.EDITABLE: + g.setColor (saEditColor); + break; + default: + g.setColor (saDefaultColor); + break; + } + g.fill (aCheckBox); + g.setColor (aTextColor); + } + g.draw (aCheckBox); + g.rotate (nTextRotation); + g.scale (nScale, nScale); + g.translate (2,-2); + g.drawString (sStateName, 0,0); + } + + // Draw string of set states. + String sStates = new String (); + for (int i=0; i<aStates.length; i++) + { + if (i > 0) + sStates = sStates + ", "; + sStates = sStates + NameProvider.getStateName(aStates[i]); + } + g.setTransform (aTransform); + g.translate (10,aWidgetArea.y+aWidgetArea.height-3); + g.scale (0.9,0.9); + g.drawString (sStates,0,0); + } + } + + static private Color + saInvalidColor = new Color (255,0,255), + saFocusColor = new Color (100,100,255), + saSelectionColor = Color.GREEN, + saDefaultColor = new Color (90,90,90), + saEditColor = new Color (240,240,0); +} + + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java new file mode 100644 index 000000000000..ad185ce86f7b --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java @@ -0,0 +1,195 @@ +/************************************************************************* + * + * $RCSfile: TableView.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:37 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.lang.Integer; +import java.lang.StringBuffer; + +import javax.swing.JLabel; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleTable; +import com.sun.star.uno.UnoRuntime; + + + +/** The <type>ContextView</type> class displays information accessible over + the <type>XAccessibleContext</type> interface. This includes name, + description, and role. +*/ +public class TableView + extends ObjectView +{ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + if (UnoRuntime.queryInterface( + XAccessibleTable.class, xContext) != null) + return new TableView (aContainer); + else + return null; + } + + public TableView (ObjectViewContainer aContainer) + { + super (aContainer); + + ViewGridLayout aLayout = new ViewGridLayout (this); + + maRowCountLabel = aLayout.AddLabeledEntry ("Row Count: "); + maColumnCountLabel = aLayout.AddLabeledEntry ("Column Count: "); + maCellCountLabel = aLayout.AddLabeledEntry ("Cell Count: "); + maSelectedRowsLabel = aLayout.AddLabeledEntry ("Selected Rows: "); + maSelectedColumnsLabel = aLayout.AddLabeledEntry ("Selected Columns: "); + } + + + public void SetObject (XAccessibleContext xContext) + { + mxTable = (XAccessibleTable)UnoRuntime.queryInterface( + XAccessibleTable.class, xContext); + super.SetObject (xContext); + } + + + public void Update () + { + if (mxTable == null) + { + maRowCountLabel.setText ("<null object>"); + maColumnCountLabel.setText ("<null object>"); + maCellCountLabel.setText ("<null object>"); + maSelectedRowsLabel.setText ("<null object>"); + maSelectedColumnsLabel.setText ("<null object>"); + } + else + { + int nRowCount = mxTable.getAccessibleRowCount(); + int nColumnCount = mxTable.getAccessibleColumnCount(); + maRowCountLabel.setText (Integer.toString (nRowCount)); + maColumnCountLabel.setText (Integer.toString (nColumnCount)); + maCellCountLabel.setText (Integer.toString (nRowCount*nColumnCount)); + + StringBuffer sList = new StringBuffer(); + int[] aSelected = mxTable.getSelectedAccessibleRows(); + boolean bFirst = true; + for (int i=0; i<aSelected.length; i++) + { + if ( ! bFirst) + { + sList.append (", "); + bFirst = false; + } + sList.append (Integer.toString(aSelected[i])); + } + maSelectedRowsLabel.setText (sList.toString()); + sList = new StringBuffer(); + aSelected = mxTable.getSelectedAccessibleColumns(); + bFirst = true; + for (int i=0; i<aSelected.length; i++) + { + if ( ! bFirst) + { + sList.append (", "); + bFirst = false; + } + sList.append (Integer.toString(aSelected[i])); + } + maSelectedColumnsLabel.setText (sList.toString()); + } + } + + + + + public String GetTitle () + { + return ("Table"); + } + + + + + /** Listen for changes regarding displayed values. + */ + public void notifyEvent (AccessibleEventObject aEvent) + { + switch (aEvent.EventId) + { + case AccessibleEventId.TABLE_MODEL_CHANGED : + case AccessibleEventId.SELECTION_CHANGED: + Update (); + } + } + + private XAccessibleTable mxTable; + private JLabel + maRowCountLabel, + maColumnCountLabel, + maCellCountLabel, + maSelectedRowsLabel, + maSelectedColumnsLabel; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java new file mode 100644 index 000000000000..56f4c8758e61 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java @@ -0,0 +1,501 @@ +/************************************************************************* + * + * $RCSfile: TextView.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2008/05/14 13:21:35 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSpinner; +import javax.swing.JTree; +import javax.swing.tree.TreeNode; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.MutableTreeNode; + +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.AccessibleTextType; +import com.sun.star.accessibility.AccessibleStateType; +import com.sun.star.accessibility.TextSegment; +import com.sun.star.accessibility.XAccessibleText; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleMultiLineText; +import com.sun.star.accessibility.XAccessibleStateSet; +import com.sun.star.awt.Point; +import com.sun.star.awt.Rectangle; +import com.sun.star.beans.PropertyValue; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.uno.UnoRuntime; + +import org.openoffice.accessibility.awb.view.text.CaretSpinnerModel; +import org.openoffice.accessibility.awb.view.text.TextDialogFactory; + + +public class TextView + extends ObjectView + implements ActionListener +{ + + /** Create a TextView when the given object supports the + XAccessibleText interface. + */ + static public ObjectView Create ( + ObjectViewContainer aContainer, + XAccessibleContext xContext) + { + XAccessibleText xText = (XAccessibleText)UnoRuntime.queryInterface( + XAccessibleText.class, xContext); + if (xText != null) + return new TextView (aContainer); + else + return null; + } + + + public TextView (ObjectViewContainer aContainer) + { + super (aContainer); + + ViewGridLayout aLayout = new ViewGridLayout (this); + + maTextLabel = aLayout.AddLabeledString ("Text: "); + maCharacterArrayLabel = aLayout.AddLabeledEntry ("Characters: "); + maCharacterCountLabel = aLayout.AddLabeledEntry ("Character Count: "); + maSelectionLabel = aLayout.AddLabeledEntry ("Selection: "); + maBoundsLabel = aLayout.AddLabeledEntry ("Bounds Test: "); + maCaretPositionSpinner = (JSpinner)aLayout.AddLabeledComponent ( + "Caret position:", new JSpinner()); + Dimension aSize = maCaretPositionSpinner.getSize(); + maCaretPositionSpinner.setPreferredSize (new Dimension (100,20)); + maCaretLineNoLabel = aLayout.AddLabeledEntry ("Line number at caret: "); + maCaretLineTextLabel = aLayout.AddLabeledEntry ("Text of line at caret: "); + maLineNoFromCaretPosLabel = aLayout.AddLabeledEntry ("Line number at index of caret: "); + maLineTextFromCaretPosLabel = aLayout.AddLabeledEntry ("Text of line at index of caret: "); + + JPanel aButtonPanel = new JPanel (); + aLayout.AddComponent (aButtonPanel); + + JButton aButton = new JButton ("select..."); + aButton.setFont (aLayout.GetFont()); + aButton.addActionListener (this); + aButtonPanel.add (aButton); + + aButton = new JButton ("copy..."); + aButton.setFont (aLayout.GetFont()); + aButton.addActionListener (this); + aButtonPanel.add (aButton); + + // A tree that holds the text broken down into various segments. + maTree = new JTree (); + aLayout.AddComponent (new JScrollPane ( + maTree, + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)); + } + + + /** Additionally to the context store a reference to the + XAccessibleText interface. + */ + public void SetObject (XAccessibleContext xObject) + { + mxText = (XAccessibleText)UnoRuntime.queryInterface( + XAccessibleText.class, xObject); + maCaretSpinnerModel = new CaretSpinnerModel(mxText); + maCaretPositionSpinner.setModel (maCaretSpinnerModel); + super.SetObject (xObject); + } + + synchronized public void Destroy () + { + mxText = null; + super.Destroy(); + } + + synchronized public void Update () + { + maCaretPositionSpinner.setEnabled (mxText != null); + DefaultMutableTreeNode aRoot = new DefaultMutableTreeNode ("Text Segments"); + if (mxText == null) + { + maTextLabel.setText ("<null object>"); + maCharacterArrayLabel.setText ("<null object>"); + maCharacterCountLabel.setText ("<null object>"); + maSelectionLabel.setText ("<null object>"); + maBoundsLabel.setText ("<null object>"); + maCaretLineNoLabel.setText ("<null object>"); + maCaretLineTextLabel.setText ("<null object>"); + maLineNoFromCaretPosLabel.setText ("<null object>"); + maLineTextFromCaretPosLabel.setText ("<null object>"); + } + else + { + maTextLabel.setText (mxText.getText()); + maCharacterArrayLabel.setText (GetCharacterArray()); + maCharacterCountLabel.setText ( + Integer.toString(mxText.getCharacterCount())); + // Selection. + maSelectionLabel.setText ( + "[" + mxText.getSelectionStart() + + "," + mxText.getSelectionEnd() + + "] \"" + mxText.getSelectedText() + "\""); + + // Character bounds. + maBoundsLabel.setText (GetTextBoundsString()); + + // Caret position. + maCaretPositionSpinner.setValue (new Integer (mxText.getCaretPosition())); + + // Multi line methods. + XAccessibleMultiLineText xMultiText = (XAccessibleMultiLineText) + UnoRuntime.queryInterface( XAccessibleMultiLineText.class, mxText ); + + if( null != xMultiText ) { + try { + maCaretLineNoLabel.setText ( Integer.toString( xMultiText.getNumberOfLineWithCaret() ) ); + TextSegment ts = xMultiText.getTextAtLineWithCaret(); + maCaretLineTextLabel.setText ( "[" + ts.SegmentStart + + "," + ts.SegmentEnd + + "] \"" + ts.SegmentText + "\""); + maLineNoFromCaretPosLabel.setText ( Integer.toString( xMultiText.getLineNumberAtIndex( mxText.getCaretPosition() ) ) ); + ts = xMultiText.getTextAtLineNumber(xMultiText.getLineNumberAtIndex( mxText.getCaretPosition() ) ); + maLineTextFromCaretPosLabel.setText ( "[" + ts.SegmentStart + + "," + ts.SegmentEnd + + "] \"" + ts.SegmentText + "\""); + } catch( IndexOutOfBoundsException e) { + } + } + + // Text segments. + aRoot.add (CreateNode ("Character", AccessibleTextType.CHARACTER)); + aRoot.add (CreateNode ("Word", AccessibleTextType.WORD)); + aRoot.add (CreateNode ("Sentence", AccessibleTextType.SENTENCE)); + aRoot.add (CreateNode ("Paragraph", AccessibleTextType.PARAGRAPH)); + aRoot.add (CreateNode ("Line", AccessibleTextType.LINE)); + aRoot.add (CreateNode ("Attribute", AccessibleTextType.ATTRIBUTE_RUN)); + aRoot.add (CreateNode ("Glyph", AccessibleTextType.GLYPH)); + } + ((DefaultTreeModel)maTree.getModel()).setRoot (aRoot); + } + + public String GetTitle () + { + return ("Text"); + } + + public void notifyEvent (AccessibleEventObject aEvent) + { + System.out.println (aEvent); + switch (aEvent.EventId) + { + case AccessibleEventId.CARET_CHANGED : + maCaretSpinnerModel.Update(); + Update (); + break; + + case AccessibleEventId.TEXT_CHANGED : + case AccessibleEventId.TEXT_SELECTION_CHANGED: + Update (); + break; + } + } + + public void actionPerformed (ActionEvent aEvent) + { + String sCommand = aEvent.getActionCommand(); + if (sCommand.equals ("select...")) + TextDialogFactory.CreateSelectionDialog (mxContext); + else if (sCommand.equals ("copy...")) + TextDialogFactory.CreateCopyDialog (mxContext); + } + + + + /** Create a string that is a list of all characters returned by the + getCharacter() method. + */ + private String GetCharacterArray () + { + // Do not show more than 30 characters. + int nCharacterCount = mxText.getCharacterCount(); + int nMaxDisplayCount = 30; + + // build up string + StringBuffer aCharacterArray = new StringBuffer(); + int nIndex = 0; + try + { + while (nIndex<nCharacterCount && nIndex<nMaxDisplayCount) + { + aCharacterArray.append (mxText.getCharacter (nIndex)); + if (nIndex < nCharacterCount-1) + aCharacterArray.append (","); + nIndex ++; + } + if (nMaxDisplayCount < nCharacterCount) + aCharacterArray.append (", ..."); + } + catch (IndexOutOfBoundsException e) + { + aCharacterArray.append ("; Index Out Of Bounds at index " + nIndex); + } + + return aCharacterArray.toString(); + } + + + + /** Iterate over all characters and translate their positions + back and forth. + */ + private String GetTextBoundsString () + { + StringBuffer aBuffer = new StringBuffer (); + try + { + // Iterate over all characters in the text. + int nCount = mxText.getCharacterCount(); + for (int i=0; i<nCount; i++) + { + // Get bounds for this character. + Rectangle aBBox = mxText.getCharacterBounds (i); + + // get the character by 'clicking' into the middle of + // the bounds + Point aMiddle = new Point(); + aMiddle.X = aBBox.X + (aBBox.Width / 2) - 1; + aMiddle.Y = aBBox.Y + (aBBox.Height / 2) - 1; + int nIndex = mxText.getIndexAtPoint (aMiddle); + + // get the character, or a '#' for an illegal index + if ((nIndex >= 0) && (nIndex < mxText.getCharacter(i))) + aBuffer.append (mxText.getCharacter(nIndex)); + else + aBuffer.append ('#'); + } + } + catch (IndexOutOfBoundsException aEvent) + { + // Ignore errors. + } + + return aBuffer.toString(); + } + + + + + private final static int BEFORE = -1; + private final static int AT = 0; + private final static int BEHIND = +1; + + private MutableTreeNode CreateNode (String sTitle, short nTextType) + { + DefaultMutableTreeNode aNode = new DefaultMutableTreeNode (sTitle); + + aNode.add (CreateSegmentNode ("Before", nTextType, BEFORE)); + aNode.add (CreateSegmentNode ("At", nTextType, AT)); + aNode.add (CreateSegmentNode ("Behind", nTextType, BEHIND)); + + return aNode; + } + + private MutableTreeNode CreateSegmentNode (String sTitle, short nTextType, int nWhere) + { + TextSegment aSegment; + int nTextLength = mxText.getCharacterCount(); + DefaultMutableTreeNode aNode = new DefaultMutableTreeNode (sTitle); + for (int nIndex=0; nIndex<=nTextLength; /* empty */) + { + aSegment = GetTextSegment (nIndex, nTextType, nWhere); + DefaultMutableTreeNode aSegmentNode = new DefaultMutableTreeNode ( + new StringBuffer ( + Integer.toString (nIndex) + " -> " + + Integer.toString (aSegment.SegmentStart) + " - " + + Integer.toString (aSegment.SegmentEnd) + " : " + + aSegment.SegmentText.toString())); + aNode.add (aSegmentNode); + if (nTextType == AccessibleTextType.ATTRIBUTE_RUN) + AddAttributeNodes (aSegmentNode, aSegment); + if (aSegment.SegmentEnd > nIndex) + nIndex = aSegment.SegmentEnd; + else + nIndex ++; + } + + return aNode; + } + + + private TextSegment GetTextSegment (int nIndex, short nTextType, int nWhere) + { + TextSegment aSegment; + + try + { + switch (nWhere) + { + case BEFORE: + aSegment = mxText.getTextBeforeIndex (nIndex, nTextType); + break; + + case AT: + aSegment = mxText.getTextAtIndex (nIndex, nTextType); + break; + + case BEHIND: + aSegment = mxText.getTextBehindIndex (nIndex, nTextType); + break; + + default: + aSegment = new TextSegment(); + aSegment.SegmentText = new String ("unknown position " + nWhere); + aSegment.SegmentStart = nIndex; + aSegment.SegmentStart = nIndex+1; + break; + } + } + catch (IndexOutOfBoundsException aException) + { + aSegment = new TextSegment (); + aSegment.SegmentText = new String ("Invalid index at ") + nIndex + " : " + + aException.toString(); + aSegment.SegmentStart = nIndex; + aSegment.SegmentEnd = nIndex+1; + } + catch (IllegalArgumentException aException) + { + aSegment = new TextSegment (); + aSegment.SegmentText = new String ("Illegal argument at ") + nIndex + " : " + + aException.toString(); + aSegment.SegmentStart = nIndex; + aSegment.SegmentEnd = nIndex+1; + } + + return aSegment; + } + + + /** Add to the given node one node for every attribute of the given segment. + */ + private void AddAttributeNodes ( + DefaultMutableTreeNode aNode, + TextSegment aSegment) + { + try + { + PropertyValue[] aValues = mxText.getCharacterAttributes ( + aSegment.SegmentStart, aAttributeList); + for (int i=0; i<aValues.length; i++) + aNode.add (new DefaultMutableTreeNode ( + aValues[i].Name + ": " + aValues[i].Value)); + } + catch (IndexOutOfBoundsException aException) + { + aNode.add (new DefaultMutableTreeNode ( + "caught IndexOutOfBoundsException while retrieveing attributes")); + } + } + + private XAccessibleText mxText; + private JLabel + maTextLabel, + maCharacterArrayLabel, + maCharacterCountLabel, + maSelectionLabel, + maBoundsLabel, + maCaretLineNoLabel, + maCaretLineTextLabel, + maLineNoFromCaretPosLabel, + maLineTextFromCaretPosLabel; + + private JSpinner maCaretPositionSpinner; + private JTree maTree; + private CaretSpinnerModel maCaretSpinnerModel; + + private static String[] aAttributeList = new String[] { + "CharBackColor", + "CharColor", + "CharEscapement", + "CharHeight", + "CharPosture", + "CharStrikeout", + "CharUnderline", + "CharWeight", + "ParaAdjust", + "ParaBottomMargin", + "ParaFirstLineIndent", + "ParaLeftMargin", + "ParaLineSpacing", + "ParaRightMargin", + "ParaTabStops"}; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java new file mode 100644 index 000000000000..e4f020a51455 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java @@ -0,0 +1,151 @@ +/************************************************************************* + * + * $RCSfile: ViewGridLayout.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:38 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.GridBagLayout; +import java.awt.GridBagConstraints; +import javax.swing.JComponent; +import javax.swing.JLabel; + + +/** This class is a convenience class for views to use the GridBagLayout. +*/ +class ViewGridLayout +{ + public ViewGridLayout (JComponent aComponent) + { + maComponent = aComponent; + maComponent.setLayout (new GridBagLayout()); + maComponent.setMinimumSize (new Dimension (300,30)); + maComponent.setMaximumSize (new Dimension (300,1000)); + mnCurrentLine = 0; + } + + public JLabel AddLabeledEntry (String sTitle) + { + return (JLabel)AddLabeledComponent (sTitle, new JLabel ("")); + } + + public JLabel AddLabeledString (String sTitle) + { + JLabel aLabel = AddLabeledEntry (sTitle); + aLabel.setBackground (new Color(220,220,220)); + aLabel.setOpaque (true); + return aLabel; + } + + public JComponent AddLabeledComponent (String sTitle, JComponent aComponent) + { + GridBagConstraints constraints = new GridBagConstraints (); + constraints.gridx = 0; + constraints.anchor = GridBagConstraints.WEST; + constraints.fill = GridBagConstraints.NONE; + constraints.gridy = mnCurrentLine; + + JLabel aLabel = new JLabel(sTitle); + aLabel.setFont (saFont); + maComponent.add (aLabel, constraints); + constraints.gridx = 1; + constraints.weightx = 1; + constraints.fill = GridBagConstraints.NONE; + aComponent.setFont (saFont); + maComponent.add (aComponent, constraints); + + mnCurrentLine += 1; + + return aComponent; + } + + public JComponent AddComponent (JComponent aComponent) + { + GridBagConstraints constraints = new GridBagConstraints (); + constraints.gridx = 0; + constraints.gridwidth = 2; + constraints.weightx = 1; + constraints.anchor = GridBagConstraints.WEST; + constraints.fill = GridBagConstraints.HORIZONTAL; + constraints.gridy = mnCurrentLine; + + maComponent.add (aComponent, constraints); + + mnCurrentLine += 1; + + return aComponent; + } + + static public Font GetFont () + { + return saFont; + } + + static private Font saFont; + private int mnCurrentLine; + private JComponent maComponent; + + static + { + saFont = new Font ("Dialog", Font.PLAIN, 11); + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common new file mode 100644 index 000000000000..d4929e3f1cd8 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common @@ -0,0 +1,76 @@ +#************************************************************************* +# +# $RCSfile: makefile.common,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar +JAVAFILES = \ + ComponentView.java \ + ContextView.java \ + EditableTextView.java \ + EventMonitorView.java \ + FocusView.java \ + LayoutManager.java \ + ObjectView.java \ + ObjectViewContainer.java \ + ObjectViewContainerWindow.java \ + ParentView.java \ + SelectionView.java \ + ServiceInterfaceView.java \ + StateSetView.java \ + TableView.java \ + TextView.java \ + ViewGridLayout.java diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.mk b/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.mk new file mode 100644 index 000000000000..c8ddd587635a --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = awb +PRJ = ..$/..$/..$/..$/..$/.. +TARGET = awb_view +PACKAGE = org$/openoffice$/accessibility$/awb$/view + +USE_JAVAVER:=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(JAVAVER:s/.//)" >= "140" + +.INCLUDE : makefile.common + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +.ENDIF + +# --- Targets ------------------------------------------------------ + + +.INCLUDE : target.mk + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java new file mode 100644 index 000000000000..6289697ee375 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java @@ -0,0 +1,156 @@ +/************************************************************************* + * + * $RCSfile: CaretSpinnerModel.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obr $ $Date: 2008/05/14 13:21:37 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view.text; + +import java.lang.Integer; +import java.util.Vector; +import javax.swing.SpinnerModel; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import com.sun.star.accessibility.XAccessibleText; +import com.sun.star.lang.IndexOutOfBoundsException; + + +/** A simple model for JSpinner objects that clips the spinner values to valid + text indices. +*/ +public class CaretSpinnerModel + implements SpinnerModel +{ + public CaretSpinnerModel (XAccessibleText xText) + { + mxText = xText; + maListeners = new Vector (); + } + + public void addChangeListener (ChangeListener aListener) + { + if (aListener != null) + maListeners.add (aListener); + } + + public void removeChangeListener (ChangeListener aListener) + { + maListeners.removeElement (aListener); + } + + public Object getNextValue () + { + if (mxText != null) + { + int nPosition = mxText.getCaretPosition(); + if (nPosition+1 <= mxText.getCharacterCount()) + return new Integer (nPosition+1); + } + return null; + } + + public Object getPreviousValue () + { + if (mxText != null) + { + int nPosition = mxText.getCaretPosition(); + if (nPosition > 0) + return new Integer (nPosition-1); + } + return null; + } + + public Object getValue () + { + if (mxText != null) + return new Integer (mxText.getCaretPosition()); + else + return null; + } + + public void setValue (Object aValue) + { + if (mxText != null) + if (aValue instanceof Integer) + { + try + { + if( ((Integer)aValue).intValue() != mxText.getCaretPosition() ) + mxText.setCaretPosition (((Integer)aValue).intValue()); + } + catch (IndexOutOfBoundsException aException) + { + } + } + } + + /** Call this method when the caret position has changes so that the model + can inform its listeners about it. + */ + public void Update () + { + ChangeEvent aEvent = new ChangeEvent (this); + for (int i=0; i<maListeners.size(); i++) + ((ChangeListener)maListeners.elementAt(i)).stateChanged (aEvent); + } + + private XAccessibleText mxText; + private Integer maValue; + private Vector maListeners; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/Makefile b/accessibility/workben/org/openoffice/accessibility/awb/view/text/Makefile new file mode 100644 index 000000000000..c58899a09f6e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/Makefile @@ -0,0 +1,13 @@ +# $Id: Makefile,v 1.1 2003/06/13 16:30:41 af Exp $ + +all : package + +ROOT=../../../../.. +PACKAGE = org.openoffice.accessibility.awb.view.text +SUBDIRS = +include makefile.common + +include $(ROOT)/makefile.in + + +package : $(CLASS_FILES) diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java new file mode 100644 index 000000000000..420119515a41 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java @@ -0,0 +1,242 @@ +/************************************************************************* + * + * $RCSfile: TextActionDialog.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:42 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view.text; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.FlowLayout; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.text.JTextComponent; + +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleText; +import com.sun.star.accessibility.XAccessibleEditableText; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.uno.UnoRuntime; + + +/** + * Display a dialog with a text field and a pair of cancel/do-it buttons + */ +class TextActionDialog + extends JDialog + implements ActionListener +{ + public TextActionDialog ( + XAccessibleContext xContext, + String sExplanation, + String sTitle) + { + super();// AccessibilityWorkBench.Instance() ); + + mxContext = xContext; + msTitle = sTitle; + msExplanation = sExplanation; + Layout (); + setSize (350, 225); + + } + + + /** build dialog */ + protected void Layout() + { + setTitle (msTitle); + + // vertical stacking of the elements + Container aContent = getContentPane(); + // aContent.setLayout( new BorderLayout() ); + + // Label with explanation. + if (msExplanation.length() > 0) + aContent.add (new JLabel (msExplanation), BorderLayout.NORTH); + + // the text field + maText = new JTextArea(); + maText.setLineWrap (true); + maText.setEditable (false); + aContent.add (maText, BorderLayout.CENTER); + + XAccessibleText xText = (XAccessibleText)UnoRuntime.queryInterface( + XAccessibleText.class, mxContext); + String sText = xText.getText(); + maText.setText (sText); + maText.setRows (sText.length() / 40 + 1); + maText.setColumns (Math.min (Math.max (40, sText.length()), 20)); + + JPanel aButtons = new JPanel(); + aButtons.setLayout (new FlowLayout()); + maIndexToggle = new JCheckBox ("reverse selection"); + aButtons.add (maIndexToggle); + + JButton aActionButton = new JButton (msTitle); + aActionButton.setActionCommand ("Action"); + aActionButton.addActionListener (this); + aButtons.add (aActionButton); + + JButton aCancelButton = new JButton ("cancel"); + aCancelButton.setActionCommand ("Cancel"); + aCancelButton.addActionListener (this); + aButtons.add (aCancelButton); + + // add Panel with buttons + aContent.add (aButtons, BorderLayout.SOUTH); + } + + protected void Cancel() + { + hide(); + dispose(); + } + + public void actionPerformed(ActionEvent e) + { + String sCommand = e.getActionCommand(); + + if( "Cancel".equals( sCommand ) ) + Cancel(); + else if( "Action".equals( sCommand ) ) + Action(); + } + + + protected int GetSelectionStart() + { + return GetSelection(true); + } + protected int GetSelectionEnd() + { + return GetSelection(false); + } + private int GetSelection (boolean bStart) + { + if (bStart ^ maIndexToggle.isSelected()) + return maText.getSelectionStart(); + else + return maText.getSelectionEnd(); + } + + + + protected void Action () + { + String sError = null; + boolean bSuccess = true; + try + { + XAccessibleText xText = + (XAccessibleText)UnoRuntime.queryInterface( + XAccessibleText.class, mxContext); + if (xText != null) + bSuccess = bSuccess && TextAction (xText); + + XAccessibleEditableText xEditableText = + (XAccessibleEditableText)UnoRuntime.queryInterface( + XAccessibleEditableText.class, mxContext); + if (xEditableText != null) + bSuccess = bSuccess && EditableTextAction (xEditableText); + + if ( ! bSuccess) + sError = "Can't execute"; + } + catch (IndexOutOfBoundsException e) + { + sError = "Index out of bounds"; + } + + if (sError != null) + JOptionPane.showMessageDialog ( + this,// AccessibilityWorkBench.Instance(), + sError, + msTitle, + JOptionPane.ERROR_MESSAGE); + + Cancel(); + } + + /** override this for dialog-specific action */ + boolean TextAction (XAccessibleText xText) + throws IndexOutOfBoundsException + { + return true; + } + + boolean EditableTextAction (XAccessibleEditableText xText) + throws IndexOutOfBoundsException + { + return true; + } + + private XAccessibleContext mxContext; + protected JTextArea maText; + private String msTitle; + private String msExplanation; + private JCheckBox maIndexToggle; +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java new file mode 100644 index 000000000000..36d81162462c --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java @@ -0,0 +1,213 @@ +/************************************************************************* + * + * $RCSfile: TextAttributeDialog.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:42 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view.text; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.BoxLayout; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JColorChooser; +import javax.swing.JPanel; +import javax.swing.text.JTextComponent; + +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEditableText; +import com.sun.star.beans.PropertyValue; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.uno.UnoRuntime; + + +class TextAttributeDialog + extends TextActionDialog +{ + public TextAttributeDialog (XAccessibleContext xContext) + { + super (xContext, + "Choose attributes, select text, and press 'Set':", + "set"); + } + + protected void Layout () + { + super.Layout (); + + maForeground = Color.black; + maBackground = Color.white; + + JPanel aPanel = new JPanel(); + aPanel.setLayout (new BoxLayout (aPanel, BoxLayout.Y_AXIS)); + + maBoldCheckBox = new JCheckBox ("bold"); + maUnderlineCheckBox = new JCheckBox ("underline"); + maItalicsCheckBox = new JCheckBox ("italics"); + + JButton aForegroundButton = new JButton ("Foreground", + new TextAttributeDialog.ColorIcon(true)); + aForegroundButton.addActionListener (new ActionListener() + { + public void actionPerformed (ActionEvent aEvent) + { + maForeground = JColorChooser.showDialog ( + TextAttributeDialog.this, + "Select Foreground Color", + maForeground); + } + } ); + + JButton aBackgroundButton = new JButton("Background", + new TextAttributeDialog.ColorIcon(false)); + aBackgroundButton.addActionListener (new ActionListener() + { + public void actionPerformed (ActionEvent eEvent) + { + maBackground = JColorChooser.showDialog( + TextAttributeDialog.this, + "Select Background Color", + maBackground); + } + } ); + + aPanel.add (maBoldCheckBox); + aPanel.add (maUnderlineCheckBox); + aPanel.add (maItalicsCheckBox); + aPanel.add (aForegroundButton); + aPanel.add (aBackgroundButton); + + getContentPane().add (aPanel, BorderLayout.WEST); + } + + + /** edit the text */ + boolean EditableTextAction (XAccessibleEditableText xText) + throws IndexOutOfBoundsException + { + PropertyValue[] aSequence = new PropertyValue[6]; + aSequence[0] = new PropertyValue(); + aSequence[0].Name = "CharWeight"; + aSequence[0].Value = new Integer (maBoldCheckBox.isSelected() ? 150 : 100); + aSequence[1] = new PropertyValue(); + aSequence[1].Name = "CharUnderline"; + aSequence[1].Value = new Integer (maUnderlineCheckBox.isSelected() ? 1 : 0); + aSequence[2] = new PropertyValue(); + aSequence[2].Name = "CharBackColor"; + aSequence[2].Value = new Integer (maBackground.getRGB()); + aSequence[3] = new PropertyValue(); + aSequence[3].Name = "CharColor"; + aSequence[3].Value = new Integer (maForeground.getRGB()); + aSequence[4] = new PropertyValue(); + aSequence[4].Name = "CharPosture"; + aSequence[4].Value = new Integer (maItalicsCheckBox.isSelected() ? 1 : 0); + aSequence[5] = new PropertyValue(); + aSequence[5].Name = "CharBackTransparent"; + aSequence[5].Value = new Boolean (false); + + return xText.setAttributes ( + GetSelectionStart(), + GetSelectionEnd(), + aSequence); + } + + class ColorIcon + implements Icon + { + public ColorIcon(boolean bWhich) { bForeground = bWhich; } + public int getIconHeight() { return nHeight; } + public int getIconWidth() { return nWidth; } + public void paintIcon (Component c, Graphics g, int x, int y) + { + g.setColor( getColor() ); + g.fillRect( x, y, nHeight, nWidth ); + g.setColor( c.getForeground() ); + g.drawRect( x, y, nHeight, nWidth ); + } + Color getColor() + { + if (bForeground) + return maForeground; + else + return maBackground; + } + + private static final int nHeight = 16; + private static final int nWidth = 16; + private boolean bForeground; + } + + + + + private JCheckBox + maBoldCheckBox, + maUnderlineCheckBox, + maItalicsCheckBox; + private Color + maForeground, + maBackground; + +} + diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java new file mode 100644 index 000000000000..397c3f8b1877 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java @@ -0,0 +1,170 @@ +/************************************************************************* + * + * $RCSfile: TextDialogFactory.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:43 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view.text; + +import javax.swing.JDialog; +import javax.swing.text.JTextComponent; + +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEditableText; +import com.sun.star.accessibility.XAccessibleText; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.uno.UnoRuntime; + + +/** Factory for dialogs of the text views. +*/ +public class TextDialogFactory +{ + static public JDialog CreateSelectionDialog (XAccessibleContext xContext) + { + JDialog aDialog = new TextActionDialog( + xContext, + "Select range:", + "select") + { + boolean TextAction (XAccessibleText xText) + throws IndexOutOfBoundsException + { + return xText.setSelection( + GetSelectionStart(), + GetSelectionEnd() ); + } + }; + if (aDialog != null) + aDialog.show(); + return aDialog; + } + + static public JDialog CreateCopyDialog (XAccessibleContext xContext) + { + JDialog aDialog = new TextActionDialog( + xContext, + "Select range and copy:", + "copy") + { + boolean TextAction (XAccessibleText xText) + throws IndexOutOfBoundsException + { + return xText.copyText( + GetSelectionStart(), + GetSelectionEnd()); + } + }; + if (aDialog != null) + aDialog.show(); + return aDialog; + } + static public JDialog CreateCutDialog (XAccessibleContext xContext) + { + JDialog aDialog = new TextActionDialog( + xContext, + "Select range and cut:", + "cut") + { + boolean EditableTextAction (XAccessibleEditableText xText) + throws IndexOutOfBoundsException + { + return xText.cutText( + GetSelectionStart(), + GetSelectionEnd() ); + } + }; + if (aDialog != null) + aDialog.show(); + return aDialog; + } + static public JDialog CreatePasteDialog (XAccessibleContext xContext) + { + JDialog aDialog = new TextActionDialog ( + xContext, + "Place Caret and paste:", + "paste") + { + boolean EditableTextAction (XAccessibleEditableText xText) + throws IndexOutOfBoundsException + { + return xText.pasteText(maText.getCaretPosition()); + } + }; + if (aDialog != null) + aDialog.show(); + return aDialog; + } + static public JDialog CreateEditDialog (XAccessibleContext xContext) + { + JDialog aDialog = new TextEditDialog ( + xContext, + "Edit text:", + "edit"); + if (aDialog != null) + aDialog.show(); + return aDialog; + } + static public JDialog CreateFormatDialog (XAccessibleContext xContext) + { + JDialog aDialog = new TextAttributeDialog (xContext); + if (aDialog != null) + aDialog.show(); + return aDialog; + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java new file mode 100644 index 000000000000..55dfea6fb0b2 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java @@ -0,0 +1,156 @@ +/************************************************************************* + * + * $RCSfile: TextEditDialog.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: af $ $Date: 2003/06/13 16:30:43 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.awb.view.text; + +import javax.swing.text.JTextComponent; + +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEditableText; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.uno.UnoRuntime; + + +class TextEditDialog + extends TextActionDialog +{ + public TextEditDialog ( + XAccessibleContext xContext, + String sExplanation, + String sTitle ) + { + super (xContext, sExplanation, sTitle); + } + + protected void Layout() + { + super.Layout(); + maText.setEditable (true); + } + + + /** edit the text */ + boolean EditableTextAction (XAccessibleEditableText xText) + { + return UpdateText (xText, maText.getText()); + } + + + /** update the text */ + boolean UpdateText (XAccessibleEditableText xText, String sNew) + { + boolean bResult = false; + + String sOld = xText.getText(); + + // false alarm? Early out if no change was done! + if ( ! sOld.equals (sNew)) + { + + // Get the minimum length of both strings. + int nMinLength = sOld.length(); + if (sNew.length() < nMinLength) + nMinLength = sNew.length(); + + // Count equal characters from front and end. + int nFront = 0; + while ((nFront < nMinLength) && + (sNew.charAt(nFront) == sOld.charAt(nFront))) + nFront++; + int nBack = 0; + while ((nBack < nMinLength) && + (sNew.charAt(sNew.length()-nBack-1) == + sOld.charAt(sOld.length()-nBack-1) )) + nBack++; + if (nFront + nBack > nMinLength) + nBack = nMinLength - nFront; + + // so... the first nFront and the last nBack characters are the + // same. Change the others! + String sDel = sOld.substring (nFront, sOld.length() - nBack); + String sIns = sNew.substring (nFront, sNew.length() - nBack); + + System.out.println ("edit text: " + + sOld.substring(0, nFront) + + " [ " + sDel + " -> " + sIns + " ] " + + sOld.substring(sOld.length() - nBack)); + + try + { + // edit the text, and use + // (set|insert|delete|replace)Text as needed + if( nFront+nBack == 0 ) + bResult = xText.setText( sIns ); + else if( sDel.length() == 0 ) + bResult = xText.insertText( sIns, nFront ); + else if( sIns.length() == 0 ) + bResult = xText.deleteText( nFront, sOld.length()-nBack ); + else + bResult = xText.replaceText(nFront, sOld.length()-nBack,sIns); + } + catch( IndexOutOfBoundsException aException) + { + } + } + + return bResult; + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common new file mode 100644 index 000000000000..32655a0c6a6f --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common @@ -0,0 +1,65 @@ +#************************************************************************* +# +# $RCSfile: makefile.common,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar +JAVAFILES = \ + CaretSpinnerModel.java \ + TextActionDialog.java \ + TextEditDialog.java \ + TextAttributeDialog.java \ + TextDialogFactory.java diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.mk b/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.mk new file mode 100644 index 000000000000..05f5b3a99c35 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = awb +PRJ = ..$/..$/..$/..$/..$/..$/.. +TARGET = awb_view_text +PACKAGE = org$/openoffice$/accessibility$/awb$/view$/text + +USE_JAVAVER:=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(JAVAVER:s/.//)" >= "140" + +.INCLUDE : makefile.common + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +.ENDIF + +# --- Targets ------------------------------------------------------ + + +.INCLUDE : target.mk + diff --git a/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java b/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java new file mode 100644 index 000000000000..f9212e05a35c --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: AccessibleEventMulticaster.java,v $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package org.openoffice.accessibility.misc; + +import com.sun.star.lang.EventObject; + +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessibleEventBroadcaster; +import com.sun.star.accessibility.XAccessibleEventListener; + +/** + * + */ +public class AccessibleEventMulticaster implements XAccessibleEventListener { + + private final XAccessibleEventListener a; + private final XAccessibleEventListener b; + + /** Creates a new instance of AccessibleEventMulticaster */ + protected AccessibleEventMulticaster(XAccessibleEventListener a, + XAccessibleEventListener b) { + this.a = a; + this.b = b; + } + + protected XAccessibleEventListener remove(XAccessibleEventListener l) { + if (l == a) + return b; + if (l == b) + return a; + XAccessibleEventListener a2 = remove(a, l); + XAccessibleEventListener b2 = remove(b, l); + if (a2 == a && b2 == b) { + return this; // not found + } + return add(a2, b2); + } + + public void notifyEvent(AccessibleEventObject accessibleEventObject) { + a.notifyEvent(accessibleEventObject); + b.notifyEvent(accessibleEventObject); + } + + public void disposing(EventObject eventObject) { + a.disposing(eventObject); + b.disposing(eventObject); + } + + public static XAccessibleEventListener add(XAccessibleEventListener a, XAccessibleEventListener b) { + if (a == null) + return b; + if (b == null) + return a; + return new AccessibleEventMulticaster(a,b); + } + + public static XAccessibleEventListener remove(XAccessibleEventListener l, XAccessibleEventListener oldl) { + if (l == oldl || l == null) { + return null; + } else if (l instanceof AccessibleEventMulticaster) { + return ((AccessibleEventMulticaster) l).remove(oldl); + } else { + return l; + } + } + +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/Connector.java b/accessibility/workben/org/openoffice/accessibility/misc/Connector.java new file mode 100644 index 000000000000..de188676e224 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/Connector.java @@ -0,0 +1,50 @@ +package org.openoffice.accessibility.misc; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Timer; +import java.util.TimerTask; +import java.util.Vector; + + +/** Wait for an Office application and connect to it. +*/ +public class Connector + extends TimerTask +{ + final public static long snDelay = 3000; + + public Connector () + { + maTimer = new Timer (true); + maListeners = new Vector(); + run (); + } + + public void AddConnectionListener (ActionListener aListener) + { + SimpleOffice aOffice = SimpleOffice.Instance(); + if (aOffice!=null && aOffice.IsConnected()) + aListener.actionPerformed ( + new ActionEvent (aOffice,0,"<connected>")); + maListeners.add (aListener); + } + + public void run () + { + SimpleOffice aOffice = SimpleOffice.Instance(); + if (aOffice!=null && !aOffice.IsConnected()) + if ( ! aOffice.Connect()) + maTimer.schedule (this, snDelay); + else + { + ActionEvent aEvent = new ActionEvent (aOffice,0,"<connected>"); + for (int i=0; i<maListeners.size(); i++) + ((ActionListener)maListeners.elementAt(i)).actionPerformed( + aEvent); + } + } + + Timer maTimer; + Vector maListeners; +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java b/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java new file mode 100644 index 000000000000..fbd1455cd295 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java @@ -0,0 +1,421 @@ +package org.openoffice.accessibility.misc; + +import java.lang.Thread; +import java.io.PrintStream; + +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.XWindow; + +import com.sun.star.beans.Property; +import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.XPropertySet; +import com.sun.star.beans.XPropertySetInfo; + +import com.sun.star.container.XIndexAccess; +import com.sun.star.container.XChild; +import com.sun.star.container.XEnumerationAccess; +import com.sun.star.container.XEnumeration; + +import com.sun.star.frame.XComponentLoader; +import com.sun.star.frame.XController; +import com.sun.star.frame.XDesktop; +import com.sun.star.frame.XFrame; +import com.sun.star.frame.XTasksSupplier; +import com.sun.star.frame.XTask; + +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XServiceName; +import com.sun.star.lang.XTypeProvider; + +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.Type; + +import com.sun.star.drawing.XDrawView; +import com.sun.star.drawing.XDrawPage; +import com.sun.star.drawing.XShapes; +import com.sun.star.drawing.XShape; +import com.sun.star.drawing.XShapeDescriptor; + +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleComponent; +import com.sun.star.accessibility.XAccessibleRelationSet; +import com.sun.star.accessibility.XAccessibleStateSet; + +public class InformationWriter +{ + public InformationWriter (PrintStream aOut) + { + maOut = aOut; + } + + public void drawPageTest (XInterface xPage) + { + try + { + printProperty (xPage, "BorderBottom ", "BorderBottom"); + printProperty (xPage, "BorderLeft ", "BorderLeft"); + printProperty (xPage, "BorderRight ", "BorderRight"); + printProperty (xPage, "BorderTop ", "BorderTop"); + printProperty (xPage, "Height ", "Height"); + printProperty (xPage, "Width ", "Width"); + printProperty (xPage, "Number ", "Number"); + } + catch (Exception e) + { + System.out.println ("caught exception while testing draw page:" + e); + } + } + + public void printProperty (XInterface xObject, String prefix, String name) + { + try + { + XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet.class, xObject); + maOut.println (prefix + + xPropertySet.getPropertyValue (name)); + } + catch (Exception e) + { + maOut.println ("caught exception while getting property " + + name + " : " + e); + } + } + + + + public void showShapes (XDrawPage xPage) + { + try + { + XIndexAccess xShapeList = (XIndexAccess) UnoRuntime.queryInterface( + XIndexAccess.class, xPage); + + maOut.println ("There are " + xShapeList.getCount() + + " shapes"); + for (int i=0; i<xShapeList.getCount(); i++) + { + XShape xShape = (XShape) UnoRuntime.queryInterface( + XShape.class, xShapeList.getByIndex (i)); + + XShapeDescriptor xShapeDescriptor = + (XShapeDescriptor) UnoRuntime.queryInterface( + XShapeDescriptor.class, xShape); + String sName = xShapeDescriptor.getShapeType (); + maOut.println (" shape " + i + " : " + sName); + + XPropertySet xPropertySet = + (XPropertySet) UnoRuntime.queryInterface( + XPropertySet.class, xShape); + Integer nZOrder = + (Integer) xPropertySet.getPropertyValue ("ZOrder"); + maOut.println (" zorder = " + nZOrder); + } + } + catch (Exception e) + { + maOut.println ("caught exception in showShapes: " + e); + } + } + + + + + /** @descr Print all available services of the given object to the + standard output. + */ + public void showServices (XInterface xObject) + { + try + { + maOut.println ("Services:"); + XMultiServiceFactory xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface ( + XMultiServiceFactory.class, + xObject + ); + if (xMSF == null) + maOut.println (" object does not support interface XMultiServiceFactory"); + else + { + String[] sServiceNames = xMSF.getAvailableServiceNames (); + maOut.println (" object can create " + + sServiceNames.length + " services"); + for (int i=0; i<sServiceNames.length; i++) + maOut.println (" service " + i + " : " + sServiceNames[i]); + } + } + catch (Exception e) + { + maOut.println ("caught exception in showServices : " + e); + } + } + + /** @descr Print the service and implementation name of the given + object. + */ + public void showInfo (XInterface xObject) + { + try + { + System.out.println ("Info:"); + // Use interface XServiceName to retrieve name of (main) service. + XServiceName xSN = (XServiceName) UnoRuntime.queryInterface ( + XServiceName.class, xObject); + if (xSN == null) + maOut.println (" interface XServiceName not supported"); + else + { + maOut.println (" Service name : " + xSN.getServiceName ()); + } + + // Use interface XServiceInfo to retrieve information about + // supported services. + XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface ( + XServiceInfo.class, xObject); + if (xSI == null) + maOut.println (" interface XServiceInfo not supported"); + else + { + maOut.println (" Implementation name : " + + xSI.getImplementationName ()); + } + } + catch (Exception e) + { + maOut.println ("caught exception in showInfo : " + e); + } + } + + + + + /** @descr Print information about supported interfaces. + */ + public void showInterfaces (XInterface xObject) + { + try + { + maOut.println ("Interfaces:"); + // Use interface XTypeProvider to retrieve a list of supported + // interfaces. + XTypeProvider xTP = (XTypeProvider) UnoRuntime.queryInterface ( + XTypeProvider.class, xObject); + if (xTP == null) + maOut.println (" interface XTypeProvider not supported"); + else + { + Type[] aTypeList = xTP.getTypes (); + maOut.println (" object supports " + aTypeList.length + + " interfaces"); + for (int i=0; i<aTypeList.length; i++) + maOut.println (" " + i + " : " + + aTypeList[i].getTypeName()); + } + } + catch (Exception e) + { + maOut.println ("caught exception in showInterfaces : " + e); + } + } + + + /** @descr Print information concerning the accessibility of the given + object. + */ + public boolean showAccessibility (XInterface xObject, int depth) + { + try + { + // Create indentation string. + String sIndent = ""; + while (depth-- > 0) + sIndent += " "; + + // Get XAccessibleContext object if given object does not + // already support this interface. + XAccessibleContext xContext + = (XAccessibleContext) UnoRuntime.queryInterface ( + XAccessibleContext.class, xObject); + if (xContext == null) + { + XAccessible xAccessible + = (XAccessible) UnoRuntime.queryInterface ( + XAccessible.class, xObject); + if (xAccessible == null) + { + maOut.println (sIndent + "given object " + xObject + + " is not accessible"); + return false; + } + else + xContext = xAccessible.getAccessibleContext(); + } + + // Print information about the accessible context. + if (xContext != null) + { + maOut.println (sIndent + "Name : " + + xContext.getAccessibleName()); + maOut.println (sIndent + "Description : " + + xContext.getAccessibleDescription()); + maOut.println (sIndent + "Role : " + + xContext.getAccessibleRole()); + String sHasParent; + if (xContext.getAccessibleParent() != null) + { + maOut.println (sIndent + "Has parent : yes"); + maOut.println (sIndent + "Parent index : " + + xContext.getAccessibleIndexInParent()); + } + else + maOut.println (sIndent + "Has parent : no"); + maOut.println (sIndent + "Child count : " + + xContext.getAccessibleChildCount()); + maOut.print (sIndent + "Relation set : "); + XAccessibleRelationSet xRelationSet + = xContext.getAccessibleRelationSet(); + if (xRelationSet != null) + { + maOut.print (xRelationSet.getRelationCount() + " ("); + for (int i=0; i<xRelationSet.getRelationCount(); i++) + { + if (i > 0) + maOut.print (", "); + maOut.print (xRelationSet.getRelation(i).toString()); + } + maOut.println (")"); + } + else + maOut.println ("no relation set"); + + maOut.print (sIndent + "State set : "); + XAccessibleStateSet xStateSet = + xContext.getAccessibleStateSet(); + if (xStateSet != null) + { + XIndexAccess xStates = + (XIndexAccess) UnoRuntime.queryInterface ( + XIndexAccess.class, xStateSet); + maOut.print (xStates.getCount() + " ("); + for (int i=0; i<xStates.getCount(); i++) + { + if (i > 0) + maOut.print (", "); + maOut.print (xStates.getByIndex(i).toString()); + } + maOut.println (")"); + } + else + maOut.println ("no state set"); + + showAccessibleComponent (xContext, sIndent); + } + else + maOut.println ("object has no accessible context."); + + // showInfo (xContext); + // showServices (xContext); + // showInterfaces (xContext); + } + catch (Exception e) + { + System.out.println ("caught exception in showAccessibility :" + e); + } + return true; + } + + + + + /** @descr Print information about the given accessible component. + */ + public void showAccessibleComponent (XInterface xObject, String sIndent) + { + try + { + XAccessibleComponent xComponent = + (XAccessibleComponent) UnoRuntime.queryInterface ( + XAccessibleComponent.class, xObject); + + // Print information about the accessible context. + if (xComponent != null) + { + maOut.println (sIndent + "Position : " + + xComponent.getLocation().X+", " + + xComponent.getLocation().Y); + maOut.println (sIndent + "Screen position : " + + xComponent.getLocationOnScreen().X+", " + + xComponent.getLocationOnScreen().Y); + maOut.println (sIndent + "Size : " + + xComponent.getSize().Width+", " + + xComponent.getSize().Height); + } + } + catch (Exception e) + { + System.out.println ( + "caught exception in showAccessibleComponent : " + e); + } + } + + + /** Show a textual representation of the accessibility subtree rooted in + xRoot. + */ + public boolean showAccessibilityTree (XAccessible xRoot, int depth) + { + try + { + if ( ! showAccessibility (xRoot, depth)) + return false; + + String sIndent = ""; + for (int i=0; i<depth; i++) + sIndent += " "; + + // Iterate over children and show them. + XAccessibleContext xContext = xRoot.getAccessibleContext(); + if (xContext != null) + { + int n = xContext.getAccessibleChildCount(); + for (int i=0; i<n; i++) + { + maOut.println (sIndent + "child " + i + " :"); + showAccessibilityTree (xContext.getAccessibleChild(i),depth+1); + } + } + else + maOut.println ("Accessible object has no context"); + } + catch (Exception e) + { + System.out.println ( + "caught exception in showAccessibleTree : " + e); + return false; + } + + return true; + } + + public void showProperties (XInterface xObject) + { + XPropertySet xSet = (XPropertySet) UnoRuntime.queryInterface ( + XPropertySet.class, xObject); + if (xSet == null) + maOut.println ("object does not support XPropertySet"); + else + { + XPropertySetInfo xInfo = xSet.getPropertySetInfo (); + Property[] aProperties = xInfo.getProperties (); + int n = aProperties.length; + for (int i=0; i<n; i++) + maOut.println (i + " : " + aProperties[i].Name +", " + aProperties[i].Type); + } + } + + private PrintStream maOut; +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/Makefile b/accessibility/workben/org/openoffice/accessibility/misc/Makefile new file mode 100644 index 000000000000..a33a430c0eaa --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/Makefile @@ -0,0 +1,69 @@ +#************************************************************************* +# +# $RCSfile: Makefile,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +all : package + +ROOT=../../../.. +PACKAGE = org.openoffice.accessibility.misc +SUBDIRS = + +include makefile.common + +include $(ROOT)/makefile.in + +package: subdirs $(CLASS_FILES) diff --git a/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java b/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java new file mode 100644 index 000000000000..d990a517dfc1 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java @@ -0,0 +1,125 @@ +package org.openoffice.accessibility.misc; + +import java.awt.Font; +import java.awt.Rectangle; +import java.awt.Color; +import java.awt.Graphics; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.JScrollBar; + + + +/** A message area displays text in a scrollable text widget. It is a + singleton. Other objects can access it directly to display messages. +*/ +public class MessageArea + extends JScrollPane +{ + public static synchronized MessageArea Instance () + { + if (saInstance == null) + saInstance = new MessageArea (); + return saInstance; + } + + + + + /** Create a new message area. This method is private because the class is + a singleton and may therefore not be instanciated from the outside. + */ + private MessageArea () + { + maText = new JTextArea(); + maText.setBackground (new Color (255,250,240)); + maText.setFont (new Font ("Helvetica", Font.PLAIN, 9)); + setViewportView (maText); + setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + + printMessage ( + "class path is " + System.getProperty ("java.class.path") + "\n"); + } + + + + + /** Show the given string at the end of the message area and scroll to make + it visible. + */ + public static synchronized void print (String aMessage) + { + print (0, aMessage); + } + + + + + /** Show the given string at the end of the message area and scroll to make + it visible. Indent the string as requested. + */ + public static synchronized void print (int nIndentation, String aMessage) + { + while (nIndentation-- > 0) + aMessage = " " + aMessage; + Instance().printMessage(aMessage); + } + + + + + /** Show the given string at the end of the message area and scroll to make + it visible. + */ + public static void println (String aMessage) + { + println (0, aMessage); + } + + + + + /** Show the given string at the end of the message area and scroll to make + it visible. + */ + public static void println (int nIndentation, String aMessage) + { + print (nIndentation, aMessage+"\n"); + } + + + + + public void paintComponent (Graphics g) + { + synchronized (g) + { + JScrollBar sb = getVerticalScrollBar(); + if (sb != null) + { + int nScrollBarValue = sb.getMaximum() - sb.getVisibleAmount() - 1; + sb.setValue (nScrollBarValue); + } + super.paintComponent (g); + } + } + + + + + /** Append the given string to the end of the text and scroll so that it + becomes visible. This is an internal method. Use one of the static + and public ones. + */ + private synchronized void printMessage (String aMessage) + { + maText.append (aMessage); + } + + + + + private static MessageArea saInstance = null; + private JTextArea maText; +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java b/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java new file mode 100644 index 000000000000..736bc2c7f17b --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java @@ -0,0 +1,263 @@ +package org.openoffice.accessibility.misc; + +import java.util.HashMap; +import com.sun.star.accessibility.AccessibleStateType; +import com.sun.star.accessibility.AccessibleEventId; +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.AccessibleRelationType; + + +/** Provide names for several accessibility constants groups. +*/ +public class NameProvider +{ + /** Return the name of the specified state. + @param nStateId + Id of the state for which to return its name. This is one of + the ids listed in the <type>AccessibleStateType</const> + constants group. + @return + Returns the name of the specified state. When an invalid or + unknown state id is given then a special string is returned that + says that the state does not exist. + */ + public static String getStateName (int nStateId) + { + String sStateName = (String)maStateMap.get (new Integer(nStateId)); + if (sStateName == null) + sStateName = new String ("<unknown state " + nStateId + ">"); + return sStateName; + } + + + /** Return the name of the specified event. + @param nEventId + Id of the event type for which to return its name. This is one + of the ids listed in the <type>AccessibleEventId</const> + constants group. + @return + Returns the name of the specified event type or an empty string + if an invalid / unknown event id was given. + */ + public static String getEventName (int nEventId) + { + return (String)maEventMap.get (new Integer(nEventId)); + } + + + /** Return the name of the specified role. + @param nRole + Id of the role for which to return its name. This is one of + the ids listed in the <type>AccessibleRole</const> + constants group. + @return + Returns the name of the specified role or an empty string if an + invalid / unknown role id was given. + */ + public static String getRoleName (int nRole) + { + return (String)maRoleMap.get (new Integer(nRole)); + } + + + /** Return the name of the specified relation. + @param nRelation + Id of the relation for which to return its name. This is one of + the ids listed in the <type>AccessibleRelationType</const> + constants group. + @return + Returns the name of the specified relation type or an empty + string if an invalid / unknown role id was given. + */ + public static String getRelationName (int nRelation) + { + return (String)maRelationMap.get (new Integer(nRelation)); + } + + + private static HashMap maStateMap = new HashMap(); + private static HashMap maEventMap = new HashMap(); + private static HashMap maRoleMap = new HashMap(); + private static HashMap maRelationMap = new HashMap(); + + static { + maStateMap.put (new Integer (AccessibleStateType.INVALID), "INVALID"); + maStateMap.put (new Integer (AccessibleStateType.ACTIVE), "ACTIVE"); + maStateMap.put (new Integer (AccessibleStateType.ARMED), "ARMED"); + maStateMap.put (new Integer (AccessibleStateType.BUSY), "BUSY"); + maStateMap.put (new Integer (AccessibleStateType.CHECKED), "CHECKED"); + // maStateMap.put (new Integer (AccessibleStateType.COLLAPSED), "COLLAPSED"); + maStateMap.put (new Integer (AccessibleStateType.DEFUNC), "DEFUNC"); + maStateMap.put (new Integer (AccessibleStateType.EDITABLE), "EDITABLE"); + maStateMap.put (new Integer (AccessibleStateType.ENABLED), "ENABLED"); + maStateMap.put (new Integer (AccessibleStateType.EXPANDABLE), "EXPANDABLE"); + maStateMap.put (new Integer (AccessibleStateType.EXPANDED), "EXPANDED"); + maStateMap.put (new Integer (AccessibleStateType.FOCUSABLE), "FOCUSABLE"); + maStateMap.put (new Integer (AccessibleStateType.FOCUSED), "FOCUSED"); + maStateMap.put (new Integer (AccessibleStateType.HORIZONTAL), "HORIZONTAL"); + maStateMap.put (new Integer (AccessibleStateType.ICONIFIED), "ICONIFIED"); + maStateMap.put (new Integer (AccessibleStateType.MODAL), "MODAL"); + maStateMap.put (new Integer (AccessibleStateType.MULTI_LINE), "MULTI_LINE"); + maStateMap.put (new Integer (AccessibleStateType.MULTI_SELECTABLE), "MULTI_SELECTABLE"); + maStateMap.put (new Integer (AccessibleStateType.OPAQUE), "OPAQUE"); + maStateMap.put (new Integer (AccessibleStateType.PRESSED), "PRESSED"); + maStateMap.put (new Integer (AccessibleStateType.RESIZABLE), "RESIZABLE"); + maStateMap.put (new Integer (AccessibleStateType.SELECTABLE), "SELECTABLE"); + maStateMap.put (new Integer (AccessibleStateType.SELECTED), "SELECTED"); + maStateMap.put (new Integer (AccessibleStateType.SENSITIVE), "SENSITIVE"); + maStateMap.put (new Integer (AccessibleStateType.SHOWING), "SHOWING"); + maStateMap.put (new Integer (AccessibleStateType.SINGLE_LINE), "SINGLE_LINE"); + maStateMap.put (new Integer (AccessibleStateType.STALE), "STALE"); + maStateMap.put (new Integer (AccessibleStateType.TRANSIENT), "TRANSIENT"); + maStateMap.put (new Integer (AccessibleStateType.VERTICAL), "VERTICAL"); + maStateMap.put (new Integer (AccessibleStateType.VISIBLE), "VISIBLE"); + maStateMap.put (new Integer (AccessibleStateType.MANAGES_DESCENDANTS), + "MANAGES_DESCENDANTS"); + //maStateMap.put (new Integer (AccessibleStateType.INCONSISTENT),"INCONSISTENT"); + + + maEventMap.put (new Integer (0), + "[UNKNOWN]"); + maEventMap.put (new Integer (AccessibleEventId.NAME_CHANGED), + "NAME_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.DESCRIPTION_CHANGED), + "DESCRIPTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.ACTION_CHANGED), + "ACTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.STATE_CHANGED), + "STATE_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.ACTIVE_DESCENDANT_CHANGED), + "ACTIVE_DESCENDANT_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.BOUNDRECT_CHANGED), + "BOUNDRECT_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.CHILD), + "CHILD"); + maEventMap.put (new Integer (AccessibleEventId.INVALIDATE_ALL_CHILDREN), + "INVALIDATE_ALL_CHILDREN"); + maEventMap.put (new Integer (AccessibleEventId.SELECTION_CHANGED), + "SELECTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.VISIBLE_DATA_CHANGED), + "VISIBLE_DATA_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.VALUE_CHANGED), + "VALUE_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.CONTENT_FLOWS_FROM_RELATION_CHANGED), + "CONTENT_FLOWS_FROM_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.CONTENT_FLOWS_TO_RELATION_CHANGED), + "CONTENT_FLOWS_TO_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.CONTROLLED_BY_RELATION_CHANGED), + "CONTROLLED_BY_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.CONTROLLER_FOR_RELATION_CHANGED), + "CONTROLLER_FOR_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.LABEL_FOR_RELATION_CHANGED), + "LABEL_FOR_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.LABELED_BY_RELATION_CHANGED), + "LABELED_BY_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.MEMBER_OF_RELATION_CHANGED), + "MEMBER_OF_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.SUB_WINDOW_OF_RELATION_CHANGED), + "SUB_WINDOW_OF_RELATION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.CARET_CHANGED), + "CARET_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TEXT_SELECTION_CHANGED), + "TEXT_SELECTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TEXT_CHANGED), + "TEXT_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TEXT_ATTRIBUTE_CHANGED), + "TEXT_ATTRIBUTE_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.HYPERTEXT_CHANGED), + "HYPERTEXT_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_CAPTION_CHANGED), + "TABLE_CAPTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_COLUMN_DESCRIPTION_CHANGED), + "TABLE_COLUMN_DESCRIPTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_COLUMN_HEADER_CHANGED), + "TABLE_COLUMN_HEADER_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_MODEL_CHANGED), + "TABLE_MODEL_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_ROW_DESCRIPTION_CHANGED), + "TABLE_ROW_DESCRIPTION_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_ROW_HEADER_CHANGED), + "TABLE_ROW_HEADER_CHANGED"); + maEventMap.put (new Integer (AccessibleEventId.TABLE_SUMMARY_CHANGED), + "TABLE_SUMMARY_CHANGED"); + + maRoleMap.put (new Integer(AccessibleRole.UNKNOWN), "UNKNOWN"); + maRoleMap.put (new Integer (AccessibleRole.UNKNOWN), "UNKNOWN"); + maRoleMap.put (new Integer (AccessibleRole.ALERT), "ALERT"); + maRoleMap.put (new Integer (AccessibleRole.COLUMN_HEADER), "COLUMN_HEADER"); + maRoleMap.put (new Integer (AccessibleRole.CANVAS), "CANVAS"); + maRoleMap.put (new Integer (AccessibleRole.CHECK_BOX), "CHECK_BOX"); + maRoleMap.put (new Integer (AccessibleRole.CHECK_MENU_ITEM), "CHECK_MENU_ITEM"); + maRoleMap.put (new Integer (AccessibleRole.COLOR_CHOOSER), "COLOR_CHOOSER"); + maRoleMap.put (new Integer (AccessibleRole.COMBO_BOX), "COMBO_BOX"); + maRoleMap.put (new Integer (AccessibleRole.DESKTOP_ICON), "DESKTOP_ICON"); + maRoleMap.put (new Integer (AccessibleRole.DESKTOP_PANE), "DESKTOP_PANE"); + maRoleMap.put (new Integer (AccessibleRole.DIRECTORY_PANE), "DIRECTORY_PANE"); + maRoleMap.put (new Integer (AccessibleRole.DIALOG), "DIALOG"); + maRoleMap.put (new Integer (AccessibleRole.DOCUMENT), "DOCUMENT"); + maRoleMap.put (new Integer (AccessibleRole.EMBEDDED_OBJECT), "EMBEDDED_OBJECT"); + maRoleMap.put (new Integer (AccessibleRole.END_NOTE), "END_NOTE"); + maRoleMap.put (new Integer (AccessibleRole.FILE_CHOOSER), "FILE_CHOOSER"); + maRoleMap.put (new Integer (AccessibleRole.FILLER), "FILLER"); + maRoleMap.put (new Integer (AccessibleRole.FONT_CHOOSER), "FONT_CHOOSER"); + maRoleMap.put (new Integer (AccessibleRole.FOOTER), "FOOTER"); + maRoleMap.put (new Integer (AccessibleRole.FOOTNOTE), "FOOTNOTE"); + maRoleMap.put (new Integer (AccessibleRole.FRAME), "FRAME"); + maRoleMap.put (new Integer (AccessibleRole.GLASS_PANE), "GLASS_PANE"); + maRoleMap.put (new Integer (AccessibleRole.GRAPHIC), "GRAPHIC"); + maRoleMap.put (new Integer (AccessibleRole.GROUP_BOX), "GROUP_BOX"); + maRoleMap.put (new Integer (AccessibleRole.HEADER), "HEADER"); + maRoleMap.put (new Integer (AccessibleRole.HEADING), "HEADING"); + maRoleMap.put (new Integer (AccessibleRole.HYPER_LINK), "HYPER_LINK"); + maRoleMap.put (new Integer (AccessibleRole.ICON), "ICON"); + maRoleMap.put (new Integer (AccessibleRole.INTERNAL_FRAME), "INTERNAL_FRAME"); + maRoleMap.put (new Integer (AccessibleRole.LABEL), "LABEL"); + maRoleMap.put (new Integer (AccessibleRole.LAYERED_PANE), "LAYERED_PANE"); + maRoleMap.put (new Integer (AccessibleRole.LIST), "LIST"); + maRoleMap.put (new Integer (AccessibleRole.LIST_ITEM), "LIST_ITEM"); + maRoleMap.put (new Integer (AccessibleRole.MENU), "MENU"); + maRoleMap.put (new Integer (AccessibleRole.MENU_BAR), "MENU_BAR"); + maRoleMap.put (new Integer (AccessibleRole.MENU_ITEM), "MENU_ITEM"); + maRoleMap.put (new Integer (AccessibleRole.OPTION_PANE), "OPTION_PANE"); + maRoleMap.put (new Integer (AccessibleRole.PAGE_TAB), "PAGE_TAB"); + maRoleMap.put (new Integer (AccessibleRole.PAGE_TAB_LIST), "PAGE_TAB_LIST"); + maRoleMap.put (new Integer (AccessibleRole.PANEL), "PANEL"); + maRoleMap.put (new Integer (AccessibleRole.PARAGRAPH), "PARAGRAPH"); + maRoleMap.put (new Integer (AccessibleRole.PASSWORD_TEXT), "PASSWORD_TEXT"); + maRoleMap.put (new Integer (AccessibleRole.POPUP_MENU), "POPUP_MENU"); + maRoleMap.put (new Integer (AccessibleRole.PUSH_BUTTON), "PUSH_BUTTON"); + maRoleMap.put (new Integer (AccessibleRole.PROGRESS_BAR), "PROGRESS_BAR"); + maRoleMap.put (new Integer (AccessibleRole.RADIO_BUTTON), "RADIO_BUTTON"); + maRoleMap.put (new Integer (AccessibleRole.RADIO_MENU_ITEM), "RADIO_MENU_ITEM"); + maRoleMap.put (new Integer (AccessibleRole.ROW_HEADER), "ROW_HEADER"); + maRoleMap.put (new Integer (AccessibleRole.ROOT_PANE), "ROOT_PANE"); + maRoleMap.put (new Integer (AccessibleRole.SCROLL_BAR), "SCROLL_BAR"); + maRoleMap.put (new Integer (AccessibleRole.SCROLL_PANE), "SCROLL_PANE"); + maRoleMap.put (new Integer (AccessibleRole.SHAPE), "SHAPE"); + maRoleMap.put (new Integer (AccessibleRole.SEPARATOR), "SEPARATOR"); + maRoleMap.put (new Integer (AccessibleRole.SLIDER), "SLIDER"); + maRoleMap.put (new Integer (AccessibleRole.SPIN_BOX), "SPIN_BOX"); + maRoleMap.put (new Integer (AccessibleRole.SPLIT_PANE), "SPLIT_PANE"); + maRoleMap.put (new Integer (AccessibleRole.STATUS_BAR), "STATUS_BAR"); + maRoleMap.put (new Integer (AccessibleRole.TABLE), "TABLE"); + maRoleMap.put (new Integer (AccessibleRole.TABLE_CELL), "TABLE_CELL"); + maRoleMap.put (new Integer (AccessibleRole.TEXT), "TEXT"); + maRoleMap.put (new Integer (AccessibleRole.TEXT_FRAME), "TEXT_FRAME"); + maRoleMap.put (new Integer (AccessibleRole.TOGGLE_BUTTON), "TOGGLE_BUTTON"); + maRoleMap.put (new Integer (AccessibleRole.TOOL_BAR), "TOOL_BAR"); + maRoleMap.put (new Integer (AccessibleRole.TOOL_TIP), "TOOL_TIP"); + maRoleMap.put (new Integer (AccessibleRole.TREE), "TREE"); + maRoleMap.put (new Integer (AccessibleRole.VIEW_PORT), "VIEW_PORT"); + maRoleMap.put (new Integer (AccessibleRole.WINDOW), "WINDOW"); + + maRelationMap.put (new Integer (AccessibleRelationType.INVALID), "INVALID"); + maRelationMap.put (new Integer (AccessibleRelationType.CONTENT_FLOWS_FROM), "CONTENT_FLOWS_FROM"); + maRelationMap.put (new Integer (AccessibleRelationType.CONTENT_FLOWS_TO), "CONTENT_FLOWS_TO"); + maRelationMap.put (new Integer (AccessibleRelationType.CONTROLLED_BY), "CONTROLLED_BY"); + maRelationMap.put (new Integer (AccessibleRelationType.CONTROLLER_FOR), "CONTROLLER_FOR"); + maRelationMap.put (new Integer (AccessibleRelationType.LABEL_FOR), "LABEL_FOR"); + maRelationMap.put (new Integer (AccessibleRelationType.LABELED_BY), "LABELED_BY"); + maRelationMap.put (new Integer (AccessibleRelationType.MEMBER_OF), "MEMBER_OF"); + maRelationMap.put (new Integer (AccessibleRelationType.SUB_WINDOW_OF), "SUB_WINDOW_OF"); + } +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java b/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java new file mode 100644 index 000000000000..d9f77d9e4e07 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java @@ -0,0 +1,169 @@ +package org.openoffice.accessibility.misc; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.PrintStream; +import java.util.Timer; +import java.util.TimerTask; +import java.util.Vector; + +import com.sun.star.uno.UnoRuntime; +import com.sun.star.bridge.XUnoUrlResolver; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.comp.helper.Bootstrap; + +/** This class establishes a connection to a StarOffice application. + */ +public class OfficeConnection + extends TimerTask +{ + final public static long snDelay = 3000; + + public static synchronized OfficeConnection Instance () + { + if (saInstance == null) + saInstance = new OfficeConnection (); + return saInstance; + } + + + + + static public void SetPipeName (String sPipeName) + { + ssDefaultPipeName = sPipeName; + } + + + + + public void AddConnectionListener (ActionListener aListener) + { + SimpleOffice aOffice = SimpleOffice.Instance(); + if (IsValid()) + aListener.actionPerformed ( + new ActionEvent (aOffice,0,"<connected>")); + maListeners.add (aListener); + } + + + + /** @descr Return the service manager that represents the connected + StarOffice application + */ + public XMultiServiceFactory GetServiceManager () + { + return maServiceManager; + } + + + + + /** Return a flag that indicates if the constructor has been able to + establish a valid connection. + */ + public boolean IsValid () + { + return (maServiceManager != null); + } + + + + + /** Connect to a already running StarOffice application that has + been started with a command line argument like + "-accept=pipe,name=<username>;urp;" + */ + private boolean Connect () + { + mbInitialized = true; + // Set up connection string. + String sConnectString = "uno:pipe,name=" + msPipeName + + ";urp;StarOffice.ServiceManager"; + + // connect to a running office and get the ServiceManager + try + { + // Create a URL Resolver. + XMultiServiceFactory aLocalServiceManager = + Bootstrap.createSimpleServiceManager(); + XUnoUrlResolver aURLResolver = + (XUnoUrlResolver) UnoRuntime.queryInterface ( + XUnoUrlResolver.class, + aLocalServiceManager.createInstance ( + "com.sun.star.bridge.UnoUrlResolver") + ); + + maServiceManager = + (XMultiServiceFactory) UnoRuntime.queryInterface ( + XMultiServiceFactory.class, + aURLResolver.resolve (sConnectString) + ); + } + + catch (Exception e) + { + if (maOut != null) + { + maOut.println ("Could not connect with " + + sConnectString + " : " + e); + maOut.println ("Please start OpenOffice/StarOffice with " + + "\"-accept=pipe,name=" + msPipeName + ";urp;\""); + } + } + + return maServiceManager != null; + } + + + public void run () + { + if ( ! IsValid()) + { + MessageArea.println ("trying to connect"); + if (Connect()) + { + // Stop the timer. + cancel (); + + ActionEvent aEvent = new ActionEvent (this,0,"<connected>"); + for (int i=0; i<maListeners.size(); i++) + ((ActionListener)maListeners.elementAt(i)).actionPerformed(aEvent); + } + } + } + + private OfficeConnection () + { + this (null); + } + + + private OfficeConnection (PrintStream aOut) + { + msPipeName = ssDefaultPipeName; + maOut = aOut; + maListeners = new Vector(); + maServiceManager = null; + + maTimer = new Timer (true); + maTimer.schedule (this, 0, snDelay); + } + + + private static OfficeConnection saInstance = null; + private static String ssDefaultPipeName = System.getenv( "USER" ); + + private XMultiServiceFactory maServiceManager; + String msPipeName; + + /** A value of true just indicates that it has been tried to establish a connection, + not that that has been successfull. + */ + private boolean mbInitialized = false; + + /// Stream used to print messages. + private PrintStream maOut; + private Timer maTimer; + private Vector maListeners; +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/Options.java b/accessibility/workben/org/openoffice/accessibility/misc/Options.java new file mode 100644 index 000000000000..e3c358264a1d --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/Options.java @@ -0,0 +1,106 @@ +package org.openoffice.accessibility.misc; + +import java.io.File; +import java.io.FileReader; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.util.Properties; + + +/** Load from and save options into a file. +*/ +public class Options + extends Properties +{ + static public Options Instance () + { + if (saOptions == null) + saOptions = new Options (); + return saOptions; + } + + static public void SetString (String sName, String sValue) + { + Instance().setProperty (sName, sValue); + Instance().Save (); + } + + static public String GetString (String sName) + { + return Instance().getProperty (sName); + } + + static public void SetBoolean (String sName, boolean bValue) + { + Instance().setProperty (sName, Boolean.toString(bValue)); + Instance().Save (); + } + + static public boolean GetBoolean (String sName) + { + return Boolean.valueOf(Instance().getProperty (sName)).booleanValue(); + } + + static public void SetInteger (String sName, int nValue) + { + Instance().setProperty (sName, Integer.toString(nValue)); + Instance().Save (); + } + + static public int GetInteger (String sName, int nDefault) + { + String sValue = Instance().getProperty (sName); + if (sValue == null) + return nDefault; + else + return Integer.parseInt (sValue); + } + + public void Load (String sBaseName) + { + try + { + load (new FileInputStream (ProvideFile(sBaseName))); + } + catch (java.io.IOException e) + { + // Ignore a non-existing options file. + } + } + + public void Save (String sBaseName) + { + ProvideFile(sBaseName); + Save (); + } + + public void Save () + { + if (maFile != null) + { + try + { + store (new FileOutputStream (maFile), null); + } + catch (java.io.IOException e) + { + } + } + } + + private Options () + { + maFile = null; + } + + private File ProvideFile (String sBaseName) + { + maFile = new File ( + System.getProperty ("user.home"), + sBaseName); + return maFile; + } + + static private Options saOptions = null; + private File maFile; +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java b/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java new file mode 100644 index 000000000000..3a2dcdf21926 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java @@ -0,0 +1,413 @@ +package org.openoffice.accessibility.misc; + +import java.lang.Thread; + +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.awt.XWindow; + +import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.XPropertySet; + +import com.sun.star.container.XIndexAccess; +import com.sun.star.container.XChild; +import com.sun.star.container.XEnumerationAccess; +import com.sun.star.container.XEnumeration; + +import com.sun.star.frame.XComponentLoader; +import com.sun.star.frame.XController; +import com.sun.star.frame.XDesktop; +import com.sun.star.frame.XFrame; +import com.sun.star.frame.XModel; +import com.sun.star.frame.XTasksSupplier; +import com.sun.star.frame.XTask; + +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XServiceName; +import com.sun.star.lang.XTypeProvider; + +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.Type; + +import com.sun.star.drawing.XDrawView; +import com.sun.star.drawing.XDrawPage; +import com.sun.star.drawing.XShapes; +import com.sun.star.drawing.XShape; +import com.sun.star.drawing.XShapeDescriptor; + +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleComponent; +import com.sun.star.accessibility.XAccessibleRelationSet; +import com.sun.star.accessibility.XAccessibleStateSet; + + +/** This singleton class tries to simplify some tasks like loading a document + or getting various objects. +*/ +public class SimpleOffice +{ + synchronized static public SimpleOffice Instance () + { + if (saInstance == null) + saInstance = new SimpleOffice (); + + return saInstance; + } + + synchronized static public void Clear () + { + saInstance = null; + } + + + public XModel LoadDocument (String URL) + { + XModel xModel = null; + try + { + // Load the document from the specified URL. + XComponentLoader xLoader = + (XComponentLoader)UnoRuntime.queryInterface( + XComponentLoader.class, mxDesktop); + + XComponent xComponent = xLoader.loadComponentFromURL ( + URL, + "_blank", + 0, + new PropertyValue[0] + ); + + xModel = (XModel) UnoRuntime.queryInterface( + XModel.class, xComponent); + } + catch (java.lang.NullPointerException e) + { + MessageArea.println ("caught exception while loading " + + URL + " : " + e); + } + catch (Exception e) + { + MessageArea.println ("caught exception while loading " + + URL + " : " + e); + } + return xModel; + } + + + + + public XModel GetModel (String name) + { + XModel xModel = null; + try + { + XTasksSupplier xTasksSupplier = + (XTasksSupplier) UnoRuntime.queryInterface( + XTasksSupplier.class, mxDesktop); + XEnumerationAccess xEA = xTasksSupplier.getTasks(); + XEnumeration xE = xEA.createEnumeration(); + while (xE.hasMoreElements()) + { + XTask xTask = (XTask) UnoRuntime.queryInterface( + XTask.class, xE.nextElement()); + MessageArea.print (xTask.getName()); + } + } + catch (Exception e) + { + MessageArea.println ("caught exception while getting Model " + name + + ": " + e); + } + return xModel; + } + + + public XModel GetModel (XDrawView xView) + { + XController xController = (XController) UnoRuntime.queryInterface( + XController.class, xView); + if (xController != null) + return xController.getModel(); + else + { + MessageArea.println ("can't cast view to controller"); + return null; + } + } + + + + + public XDesktop GetDesktop () + { + if (mxDesktop != null) + return mxDesktop; + try + { + // Get the factory of the connected office. + XMultiServiceFactory xMSF = + OfficeConnection.Instance().GetServiceManager (); + if (xMSF == null) + { + MessageArea.println ("can't connect to office"); + return null; + } + else + MessageArea.println ("Connected successfully."); + + // Create a new desktop. + mxDesktop = (XDesktop) UnoRuntime.queryInterface( + XDesktop.class, + xMSF.createInstance ("com.sun.star.frame.Desktop") + ); + } + catch (Exception e) + { + MessageArea.println ("caught exception while creating desktop: " + + e); + } + + return mxDesktop; + } + + + /** Return a reference to the extended toolkit which is a broadcaster of + top window, key, and focus events. + */ + public XExtendedToolkit GetExtendedToolkit () + { + XExtendedToolkit xToolkit = null; + if (this != null) + try + { + // Get the factory of the connected office. + XMultiServiceFactory xMSF = + OfficeConnection.Instance().GetServiceManager (); + if (xMSF != null) + { + xToolkit = (XExtendedToolkit) UnoRuntime.queryInterface( + XExtendedToolkit.class, + xMSF.createInstance ("stardiv.Toolkit.VCLXToolkit") + ); + } + } + catch (Exception e) + { + MessageArea.println ( + "caught exception while creating extended toolkit: " + e); + } + + return xToolkit; + } + + + + static public XAccessible GetAccessibleObject (XInterface xObject) + { + XAccessible xAccessible = null; + try + { + xAccessible = (XAccessible) UnoRuntime.queryInterface( + XAccessible.class, xObject); + } + catch (Exception e) + { + System.err.println ( + "caught exception while getting accessible object" + e); + e.printStackTrace (System.err); + } + return xAccessible; + } + + static public XAccessibleContext GetAccessibleContext (XInterface xObject) + { + XAccessible xAccessible = GetAccessibleObject (xObject); + if (xAccessible != null) + return xAccessible.getAccessibleContext(); + else + return null; + } + + /** Return the root object of the accessibility hierarchy. + */ + public XAccessible GetAccessibleRoot (XAccessible xAccessible) + { + try + { + XAccessible xParent = null; + do + { + XAccessibleContext xContext = xAccessible.getAccessibleContext(); + if (xContext != null) + xParent = xContext.getAccessibleParent(); + if (xParent != null) + xAccessible = xParent; + } + while (xParent != null); + } + catch (Exception e) + { + MessageArea.println ( + "caught exception while getting accessible root" + e); + e.printStackTrace(); + } + return xAccessible; + } + + + + + /** @descr Return the current window associated with the given + model. + */ + public XWindow GetCurrentWindow () + { + return GetCurrentWindow ((XModel) UnoRuntime.queryInterface( + XModel.class, GetDesktop())); + } + + + + + + public XWindow GetCurrentWindow (XModel xModel) + { + XWindow xWindow = null; + try + { + if (xModel == null) + MessageArea.println ("invalid model (==null)"); + XController xController = xModel.getCurrentController(); + if (xController == null) + MessageArea.println ("can't get controller from model"); + XFrame xFrame = xController.getFrame(); + if (xFrame == null) + MessageArea.println ("can't get frame from controller"); + xWindow = xFrame.getComponentWindow (); + if (xWindow == null) + MessageArea.println ("can't get window from frame"); + } + catch (Exception e) + { + MessageArea.println ("caught exception while getting current window" + e); + } + + return xWindow; + } + + + /** @descr Return the current draw page of the given desktop. + */ + public XDrawPage GetCurrentDrawPage () + { + return GetCurrentDrawPage ( + (XDrawView) UnoRuntime.queryInterface( + XDrawView.class, + GetCurrentView())); + } + + + + + public XDrawPage GetCurrentDrawPage (XDrawView xView) + { + XDrawPage xPage = null; + try + { + if (xView == null) + MessageArea.println ("can't get current draw page from null view"); + else + xPage = xView.getCurrentPage(); + } + catch (Exception e) + { + MessageArea.println ("caught exception while getting current draw page : " + e); + } + + return xPage; + } + + + + + /** @descr Return the current view of the given desktop. + */ + public XDrawView GetCurrentView () + { + return GetCurrentView (GetDesktop()); + } + + public XDrawView GetCurrentView (XDesktop xDesktop) + { + if (xDesktop == null) + MessageArea.println ("can't get desktop to retrieve current view"); + + XDrawView xView = null; + try + { + XComponent xComponent = xDesktop.getCurrentComponent(); + if (xComponent == null) + MessageArea.println ("can't get component to retrieve current view"); + + XFrame xFrame = xDesktop.getCurrentFrame(); + if (xFrame == null) + MessageArea.println ("can't get frame to retrieve current view"); + + XController xController = xFrame.getController(); + if (xController == null) + MessageArea.println ("can't get controller to retrieve current view"); + + xView = (XDrawView) UnoRuntime.queryInterface( + XDrawView.class, xController); + if (xView == null) + MessageArea.println ("could not cast controller into view"); + } + catch (Exception e) + { + MessageArea.println ("caught exception while getting current view : " + e); + } + + return xView; + } + + + + + // Return the accessible object of the document window. + public static XAccessible GetAccessibleDocumentWindow (XDrawPage xPage) + { + XIndexAccess xShapeList = (XIndexAccess) UnoRuntime.queryInterface( + XIndexAccess.class, xPage); + if (xShapeList.getCount() > 0) + { + // All shapes return as accessible object the document window's + // accessible object. This is, of course, a hack and will be + // removed as soon as the missing infrastructure for obtaining + // the object directly is implemented. + XShape xShape = null; + try{ + xShape = (XShape) UnoRuntime.queryInterface( + XShape.class, xShapeList.getByIndex (0)); + } catch (Exception e) + {} + XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface ( + XAccessible.class, xShape); + return xAccessible; + } + else + return null; + } + + private SimpleOffice () + { + } + + + + private XDesktop mxDesktop; + private static SimpleOffice saInstance = null; +} diff --git a/accessibility/workben/org/openoffice/accessibility/misc/makefile.common b/accessibility/workben/org/openoffice/accessibility/misc/makefile.common new file mode 100644 index 000000000000..d06336e12c56 --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/makefile.common @@ -0,0 +1,67 @@ +#************************************************************************* +# +# $RCSfile: makefile.common,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar juh.jar java_uno.jar +JAVAFILES = \ + AccessibleEventMulticaster.java \ + InformationWriter.java \ + MessageArea.java \ + NameProvider.java \ + OfficeConnection.java \ + Options.java \ + SimpleOffice.java diff --git a/accessibility/workben/org/openoffice/accessibility/misc/makefile.mk b/accessibility/workben/org/openoffice/accessibility/misc/makefile.mk new file mode 100644 index 000000000000..f0b71f860c3e --- /dev/null +++ b/accessibility/workben/org/openoffice/accessibility/misc/makefile.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = awb +PRJ = ..$/..$/..$/..$/.. +TARGET = java_misc +PACKAGE = org$/openoffice$/accessibility$/misc + +USE_JAVAVER:=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(JAVAVER:s/.//)" >= "140" + +.INCLUDE : makefile.common + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +#JARTARGET = $(TARGET).jar +#JARCOMPRESS = TRUE +#JARCLASSDIRS = $(PACKAGE) org/openoffice/java/accessibility/awb +#CUSTOMMANIFESTFILE = manifest +.ENDIF + +# --- Targets ------------------------------------------------------ + + +.INCLUDE : target.mk + diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 55b72e1031e2..6f79551ecd72 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -260,7 +260,7 @@ long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG ) IMPL_LINK( CommunicationLinkViaSocket, PutDataReceivedHdl, CommunicationLinkViaSocket*, EMPTYARG ) { - nDataReceivedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, DataReceived ) ); + nDataReceivedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLink, DataReceived ) ); return 0; } diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx index 5d84cb6cd75d..988f4055a2eb 100644 --- a/automation/source/server/server.cxx +++ b/automation/source/server/server.cxx @@ -805,7 +805,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) break; } default: - DBG_ERROR1( "Unbekannter Request Nr:%il", nId ); + DBG_ERROR1( "Unbekannter Request Nr:%i", nId ); break; } if( !pIn->IsEof() ) diff --git a/automation/source/testtool/makefile.mk b/automation/source/testtool/makefile.mk index 4cb27a48ddd4..79a811fdaee7 100644 --- a/automation/source/testtool/makefile.mk +++ b/automation/source/testtool/makefile.mk @@ -103,12 +103,15 @@ $(MISC)$/xfilter.pl : filter.pl .IF "$(GUI)"=="UNX" INIFILESUFFIX=rc +BRANDPATH=none .ELIF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" INIFILESUFFIX=.ini +BRANDPATH=.. .END $(BIN)$/testtool$(INIFILESUFFIX): testtool.ini - $(SED) -e s/$(EMQ)!INIFILESUFFIX$(EMQ)!/$(INIFILESUFFIX)/ < $< > $@ + $(SED) -e s/$(EMQ)!INIFILESUFFIX$(EMQ)!/$(INIFILESUFFIX)/ \ + -e s/$(EMQ)!BRANDPATH$(EMQ)!/$(BRANDPATH)/ < $< > $@ ALLTAR: \ $(BIN)$/testtool$(INIFILESUFFIX) diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index f341bd3efe36..3ac135829f6d 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -36,7 +36,6 @@ #include <vcl/svapp.hxx> #include <tools/time.hxx> #include <tools/debug.hxx> -#include <vos/process.hxx> #include <vcl/timer.hxx> #ifndef _BASIC_TTRESHLP_HXX diff --git a/automation/source/testtool/testtool.ini b/automation/source/testtool/testtool.ini index bf1b54c8777e..ff2e43f5c0f6 100644 --- a/automation/source/testtool/testtool.ini +++ b/automation/source/testtool/testtool.ini @@ -1,7 +1,7 @@ [Bootstrap] URE_BOOTSTRAP=${ORIGIN}/fundamentalbasis!INIFILESUFFIX! OOO_BASE_DIR=${ORIGIN}/.. -BRAND_BASE_DIR=${OOO_BASE_DIR}/none +BRAND_BASE_DIR=${OOO_BASE_DIR}/!BRANDPATH! UserInstallation=${SYSUSERCONFIG}/.oootesttool [Misc] diff --git a/automation/util/manually_added_ids.hid b/automation/util/manually_added_ids.hid index e9fdb24f9793..7372dc0d9879 100755 --- a/automation/util/manually_added_ids.hid +++ b/automation/util/manually_added_ids.hid @@ -1,15 +1,8 @@ -HDE_PDF_EXPORT_DLG 33375 - MSC_Super_ID 123456 MSC_Super_ID2 1234567 MSC_Super_ID3 12345678 -HID_OPTIONS_JAVA_LIST 39997 - -PDF1TBO 867876864 -PDF2TBO 867860480 - FontWork1TBO 40026 FontWork2TBO 40027 diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src index 5d5f4b6fe9fb..130dda34d9e4 100644 --- a/basctl/source/basicide/basidesh.src +++ b/basctl/source/basicide/basidesh.src @@ -195,7 +195,7 @@ String RID_STR_APPENDLIBS String RID_STR_QUERYDELMACRO { /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie das Makro XX löschen ? : M÷chten Sie das Makro XX l÷schen ? */ - Text [ en-US ] = "Do you want to delete the macro XX ?" ; + Text [ en-US ] = "Do you want to delete the macro XX?" ; }; String RID_STR_QUERYDELDIALOG { diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 4d0ccca05581..e4abb3fad92e 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -80,31 +80,6 @@ namespace BasicIDE { //---------------------------------------------------------------------------- -SfxMacro* CreateMacro() -{ - DBG_ERROR( "BasicIDE::CreateMacro() - war eigentlich nur fuer Macro-Recording!" ); - IDE_DLL()->GetExtraData()->ChoosingMacro() = TRUE; - SFX_APP()->EnterBasicCall(); - Window* pParent = Application::GetDefDialogParent(); - SfxMacro* pMacro = 0; - MacroChooser* pChooser = new MacroChooser( pParent, TRUE ); - Window* pOldModalDialogParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( pChooser ); - //pChooser->SetMode( MACROCHOOSER_RECORDING ); - short nRetValue = pChooser->Execute(); - (void)nRetValue; - - Application::SetDefDialogParent( pOldModalDialogParent ); - delete pChooser; - - SFX_APP()->LeaveBasicCall(); - IDE_DLL()->GetExtraData()->ChoosingMacro() = FALSE; - - return pMacro; -} - -//---------------------------------------------------------------------------- - void Organize( INT16 tabId ) { BasicIDEDLL::Init(); diff --git a/basctl/source/basicide/bastype3.hxx b/basctl/source/basicide/bastype3.hxx index 35607b43f307..02dbb9cd95dd 100644 --- a/basctl/source/basicide/bastype3.hxx +++ b/basctl/source/basicide/bastype3.hxx @@ -62,24 +62,6 @@ public: Accelerator& GetAccelerator() { return aAcc; } }; -class ExtendedMultiLineEdit : public MultiLineEdit -{ -private: - Accelerator aAcc; - Link aAccHdl; - -protected: - DECL_LINK( EditAccHdl, Accelerator * ); - DECL_LINK( ImplGetFocusHdl, Control* ); - DECL_LINK( ImplLoseFocusHdl, Control* ); - -public: - ExtendedMultiLineEdit( Window* pParent, IDEResId nRes ); - - void SetAccHdl( const Link& rLink ) { aAccHdl = rLink; } - Accelerator& GetAccelerator() { return aAcc; } -}; - #endif //NO_SPECIALEDIT #endif // _BASTYPE3_HXX diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index c00037cf8cab..3b64b11b9abc 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -484,24 +484,6 @@ void __EXPORT BasicDockingWindow::StartDocking() - -BasicToolBox::BasicToolBox( Window* pParent, IDEResId nRes ) : - ToolBox( pParent, nRes ) -{ -} - - - -void __EXPORT BasicToolBox::MouseButtonDown( const MouseEvent &rEvt ) -{ - ToolBox::MouseButtonDown( rEvt ); - if ( !GetCurItemId() ) - ((BasicDockingWindow*)GetParent())->MouseButtonDown( rEvt ); -} - - - - ExtendedEdit::ExtendedEdit( Window* pParent, IDEResId nRes ) : Edit( pParent, nRes ) { @@ -534,34 +516,6 @@ IMPL_LINK_INLINE_END( ExtendedEdit, EditAccHdl, Accelerator *, pAcc ) -ExtendedMultiLineEdit::ExtendedMultiLineEdit( Window* pParent, IDEResId nRes ) : - MultiLineEdit( pParent, nRes ) -{ - aAcc.SetSelectHdl( LINK( this, ExtendedMultiLineEdit, EditAccHdl ) ); - Control::SetGetFocusHdl( LINK( this, ExtendedMultiLineEdit, ImplGetFocusHdl ) ); - Control::SetLoseFocusHdl( LINK( this, ExtendedMultiLineEdit, ImplLoseFocusHdl ) ); -} - -IMPL_LINK( ExtendedMultiLineEdit, ImplGetFocusHdl, Control*, EMPTYARG ) -{ - Application::InsertAccel( &aAcc ); - return 0; -} - - -IMPL_LINK( ExtendedMultiLineEdit, ImplLoseFocusHdl, Control*, EMPTYARG ) -{ - Application::RemoveAccel( &aAcc ); - return 0; -} - -IMPL_LINK_INLINE_START( ExtendedMultiLineEdit, EditAccHdl, Accelerator *, pAcc ) -{ - aAccHdl.Call( pAcc ); - return 0; -} -IMPL_LINK_INLINE_END( ExtendedMultiLineEdit, EditAccHdl, Accelerator *, pAcc ) - struct TabBarDDInfo { ULONG npTabBar; @@ -803,11 +757,6 @@ ULONG CalcLineCount( SvStream& rStream ) return nCRs; } -LibInfoKey::LibInfoKey() - :m_aDocument( ScriptDocument::getApplicationScriptDocument() ) -{ -} - LibInfoKey::LibInfoKey( const ScriptDocument& rDocument, const String& rLibName ) :m_aDocument( rDocument ) ,m_aLibName( rLibName ) @@ -839,12 +788,6 @@ bool LibInfoKey::operator==( const LibInfoKey& rKey ) const return bRet; } -LibInfoItem::LibInfoItem() - :m_aDocument( ScriptDocument::getApplicationScriptDocument() ) - ,m_nCurrentType( 0 ) -{ -} - LibInfoItem::LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType ) :m_aDocument( rDocument ) ,m_aLibName( rLibName ) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index abf25722eab2..f0143cc8517b 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -232,14 +232,6 @@ SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, ULONG nPos ) //---------------------------------------------------------------------------- -void BasicCheckBox::RemoveEntry( ULONG nPos ) -{ - if ( nPos < GetEntryCount() ) - SvTreeListBox::GetModel()->Remove( GetEntry( nPos ) ); -} - -//---------------------------------------------------------------------------- - SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName ) { ULONG nCount = GetEntryCount(); @@ -255,29 +247,6 @@ SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName ) //---------------------------------------------------------------------------- -ULONG BasicCheckBox::GetSelectEntryPos() const -{ - return GetModel()->GetAbsPos( FirstSelected() ); -} - -//---------------------------------------------------------------------------- - -ULONG BasicCheckBox::GetCheckedEntryCount() const -{ - ULONG nCheckCount = 0; - ULONG nCount = GetEntryCount(); - - for (ULONG i=0; i<nCount; i++ ) - { - if ( IsChecked( i ) ) - nCheckCount++; - } - - return nCheckCount; -} - -//---------------------------------------------------------------------------- - void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck ) { if ( nPos < GetEntryCount() ) diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 6d9a468fd498..b5066463ec51 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -131,12 +131,8 @@ public: ~BasicCheckBox(); SvLBoxEntry* DoInsertEntry( const String& rStr, ULONG nPos = LISTBOX_APPEND ); - void RemoveEntry( ULONG nPos ); SvLBoxEntry* FindEntry( const String& rName ); - ULONG GetSelectEntryPos() const; - - ULONG GetCheckedEntryCount() const; void CheckEntryPos( ULONG nPos, BOOL bCheck = TRUE ); BOOL IsChecked( ULONG nPos ) const; diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index f8cec9ee785f..6211b8552bc3 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -88,16 +88,6 @@ DlgEdObj::DlgEdObj() //---------------------------------------------------------------------------- -DlgEdObj::DlgEdObj(const ::rtl::OUString& rModelName) - :SdrUnoObj(rModelName, sal_False) - ,bIsListening(sal_False) - ,pDlgEdForm( NULL ) -{ - DBG_CTOR(DlgEdObj, NULL); -} - -//---------------------------------------------------------------------------- - DlgEdObj::DlgEdObj(const ::rtl::OUString& rModelName, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac) :SdrUnoObj(rModelName, rxSFac, sal_False) @@ -1377,76 +1367,11 @@ void DlgEdObj::SetLayer(SdrLayerID nLayer) //---------------------------------------------------------------------------- -SdrObject* DlgEdObj::CheckHit( const Point& rPnt, USHORT nTol,const SetOfByte* pSet ) const -{ - // #109994# fixed here, because the drawing layer doesn't handle objects - // with a width or height of 0 in a proper way - Rectangle aRect_( aOutRect ); - if ( aRect_.IsEmpty() ) - { - aRect_.Left() -= nTol; - aRect_.Top() -= nTol; - aRect_.Right() = ( aRect_.Right() == RECT_EMPTY ? aOutRect.Left() + nTol : aRect_.Right() + nTol ); - aRect_.Bottom() = ( aRect_.Bottom() == RECT_EMPTY ? aOutRect.Top() + nTol : aRect_.Bottom() + nTol ); - - if ( aRect_.IsInside( rPnt ) ) - return (SdrObject*)this; - else - return 0; - } - - if ( supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" )) - { - Rectangle aROuter = aOutRect; - aROuter.Left() -= nTol; - aROuter.Right() += nTol; - aROuter.Top() -= nTol; - aROuter.Bottom() += nTol; - - Rectangle aRInner = aOutRect; - if( (aRInner.GetSize().Height() > (long)nTol*2) && - (aRInner.GetSize().Width() > (long)nTol*2) ) - { - aRInner.Left() += nTol; - aRInner.Right() -= nTol; - aRInner.Top() += nTol; - aRInner.Bottom() -= nTol; - } - - if( aROuter.IsInside( rPnt ) && !aRInner.IsInside( rPnt ) ) - return (SdrObject*)this; - else - return 0; - } - else - return SdrUnoObj::CheckHit( rPnt, nTol, pSet ); -} - - -//---------------------------------------------------------------------------- - TYPEINIT1(DlgEdForm, DlgEdObj); DBG_NAME(DlgEdForm); //---------------------------------------------------------------------------- -DlgEdForm::DlgEdForm(const ::rtl::OUString& rModelName) - :DlgEdObj(rModelName) -{ - DBG_CTOR(DlgEdForm, NULL); -} - -//---------------------------------------------------------------------------- - -DlgEdForm::DlgEdForm(const ::rtl::OUString& rModelName, - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac) - :DlgEdObj(rModelName, rxSFac) -{ - DBG_CTOR(DlgEdForm, NULL); -} - -//---------------------------------------------------------------------------- - DlgEdForm::DlgEdForm() :DlgEdObj() { @@ -1857,32 +1782,6 @@ void DlgEdForm::UpdateTabOrderAndGroups() //---------------------------------------------------------------------------- -SdrObject* DlgEdForm::CheckHit( const Point& rPnt, USHORT nTol, const SetOfByte* ) const -{ - Rectangle aROuter = aOutRect; - aROuter.Left() -= nTol; - aROuter.Right() += nTol; - aROuter.Top() -= nTol; - aROuter.Bottom() += nTol; - - Rectangle aRInner = aOutRect; - if( (aRInner.GetSize().Height() > (long)nTol*2) && - (aRInner.GetSize().Width() > (long)nTol*2) ) - { - aRInner.Left() += nTol; - aRInner.Right() -= nTol; - aRInner.Top() += nTol; - aRInner.Bottom() -= nTol; - } - - if( aROuter.IsInside( rPnt ) && !aRInner.IsInside( rPnt ) ) - return (SdrObject*)this; - else - return 0; -} - -//---------------------------------------------------------------------------- - void DlgEdForm::NbcMove( const Size& rSize ) { SdrUnoObj::NbcMove( rSize ); diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx index 50b7ae7f28df..19b58e763113 100644 --- a/basctl/source/dlged/dlgedview.cxx +++ b/basctl/source/dlged/dlgedview.cxx @@ -43,6 +43,7 @@ #include <basidesh.hxx> #include <iderdll.hxx> +#include "dlgedobj.hxx" TYPEINIT1( DlgEdView, SdrView ); @@ -151,3 +152,68 @@ void DlgEdView::MakeVisible( const Rectangle& rRect, Window& rWin ) //---------------------------------------------------------------------------- +SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT nTol) +{ + DlgEdObj* pDlgEdObj = dynamic_cast< DlgEdObj* >(pRetval); + + if(pDlgEdObj) + { + bool bExcludeInner(false); + + if(0 != dynamic_cast< DlgEdForm* >(pRetval)) + { + // from DlgEdForm::CheckHit; exclude inner for DlgEdForm + bExcludeInner = true; + } + else if(pDlgEdObj->supportsService("com.sun.star.awt.UnoControlGroupBoxModel")) + { + // from DlgEdObj::CheckHit; exclude inner for group shapes + bExcludeInner = true; + } + + if(bExcludeInner) + { + // use direct model data; it's a DlgEdObj, so GetLastBoundRect() + // will access aOutRect directly + const Rectangle aOuterRectangle(pDlgEdObj->GetLastBoundRect()); + + if(!aOuterRectangle.IsEmpty() + && RECT_EMPTY != aOuterRectangle.Right() + && RECT_EMPTY != aOuterRectangle.Bottom()) + { + basegfx::B2DRange aOuterRange( + aOuterRectangle.Left(), aOuterRectangle.Top(), + aOuterRectangle.Right(), aOuterRectangle.Bottom()); + + if(nTol) + { + aOuterRange.grow(-1.0 * nTol); + } + + if(aOuterRange.isInside(basegfx::B2DPoint(rPnt.X(), rPnt.Y()))) + { + pRetval = 0; + } + } + } + } + + return pRetval; +} + +SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const +{ + // call parent + SdrObject* pRetval = SdrView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay); + + if(pRetval) + { + // check hitted object locally + pRetval = impLocalHitCorrection(pRetval, rPnt, nTol); + } + + return pRetval; +} + +//---------------------------------------------------------------------------- +// eof diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx index a243d64af39a..c917de5a6dee 100644 --- a/basctl/source/inc/basobj.hxx +++ b/basctl/source/inc/basobj.hxx @@ -54,7 +54,6 @@ struct BasicIDE_Impl; namespace BasicIDE { - SfxMacro* CreateMacro(); void Organize( INT16 tabId ); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index ba1ac9c57068..0c542ac405ad 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -98,8 +98,6 @@ struct BreakPoint class BasicDockingWindow : public DockingWindow { - friend class BasicToolBox; - Rectangle aFloatingPosAndSize; protected: @@ -113,14 +111,6 @@ public: BasicDockingWindow( Window* pParent ); }; -class BasicToolBox : public ToolBox -{ -public: - BasicToolBox( Window* pParent, IDEResId nRes ); - - virtual void MouseButtonDown( const MouseEvent& rMEvt ); -}; - DECLARE_LIST( BreakPL, BreakPoint* ) class BreakPointList : public BreakPL { @@ -264,7 +254,6 @@ private: String m_aLibName; public: - LibInfoKey(); LibInfoKey( const ScriptDocument& rDocument, const String& rLibName ); ~LibInfoKey(); @@ -287,7 +276,6 @@ private: USHORT m_nCurrentType; public: - LibInfoItem(); LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType ); ~LibInfoItem(); diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 6061eff2a8df..e352ad738da4 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -66,7 +66,6 @@ private: protected: DlgEdObj(); - DlgEdObj(const ::rtl::OUString& rModelName); DlgEdObj(const ::rtl::OUString& rModelName, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac); @@ -140,7 +139,6 @@ public: virtual void SAL_CALL _elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); virtual void SetLayer(SdrLayerID nLayer); - virtual SdrObject* CheckHit(const Point& rPnt,USHORT nTol,const SetOfByte*) const; }; @@ -161,9 +159,6 @@ private: protected: - DlgEdForm(const ::rtl::OUString& rModelName); - DlgEdForm(const ::rtl::OUString& rModelName, - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac); DlgEdForm(); virtual void NbcMove( const Size& rSize ); @@ -194,8 +189,6 @@ public: virtual void UpdateGroups(); virtual void UpdateTabOrderAndGroups(); - virtual SdrObject* CheckHit(const Point& rPnt,USHORT nTol,const SetOfByte*) const; - ::com::sun::star::awt::DeviceInfo getDeviceInfo() const; private: diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx index 5b9538c347f8..11d580634e99 100644 --- a/basctl/source/inc/dlgedview.hxx +++ b/basctl/source/inc/dlgedview.hxx @@ -53,6 +53,11 @@ public: virtual void MarkListHasChanged(); virtual void MakeVisible( const Rectangle& rRect, Window& rWin ); + +protected: + // overloaded to handle HitTest for some objects special + using SdrView::CheckSingleSdrObjectHit; + virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const; }; #endif //_BASCTL_DLGEDVIEW_HXX diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk index 80b3efd4325d..0f2a919ff655 100644 --- a/basctl/util/makefile.mk +++ b/basctl/util/makefile.mk @@ -54,6 +54,7 @@ SHL1TARGET= basctl$(DLLPOSTFIX) SHL1IMPLIB= basctl SHL1BASE = 0x1d800000 SHL1STDLIBS= \ + $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ $(BASICLIB) \ diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx index 4c043419f9d6..ca24d508ae07 100755 --- a/crashrep/source/unx/main.cxx +++ b/crashrep/source/unx/main.cxx @@ -357,7 +357,7 @@ bool SendHTTPRequest( "SOAPAction: \"\"\r\n\r\n", pszServer, uPort, - (int)length + static_cast<int>(length) ); else sprintf( buffer, @@ -365,7 +365,7 @@ bool SendHTTPRequest( "Content-Type: text/xml; charset=\"utf-8\"\r\n" "Content-Length: %d\r\n" "SOAPAction: \"\"\r\n\r\n", - (int)length + static_cast<int>(length) ); if ( g_bDebugMode ) diff --git a/crashrep/source/unx/makefile.mk b/crashrep/source/unx/makefile.mk index 54628be1f2f7..2f8be8f96a76 100755 --- a/crashrep/source/unx/makefile.mk +++ b/crashrep/source/unx/makefile.mk @@ -63,7 +63,7 @@ APP1RPATH=BRAND .IF "$(OS)" != "MACOSX" APP1STDLIBS=$(DYNAMIC) -lXext -lX11 .ENDIF -.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX" +.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX" && "$(OS)"!="NETBSD" APP1STDLIBS+=-ldl -lnsl .ENDIF .IF "$(OS)" == "SOLARIS" diff --git a/crashrep/source/win32/soreport.cpp b/crashrep/source/win32/soreport.cpp index 4c897f76e0b5..043ad62b0051 100755 --- a/crashrep/source/win32/soreport.cpp +++ b/crashrep/source/win32/soreport.cpp @@ -1564,8 +1564,60 @@ static void repatch_soffice_exe( void *pBuffer, size_t nBufSize ) } while ( !bPatched && nBufSize ); } +// Normalize executable/library images to prevent different MD5 checksums due +// to a different PE header date/checksum (this doesn't affect the code/data +// sections of a executable/library. Please see tools/source/bootstrp/md5.cxx +// where the same method is also used. The tool so_checksum creates the MD5 +// checksums during build time. You have to make sure that both methods use the +// same algorithm otherwise there could be problems with stack reports. +static void normalize_pe_image(sal_uInt8* buffer, size_t nBufferSize) +{ + const int OFFSET_PE_OFFSET = 0x3c; + const int OFFSET_COFF_TIMEDATESTAMP = 4; + const int PE_SIGNATURE_SIZE = 4; + const int COFFHEADER_SIZE = 20; + const int OFFSET_PE_OPTIONALHEADER_CHECKSUM = 64; + + // Check the header part of the file buffer + if (buffer[0] == 'M' && buffer[1] == 'Z') + { + unsigned long PEHeaderOffset = (long)buffer[OFFSET_PE_OFFSET]; + if (PEHeaderOffset < nBufferSize-4) + { + if ( buffer[PEHeaderOffset] == 'P' && + buffer[PEHeaderOffset+1] == 'E' && + buffer[PEHeaderOffset+2] == 0 && + buffer[PEHeaderOffset+3] == 0 ) + { + PEHeaderOffset += PE_SIGNATURE_SIZE; + if (PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP < nBufferSize-4) + { + // Set timedatestamp and checksum fields to a normalized + // value to enforce the same MD5 checksum for identical + // Windows executables/libraries. + buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP] = 0; + buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+1] = 0; + buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+2] = 0; + buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+3] = 0; + } + + if (PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM < nBufferSize-4) + { + // Set checksum to a normalized value + buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM] = 0; + buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+1] = 0; + buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+2] = 0; + buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+3] = 0; + } + } + } + } +} + static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, sal_uInt32 nChecksumLen ) { + const int MINIMAL_FILESIZE = 512; + sal_uInt32 nBytesProcessed = 0; FILE *fp = fopen( filename, "rb" ); @@ -1585,6 +1637,8 @@ static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum { if ( 0 == stricmp( GetFileName(filename).c_str(), "soffice.bin" ) ) repatch_soffice_exe( pBuffer, nBytesRead ); + else if ( nFileSize > MINIMAL_FILESIZE ) + normalize_pe_image( pBuffer, nBytesRead ); rtlDigestError error = rtl_digest_MD5 ( pBuffer, nBytesRead, diff --git a/embedserv/source/inprocserv/makefile.mk b/embedserv/source/inprocserv/makefile.mk index 0f81dcc8bd0d..1928b1ec42ac 100644 --- a/embedserv/source/inprocserv/makefile.mk +++ b/embedserv/source/inprocserv/makefile.mk @@ -57,7 +57,17 @@ SLOFILES=\ $(SLO)$/inprocembobj.obj SHL1TARGET=$(TARGET) -SHL1STDLIBS=\ +.IF "$(COM)"=="GCC" +SHL1STDLIBS += -lstdc++ +.IF "$(MINGW_GCCLIB_EH)"=="YES" +SHL1STDLIBS += -lgcc_eh +.ENDIF +SHL1STDLIBS += -lgcc -lmingw32 -lmoldname -lmsvcrt +.ELSE +SHL1STDLIBS= +.ENDIF + +SHL1STDLIBS+=\ $(UUIDLIB)\ $(OLE32LIB)\ $(GDI32LIB)\ diff --git a/extensions/inc/extensio.hrc b/extensions/inc/extensio.hrc index c2b627d25ecf..6af1dc5b04fb 100644 --- a/extensions/inc/extensio.hrc +++ b/extensions/inc/extensio.hrc @@ -181,7 +181,7 @@ #define HID_PROP_LOCKED (HID_FORMS_START + 22) #define HID_PROP_FORMATKEY (HID_FORMS_START + 23) #define HID_PROP_REQUIRED (HID_FORMS_START + 24) - // FREE +#define HID_PROP_WHEEL_BEHAVIOR (HID_FORMS_START + 25) // FREE #define HID_PROP_UNIQUE (HID_FORMS_START + 27) #define HID_PROP_CLASSID (HID_FORMS_START + 28) @@ -249,7 +249,7 @@ #define HID_PROP_ECHO_CHAR (HID_FORMS_START + 91) #define HID_PROP_EMPTY_IS_NULL (HID_FORMS_START + 92) #define HID_PROP_DECIMAL_ACCURACY (HID_FORMS_START + 93) - // FREE +#define HID_PROP_ENABLE_VISIBLE (HID_FORMS_START + 94) #define HID_PROP_DEFAULT_BUTTON (HID_FORMS_START + 95) #define HID_PROP_HIDDEN_VALUE (HID_FORMS_START + 96) #define HID_PROP_TRISTATE (HID_FORMS_START + 97) diff --git a/extensions/source/abpilot/makefile.mk b/extensions/source/abpilot/makefile.mk index 85a19ade9996..8830b9144409 100644 --- a/extensions/source/abpilot/makefile.mk +++ b/extensions/source/abpilot/makefile.mk @@ -94,6 +94,7 @@ SHL1STDLIBS= \ $(COMPHELPERLIB) \ $(TKLIB) \ $(UNOTOOLSLIB) \ + $(SVXCORELIB) \ $(SVXLIB) SHL1LIBS= $(SLB)$/$(TARGET).lib diff --git a/extensions/source/activex/main/SOActiveX.h b/extensions/source/activex/main/SOActiveX.h index f7017d582be9..2bf33f96b4e9 100644 --- a/extensions/source/activex/main/SOActiveX.h +++ b/extensions/source/activex/main/SOActiveX.h @@ -163,7 +163,7 @@ public: HRESULT GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl ); HRESULT Cleanup(); HRESULT TerminateOffice(); - HRESULT CSOActiveX::GetURL( const OLECHAR* url, + HRESULT GetURL( const OLECHAR* url, const OLECHAR* target ); void CallbackCreateXInputStream( CBindStatusCallback<CSOActiveX>* pbsc, BYTE* pBytes, DWORD dwSize ); diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 7b36f27626c4..f86b284b72fd 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -223,9 +223,6 @@ namespace dbp // the bound field getContext().xObjectModel->setPropertyValue(::rtl::OUString::createFromAscii("DataField"), makeAny(::rtl::OUString(getSettings().sLinkedFormField))); - - // by default, create a drop down control - getContext().xObjectModel->setPropertyValue(::rtl::OUString::createFromAscii("Dropdown"), ::cppu::bool2any(sal_True)); } catch(Exception&) { diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 2addf2f037a7..255d66f46ea8 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -32,8 +32,10 @@ #define __OLEOBJW_HXX #include "ole2uno.hxx" +#ifdef _MSC_VER #pragma warning (push,1) #pragma warning (disable:4548) +#endif #include <tools/presys.h> #define _WIN32_WINNT 0x0400 @@ -46,7 +48,9 @@ #include <hash_map> #include <tools/postsys.h> +#ifdef _MSC_VER #pragma warning (pop) +#endif #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase4.hxx> @@ -88,7 +92,7 @@ public: ~IUnknownWrapper_Impl(); //XInterface - Any SAL_CALL IUnknownWrapper_Impl::queryInterface(const Type& t) + Any SAL_CALL queryInterface(const Type& t) throw (RuntimeException); // XInvokation diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index 1ed12a759877..8a44ec603b7f 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -1684,7 +1684,8 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& aType= Type()) #endif { - if (pVar->vt != VT_UNKNOWN && pVar->vt != VT_DISPATCH) + //To allow passing "Nothing" in VS 2008 we need to accept VT_EMPTY + if (pVar->vt != VT_UNKNOWN && pVar->vt != VT_DISPATCH && pVar->vt != VT_EMPTY) throw IllegalArgumentException( OUSTR("[automation bridge]UnoConversionUtilities<T>::createOleObjectWrapper \n" "The VARIANT does not contain an object type! "), 0, -1); @@ -1719,13 +1720,23 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& Any ret; //If no Type is provided and pVar contains IUnknown then we return a XInterface. //If pVar contains an IDispatch then we return a XInvocation. - Type desiredType; - if (aType == VOID_TYPE && pVar->vt == VT_UNKNOWN) - desiredType = getCppuType((Reference<XInterface>*) 0); - else if (aType == VOID_TYPE && pVar->vt == VT_DISPATCH) - desiredType = getCppuType((Reference<XInvocation>*) 0); - else - desiredType = aType; + Type desiredType = aType; + + if (aType == VOID_TYPE) + { + switch (pVar->vt) + { + case VT_EMPTY: + case VT_UNKNOWN: + desiredType = getCppuType((Reference<XInterface>*) 0); + break; + case VT_DISPATCH: + desiredType = getCppuType((Reference<XInvocation>*) 0); + break; + default: + desiredType = aType; + } + } // COM pointer are NULL, no wrapper required if (spUnknown == NULL) diff --git a/extensions/source/oooimprovecore/makefile.mk b/extensions/source/oooimprovecore/makefile.mk index 53de4e333994..74a9ad9aee19 100644 --- a/extensions/source/oooimprovecore/makefile.mk +++ b/extensions/source/oooimprovecore/makefile.mk @@ -62,6 +62,7 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(SVTOOLLIB) \ $(SFXLIB) \ + $(SVXCORELIB) \ $(SVXLIB) \ $(TOOLSLIB) diff --git a/extensions/source/oooimprovement/config.cxx b/extensions/source/oooimprovement/config.cxx index daf1e81bc60d..bece7e089f1a 100644 --- a/extensions/source/oooimprovement/config.cxx +++ b/extensions/source/oooimprovement/config.cxx @@ -222,6 +222,7 @@ namespace oooimprovement return result; } +#ifdef FUTURE sal_Int32 Config::getFailedAttempts() const { sal_Int32 result = 0; @@ -231,6 +232,7 @@ namespace oooimprovement MyConfigurationHelper::E_READONLY) >>= result; return result; } +#endif sal_Int32 Config::getOfficeStartCounterdown() const { diff --git a/extensions/source/oooimprovement/config.hxx b/extensions/source/oooimprovement/config.hxx index ff032a6032a5..c5ea887fa76f 100644 --- a/extensions/source/oooimprovement/config.hxx +++ b/extensions/source/oooimprovement/config.hxx @@ -53,7 +53,9 @@ namespace oooimprovement ::rtl::OUString getSoapId() const; ::rtl::OUString getSoapUrl() const; sal_Int32 getReportCount() const; +#ifdef FUTURE sal_Int32 getFailedAttempts() const; +#endif sal_Int32 getOfficeStartCounterdown() const; sal_Int32 incrementEventCount(sal_Int32 by); sal_Int32 incrementReportCount(sal_Int32 by); diff --git a/extensions/source/oooimprovement/corecontroller.cxx b/extensions/source/oooimprovement/corecontroller.cxx index 34fc24e42302..3c9245d3faa9 100644 --- a/extensions/source/oooimprovement/corecontroller.cxx +++ b/extensions/source/oooimprovement/corecontroller.cxx @@ -33,7 +33,6 @@ #include "corecontroller.hxx" #include "config.hxx" - using ::rtl::OUString; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; @@ -41,14 +40,6 @@ using namespace ::com::sun::star::uno; namespace oooimprovement { - - CoreController::CoreController(const Reference<XComponentContext>& context) - : m_ServiceFactory(Reference<XMultiServiceFactory>( - context->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.lang.XMultiServiceFactory"), context), - UNO_QUERY)) - { } - CoreController::CoreController(const Reference<XMultiServiceFactory>& sf) : m_ServiceFactory(sf) { } @@ -96,9 +87,6 @@ namespace oooimprovement return aServiceNames; } - Reference<XInterface> SAL_CALL CoreController::Create(const Reference<XComponentContext>& context) - { return *(new CoreController(context)); } - Reference<XInterface> SAL_CALL CoreController::Create(const Reference<XMultiServiceFactory>& sm) { return *(new CoreController(sm)); } } diff --git a/extensions/source/oooimprovement/corecontroller.hxx b/extensions/source/oooimprovement/corecontroller.hxx index 3f1cadb82b69..4f62e9d026b6 100644 --- a/extensions/source/oooimprovement/corecontroller.hxx +++ b/extensions/source/oooimprovement/corecontroller.hxx @@ -54,8 +54,8 @@ namespace oooimprovement // css::lang::XServiceInfo - static version static ::rtl::OUString SAL_CALL getImplementationName_static(); static css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static(); - static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( - const css::uno::Reference<css::uno::XComponentContext>& context); + //static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( + // const css::uno::Reference<css::uno::XComponentContext>& context); static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( const css::uno::Reference< css::lang::XMultiServiceFactory>& sm); diff --git a/extensions/source/oooimprovement/invite_job.cxx b/extensions/source/oooimprovement/invite_job.cxx index 20efafcaa69a..bb1ce11d23fe 100644 --- a/extensions/source/oooimprovement/invite_job.cxx +++ b/extensions/source/oooimprovement/invite_job.cxx @@ -67,12 +67,12 @@ namespace namespace oooimprovement { - InviteJob::InviteJob(const Reference<XComponentContext>& context) - : m_ServiceFactory(Reference<XMultiServiceFactory>( - context->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.lang.XMultiServiceFactory"), context), - UNO_QUERY)) - { } +// InviteJob::InviteJob(const Reference<XComponentContext>& context) +// : m_ServiceFactory(Reference<XMultiServiceFactory>( +// context->getServiceManager()->createInstanceWithContext( +// OUString::createFromAscii("com.sun.star.lang.XMultiServiceFactory"), context), +// UNO_QUERY)) +// { } InviteJob::InviteJob(const Reference<XMultiServiceFactory>& sf) : m_ServiceFactory(sf) @@ -128,8 +128,8 @@ namespace oooimprovement return aServiceNames; } - Reference<XInterface> InviteJob::Create(const Reference<XComponentContext>& context) - { return *(new InviteJob(context)); } +// Reference<XInterface> InviteJob::Create(const Reference<XComponentContext>& context) +// { return *(new InviteJob(context)); } Reference<XInterface> InviteJob::Create(const Reference<XMultiServiceFactory>& sm) { return *(new InviteJob(sm)); } diff --git a/extensions/source/oooimprovement/invite_job.hxx b/extensions/source/oooimprovement/invite_job.hxx index 17e5c2586003..8c1cd57f07a8 100644 --- a/extensions/source/oooimprovement/invite_job.hxx +++ b/extensions/source/oooimprovement/invite_job.hxx @@ -53,8 +53,8 @@ namespace oooimprovement // XServiceInfo - static version static ::rtl::OUString SAL_CALL getImplementationName_static(); static css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static(); - static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( - const css::uno::Reference< css::uno::XComponentContext>& context); + //static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( + // const css::uno::Reference< css::uno::XComponentContext>& context); static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(const css::uno::Reference< css::lang::XMultiServiceFactory>& sm); diff --git a/extensions/source/oooimprovement/myconfigurationhelper.cxx b/extensions/source/oooimprovement/myconfigurationhelper.cxx index c6e68e92a064..e0f14c6ec445 100644 --- a/extensions/source/oooimprovement/myconfigurationhelper.cxx +++ b/extensions/source/oooimprovement/myconfigurationhelper.cxx @@ -149,33 +149,6 @@ namespace oooimprovement xProps->setPropertyValue(sKey, aValue); } - Reference<XInterface> MyConfigurationHelper::makeSureSetNodeExists( - const Reference<XInterface> xCFG, - const OUString& sRelPathToSet, - const OUString& sSetNode) - { - Reference<css::container::XHierarchicalNameAccess> xAccess(xCFG, UNO_QUERY_THROW); - Reference<css::container::XNameAccess> xSet; - xAccess->getByHierarchicalName(sRelPathToSet) >>= xSet; - if (!xSet.is()) - throw css::container::NoSuchElementException( - noSuchElement(sRelPathToSet), - Reference<XInterface>()); - - Reference<XInterface> xNode; - if (xSet->hasByName(sSetNode)) - xSet->getByName(sSetNode) >>= xNode; - else - { - Reference<XSingleServiceFactory> xNodeFactory(xSet, UNO_QUERY_THROW); - xNode = xNodeFactory->createInstance(); - Reference<css::container::XNameContainer> xSetReplace(xSet, UNO_QUERY_THROW); - xSetReplace->insertByName(sSetNode, makeAny(xNode)); - } - - return xNode; - } - Any MyConfigurationHelper::readDirectKey( const Reference<XMultiServiceFactory> xSMGR, const OUString& sPackage, diff --git a/extensions/source/oooimprovement/myconfigurationhelper.hxx b/extensions/source/oooimprovement/myconfigurationhelper.hxx index a5d0c749e81a..5c5cb38b6a68 100644 --- a/extensions/source/oooimprovement/myconfigurationhelper.hxx +++ b/extensions/source/oooimprovement/myconfigurationhelper.hxx @@ -163,40 +163,6 @@ namespace oooimprovement const css::uno::Any& aValue); //----------------------------------------------- - /** it checks if the specified set node exists ... or create an empty one - * otherwise. - * - * This method must be used in combination with openConfig(). - * The cached configuration access must be provided here ... and - * all operations are made relativ to this access point. - * - * Further this method must be used only with configuration set's. - * Atomic keys can't be "created" ... they "exists everytimes". - * - * @param xCFG - * the configuration root, where sRelPathToSet should be interpreted - * as relativ path. - * - * @param sRelPathToSet - * path relative to xCFG parameter. - * - * @param sSetNode - * the set node, which should be checked if its exists ... - * or which should be created with default values. - * - * @return A reference to the found (or new created) set node. - * Cant be NULL .. in such case an exception occure ! - * - * @throw css::uno::Any exceptions the underlying configuration can throw. - * E.g. css::uno::Exception if the provided configuration - * access does not allow writing for this set. - */ - static css::uno::Reference< css::uno::XInterface> makeSureSetNodeExists( - const css::uno::Reference< css::uno::XInterface> xCFG, - const ::rtl::OUString& sRelPathToSet, - const ::rtl::OUString& sSetNode); - - //----------------------------------------------- /** commit all changes made on the specified configuration access. * * This method must be used in combination with openConfig(). diff --git a/extensions/source/oooimprovement/soaprequest.cxx b/extensions/source/oooimprovement/soaprequest.cxx index d67ce911d204..94099cc21aee 100644 --- a/extensions/source/oooimprovement/soaprequest.cxx +++ b/extensions/source/oooimprovement/soaprequest.cxx @@ -33,6 +33,7 @@ #include "soaprequest.hxx" #include "errormail.hxx" +#include "config.hxx" #include <boost/shared_ptr.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -56,7 +57,7 @@ namespace { static unsigned long asUlong(sal_Int8 input) { - return *reinterpret_cast<unsigned char *>(&input) ; + return *reinterpret_cast<unsigned char *>(&input); }; static Sequence<sal_Int8> base64_encode(const Sequence<sal_Int8>& input) @@ -150,10 +151,22 @@ namespace "</SOAP-ENV:Envelope>\n"); static const OString SOAP_ITEM_END("]]></value></item>\n"); - static const OString getSoapSoapId(const OString& soap_id) + static const OString getSoapOfficeversion(const Reference<XMultiServiceFactory>& sf) { OStringBuffer buf = - "<body xsi:type=\"xsd:string\">" + xmlEncode(soap_id) + "</body>\n"; + "<Officeversion Productname=\"" + + ::rtl::OUStringToOString(oooimprovement::Config(sf).getCompleteProductname(), RTL_TEXTENCODING_ASCII_US) + + "\"/>\n"; + return buf.makeStringAndClear(); + }; + + static const OString getSoapSoapId(const Reference<XMultiServiceFactory>& sf, const OString& soap_id) + { + OStringBuffer buf; + buf.append("<body xsi:type=\"xsd:string\">"); + buf.append(xmlEncode(soap_id)).append("\n"); + buf.append(getSoapOfficeversion(sf)); + buf.append("</body>\n"); return buf.makeStringAndClear(); }; @@ -180,7 +193,7 @@ namespace oooimprovement writeString(target, SOAP_START); writeString( target, - getSoapSoapId(rtl::OUStringToOString(m_SoapId, RTL_TEXTENCODING_ASCII_US))); + getSoapSoapId(m_ServiceFactory, rtl::OUStringToOString(m_SoapId, RTL_TEXTENCODING_ASCII_US))); writeString(target, SOAP_ITEMS_START); writeString(target, getSoapItemStart("reportmail.xml")); writeString(target, Errormail(m_ServiceFactory).getXml()); diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index d0ac0de3857a..b200d37cb83b 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -412,6 +412,18 @@ namespace pcr } //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > SAL_CALL EFormsPropertyHandler::getSupersededProperties( ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_pHelper.get() ) + return Sequence< ::rtl::OUString >(); + + Sequence< ::rtl::OUString > aReturn( 1 ); + aReturn[ 0 ] = PROPERTY_INPUT_REQUIRED; + return aReturn; + } + + //-------------------------------------------------------------------- LineDescriptor SAL_CALL EFormsPropertyHandler::describePropertyLine( const ::rtl::OUString& _rPropertyName, const Reference< XPropertyControlFactory >& _rxControlFactory ) throw (UnknownPropertyException, NullPointerException, RuntimeException) diff --git a/extensions/source/propctrlr/eformspropertyhandler.hxx b/extensions/source/propctrlr/eformspropertyhandler.hxx index 700cf43431cf..55c464d77076 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.hxx +++ b/extensions/source/propctrlr/eformspropertyhandler.hxx @@ -77,6 +77,8 @@ namespace pcr virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > + SAL_CALL getSupersededProperties( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::inspection::LineDescriptor SAL_CALL describePropertyLine( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::inspection::InteractiveSelectionResult diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index ccfc3f746ef7..cdfefa314c55 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -149,11 +149,13 @@ namespace pcr DEF_INFO_3( LITERALMASK, LITERALMASK, LITERALMASK, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( STRICTFORMAT, STRICTFORMAT, STRICTFORMAT, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( ENABLED, ENABLED, ENABLED, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), + DEF_INFO_3( ENABLE_VISIBLE, ENABLE_VISIBLE, ENABLE_VISIBLE, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( READONLY, READONLY, READONLY, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( PRINTABLE, PRINTABLE, PRINTABLE, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( STEP, STEP, STEP, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( TABSTOP, TABSTOP, TABSTOP, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_2( TABINDEX, TABINDEX, TABINDEX, FORM_VISIBLE, DIALOG_VISIBLE ), + DEF_INFO_3( WHEEL_BEHAVIOR, WHEEL_BEHAVIOR, WHEEL_BEHAVIOR, FORM_VISIBLE, ENUM, COMPOSEABLE ), DEF_INFO_2( BOUND_CELL, BOUND_CELL, BOUND_CELL, FORM_VISIBLE, DATA_PROPERTY ), DEF_INFO_3( CELL_EXCHANGE_TYPE,CELL_EXCHANGE_TYPE, CELL_EXCHANGE_TYPE,FORM_VISIBLE, DATA_PROPERTY, ENUM ), @@ -513,6 +515,9 @@ namespace pcr case PROPERTY_ID_WRITING_MODE: nStringItemsResId = RID_RSC_ENUM_WRITING_MODE; break; + case PROPERTY_ID_WHEEL_BEHAVIOR: + nStringItemsResId = RID_RSC_ENUM_WHEEL_BEHAVIOR; + break; case PROPERTY_ID_TEXT_ANCHOR_TYPE: nStringItemsResId = RID_RSC_ENUM_TEXT_ANCHOR_TYPE; break; diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx index b49fae5cf3d8..accfa5cc051f 100644 --- a/extensions/source/propctrlr/formmetadata.hxx +++ b/extensions/source/propctrlr/formmetadata.hxx @@ -340,8 +340,10 @@ namespace pcr #define PROPERTY_ID_SCALE_MODE 196 #define PROPERTY_ID_INPUT_REQUIRED 197 #define PROPERTY_ID_WRITING_MODE 198 - #define PROPERTY_ID_TEXT_ANCHOR_TYPE 199 - #define PROPERTY_ID_SHEET_ANCHOR_TYPE 200 + #define PROPERTY_ID_ENABLE_VISIBLE 199 + #define PROPERTY_ID_WHEEL_BEHAVIOR 200 + #define PROPERTY_ID_TEXT_ANCHOR_TYPE 201 + #define PROPERTY_ID_SHEET_ANCHOR_TYPE 202 //............................................................................ } // namespace pcr diff --git a/extensions/source/propctrlr/formres.src b/extensions/source/propctrlr/formres.src index 224587b11729..930b30697da9 100644 --- a/extensions/source/propctrlr/formres.src +++ b/extensions/source/propctrlr/formres.src @@ -51,6 +51,10 @@ String RID_STR_ENABLED { Text [ en-US ] = "Enabled" ; }; +String RID_STR_ENABLE_VISIBLE +{ + Text [ en-US ] = "Visible" ; +}; String RID_STR_AUTOCOMPLETE { Text [ en-US ] = "AutoFill" ; @@ -234,6 +238,10 @@ String RID_STR_TABINDEX { Text [ en-US ] = "Tab order" ; }; +String RID_STR_WHEEL_BEHAVIOR +{ + Text [ en-US ] = "Mouse wheel scroll" ; +}; String RID_STR_FILTER { Text [ en-US ] = "Filter" ; @@ -1431,6 +1439,22 @@ Resource RID_RSC_ENUM_WRITING_MODE }; }; +Resource RID_RSC_ENUM_WHEEL_BEHAVIOR +{ + String 1 + { + Text [ en-US ] = "Never"; + }; + String 2 + { + Text [ en-US ] = "When focused"; + }; + String 3 + { + Text [ en-US ] = "Always"; + }; +}; + String RID_STR_ANCHOR_TYPE { Text [ en-US ] = "Anchor"; diff --git a/extensions/source/propctrlr/formresid.hrc b/extensions/source/propctrlr/formresid.hrc index ad10cfd379e2..d8aab240bced 100644 --- a/extensions/source/propctrlr/formresid.hrc +++ b/extensions/source/propctrlr/formresid.hrc @@ -150,8 +150,8 @@ #define RID_STR_INPUT_REQUIRED ( RID_FORMBROWSER_START + 119 ) #define RID_STR_UNCHECKEDREFVALUE ( RID_FORMBROWSER_START + 120 ) #define RID_STR_CURSOR_TYPE ( RID_FORMBROWSER_START + 121 ) - // FREE - // FREE +#define RID_STR_ENABLE_VISIBLE ( RID_FORMBROWSER_START + 122 ) +#define RID_STR_WHEEL_BEHAVIOR ( RID_FORMBROWSER_START + 123 ) // FREE // FREE // FREE @@ -345,8 +345,9 @@ #define RID_RSC_ENUM_YESNO ( RID_PROPCONTROLLER_START + 27 ) #define RID_RSC_ENUM_SHOWHIDE ( RID_PROPCONTROLLER_START + 28 ) #define RID_RSC_ENUM_WRITING_MODE ( RID_PROPCONTROLLER_START + 29 ) -#define RID_RSC_ENUM_TEXT_ANCHOR_TYPE ( RID_PROPCONTROLLER_START + 30 ) -#define RID_RSC_ENUM_SHEET_ANCHOR_TYPE ( RID_PROPCONTROLLER_START + 31 ) +#define RID_RSC_ENUM_WHEEL_BEHAVIOR ( RID_PROPCONTROLLER_START + 30 ) +#define RID_RSC_ENUM_TEXT_ANCHOR_TYPE ( RID_PROPCONTROLLER_START + 31 ) +#define RID_RSC_ENUM_SHEET_ANCHOR_TYPE ( RID_PROPCONTROLLER_START + 32 ) // ----------------------------------------------------------------------- // - ImageList - local ids diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx index cc6bc9db824b..c07b386584b5 100644 --- a/extensions/source/propctrlr/formstrings.hxx +++ b/extensions/source/propctrlr/formstrings.hxx @@ -48,6 +48,7 @@ namespace pcr PCR_CONSTASCII_STRING( PROPERTY_CONTROLLABEL, "LabelControl"); PCR_CONSTASCII_STRING( PROPERTY_LABEL, "Label"); PCR_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex"); + PCR_CONSTASCII_STRING( PROPERTY_WHEEL_BEHAVIOR, "MouseWheelBehavior"); PCR_CONSTASCII_STRING( PROPERTY_TAG, "Tag"); PCR_CONSTASCII_STRING( PROPERTY_NAME, "Name"); PCR_CONSTASCII_STRING( PROPERTY_VALUE, "Value"); @@ -57,6 +58,7 @@ namespace pcr PCR_CONSTASCII_STRING( PROPERTY_CONTROLSOURCE, "DataField"); PCR_CONSTASCII_STRING( PROPERTY_INPUT_REQUIRED, "InputRequired"); PCR_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled"); + PCR_CONSTASCII_STRING( PROPERTY_ENABLE_VISIBLE, "EnableVisible" ); PCR_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly"); PCR_CONSTASCII_STRING( PROPERTY_ISREADONLY, "IsReadOnly"); PCR_CONSTASCII_STRING( PROPERTY_FILTER, "Filter"); diff --git a/extensions/source/propctrlr/makefile.mk b/extensions/source/propctrlr/makefile.mk index c043850e3c73..9b9ffe47aa15 100644 --- a/extensions/source/propctrlr/makefile.mk +++ b/extensions/source/propctrlr/makefile.mk @@ -120,6 +120,7 @@ SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1VERSIONMAP= $(TARGET).map SHL1STDLIBS= \ + $(SVXCORELIB) \ $(SVXLIB) \ $(SFXLIB) \ $(SVTOOLLIB)\ diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index c0374bbb3ce5..de2e7f272350 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -224,6 +224,19 @@ void SaneDlg::InitFields() maReslBox.SetMin( (long)pDouble[0] ); maReslBox.SetMax( (long)pDouble[1] ); maReslBox.InsertValue( (long)pDouble[0] ); + // mh@openoffice.org: issue 68557: Can only select 75 and 2400 dpi in Scanner dialogue + // scanner allows random setting of dpi resolution, a slider might be useful + // support that + // workaround: offer at least some more standard dpi resolution between + // min and max value + int bGot300 = 0; + for ( int nRes = (long) pDouble[0] * 2; nRes < (long) pDouble[1]; nRes = nRes * 2 ) + { + if ( !bGot300 && nRes > 300 ) { + nRes = 300; bGot300 = 1; + } + maReslBox.InsertValue(nRes); + } maReslBox.InsertValue( (long)pDouble[1] ); } if( pDouble ) diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index 2e0d470b3241..0b1d1e68f9f3 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -197,7 +197,14 @@ void ScannerThread::run() void ScannerManager::DestroyData() { - // unused + // was unused, now because of i99835: "Scanning interface not SANE API compliant" + // delete all SaneHolder to get Sane Dtor called + int i; + for ( i = allSanes.Count(); i > 0; i-- ) + { + SaneHolder *pSaneHolder = allSanes.GetObject(i-1); + if ( pSaneHolder ) delete pSaneHolder; + } } // ----------------------------------------------------------------------------- diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 3bc292e4c8ef..f64ba851e679 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -36,12 +36,15 @@ #include "updatehdl.hxx" #include "updateprotocol.hxx" -#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/implbase3.hxx> #include <cppuhelper/implementationentry.hxx> +#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/XTerminateListener.hpp" #include <com/sun/star/task/XJob.hpp> namespace beans = com::sun::star::beans ; +namespace frame = com::sun::star::frame ; namespace lang = com::sun::star::lang ; namespace task = com::sun::star::task ; namespace uno = com::sun::star::uno ; @@ -61,6 +64,7 @@ public: virtual void SAL_CALL onTerminated(); void showDialog(); + void setTerminating() { m_bTerminating = true; } protected: ~InitUpdateCheckJobThread(); @@ -70,10 +74,11 @@ private: uno::Reference<uno::XComponentContext> m_xContext; uno::Sequence<beans::NamedValue> m_xParameters; bool m_bShowDialog; + bool m_bTerminating; }; class UpdateCheckJob : - public ::cppu::WeakImplHelper2< task::XJob, lang::XServiceInfo > + public ::cppu::WeakImplHelper3< task::XJob, lang::XServiceInfo, frame::XTerminateListener > { virtual ~UpdateCheckJob(); @@ -100,8 +105,19 @@ public: virtual uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (uno::RuntimeException); + // XEventListener + virtual void SAL_CALL disposing( ::com::sun::star::lang::EventObject const & evt ) + throw (::com::sun::star::uno::RuntimeException); + + // XTerminateListener + virtual void SAL_CALL queryTermination( lang::EventObject const & evt ) + throw ( frame::TerminationVetoException, uno::RuntimeException ); + virtual void SAL_CALL notifyTermination( lang::EventObject const & evt ) + throw ( uno::RuntimeException ); + private: uno::Reference<uno::XComponentContext> m_xContext; + uno::Reference< frame::XDesktop > m_xDesktop; InitUpdateCheckJobThread *m_pInitThread; void handleExtensionUpdates( const uno::Sequence< beans::NamedValue > &rListProp ); @@ -115,7 +131,8 @@ InitUpdateCheckJobThread::InitUpdateCheckJobThread( const uno::Sequence< beans::NamedValue > &xParameters ) : m_xContext( xContext ), m_xParameters( xParameters ), - m_bShowDialog( false ) + m_bShowDialog( false ), + m_bTerminating( false ) { create(); } @@ -132,6 +149,9 @@ void SAL_CALL InitUpdateCheckJobThread::run() m_aCondition.wait( &tv ); + if ( m_bTerminating ) + return; + rtl::Reference< UpdateCheck > aController( UpdateCheck::get() ); aController->initialize( m_xParameters, m_xContext ); @@ -156,10 +176,13 @@ void InitUpdateCheckJobThread::showDialog() //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -UpdateCheckJob::UpdateCheckJob(const uno::Reference<uno::XComponentContext>& xContext) : +UpdateCheckJob::UpdateCheckJob( const uno::Reference<uno::XComponentContext>& xContext ) : m_xContext(xContext), m_pInitThread( NULL ) { + m_xDesktop.set( xContext->getServiceManager()->createInstanceWithContext( UNISTRING("com.sun.star.frame.Desktop"), xContext ), uno::UNO_QUERY ); + if ( m_xDesktop.is() ) + m_xDesktop->addTerminateListener( this ); } //------------------------------------------------------------------------------ @@ -301,6 +324,37 @@ UpdateCheckJob::supportsService( rtl::OUString const & serviceName ) throw (uno: return sal_False; } +//------------------------------------------------------------------------------ +// XEventListener +void SAL_CALL UpdateCheckJob::disposing( lang::EventObject const & rEvt ) + throw ( uno::RuntimeException ) +{ + bool shutDown = ( rEvt.Source == m_xDesktop ); + + if ( shutDown && m_xDesktop.is() ) + { + m_xDesktop->removeTerminateListener( this ); + m_xDesktop.clear(); + } +} + +//------------------------------------------------------------------------------ +// XTerminateListener +void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & ) + throw ( frame::TerminationVetoException, uno::RuntimeException ) +{ +} + +//------------------------------------------------------------------------------ +void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt ) + throw ( uno::RuntimeException ) +{ + if ( m_pInitThread ) + m_pInitThread->setTerminating(); + + disposing( rEvt ); +} + } // anonymous namespace //------------------------------------------------------------------------------ diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.def b/extensions/test/ole/AxTestComponents/AxTestComponents.def index 6c19f0c53300..5d8c019adefc 100644 --- a/extensions/test/ole/AxTestComponents/AxTestComponents.def +++ b/extensions/test/ole/AxTestComponents/AxTestComponents.def @@ -3,7 +3,7 @@ LIBRARY "AxTestComponents.DLL" EXPORTS - DllCanUnloadNow @1 PRIVATE - DllGetClassObject @2 PRIVATE - DllRegisterServer @3 PRIVATE - DllUnregisterServer @4 PRIVATE + DllCanUnloadNow PRIVATE + DllGetClassObject PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.sln b/extensions/test/ole/AxTestComponents/AxTestComponents.sln index 669a59cef405..eadaa373ed94 100644 --- a/extensions/test/ole/AxTestComponents/AxTestComponents.sln +++ b/extensions/test/ole/AxTestComponents/AxTestComponents.sln @@ -1,33 +1,31 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AxTestComponents", "AxTestComponents.vcproj", "{CF6DC513-B04E-420A-A0F9-6D1F4046D098}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release MinDependency = Release MinDependency - Release MinSize = Release MinSize - Unicode Debug = Unicode Debug - Unicode Release MinDependency = Unicode Release MinDependency - Unicode Release MinSize = Unicode Release MinSize - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Debug.ActiveCfg = Debug|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Debug.Build.0 = Debug|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinDependency.ActiveCfg = Release MinDependency|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinDependency.Build.0 = Release MinDependency|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinSize.ActiveCfg = Release MinSize|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinSize.Build.0 = Release MinSize|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Debug.ActiveCfg = Unicode Debug|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Debug.Build.0 = Unicode Debug|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinDependency.ActiveCfg = Unicode Release MinDependency|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinDependency.Build.0 = Unicode Release MinDependency|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinSize.ActiveCfg = Unicode Release MinSize|Win32 - {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinSize.Build.0 = Unicode Release MinSize|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AxTestComponents", "AxTestComponents.vcproj", "{CF6DC513-B04E-420A-A0F9-6D1F4046D098}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release MinDependency|Win32 = Release MinDependency|Win32
+ Release MinSize|Win32 = Release MinSize|Win32
+ Unicode Debug|Win32 = Unicode Debug|Win32
+ Unicode Release MinDependency|Win32 = Unicode Release MinDependency|Win32
+ Unicode Release MinSize|Win32 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Debug|Win32.Build.0 = Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinDependency|Win32.ActiveCfg = Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinDependency|Win32.Build.0 = Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinSize|Win32.ActiveCfg = Release MinSize|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinSize|Win32.Build.0 = Release MinSize|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinDependency|Win32.ActiveCfg = Unicode Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinDependency|Win32.Build.0 = Unicode Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinSize|Win32.ActiveCfg = Unicode Release MinSize|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinSize|Win32.Build.0 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj b/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj index c925c7d6b2b3..078daba3da2f 100644 --- a/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj +++ b/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj @@ -1,616 +1,819 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="AxTestComponents" - SccProjectName="" - SccLocalPath="" - Keyword="AtlProj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Unicode Release MinDependency|Win32" - OutputDirectory=".\ReleaseUMinDependency" - IntermediateDirectory=".\ReleaseUMinDependency" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="1" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseUMinDependency/AxTestComponents.pch" - AssemblerListingLocation=".\ReleaseUMinDependency/" - ObjectFile=".\ReleaseUMinDependency/" - ProgramDataBaseFileName=".\ReleaseUMinDependency/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="if "%OS%"=="" goto NOTNT -if not "%OS%"=="Windows_NT" goto NOTNT -regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -goto end -:NOTNT -echo Warning : Cannot register Unicode DLL on Windows 95 -:end -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseUMinDependency/AxTestComponents.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\AxTestComponents.def" - ProgramDatabaseFile=".\ReleaseUMinDependency/AxTestComponents.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseUMinDependency/AxTestComponents.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseUMinDependency/AxTestComponents.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release MinSize|Win32" - OutputDirectory=".\ReleaseMinSize" - IntermediateDirectory=".\ReleaseMinSize" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="2" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseMinSize/AxTestComponents.pch" - AssemblerListingLocation=".\ReleaseMinSize/" - ObjectFile=".\ReleaseMinSize/" - ProgramDataBaseFileName=".\ReleaseMinSize/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseMinSize/AxTestComponents.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\AxTestComponents.def" - ProgramDatabaseFile=".\ReleaseMinSize/AxTestComponents.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseMinSize/AxTestComponents.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseMinSize/AxTestComponents.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Unicode Release MinSize|Win32" - OutputDirectory=".\ReleaseUMinSize" - IntermediateDirectory=".\ReleaseUMinSize" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="2" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseUMinSize/AxTestComponents.pch" - AssemblerListingLocation=".\ReleaseUMinSize/" - ObjectFile=".\ReleaseUMinSize/" - ProgramDataBaseFileName=".\ReleaseUMinSize/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="if "%OS%"=="" goto NOTNT -if not "%OS%"=="Windows_NT" goto NOTNT -regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -goto end -:NOTNT -echo Warning : Cannot register Unicode DLL on Windows 95 -:end -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseUMinSize/AxTestComponents.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\AxTestComponents.def" - ProgramDatabaseFile=".\ReleaseUMinSize/AxTestComponents.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseUMinSize/AxTestComponents.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseUMinSize/AxTestComponents.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release MinDependency|Win32" - OutputDirectory=".\ReleaseMinDependency" - IntermediateDirectory=".\ReleaseMinDependency" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="1" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseMinDependency/AxTestComponents.pch" - AssemblerListingLocation=".\ReleaseMinDependency/" - ObjectFile=".\ReleaseMinDependency/" - ProgramDataBaseFileName=".\ReleaseMinDependency/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseMinDependency/AxTestComponents.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\AxTestComponents.def" - ProgramDatabaseFile=".\ReleaseMinDependency/AxTestComponents.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseMinDependency/AxTestComponents.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseMinDependency/AxTestComponents.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\Debug" - IntermediateDirectory=".\Debug" - ConfigurationType="2" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\Debug/AxTestComponents.pch" - AssemblerListingLocation=".\Debug/" - ObjectFile=".\Debug/" - ProgramDataBaseFileName=".\Debug/" - BrowseInformation="1" - WarningLevel="3" - SuppressStartupBanner="FALSE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\Debug/AxTestComponents.dll" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\AxTestComponents.def" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\Debug/AxTestComponents.pdb" - SubSystem="2" - ImportLibrary=".\Debug/AxTestComponents.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Debug/AxTestComponents.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Unicode Debug|Win32" - OutputDirectory=".\DebugU" - IntermediateDirectory=".\DebugU" - ConfigurationType="2" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\DebugU/AxTestComponents.pch" - AssemblerListingLocation=".\DebugU/" - ObjectFile=".\DebugU/" - ProgramDataBaseFileName=".\DebugU/" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="if "%OS%"=="" goto NOTNT -if not "%OS%"=="Windows_NT" goto NOTNT -regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -goto end -:NOTNT -echo Warning : Cannot register Unicode DLL on Windows 95 -:end -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\DebugU/AxTestComponents.dll" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\AxTestComponents.def" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\DebugU/AxTestComponents.pdb" - SubSystem="2" - ImportLibrary=".\DebugU/AxTestComponents.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\DebugU/AxTestComponents.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath=".\AxTestComponents.cpp"> - </File> - <File - RelativePath=".\AxTestComponents.def"> - </File> - <File - RelativePath=".\AxTestComponents.idl"> - <FileConfiguration - Name="Unicode Release MinDependency|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\AxTestComponents.tlb" - HeaderFileName="AxTestComponents.h" - InterfaceIdentifierFileName="AxTestComponents_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinSize|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\AxTestComponents.tlb" - HeaderFileName="AxTestComponents.h" - InterfaceIdentifierFileName="AxTestComponents_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Release MinSize|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\AxTestComponents.tlb" - HeaderFileName="AxTestComponents.h" - InterfaceIdentifierFileName="AxTestComponents_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinDependency|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\AxTestComponents.tlb" - HeaderFileName="AxTestComponents.h" - InterfaceIdentifierFileName="AxTestComponents_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\AxTestComponents.tlb" - HeaderFileName="AxTestComponents.h" - InterfaceIdentifierFileName="AxTestComponents_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\AxTestComponents.tlb" - HeaderFileName="AxTestComponents.h" - InterfaceIdentifierFileName="AxTestComponents_i.c"/> - </FileConfiguration> - </File> - <File - RelativePath=".\AxTestComponents.rc"> - <FileConfiguration - Name="Unicode Release MinDependency|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinSize|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Release MinSize|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinDependency|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - </File> - <File - RelativePath=".\Basic.cpp"> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions=" /Ob0"/> - </FileConfiguration> - </File> - <File - RelativePath="Foo.cpp"> - </File> - <File - RelativePath=".\StdAfx.cpp"> - <FileConfiguration - Name="Unicode Release MinDependency|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinSize|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Release MinSize|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinDependency|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath=".\Basic.h"> - </File> - <File - RelativePath="Foo.h"> - </File> - <File - RelativePath=".\Resource.h"> - </File> - <File - RelativePath=".\StdAfx.h"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> - <File - RelativePath=".\Basic.rgs"> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="AxTestComponents"
+ ProjectGUID="{CF6DC513-B04E-420A-A0F9-6D1F4046D098}"
+ RootNamespace="AxTestComponents"
+ Keyword="AtlProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Unicode Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseUMinDependency"
+ IntermediateDirectory=".\ReleaseUMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinDependency/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinDependency/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseUMinDependency/"
+ ObjectFile=".\ReleaseUMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseUMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseUMinDependency/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseUMinDependency/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinDependency/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinSize|Win32"
+ OutputDirectory=".\ReleaseMinSize"
+ IntermediateDirectory=".\ReleaseMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinSize/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinSize/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseMinSize/"
+ ObjectFile=".\ReleaseMinSize/"
+ ProgramDataBaseFileName=".\ReleaseMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseMinSize/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseMinSize/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinSize/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Release MinSize|Win32"
+ OutputDirectory=".\ReleaseUMinSize"
+ IntermediateDirectory=".\ReleaseUMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinSize/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinSize/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseUMinSize/"
+ ObjectFile=".\ReleaseUMinSize/"
+ ProgramDataBaseFileName=".\ReleaseUMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseUMinSize/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseUMinSize/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinSize/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseMinDependency"
+ IntermediateDirectory=".\ReleaseMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinDependency/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinDependency/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseMinDependency/"
+ ObjectFile=".\ReleaseMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseMinDependency/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseMinDependency/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinDependency/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/AxTestComponents.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\Debug/AxTestComponents.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Debug|Win32"
+ OutputDirectory=".\DebugU"
+ IntermediateDirectory=".\DebugU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\DebugU/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\DebugU/AxTestComponents.pch"
+ AssemblerListingLocation=".\DebugU/"
+ ObjectFile=".\DebugU/"
+ ProgramDataBaseFileName=".\DebugU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\DebugU/AxTestComponents.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\DebugU/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\DebugU/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\AxTestComponents.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AxTestComponents.def"
+ >
+ </File>
+ <File
+ RelativePath=".\AxTestComponents.idl"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\AxTestComponents.rc"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Basic.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Ob0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="Foo.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\Basic.h"
+ >
+ </File>
+ <File
+ RelativePath="Foo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\Basic.rgs"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt b/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt index cc16cd810e3c..1d5a63492126 100644 --- a/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt +++ b/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt @@ -1,4 +1,4 @@ -Visual Basic client that instantiates a Windows Script Component -,dcomtest.writerdemo.wsc. That component is located in -extensions/test/ole/DCOM/scriptComponents/WriterDemo.wsc. -Don't forget to register that component (right-click,select register).
\ No newline at end of file +Visual Basic client that instantiates a Windows Script Component
+,dcomtest.writerdemo.wsc. That component is located in
+extensions/test/ole/DCOM/scriptComponents/WriterDemo.wsc. Don't forget to
+register that component (right-click,select register).
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.def b/extensions/test/ole/EventListenerSample/EventListener/EventListener.def index 9e4eab1df62c..9d88a68f7f39 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/EventListener.def +++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.def @@ -3,7 +3,7 @@ LIBRARY "EventListener.DLL"
EXPORTS
- DllCanUnloadNow @1 PRIVATE
- DllGetClassObject @2 PRIVATE
- DllRegisterServer @3 PRIVATE
- DllUnregisterServer @4 PRIVATE
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp b/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp deleted file mode 100644 index 08aac8247c0a..000000000000 --- a/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp +++ /dev/null @@ -1,323 +0,0 @@ -# Microsoft Developer Studio Project File - Name="EventListener" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=EventListener - Win32 Debug -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "EventListener.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "EventListener.mak" CFG="EventListener - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "EventListener - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "EventListener - Win32 Unicode Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "EventListener - Win32 Release MinSize" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "EventListener - Win32 Release MinDependency" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "EventListener - Win32 Unicode Release MinSize" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "EventListener - Win32 Unicode Release MinDependency" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "EventListener - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# Begin Custom Build - Performing registration -OutDir=.\Debug -TargetPath=.\Debug\EventListener.dll -InputPath=.\Debug\EventListener.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - -# End Custom Build - -!ELSEIF "$(CFG)" == "EventListener - Win32 Unicode Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "DebugU" -# PROP BASE Intermediate_Dir "DebugU" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "DebugU" -# PROP Intermediate_Dir "DebugU" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# Begin Custom Build - Performing registration -OutDir=.\DebugU -TargetPath=.\DebugU\EventListener.dll -InputPath=.\DebugU\EventListener.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - if "%OS%"=="" goto NOTNT - if not "%OS%"=="Windows_NT" goto NOTNT - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - goto end - :NOTNT - echo Warning : Cannot register Unicode DLL on Windows 95 - :end - -# End Custom Build - -!ELSEIF "$(CFG)" == "EventListener - Win32 Release MinSize" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseMinSize" -# PROP BASE Intermediate_Dir "ReleaseMinSize" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseMinSize" -# PROP Intermediate_Dir "ReleaseMinSize" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseMinSize -TargetPath=.\ReleaseMinSize\EventListener.dll -InputPath=.\ReleaseMinSize\EventListener.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - -# End Custom Build - -!ELSEIF "$(CFG)" == "EventListener - Win32 Release MinDependency" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseMinDependency" -# PROP BASE Intermediate_Dir "ReleaseMinDependency" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseMinDependency" -# PROP Intermediate_Dir "ReleaseMinDependency" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseMinDependency -TargetPath=.\ReleaseMinDependency\EventListener.dll -InputPath=.\ReleaseMinDependency\EventListener.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - -# End Custom Build - -!ELSEIF "$(CFG)" == "EventListener - Win32 Unicode Release MinSize" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseUMinSize" -# PROP BASE Intermediate_Dir "ReleaseUMinSize" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseUMinSize" -# PROP Intermediate_Dir "ReleaseUMinSize" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseUMinSize -TargetPath=.\ReleaseUMinSize\EventListener.dll -InputPath=.\ReleaseUMinSize\EventListener.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - if "%OS%"=="" goto NOTNT - if not "%OS%"=="Windows_NT" goto NOTNT - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - goto end - :NOTNT - echo Warning : Cannot register Unicode DLL on Windows 95 - :end - -# End Custom Build - -!ELSEIF "$(CFG)" == "EventListener - Win32 Unicode Release MinDependency" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseUMinDependency" -# PROP BASE Intermediate_Dir "ReleaseUMinDependency" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseUMinDependency" -# PROP Intermediate_Dir "ReleaseUMinDependency" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseUMinDependency -TargetPath=.\ReleaseUMinDependency\EventListener.dll -InputPath=.\ReleaseUMinDependency\EventListener.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - if "%OS%"=="" goto NOTNT - if not "%OS%"=="Windows_NT" goto NOTNT - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - goto end - :NOTNT - echo Warning : Cannot register Unicode DLL on Windows 95 - :end - -# End Custom Build - -!ENDIF - -# Begin Target - -# Name "EventListener - Win32 Debug" -# Name "EventListener - Win32 Unicode Debug" -# Name "EventListener - Win32 Release MinSize" -# Name "EventListener - Win32 Release MinDependency" -# Name "EventListener - Win32 Unicode Release MinSize" -# Name "EventListener - Win32 Unicode Release MinDependency" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\EventListener.cpp -# End Source File -# Begin Source File - -SOURCE=.\EventListener.def -# End Source File -# Begin Source File - -SOURCE=.\EventListener.idl -# ADD MTL /tlb ".\EventListener.tlb" /h "EventListener.h" /iid "EventListener_i.c" /Oicf -# End Source File -# Begin Source File - -SOURCE=.\EventListener.rc -# End Source File -# Begin Source File - -SOURCE=.\EvtListener.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\EvtListener.h -# End Source File -# Begin Source File - -SOURCE=.\Resource.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\EvtListener.rgs -# End Source File -# End Group -# End Target -# End Project diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw b/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw deleted file mode 100644 index 20f5e80a4ee6..000000000000 --- a/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "EventListener"=.\EventListener.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.sln b/extensions/test/ole/EventListenerSample/EventListener/EventListener.sln new file mode 100644 index 000000000000..8420bb49259a --- /dev/null +++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.sln @@ -0,0 +1,32 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EventListener", "EventListener.vcproj", "{055137B6-A402-4913-AC11-9A096E866F5B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release MinDependency|Win32 = Release MinDependency|Win32
+ Release MinSize|Win32 = Release MinSize|Win32
+ Unicode Debug|Win32 = Unicode Debug|Win32
+ Unicode Release MinDependency|Win32 = Unicode Release MinDependency|Win32
+ Unicode Release MinSize|Win32 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Debug|Win32.Build.0 = Debug|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Release MinDependency|Win32.ActiveCfg = Release MinDependency|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Release MinDependency|Win32.Build.0 = Release MinDependency|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Release MinSize|Win32.ActiveCfg = Release MinSize|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Release MinSize|Win32.Build.0 = Release MinSize|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Unicode Release MinDependency|Win32.ActiveCfg = Unicode Release MinDependency|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Unicode Release MinDependency|Win32.Build.0 = Unicode Release MinDependency|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Unicode Release MinSize|Win32.ActiveCfg = Unicode Release MinSize|Win32
+ {055137B6-A402-4913-AC11-9A096E866F5B}.Unicode Release MinSize|Win32.Build.0 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.vcproj b/extensions/test/ole/EventListenerSample/EventListener/EventListener.vcproj new file mode 100644 index 000000000000..e8aef55323bb --- /dev/null +++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.vcproj @@ -0,0 +1,927 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="EventListener"
+ ProjectGUID="{055137B6-A402-4913-AC11-9A096E866F5B}"
+ RootNamespace="EventListener"
+ Keyword="AtlProj"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Unicode Release MinSize|Win32"
+ OutputDirectory=".\ReleaseUMinSize"
+ IntermediateDirectory=".\ReleaseUMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="true"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinSize/EventListener.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinSize/EventListener.pch"
+ AssemblerListingLocation=".\ReleaseUMinSize/"
+ ObjectFile=".\ReleaseUMinSize/"
+ ProgramDataBaseFileName=".\ReleaseUMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\ReleaseUMinSize/EventListener.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\EventListener.def"
+ ProgramDatabaseFile=".\ReleaseUMinSize/EventListener.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinSize/EventListener.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ReleaseUMinSize/EventListener.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Debug|Win32"
+ OutputDirectory=".\DebugU"
+ IntermediateDirectory=".\DebugU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\DebugU/EventListener.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\DebugU/EventListener.pch"
+ AssemblerListingLocation=".\DebugU/"
+ ObjectFile=".\DebugU/"
+ ProgramDataBaseFileName=".\DebugU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\DebugU/EventListener.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\EventListener.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\DebugU/EventListener.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\DebugU/EventListener.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\DebugU/EventListener.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseMinDependency"
+ IntermediateDirectory=".\ReleaseMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="true"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinDependency/EventListener.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinDependency/EventListener.pch"
+ AssemblerListingLocation=".\ReleaseMinDependency/"
+ ObjectFile=".\ReleaseMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\ReleaseMinDependency/EventListener.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\EventListener.def"
+ ProgramDatabaseFile=".\ReleaseMinDependency/EventListener.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinDependency/EventListener.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ReleaseMinDependency/EventListener.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinSize|Win32"
+ OutputDirectory=".\ReleaseMinSize"
+ IntermediateDirectory=".\ReleaseMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="true"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinSize/EventListener.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinSize/EventListener.pch"
+ AssemblerListingLocation=".\ReleaseMinSize/"
+ ObjectFile=".\ReleaseMinSize/"
+ ProgramDataBaseFileName=".\ReleaseMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\ReleaseMinSize/EventListener.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\EventListener.def"
+ ProgramDatabaseFile=".\ReleaseMinSize/EventListener.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinSize/EventListener.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ReleaseMinSize/EventListener.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/EventListener.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/EventListener.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Debug/EventListener.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\EventListener.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/EventListener.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/EventListener.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/EventListener.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseUMinDependency"
+ IntermediateDirectory=".\ReleaseUMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="true"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinDependency/EventListener.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinDependency/EventListener.pch"
+ AssemblerListingLocation=".\ReleaseUMinDependency/"
+ ObjectFile=".\ReleaseUMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseUMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\ReleaseUMinDependency/EventListener.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\EventListener.def"
+ ProgramDatabaseFile=".\ReleaseUMinDependency/EventListener.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinDependency/EventListener.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ReleaseUMinDependency/EventListener.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="EventListener.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="EventListener.def"
+ >
+ </File>
+ <File
+ RelativePath="EventListener.idl"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\EventListener.tlb"
+ HeaderFileName="EventListener.h"
+ InterfaceIdentifierFileName="EventListener_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\EventListener.tlb"
+ HeaderFileName="EventListener.h"
+ InterfaceIdentifierFileName="EventListener_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\EventListener.tlb"
+ HeaderFileName="EventListener.h"
+ InterfaceIdentifierFileName="EventListener_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\EventListener.tlb"
+ HeaderFileName="EventListener.h"
+ InterfaceIdentifierFileName="EventListener_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\EventListener.tlb"
+ HeaderFileName="EventListener.h"
+ InterfaceIdentifierFileName="EventListener_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\EventListener.tlb"
+ HeaderFileName="EventListener.h"
+ InterfaceIdentifierFileName="EventListener_i.c"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="EventListener.rc"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="$(OUTDIR)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="$(OUTDIR)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="$(OUTDIR)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="$(OUTDIR)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="$(OUTDIR)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="$(OUTDIR)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="EvtListener.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_ATL_MIN_CRT"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="EvtListener.h"
+ >
+ </File>
+ <File
+ RelativePath="Resource.h"
+ >
+ </File>
+ <File
+ RelativePath="StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="EvtListener.rgs"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/EventListenerSample/events.htm b/extensions/test/ole/EventListenerSample/events.htm index a9ac88bd11ec..973a21528643 100644 --- a/extensions/test/ole/EventListenerSample/events.htm +++ b/extensions/test/ole/EventListenerSample/events.htm @@ -1,98 +1,98 @@ -<HTML> -<HEAD> -<META NAME="GENERATOR" Content="Microsoft Developer Studio"> -<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> -<TITLE>Document Title</TITLE> -</HEAD> -<BODY id=theBody> - -<script language="JScript"> -function Main( id) -{ -var objServiceManager= new ActiveXObject("com.sun.star.ServiceManager"); - -var objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop"); - -var args= new Array(); - -var objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args); - -var listener; -if( id == 0) - listener= new XEventListener_Impl(); -else if(id == 1) - listener= new ActiveXObject("EventListener.EvtListener"); -objDocument.addEventListener( listener); -} - - -function XEventListener_Impl() -{ - this._environment= "JScript"; - this._implementedInterfaces= new Array( "com.sun.star.lang.XEventListener"); - - //XEventListener - this.disposing= XEventListener_disposing; -} - -function XEventListener_disposing( source) -{ - alert("JScript Event Listener \n The document was closed"); -} -</script> - -<script language="VBScript"> -SUB MainVB( id) -Set objServiceManager= CreateObject("com.sun.star.ServiceManager") - -Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection") - -Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop") - -'Open a new empty writer document -Dim args() -Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args) - -Dim eventListener -select case id - case 0 - Set eventListener= CreateObject("EventListener.EvtListener") - case 1 - Set eventListener= CreateObject("VBasicEventListener.VBEventListener") -end select - -objDocument.addEventListener eventlistener -END SUB - -</script> -<p> -The script on this page creates a new StarOffice document and connects an event listener -to it. When the document is closed then the XEventListener::disposing method is called on the -listener object. How the listener is set up depends on the button being clicked. -</p> -<p> -The button will run JScript code that and adds an JScript event listener to the document. -The listener is also implemented in JScript an is on this page.. -</p> -<button onclick='Main(0)'>JScript go</Button> -<p> - -The button runs JScript code that creates the ActiveX component EventListener.EvtListener that -is written in C++ and housed in a dll. Then the event listener is added to the document. -</p> -<button onclick='Main( 1)'>JScript go</Button> -<p> -The button runs VBScript code that creates the components EventListener.EvtListener and adds it -to the document. -</p> -<button onclick='MainVB(0)'>VBScript</Button> -<p> -Runs VBScript code that creates VBasicEventListener.VBEventListener ActiveX component which was -written with VB -</p> -<button onclick='MainVB(1)'>VBScript</Button> - -</body> -</html> - - +<HTML>
+<HEAD>
+<META NAME="GENERATOR" Content="Microsoft Developer Studio">
+<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
+<TITLE>Document Title</TITLE>
+</HEAD>
+<BODY id=theBody>
+
+<script language="JScript">
+function Main( id)
+{
+var objServiceManager= new ActiveXObject("com.sun.star.ServiceManager");
+
+var objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop");
+
+var args= new Array();
+
+var objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args);
+
+var listener;
+if( id == 0)
+ listener= new XEventListener_Impl();
+else if(id == 1)
+ listener= new ActiveXObject("EventListener.EvtListener");
+objDocument.addEventListener( listener);
+}
+
+
+function XEventListener_Impl()
+{
+ this._environment= "JScript";
+ this._implementedInterfaces= new Array( "com.sun.star.lang.XEventListener");
+
+ //XEventListener
+ this.disposing= XEventListener_disposing;
+}
+
+function XEventListener_disposing( source)
+{
+ alert("JScript Event Listener \n The document was closed");
+}
+</script>
+
+<script language="VBScript">
+SUB MainVB( id)
+Set objServiceManager= CreateObject("com.sun.star.ServiceManager")
+
+Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
+
+Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")
+
+'Open a new empty writer document
+Dim args()
+Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
+
+Dim eventListener
+select case id
+ case 0
+ Set eventListener= CreateObject("EventListener.EvtListener")
+ case 1
+ Set eventListener= CreateObject("VBasicEventListener.VBEventListener")
+end select
+
+objDocument.addEventListener eventlistener
+END SUB
+
+</script>
+<p>
+The script on this page creates a new StarOffice document and connects an event listener
+to it. When the document is closed then the XEventListener::disposing method is called on the
+listener object. How the listener is set up depends on the button being clicked.
+</p>
+<p>
+The button will run JScript code that and adds an JScript event listener to the document.
+The listener is also implemented in JScript an is on this page..
+</p>
+<button onclick='Main(0)'>JScript go</Button>
+<p>
+
+The button runs JScript code that creates the ActiveX component EventListener.EvtListener that
+is written in C++ and housed in a dll. Then the event listener is added to the document.
+</p>
+<button onclick='Main( 1)'>JScript go</Button>
+<p>
+The button runs VBScript code that creates the components EventListener.EvtListener and adds it
+to the document.
+</p>
+<button onclick='MainVB(0)'>VBScript</Button>
+<p>
+Runs VBScript code that creates VBasicEventListener.VBEventListener ActiveX component which was
+written with VB
+</p>
+<button onclick='MainVB(1)'>VBScript</Button>
+
+</body>
+</html>
+
+
diff --git a/extensions/test/ole/EventListenerSample/readme.txt b/extensions/test/ole/EventListenerSample/readme.txt index 46c674153ab7..6485571ec928 100644 --- a/extensions/test/ole/EventListenerSample/readme.txt +++ b/extensions/test/ole/EventListenerSample/readme.txt @@ -1,18 +1,20 @@ -EventListener -________________________________________________________ - -The folder EventListener contains an MSDEV project that builds a dll that contains -the EventListener.EvtListener ActiveX component. The component implements the XEventListener -interface according to the rules of the OleBridge. The component will be used from the -HTML page events.htm. - -VBEventListener: -_________________________________________________________ -Contains a Visual Basic project that builds an ActiveX component that implements -com.sun.star.lang.XEventListener. Its ProgId is VBasicEventListener.VBEventListener -The dll should also be checked in. VB needs its TLB, so it uses the same CLSIDs on -the next build. The component will create a message box when its disposing function -has been called. - -The project also contains a client that builds a Project1.exe (in the same folder) -that creates VBEventListener and adds it to a StarOffice document +EventListener
+========================================
+
+The folder EventListener contains an MSDEV project that builds a dll that
+contains the EventListener.EvtListener ActiveX component. The component
+implements the XEventListener interface according to the rules of the
+OleBridge. The component will be used from the HTML page events.htm.
+
+
+VBEventListener:
+========================================
+
+Contains a Visual Basic project that builds an ActiveX component that implements
+com.sun.star.lang.XEventListener. Its ProgId is
+VBasicEventListener.VBEventListener The dll should also be checked in. VB needs
+its TLB, so it uses the same CLSIDs on the next build. The component will create
+a message box when its disposing function has been called.
+
+The project also contains a client that builds a Project1.exe (in the same
+folder) that creates VBEventListener and adds it to a StarOffice document
diff --git a/extensions/test/ole/MfcControl/MfcControl.def b/extensions/test/ole/MfcControl/MfcControl.def index 86cc2a0f8c47..8c164a7b5399 100644 --- a/extensions/test/ole/MfcControl/MfcControl.def +++ b/extensions/test/ole/MfcControl/MfcControl.def @@ -3,7 +3,7 @@ LIBRARY "MFCCONTROL.OCX"
EXPORTS
- DllCanUnloadNow @1 PRIVATE
- DllGetClassObject @2 PRIVATE
- DllRegisterServer @3 PRIVATE
- DllUnregisterServer @4 PRIVATE
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/extensions/test/ole/MfcControl/MfcControl.rc b/extensions/test/ole/MfcControl/MfcControl.rc index ce8375871fbc..e052b9f261a6 100644 --- a/extensions/test/ole/MfcControl/MfcControl.rc +++ b/extensions/test/ole/MfcControl/MfcControl.rc @@ -84,7 +84,7 @@ END // Bitmap // -IDB_MFCCONTROL BITMAP DISCARDABLE "MfcControlCtl.bmp" +//IDB_MFCCONTROL BITMAP DISCARDABLE "MfcControlCtl.bmp" ///////////////////////////////////////////////////////////////////////////// // diff --git a/extensions/test/ole/MfcControl/MfcControl.sln b/extensions/test/ole/MfcControl/MfcControl.sln index 77d3f99d6621..24e646c8626b 100644 --- a/extensions/test/ole/MfcControl/MfcControl.sln +++ b/extensions/test/ole/MfcControl/MfcControl.sln @@ -1,27 +1,25 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MfcControl", "MfcControl.vcproj", "{07D59661-3519-4F10-AE9F-22DB0479E25A}" -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release - ConfigName.2 = Unicode Debug - ConfigName.3 = Unicode Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Debug.ActiveCfg = Debug|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Debug.Build.0 = Debug|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Release.ActiveCfg = Release|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Release.Build.0 = Release|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Debug.ActiveCfg = Unicode Debug|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Debug.Build.0 = Unicode Debug|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Release.ActiveCfg = Unicode Release|Win32 - {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Release.Build.0 = Unicode Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MfcControl", "MfcControl.vcproj", "{07D59661-3519-4F10-AE9F-22DB0479E25A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ Unicode Debug|Win32 = Unicode Debug|Win32
+ Unicode Release|Win32 = Unicode Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Debug|Win32.Build.0 = Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Release|Win32.ActiveCfg = Release|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Release|Win32.Build.0 = Release|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
+ {07D59661-3519-4F10-AE9F-22DB0479E25A}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/MfcControl/MfcControl.vcproj b/extensions/test/ole/MfcControl/MfcControl.vcproj index 2fa53b2e67ee..6099d8242de6 100644 --- a/extensions/test/ole/MfcControl/MfcControl.vcproj +++ b/extensions/test/ole/MfcControl/MfcControl.vcproj @@ -1,400 +1,581 @@ -<?xml version="1.0" encoding = "Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.00" - Name="MfcControl" - SccProjectName="" - SccLocalPath="" - Keyword="MFCProj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Unicode Release|Win32" - OutputDirectory=".\ReleaseU" - IntermediateDirectory=".\ReleaseU" - ConfigurationType="2" - UseOfMFC="2" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="2" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseU/MfcControl.pch" - AssemblerListingLocation=".\ReleaseU/" - ObjectFile=".\ReleaseU/" - ProgramDataBaseFileName=".\ReleaseU/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Registering ActiveX Control..." - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - OutputFile=".\ReleaseU/MfcControl.ocx" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\MfcControl.def" - ProgramDatabaseFile=".\ReleaseU/MfcControl.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseU/MfcControl.lib"/> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" - MkTypLibCompatible="TRUE" - SuppressStartupBanner="TRUE" - TargetEnvironment="1" - TypeLibraryName=".\ReleaseU/MfcControl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_AFXDLL;NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Unicode Debug|Win32" - OutputDirectory=".\DebugU" - IntermediateDirectory=".\DebugU" - ConfigurationType="2" - UseOfMFC="2" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\DebugU/MfcControl.pch" - AssemblerListingLocation=".\DebugU/" - ObjectFile=".\DebugU/" - ProgramDataBaseFileName=".\DebugU/" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool" - Description="Registering ActiveX Control..." - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - OutputFile=".\DebugU/MfcControl.ocx" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\MfcControl.def" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\DebugU/MfcControl.pdb" - SubSystem="2" - ImportLibrary=".\DebugU/MfcControl.lib"/> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" - MkTypLibCompatible="TRUE" - SuppressStartupBanner="TRUE" - TargetEnvironment="1" - TypeLibraryName=".\DebugU/MfcControl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_AFXDLL;_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory=".\Release" - IntermediateDirectory=".\Release" - ConfigurationType="2" - UseOfMFC="2" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="2" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\Release/MfcControl.pch" - AssemblerListingLocation=".\Release/" - ObjectFile=".\Release/" - ProgramDataBaseFileName=".\Release/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Registering ActiveX Control..." - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - OutputFile=".\Release/MfcControl.ocx" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\MfcControl.def" - ProgramDatabaseFile=".\Release/MfcControl.pdb" - SubSystem="2" - ImportLibrary=".\Release/MfcControl.lib"/> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" - MkTypLibCompatible="TRUE" - SuppressStartupBanner="TRUE" - TargetEnvironment="1" - TypeLibraryName=".\Release/MfcControl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_AFXDLL;NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\Debug" - IntermediateDirectory=".\Debug" - ConfigurationType="2" - UseOfMFC="2" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\Debug/MfcControl.pch" - AssemblerListingLocation=".\Debug/" - ObjectFile=".\Debug/" - ProgramDataBaseFileName=".\Debug/" - BrowseInformation="1" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool" - Description="Registering ActiveX Control..." - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - OutputFile=".\Debug/MfcControl.ocx" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\MfcControl.def" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\Debug/MfcControl.pdb" - SubSystem="2" - ImportLibrary=".\Debug/MfcControl.lib"/> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" - MkTypLibCompatible="TRUE" - SuppressStartupBanner="TRUE" - TargetEnvironment="1" - TypeLibraryName=".\Debug/MfcControl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_AFXDLL;_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - </Configurations> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath=".\MfcControl.cpp"> - </File> - <File - RelativePath=".\MfcControl.def"> - </File> - <File - RelativePath=".\MfcControl.odl"> - <FileConfiguration - Name="Unicode Release|Win32"> - <Tool - Name="VCMIDLTool" - TargetEnvironment="1" - HeaderFileName="MfcControl_h.h"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCMIDLTool" - TargetEnvironment="1" - HeaderFileName="MfcControl_h.h"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCMIDLTool" - TargetEnvironment="1" - HeaderFileName="MfcControl_h.h"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCMIDLTool" - TargetEnvironment="1" - HeaderFileName="MfcControl_h.h"/> - </FileConfiguration> - </File> - <File - RelativePath=".\MfcControl.rc"> - <FileConfiguration - Name="Unicode Release|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - </File> - <File - RelativePath=".\MfcControlCtl.cpp"> - </File> - <File - RelativePath=".\MfcControlPpg.cpp"> - </File> - <File - RelativePath=".\StdAfx.cpp"> - <FileConfiguration - Name="Unicode Release|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath=".\MfcControl.h"> - </File> - <File - RelativePath=".\MfcControlCtl.h"> - </File> - <File - RelativePath=".\MfcControlPpg.h"> - </File> - <File - RelativePath=".\Resource.h"> - </File> - <File - RelativePath=".\StdAfx.h"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> - <File - RelativePath=".\MfcControlCtl.bmp"> - </File> - </Filter> - <File - RelativePath=".\ReadMe.txt"> - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="MfcControl"
+ ProjectGUID="{07D59661-3519-4F10-AE9F-22DB0479E25A}"
+ RootNamespace="MfcControl"
+ Keyword="MFCProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Unicode Release|Win32"
+ OutputDirectory=".\ReleaseU"
+ IntermediateDirectory=".\ReleaseU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\ReleaseU/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseU/MfcControl.pch"
+ AssemblerListingLocation=".\ReleaseU/"
+ ObjectFile=".\ReleaseU/"
+ ProgramDataBaseFileName=".\ReleaseU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\ReleaseU/MfcControl.ocx"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ ProgramDatabaseFile=".\ReleaseU/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseU/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Debug|Win32"
+ OutputDirectory=".\DebugU"
+ IntermediateDirectory=".\DebugU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\DebugU/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\DebugU/MfcControl.pch"
+ AssemblerListingLocation=".\DebugU/"
+ ObjectFile=".\DebugU/"
+ ProgramDataBaseFileName=".\DebugU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\DebugU/MfcControl.ocx"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\DebugU/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\DebugU/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Release/MfcControl.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\Release/MfcControl.ocx"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ ProgramDatabaseFile=".\Release/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Release/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Registering ActiveX Control..."
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/MfcControl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/MfcControl.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile=".\Debug/MfcControl.ocx"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\MfcControl.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MfcControl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/MfcControl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\MfcControl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControl.def"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControl.odl"
+ >
+ <FileConfiguration
+ Name="Unicode Release|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ HeaderFileName="MfcControl_h.h"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\MfcControl.rc"
+ >
+ <FileConfiguration
+ Name="Unicode Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\MfcControlCtl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControlPpg.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\MfcControl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControlCtl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MfcControlPpg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\MfcControlCtl.bmp"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/OleClient/axhost.cxx b/extensions/test/ole/OleClient/axhost.cxx index e6f42363f49d..b57860327560 100644 --- a/extensions/test/ole/OleClient/axhost.cxx +++ b/extensions/test/ole/OleClient/axhost.cxx @@ -46,7 +46,7 @@ HostWin::~HostWin() } -LRESULT HostWin::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +LRESULT HostWin::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { CAxWindow wnd(m_hWnd); diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx index be5037c35619..112f5a1512d9 100644 --- a/extensions/test/ole/OleClient/clientTest.cxx +++ b/extensions/test/ole/OleClient/clientTest.cxx @@ -86,7 +86,7 @@ void printResultVariantArray( VARIANT & var); void printVariant( VARIANT & var); void printSequence( Sequence<Any>& val); -extern "C" int __cdecl main( int argc, char * argv[] ) +extern "C" int __cdecl main( int , char **) { HRESULT hr; if( FAILED( hr=CoInitialize(NULL))) @@ -381,7 +381,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) Any inrefVariant, outrefVariant; Any inrefDecimal, outrefDecimal; Any inParamsLong, outParamsLong; - Reference<XInterface> xintUnknown = getComObject(L"AxTestComponents.Foo"); + Reference<XInterface> xintUnknown(getComObject(L"AxTestComponents.Foo")); inBool <<= (sal_Bool) sal_True; inv->setValue(OUString(L"prpBool"), inBool); @@ -391,7 +391,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) inv->setValue(OUString(L"prpByte"), inByte); outByte = inv->getValue(OUString(L"prpByte")); - inShort <<= ( sal_Int16) 0xffff; + inShort <<= static_cast<sal_Int16>( -1); inv->setValue(OUString(L"prpShort"), inShort); outShort = inv->getValue(OUString(L"prpShort")); @@ -659,7 +659,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) Any inrefVariant, outrefVariant; Any inrefDecimal, outrefDecimal; - Reference<XInterface> xIntFoo = getComObject(L"AxTestComponents.Foo"); + Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo")); //################################################################################### // in and out parameter //################################################################################### @@ -678,7 +678,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"outByte"), Sequence< Any > ( & outByte, 1), seqIndices, seqOut); outByte <<= seqOut[0]; - inShort <<= ( sal_Int16) 0xffff; + inShort <<= static_cast<sal_Int16>(-1); inv->invoke(OUString(L"inShort"), Sequence< Any > ( & inShort, 1), seqIndices, seqOut); seqIndices.realloc( 0); seqOut.realloc(0); @@ -1221,7 +1221,7 @@ HRESULT doTest() // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); if ( ! invMfc.is()) return hr; - aAny <<= ( sal_Int16) 0xffff; + aAny <<= static_cast<sal_Int16>(-1); aAny= invMfc->invoke( OUString(L"inShort"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); // diff --git a/extensions/test/ole/OleClient/funcs.cxx b/extensions/test/ole/OleClient/funcs.cxx index f6900e44d4cd..1c58da6743cd 100644 --- a/extensions/test/ole/OleClient/funcs.cxx +++ b/extensions/test/ole/OleClient/funcs.cxx @@ -42,6 +42,7 @@ #include "com/sun/star/uno/TypeClass.hpp" #include "com/sun/star/script/XInvocation.hpp" #include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" #include <com/sun/star/bridge/oleautomation/NamedArgument.hpp> #include "rtl/ustring.hxx" @@ -276,6 +277,7 @@ bool equalSequences(const Any& orig, const Any& returned) default: return false; } + return false; } template< class T > @@ -292,6 +294,7 @@ bool equalSequences(const Sequence<T>& seqIn, const Sequence<Any> & seqOut) if (anyIn != anyOut) return false; } + return true; } diff --git a/extensions/test/ole/OleClient/readme.txt b/extensions/test/ole/OleClient/readme.txt index dfbeec3b6623..96181e44db9b 100644 --- a/extensions/test/ole/OleClient/readme.txt +++ b/extensions/test/ole/OleClient/readme.txt @@ -1,16 +1,10 @@ -The program tests the OleObjectFactory service which enables to use COM components -through XInvocation. - -Requirements: - -types.rdb and services.rdb and OleClient.ini have to be next to the executable. -COM component: XCallback_Impl.Simple ( extensions/test/ole/unotocomcalls/XCallback_Impl ) -ActiveX controls: AxTestComponent.Basic ( extensions/test/ole/AxTestComponents) - MFCCONTROL.MfcControlCtrl.1 (extensions/test/ole/MfcControl) - -//The project cannot be build in our environment therefore it must be an MSDEV project. -//Reason: ATL uses min and max macros defined in windef.h. Our stl header undef min and max. -//To generate the uno header use the make file. Then Set the include path directories to -//the inc directory in the build tree. - -Now with Visual Studio .NET 2002 it seems to work +The program tests the OleObjectFactory service which enables to use COM components
+through XInvocation.
+
+Requirements:
+
+types.rdb and services.rdb and OleClient.ini have to be next to the executable.
+COM component: XCallback_Impl.Simple ( extensions/test/ole/unotocomcalls/XCallback_Impl )
+ActiveX controls: AxTestComponent.Basic ( extensions/test/ole/AxTestComponents)
+ MFCCONTROL.MfcControlCtrl.1 (extensions/test/ole/MfcControl)
+
diff --git a/extensions/test/ole/OleConverterVar1/convTest.cxx b/extensions/test/ole/OleConverterVar1/convTest.cxx index 2b1e02b5266d..3671ec00b429 100644 --- a/extensions/test/ole/OleConverterVar1/convTest.cxx +++ b/extensions/test/ole/OleConverterVar1/convTest.cxx @@ -31,6 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_extensions.hxx" +#pragma warning (disable: 4917) #include <windows.h> #include <comdef.h> #include <tchar.h> diff --git a/extensions/test/ole/OleConverterVar1/readme.txt b/extensions/test/ole/OleConverterVar1/readme.txt index 11bf9c37d842..148bab04c147 100644 --- a/extensions/test/ole/OleConverterVar1/readme.txt +++ b/extensions/test/ole/OleConverterVar1/readme.txt @@ -1,8 +1,10 @@ -The program test the Service com.sun.star.bridge.OleBridgeSupplierVar1. -While running in debug mode it writes infos to the debug - output. - -The executable needs a applicat.rdb present with the registered services -com.sun.star.bridge.OleBridgeSupplierVar1, oletest.OleTest. The OleTest -component resides in extensions/test/ole/cpnt. The build creates an -oletest.rdb file that must be merged with the applicat.rdb and OleTest -must be registered to the applicat.rdb.
\ No newline at end of file +Currently broken!!
+
+The program test the Service com.sun.star.bridge.OleBridgeSupplierVar1.
+While running in debug mode it writes infos to the debug - output.
+
+The executable needs a services.rdb present with the registered services
+com.sun.star.bridge.OleBridgeSupplierVar1, oletest.OleTest. The OleTest
+component resides in extensions/test/ole/cpnt. The build creates an
+oletest.rdb file that must be merged with the types.rdb and OleTest
+must be registered to the services.rdb.
diff --git a/extensions/test/ole/StarBasic_OleClient/oleclient.bas b/extensions/test/ole/StarBasic_OleClient/oleclient.bas index 2fdd1db67859..7ba324660dfe 100644 --- a/extensions/test/ole/StarBasic_OleClient/oleclient.bas +++ b/extensions/test/ole/StarBasic_OleClient/oleclient.bas @@ -350,10 +350,11 @@ inLong = 0 inFloat = 0 inVariant = 0 inVariant2 = 0 -'defaults are: 1, 2. , 3, 4 +'defaults are: 1, 2, 4 +'The third parameter is a VARIANT with a default value of 4. COM gives it the type BSTR obj.defaultvalue1() obj.defaultvalue2(inLong, inFloat, inVariant) -If inLong <> 1 Or inFloat <> 2 Or inVariant <> 3 Then +If inLong <> 1 Or inFloat <> 2 Or inVariant <> "4" Then runtest = -1 Exit Function End If @@ -365,7 +366,7 @@ inVariant = 0 inVariant = 0 obj.defaultvalue1(inLong, inFloat) obj.defaultvalue2(inLong, inFloat, inVariant) -If inLong <> inLong2 Or inFloat <> inFloat2 Or inVariant <> 3 Then +If inLong <> inLong2 Or inFloat <> inFloat2 Or inVariant <> "4" Then runtest = -1 Exit Function End If diff --git a/extensions/test/ole/StarBasic_OleClient/readme.txt b/extensions/test/ole/StarBasic_OleClient/readme.txt index 8e129dddddcd..2eca8aac3272 100644 --- a/extensions/test/ole/StarBasic_OleClient/readme.txt +++ b/extensions/test/ole/StarBasic_OleClient/readme.txt @@ -1,10 +1,10 @@ -oleclient.bas is a StarBasic script that uses the -"com.sun.star.bridge.OleObjectFactory" service to instantiate -the ActiveX component "AxTestComponents.Basic" and calls -functions on it. - ------------------------------------------------------------- -Requirements: - -ActiveX component: AxTestComponent.Basic must be registered. -It is contained in extensions/test/ole/AxTestComponents
\ No newline at end of file +oleclient.bas is a StarBasic script that uses the
+"com.sun.star.bridge.OleObjectFactory" service to instantiate
+the ActiveX component "AxTestComponents.Basic" and calls
+functions on it.
+
+------------------------------------------------------------
+Requirements:
+
+ActiveX component: AxTestComponent.Basic must be registered.
+It is contained in extensions/test/ole/AxTestComponents
diff --git a/extensions/test/ole/VisualBasic/AssemblyInfo.vb b/extensions/test/ole/VisualBasic/AssemblyInfo.vb new file mode 100644 index 000000000000..e663aa549ebe --- /dev/null +++ b/extensions/test/ole/VisualBasic/AssemblyInfo.vb @@ -0,0 +1,33 @@ +Imports System.Reflection
+Imports System.Runtime.CompilerServices
+Imports System.Runtime.InteropServices
+
+' General Information about an assembly is controlled through the following
+' set of attributes. Change these attribute values to modify the information
+' associated with an assembly.
+
+
+' TODO: Review the values of the assembly attributes
+
+
+<Assembly: AssemblyTitle("")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("StarOffice")>
+<Assembly: AssemblyProduct("")>
+<Assembly: AssemblyCopyright("")>
+<Assembly: AssemblyTrademark("")>
+<Assembly: AssemblyCulture("")>
+
+' Version information for an assembly consists of the following four values:
+
+' Major version
+' Minor Version
+' Build Number
+' Revision
+
+' You can specify all the values or you can default the Build and Revision Numbers
+' by using the '*' as shown below:
+
+<Assembly: AssemblyVersion("1.0.*")>
+
+
diff --git a/extensions/test/ole/VisualBasic/Form1.frm b/extensions/test/ole/VisualBasic/Form1.frm deleted file mode 100644 index c2ed1f6a11f5..000000000000 --- a/extensions/test/ole/VisualBasic/Form1.frm +++ /dev/null @@ -1,349 +0,0 @@ -VERSION 5.00 -Begin VB.Form Form1 - Caption = "Form1" - ClientHeight = 4572 - ClientLeft = 48 - ClientTop = 336 - ClientWidth = 8460 - LinkTopic = "Form1" - ScaleHeight = 4572 - ScaleWidth = 8460 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton ctrInParamStart - Caption = "Start" - Height = 252 - Left = 240 - TabIndex = 20 - Top = 480 - Width = 732 - End - Begin VB.TextBox tareaResult - Height = 1932 - Left = 4920 - TabIndex = 19 - Top = 480 - Width = 3372 - End - Begin VB.CommandButton Command20 - Caption = "Command20" - Height = 252 - Left = 3000 - TabIndex = 18 - Top = 2640 - Width = 492 - End - Begin VB.CommandButton Command19 - Caption = "string" - Height = 252 - Left = 2280 - TabIndex = 17 - Top = 2640 - Width = 492 - End - Begin VB.CommandButton Command18 - Caption = "long" - Height = 252 - Left = 1560 - TabIndex = 16 - Top = 2640 - Width = 492 - End - Begin VB.CommandButton Command17 - Caption = "short" - Height = 252 - Left = 840 - TabIndex = 15 - Top = 2640 - Width = 492 - End - Begin VB.CommandButton Command16 - Caption = "byte" - Height = 252 - Left = 120 - TabIndex = 14 - Top = 2640 - Width = 492 - End - Begin VB.CommandButton Command15 - Caption = "array" - Height = 252 - Left = 3000 - TabIndex = 12 - Top = 1920 - Width = 612 - End - Begin VB.CommandButton Command14 - Caption = "string" - Height = 252 - Left = 2280 - TabIndex = 11 - Top = 1920 - Width = 492 - End - Begin VB.CommandButton Command13 - Caption = "long" - Height = 252 - Left = 1440 - TabIndex = 10 - Top = 1920 - Width = 612 - End - Begin VB.CommandButton Command12 - Caption = "short" - Height = 252 - Left = 720 - TabIndex = 9 - Top = 1920 - Width = 612 - End - Begin VB.CommandButton Command11 - Caption = "byte" - Height = 252 - Left = 120 - TabIndex = 8 - Top = 1920 - Width = 492 - End - Begin VB.CommandButton Command10 - Caption = "array" - Height = 252 - Left = 3000 - TabIndex = 6 - Top = 1200 - Width = 612 - End - Begin VB.CommandButton Command9 - Caption = "string" - Height = 252 - Left = 2280 - TabIndex = 5 - Top = 1200 - Width = 612 - End - Begin VB.CommandButton Command8 - Caption = "long" - Height = 252 - Left = 1560 - TabIndex = 4 - Top = 1200 - Width = 612 - End - Begin VB.CommandButton Command7 - Caption = "short" - Height = 252 - Left = 840 - TabIndex = 3 - Top = 1200 - Width = 612 - End - Begin VB.CommandButton Command6 - Caption = "byte" - Height = 252 - Left = 120 - TabIndex = 2 - Top = 1200 - Width = 612 - End - Begin VB.Label Label4 - Caption = "Properties" - Height = 252 - Left = 120 - TabIndex = 13 - Top = 2280 - Width = 1212 - End - Begin VB.Label Label3 - Caption = "In Out Parameter" - Height = 252 - Left = 120 - TabIndex = 7 - Top = 1560 - Width = 1332 - End - Begin VB.Label Label2 - Caption = "Out Parameter" - Height = 252 - Left = 120 - TabIndex = 1 - Top = 840 - Width = 1332 - End - Begin VB.Label Label1 - Caption = "In Parameter" - Height = 252 - Left = 240 - TabIndex = 0 - Top = 120 - Width = 1212 - End -End -Attribute VB_Name = "Form1" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit -Private objServiceManager -Private objCoreReflection -Private objOleTest - -Private Sub ctrInParamStart_Click() -Dim ret As Variant - -' In Parameter, simple types -'============================================ -ret = objOleTest.in_methodByte(10) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodFloat(3.14) -Debug.Print TypeName(ret) & " " & CStr(ret) - -Dim d As Double 'try conversion -d = 3.14 -ret = objOleTest.in_methodFloat(3.14) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodDouble(4.14) -Debug.Print TypeName(ret) & " " & CStr(ret) -Dim s As Single -s = 4.14 -ret = objOleTest.in_methodDouble(s) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodBool(True) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodBool(False) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodShort(-10) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodUShort(10) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodLong(-1000000) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodULong(1000000) -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodString("This is a String") -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodChar("A") -Debug.Print TypeName(ret) & " " & CStr(ret) -ret = objOleTest.in_methodAny("This is a String in an any") -Debug.Print TypeName(ret) & " " & CStr(ret) - -Call objOleTest.in_methodAll(10, 10.1, 10.111, True, 10, 11, 12, 13, _ - "A String", "A", "A String in an Any") - -'Out Parameter simple types -'================================================ -Dim outByte As Byte -objOleTest.testout_methodByte outByte -Debug.Print "out byte " & CStr(outByte) -Dim outFloat As Single -objOleTest.testout_methodFloat outFloat -Debug.Print "out float " & CStr(outFloat) -Dim outDouble As Double -objOleTest.testout_methodDouble outDouble -Debug.Print "out double " & CStr(outDouble) -Dim outBool As Boolean -objOleTest.testout_methodBool outBool -Debug.Print "out bool " & CStr(outBool) -Dim outInt As Integer -objOleTest.testout_methodShort outInt -Debug.Print "out short " & CStr(outInt) -objOleTest.testout_methodUShort outInt -Debug.Print "out unsignedshort " & CStr(outInt) -Dim outLong As Long -objOleTest.testout_methodLong outLong -Debug.Print "out long " & CStr(outInt) -objOleTest.testout_methodULong outLong -Debug.Print "out unsigned long " & CStr(outInt) -Dim outString As String -objOleTest.testout_methodString outString -Debug.Print "out string " & CStr(outString) -Dim outChar As Integer -objOleTest.testout_methodChar outChar -Debug.Print "out char " & CStr(outChar) -Dim outCharS As String -objOleTest.testout_methodChar outCharS -Debug.Print "out char (String) " & CStr(outCharS) -objOleTest.testout_methodAny outString -Debug.Print "out Any " & CStr(outString) -'Out Parameter simple types (VARIANT var) -Dim outVar As Variant -objOleTest.testout_methodByte outVar -Debug.Print "out Byte (VARIANT) " & CStr(outVar) -objOleTest.testout_methodFloat outVar -Debug.Print "out float (VARIANT) " & CStr(outVar) -objOleTest.testout_methodDouble outVar -Debug.Print "out double (VARIANT) " & CStr(outVar) -objOleTest.testout_methodBool outVar -Debug.Print "out bool (VARIANT) " & CStr(outVar) -objOleTest.testout_methodShort outVar -Debug.Print "out short (VARIANT) " & CStr(outVar) -objOleTest.testout_methodUShort outVar -Debug.Print "out unsigned short (VARIANT) " & CStr(outVar) -objOleTest.testout_methodLong outVar -Debug.Print "out long (VARIANT) " & CStr(outVar) -objOleTest.testout_methodULong outVar -Debug.Print "out unsigned long (VARIANT) " & CStr(outVar) -objOleTest.testout_methodString outVar -Debug.Print "out string (VARIANT) " & CStr(outVar) -objOleTest.testout_methodChar outVar -Debug.Print "out char (VARIANT) " & CStr(outVar) -objOleTest.testout_methodAny outVar -Debug.Print "out any (VARIANT) " & CStr(outVar) - -'In/Out simple types -outByte = 10 -objOleTest.testinout_methodByte outByte -Debug.Print "inout byte " & CStr(outByte) -outFloat = 3.14 -objOleTest.testinout_methodFloat outFloat -Debug.Print "inout float " & CStr(outFloat) -outDouble = 4.14 -objOleTest.testinout_methodDouble outDouble -Debug.Print "inout double " & CStr(outDouble) -outBool = True -objOleTest.testinout_methodBool outBool -Debug.Print "inout bool " & CStr(outBool) -outInt = 10 -objOleTest.testinout_methodShort outInt -Debug.Print "inout short " & CStr(outInt) -outInt = 20 -objOleTest.testinout_methodUShort outInt -Debug.Print "inout unsignedshort " & CStr(outInt) -outLong = 30 -objOleTest.testinout_methodLong outLong -Debug.Print "inout long " & CStr(outLong) -outLong = 40 -objOleTest.testinout_methodULong outLong -Debug.Print "inout unsigned long " & CStr(outLong) -outString = "this is an in string" -objOleTest.testinout_methodString outString -Debug.Print "inout string " & CStr(outString) - -outString = "this is an in String" -objOleTest.testout_methodChar outString -Debug.Print "out char " & CStr(outString) -outString = "this is another in out string" -objOleTest.testout_methodAny outString -Debug.Print "out Any " & CStr(outString) - - - - - -Dim var As Boolean -var = True -Debug.Print CStr(var) - - -End Sub - -Private Sub Form_Load() - Set objServiceManager = CreateObject("com.sun.star.ServiceManager") - Set objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection") - - Set objOleTest = objServiceManager.createInstance("oletest.OleTest") - Debug.Print TypeName(objOleTest) -End Sub - -Private Sub Text1_Change() - -End Sub diff --git a/extensions/test/ole/VisualBasic/Module1.bas b/extensions/test/ole/VisualBasic/Module1.bas deleted file mode 100644 index ea33fdd06516..000000000000 --- a/extensions/test/ole/VisualBasic/Module1.bas +++ /dev/null @@ -1,858 +0,0 @@ -Attribute VB_Name = "Module1" -Option Explicit - -Private objServiceManager -Private objCoreReflection -Private objOleTest -Private objEventListener -'General counter -Dim i As Long -Dim j As Long -Dim sError As String -Dim inHyper As Variant, outHyper As Variant, retHyper As Variant - -Sub Main() - Set objServiceManager = CreateObject("com.sun.star.ServiceManager") - Set objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection") - ' extensions/test/ole/cpnt - Set objOleTest = objServiceManager.createInstance("oletest.OleTest") - ' extensions/test/ole/EventListenerSample/VBEventListener - Set objEventListener = CreateObject("VBasicEventListener.VBEventListener") - Debug.Print TypeName(objOleTest) - - -'testBasics -'testHyper -'testAny -'testObjects -'testGetStruct -'testImplementedInterfaces -'testGetValueObject -'testArrays -testProps - -End Sub -Function testProps() - - - Dim aToolbarItemProp1 As Object - Set aToolbarItemProp1 = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue") - Dim aToolbarItemProp2 As Object - Set aToolbarItemProp2 = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue") - Dim aToolbarItemProp3 As Object - Set aToolbarItemProp3 = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue") - Dim properties(2) As Object - - aToolbarItemProp1.Name = "CommandURL" - aToolbarItemProp1.Value = "macro:///standard.module1.TestIt" - aToolbarItemProp2.Name = "Label" - aToolbarItemProp2.Value = "Test" - aToolbarItemProp3.Name = "Type" - aToolbarItemProp3.Value = 0 - - Set properties(0) = aToolbarItemProp1 - Set properties(1) = aToolbarItemProp2 - Set properties(2) = aToolbarItemProp3 - - - Dim dummy() - 'Dim objDummy As Object = New Object - 'dummy = System.Array.createInstance(objDummy.GetType, 0) - Dim Desktop As Object - Set Desktop = objServiceManager.createInstance("com.sun.star.frame.Desktop") - Dim Doc As Object - Set Doc = Desktop.loadComponentFromURL("private:factory/swriter", "_blank", 2, dummy) - Dim LayoutManager As Object - Set LayoutManager = Doc.currentController.Frame.LayoutManager - - LayoutManager.createElement ("private:resource/toolbar/user_toolbar1") - LayoutManager.showElement ("private:resource/toolbar/user_toolbar1") - Dim ToolBar As Object - Set ToolBar = LayoutManager.getElement("private:resource/toolbar/user_toolbar1") - Dim settings As Object - Set settings = ToolBar.getSettings(True) - -'the changes are here: - Dim aany As Object - Set aany = objServiceManager.Bridge_GetValueObject() - Call aany.Set("[]com.sun.star.beans.PropertyValue", properties) - Call settings.insertByIndex(0, aany) - Call ToolBar.setSettings(settings) - - -End Function - - -Function testBasics() -' In Parameter, simple types -'============================================ -Dim tmpVar As Variant -Dim ret As Variant -Dim inByte As Byte, outByte As Byte, retByte As Byte -Dim inBool As Boolean, outBool As Boolean, retBool As Boolean -Dim inShort As Integer, outShort As Integer, retShort As Integer -Dim inUShort As Integer, outUShort As Integer, retUShort As Integer -Dim inLong As Long, outLong As Long, retLong As Long -Dim inULong As Long, outULong As Long, retULong As Long -Dim inHyper As Variant, outHyper As Variant, retHyper As Variant -Dim inUHyper As Variant, outUHyper As Variant, retUHyper As Variant -Dim inFloat As Single, outFloat As Single, retFloat As Single -Dim inDouble As Double, outDouble As Double, retDouble As Double -Dim inString As String, outString As String, retString As String -Dim inChar As Integer, outChar As Integer, retChar As Integer, retChar2 As Integer -Dim inCharAsString As String, outCharAsString As String, retCharAsString As String -Dim inAny As Variant, outAny As Variant, retAny As Variant -Dim inType As Object, outType As Object, retType As Object -Dim inXInterface As Object, outXInterface As Object, retXInterface As Object -Dim inXInterface2 As Object, outXInterface2 As Object, retXInterface2 As Object - - -Dim outVarByte As Variant -Dim outVarBool As Variant -Dim outVarShort As Variant -Dim outVarUShort As Variant -Dim outVarLong As Variant -Dim outVarULong As Variant -Dim outVarFloat As Variant -Dim outVarDouble As Variant -Dim outVarString As Variant -Dim outVarChar As Variant -Dim outVarAny As Variant -Dim outVarType As Variant - -inByte = 10 -inBool = True -inShort = -10 -inUShort = -100 -inLong = -1000 -inHyper = CDec("-9223372036854775808") 'lowest int64 -inUHyper = CDec("18446744073709551615") ' highest unsigned int64 -inULong = 10000 -inFloat = 3.14 -inDouble = 3.14 -inString = "Hello World!" -inChar = 65 -inCharAsString = "A" -inAny = "Hello World" -Set inType = objServiceManager.Bridge_CreateType("[]long") -Set inXInterface = objCoreReflection -Set inXInterface2 = objEventListener - -retByte = objOleTest.in_methodByte(inByte) -retBool = objOleTest.in_methodBool(inBool) -retShort = objOleTest.in_methodShort(inShort) -retUShort = objOleTest.in_methodUShort(inUShort) -retLong = objOleTest.in_methodLong(inLong) -retULong = objOleTest.in_methodULong(inULong) -retHyper = objOleTest.in_methodHyper(inHyper) -retUHyper = objOleTest.in_methodUHyper(inUHyper) -retFloat = objOleTest.in_methodFloat(inFloat) -retDouble = objOleTest.in_methodDouble(inDouble) -retString = objOleTest.in_methodString(inString) -retChar = objOleTest.in_methodChar(inChar) -retChar2 = objOleTest.in_methodChar(inCharAsString) -retAny = objOleTest.in_methodAny(inAny) -Set retType = objOleTest.in_methodType(inType) -Set retXInterface = objOleTest.in_methodXInterface(inXInterface) ' UNO object -Set retXInterface2 = objOleTest.in_methodXInterface(inXInterface2) - -If retByte <> inByte Or retBool <> inBool _ - Or retShort <> inShort Or retUShort <> inUShort _ - Or retLong <> inLong Or retULong <> inULong _ - Or retHyper <> inHyper Or retUHyper <> inUHyper _ - Or retFloat <> inFloat Or retDouble <> inDouble _ - Or retString <> inString Or retChar <> inChar _ - Or retChar2 <> Asc(inCharAsString) Or retAny <> inAny _ - Or retType <> inType _ - Or Not (inXInterface Is retXInterface) _ - Or Not (inXInterface2 Is retXInterface2) Then - sError = "in - parameter and return value test failed" - MsgBox sError - -End If - -'Out Parameter simple types -'================================================ - -objOleTest.testout_methodByte outByte -objOleTest.testout_methodFloat outFloat -objOleTest.testout_methodDouble outDouble -objOleTest.testout_methodBool outBool -objOleTest.testout_methodShort outShort -objOleTest.testout_methodUShort outUShort -objOleTest.testout_methodLong outLong -objOleTest.testout_methodULong outULong -objOleTest.testout_methodHyper outHyper -objOleTest.testout_methodUHyper outUHyper -objOleTest.testout_methodString outString -objOleTest.testout_methodChar outChar -objOleTest.testout_methodChar outCharAsString -objOleTest.testout_methodAny outAny -objOleTest.testout_methodType outType -'objOleTest.in_methodXInterface (inXInterface) ' UNO object -Call objOleTest.in_methodXInterface(inXInterface) ' UNO object -objOleTest.testout_methodXInterface outXInterface -Call objOleTest.in_methodXInterface(inXInterface2) ' COM object -objOleTest.testout_methodXInterface outXInterface2 - - -If outByte <> inByte Or outFloat <> inFloat _ - Or outDouble <> inDouble Or outBool <> inBool _ - Or outShort <> inShort Or outUShort <> inUShort _ - Or outLong <> inLong Or outULong <> inULong _ - Or outHyper <> inHyper Or outUHyper <> inUHyper _ - Or outString <> inString Or outChar <> inChar _ - Or outCharAsString <> inCharAsString _ - Or outAny <> inAny Or outType <> inType _ - Or Not (inXInterface Is outXInterface) _ - Or Not (inXInterface2 Is outXInterface2) Then - - sError = "out - parameter test failed!" - MsgBox sError -End If - -'Out Parameter simple types (VARIANT var) -'==================================================== -objOleTest.testout_methodByte outVarByte -objOleTest.testout_methodBool outVarBool -objOleTest.testout_methodChar outVarChar -objOleTest.testout_methodShort outVarShort -objOleTest.testout_methodUShort outVarUShort -objOleTest.testout_methodLong outVarLong -objOleTest.testout_methodULong outVarULong -objOleTest.testout_methodString outVarString -objOleTest.testout_methodFloat outVarFloat -objOleTest.testout_methodDouble outVarDouble -objOleTest.testout_methodAny outVarAny -objOleTest.testout_methodType outVarType - -If outVarByte <> inByte Or outVarBool <> inBool _ - Or outVarChar <> inChar _ - Or outVarShort <> inShort Or outVarUShort <> inUShort _ - Or outVarLong <> inLong Or outVarULong <> inULong _ - Or outVarString <> inString _ - Or outVarFloat <> inFloat Or outVarDouble <> inDouble _ - Or outVarAny <> inAny _ - Or outVarType <> inType _ - Then - sError = "out - parameter (VARIANT) test failed!" - MsgBox sError -End If - -'In/Out simple types -'============================================ -objOleTest.in_methodByte (0) -objOleTest.in_methodBool (False) -objOleTest.in_methodShort (0) -objOleTest.in_methodUShort (0) -objOleTest.in_methodLong (0) -objOleTest.in_methodULong (0) -objOleTest.in_methodHyper (0) -objOleTest.in_methodUHyper (0) -objOleTest.in_methodFloat (0) -objOleTest.in_methodDouble (0) -objOleTest.in_methodString (0) -objOleTest.in_methodChar (0) -objOleTest.in_methodAny (0) -objOleTest.in_methodType (objServiceManager.Bridge_CreateType("boolean")) -Set outXInterface = Nothing -Call objOleTest.in_methodXInterface(outXInterface) - - -outByte = 10 -retByte = outByte -objOleTest.testinout_methodByte retByte -objOleTest.testinout_methodByte retByte -outBool = True -retBool = outBool -objOleTest.testinout_methodBool retBool -objOleTest.testinout_methodBool retBool -outShort = 10 -retShort = outShort -objOleTest.testinout_methodShort retShort -objOleTest.testinout_methodShort retShort -outUShort = 20 -retUShort = outUShort -objOleTest.testinout_methodUShort retUShort -objOleTest.testinout_methodUShort retUShort -outLong = 30 -retLong = outLong -objOleTest.testinout_methodLong retLong -objOleTest.testinout_methodLong retLong -outULong = 40 -retULong = outULong -objOleTest.testinout_methodULong retLong -objOleTest.testinout_methodULong retLong -outHyper = CDec("9223372036854775807") 'highest positiv value of int64 -retHyper = outHyper -objOleTest.testinout_methodHyper retHyper -objOleTest.testinout_methodHyper retHyper -outUHyper = CDec("18446744073709551615") 'highest value of unsigned int64 -retUHyper = outUHyper -objOleTest.testinout_methodUHyper retUHyper -objOleTest.testinout_methodUHyper retUHyper -outFloat = 3.14 -retFloat = outFloat -objOleTest.testinout_methodFloat retFloat -objOleTest.testinout_methodFloat retFloat -outDouble = 4.14 -retDouble = outDouble -objOleTest.testinout_methodDouble retDouble -objOleTest.testinout_methodDouble retDouble -outString = "Hello World!" -retString = outString -objOleTest.testinout_methodString retString -objOleTest.testinout_methodString retString -outChar = 66 -retChar = outChar -objOleTest.testinout_methodChar retChar -objOleTest.testinout_methodChar retChar -outCharAsString = "H" -retCharAsString = outCharAsString -objOleTest.testinout_methodChar retCharAsString -objOleTest.testinout_methodChar retCharAsString -outAny = "Hello World 2!" -retAny = outAny -objOleTest.testinout_methodAny retAny -objOleTest.testinout_methodAny retAny -Set outType = objServiceManager.Bridge_CreateType("long") -Set retType = outType -objOleTest.testinout_methodType retType -objOleTest.testinout_methodType retType - -Set outXInterface = objCoreReflection -Set retXInterface = outXInterface -objOleTest.testinout_methodXInterface2 retXInterface - -If outByte <> retByte Or outBool <> retBool _ - Or outShort <> retShort Or outUShort <> retUShort _ - Or outLong <> retLong Or outULong <> retULong _ - Or outHyper <> retHyper Or outUHyper <> outUHyper _ - Or outFloat <> retFloat _ - Or outDouble <> retDouble _ - Or outString <> retString Or outChar <> retChar _ - Or outCharAsString <> retCharAsString Or outAny <> retAny _ - Or outType <> retType _ - Or Not (outXInterface Is retXInterface) Then - sError = "in/out - parameter test failed!" - MsgBox sError -End If - -'Attributes -objOleTest.AByte = inByte -retByte = 0 -retByte = objOleTest.AByte -objOleTest.AFloat = inFloat -retFloat = 0 -retFloat = objOleTest.AFloat -objOleTest.AType = inType -Set retType = Nothing -Set retType = objOleTest.AType - -If inByte <> retByte _ - Or inFloat <> retFloat _ - Or inType <> retType _ - Then - sError = "Attributes - test failed!" - MsgBox sError -End If - -End Function -Function testHyper() - -'====================================================================== -' Other Hyper tests -Dim emptyVar As Variant -Dim retAny As Variant - -retAny = emptyVar -inHyper = CDec("9223372036854775807") 'highest positiv value of int64 -retAny = objOleTest.in_methodAny(inHyper) -sError = "hyper test failed" -If inHyper <> retAny Then - MsgBox sError -End If -inHyper = CDec("-9223372036854775808") 'lowest negativ value of int64 -retAny = objOleTest.in_methodAny(inHyper) -If inHyper <> retAny Then - MsgBox sError -End If -inHyper = CDec("18446744073709551615") 'highest positiv value of unsigne int64 -retAny = objOleTest.in_methodAny(inHyper) -If inHyper <> retAny Then - MsgBox sError -End If -inHyper = CDec(-1) -retAny = objOleTest.in_methodAny(inHyper) -If inHyper <> retAny Then - MsgBox sError -End If -inHyper = CDec(0) -retAny = objOleTest.in_methodAny(inHyper) -If inHyper <> retAny Then - MsgBox sError -End If - -'============================================================================== - - -End Function -Function testAny() -Dim outVAr - -'Any test. We pass in an any as value object. If it is not correct converted -'then the target component throws a RuntimeException -Dim lengthInAny As Long - -lengthInAny = 10 -Dim seqLongInAny(10) As Long -For i = 0 To lengthInAny - 1 - seqLongInAny(i) = i + 10 -Next -Dim anySeqLong As Object -Set anySeqLong = objOleTest.Bridge_GetValueObject() -anySeqLong.Set "[]long", seqLongInAny -Dim anySeqRet As Variant -Err.Clear -On Error Resume Next -anySeqRet = objOleTest.other_methodAny(anySeqLong, "[]long") - -If Err.Number <> 0 Then - MsgBox "error" -End If -End Function - -Function testObjects() -' COM obj -Dim outVAr -Dim retObj As Object -'OleTest receives a COM object that implements XEventListener -'OleTest then calls a disposing on the object. The object then will be -'asked if it has been called -objEventListener.setQuiet True -objEventListener.resetDisposing -Set retObj = objOleTest.in_methodInvocation(objEventListener) -Dim ret -ret = objEventListener.disposingCalled -If ret = False Then - MsgBox "Error" -End If - -'The returned object should be objEventListener, test it by calling disposing -' takes an IDispatch as Param ( EventObject).To provide a TypeMismatch -'we put in another IDispatch -retObj.resetDisposing -retObj.disposing objEventListener -If retObj.disposingCalled = False Then - MsgBox "Error" -End If - -' out param gives out the OleTestComponent -'objOleTest.testout_methodXInterface retObj -'outVAr = Null -'retObj.testout_methodAny outVAr -'Debug.Print "test out Interface " & CStr(outVAr) -'If outVAr <> "I am a string in an any" Then -' MsgBox "error" -'End If - - -'in out -' in: UNO object, the same is expected as out param -' the function expects OleTest as parameter and sets a value - -Dim myAny As Variant - - - -Dim objOleTest2 As Object -Set objOleTest2 = objServiceManager.createInstance("oletest.OleTest") -'Set a value -objOleTest2.AttrAny2 = "VBString " - -'testinout_methodXInterfaces substitutes the argument with the object set in in_methodXInterface -objOleTest.AttrAny2 = "VBString this string was written in the UNO component to the inout pararmeter" -objOleTest.in_methodXInterface objOleTest -objOleTest.testinout_methodXInterface2 objOleTest2 -Dim tmpVar As Variant -tmpVar = Null -tmpVar = objOleTest2.AttrAny2 -Debug.Print "in: Uno out: the same object // " & CStr(tmpVar) -If tmpVar <> "VBString this string was written in the UNO component to the inout pararmeter" Then - MsgBox "error" -End If - - -'create a struct -Dim structClass As Object -Set structClass = objCoreReflection.forName("oletest.SimpleStruct") -Dim structInstance As Object -structClass.CreateObject structInstance -structInstance.message = "Now we are in VB" -Debug.Print "struct out " & structInstance.message -If structInstance.message <> "Now we are in VB" Then - MsgBox "error" -End If - -'put the struct into OleTest. The same struct will be returned with an added String -Dim structRet As Object -Set structRet = objOleTest.in_methodStruct(structInstance) -Debug.Print "struct in - return " & structRet.message -If structRet.message <> "Now we are in VBThis string was set in OleTest" Then - MsgBox "error" -End If - - -End Function -Function testGetStruct() -'Bridge_GetStruct -'======================================================== -Dim objDocument As Object -Set objDocument = createHiddenDocument() -objDocument.dispose -End Function - -Function testImplementedInterfaces() -'Bridge_ImplementedInterfaces -'================================================= -' call an UNO function that takes an XEventListener interface -'We provide a COM implementation (IDispatch) as EventListener -'Open a new empty writer document - -Dim objDocument As Object -Set objDocument = createHiddenDocument() -objEventListener.resetDisposing -objDocument.addEventListener objEventListener -objDocument.dispose -If objEventListener.disposingCalled = False Then - MsgBox "Error" -End If -End Function - -Function testGetValueObject() -'Bridge_GetValueObject -'================================================== -Dim objVal As Object -Set objVal = objOleTest.Bridge_GetValueObject() -Dim arrByte(9) As Byte -Dim countvar As Long -For countvar = 0 To 9 - arrByte(countvar) = countvar -Next countvar - -objVal.Set "[]byte", arrByte -Dim ret -ret = 0 -ret = objOleTest.methodByte(objVal) -'Test if ret is the same array - -Dim key -key = 0 -For Each key In ret - If ret(key) <> arrByte(key) Then - MsgBox "Error" - End If - Debug.Print ret(key) -Next key - -Dim outByte As Byte -outByte = 77 -Dim retByte As Byte -retByte = outByte -objVal.InitInOutParam "byte", retByte -objOleTest.testinout_methodByte objVal -objVal.InitInOutParam "byte", retByte -objOleTest.testinout_methodByte objVal - -ret = 0 -ret = objVal.Get() -Debug.Print ret -If ret <> outByte Then - MsgBox "error" -End If - -objVal.InitOutParam -Dim inChar As Integer -inChar = 65 -objOleTest.in_methodChar (inChar) -objOleTest.testout_methodChar objVal 'Returns 'A' (65) -ret = 0 -ret = objVal.Get() -Debug.Print ret -If ret <> inChar Then - MsgBox "error" -End If - -End Function - -Function testArrays() -'Arrays -'======================================== -Dim arrLong(2) As Long -Dim arrObj(2) As Object -Dim countvar As Long -For countvar = 0 To 2 - arrLong(countvar) = countvar + 10 - Debug.Print countvar - Set arrObj(countvar) = CreateObject("VBasicEventListener.VBEventListener") - arrObj(countvar).setQuiet True -Next - -'Arrays always contain VARIANTS -Dim seq() As Variant -seq = objOleTest.methodLong(arrLong) - -For countvar = 0 To 2 - Debug.Print CStr(seq(countvar)) - If arrLong(countvar) <> seq(countvar) Then - MsgBox "error" - End If -Next -seq = objOleTest.methodXInterface(arrObj) -For countvar = 0 To 2 - Dim tmp As Object - seq(countvar).resetDisposing - seq(countvar).disposing tmp - If seq(countvar).disposingCalled = False Then - MsgBox "Error" - End If -Next - -'Array containing interfaces (element type is VT_DISPATCH) -Dim arEventListener(2) As Object -For countvar = 0 To 2 - Set arEventListener(countvar) = CreateObject("VBasicEventListener.VBEventListener") - arEventListener(countvar).setQuiet True -Next - -'The function calls disposing on the listeners -seq = objOleTest.methodXEventListeners(arEventListener) -Dim count -For countvar = 0 To 2 - If arEventListener(countvar).disposingCalled = False Then - MsgBox "Error" - End If -Next -'Array containing interfaces (element type is VT_VARIANT which contains VT_DISPATCH -Dim arEventListener2(2) As Variant -For countvar = 0 To 2 - Set arEventListener2(countvar) = CreateObject("VBasicEventListener.VBEventListener") - arEventListener2(countvar).setQuiet True -Next -seq = objOleTest.methodXEventListeners(arEventListener2) -For countvar = 0 To 2 - If arEventListener2(countvar).disposingCalled = False Then - MsgBox "Error" - End If -Next - -'Variant containing Array containing interfaces (element type is VT_VARIANT which contains VT_DISPATCH -Dim arEventListener3(2) As Variant -For countvar = 0 To 2 - Dim var As Variant - Set arEventListener3(countvar) = CreateObject("VBasicEventListener.VBEventListener") - arEventListener3(countvar).setQuiet True -Next -Dim varContAr As Variant -varContAr = arEventListener3 -seq = objOleTest.methodXEventListeners(varContAr) -For countvar = 0 To 2 - If arEventListener3(countvar).disposingCalled = False Then - MsgBox "Error" - End If -Next - -'Get a sequence created in UNO, out param is Variant ( VT_BYREF|VT_VARIANT) -Dim seqX As Variant - -objOleTest.testout_methodSequence seqX -Dim key -For Each key In seqX - Debug.Print CStr(seqX(key)) - If seqX(key) <> key Then - MsgBox "error" - End If -Next -'Get a sequence created in UNO, out param is array Variant ( VT_BYREF|VT_VARIANT|VT_ARRAY) -Dim seqX2() As Variant -objOleTest.testout_methodSequence seqX2 - -For Each key In seqX2 - Debug.Print CStr(seqX2(key)) -Next - -'pass it to UNO and get it back -Dim seq7() As Variant -seq7 = objOleTest.methodLong(seqX) -Dim key2 -For Each key2 In seq7 - Debug.Print CStr(seq7(key2)) - If seqX2(key) <> key Then - MsgBox "error" - End If -Next - -'array with starting index != 0 -Dim seqIndex(1 To 2) As Long -Dim seq8() As Variant -Dim longVal1 As Long, longVal2 As Long -longVal1 = 1 -longVal2 = 2 -seqIndex(1) = longVal1 -seqIndex(2) = longVal2 -seq8 = objOleTest.methodLong(seqIndex) -If longVal1 <> seq8(0) And longVal2 <> seq8(1) Then - MsgBox "error" -End If - - -'in out Array -' arrLong is Long Array -Dim inoutVar(2) As Variant - -For countvar = 0 To 2 - inoutVar(countvar) = countvar + 10 -Next - -objOleTest.testinout_methodSequence inoutVar - -countvar = 0 -For countvar = 0 To 2 - Debug.Print CStr(inoutVar(countvar)) - If inoutVar(countvar) <> countvar + 11 Then - MsgBox "error" - End If -Next - -'Multidimensional array -'============================================================ -' Sequence< Sequence<long> > methodSequence( Sequence< Sequence long> >) -' Real multidimensional array Array -' 9 is Dim 1 (least significant) with C API -Dim mulAr(9, 1) As Long -For i = 0 To 1 - For j = 0 To 9 - mulAr(j, i) = i * 10 + j - Next j -Next i - -Dim resMul As Variant -resMul = objOleTest.methodSequence(mulAr) - -Dim countDim1 As Long -Dim countDim2 As Long -For countDim2 = 0 To 1 - Dim arr - arr = resMul(countDim2) - For countDim1 = 0 To 9 - Debug.Print arr(countDim1) - If arr(countDim1) <> mulAr(countDim1, countDim2) Then - MsgBox "Error Multidimensional Array" - End If - Next countDim1 -Next countDim2 -IsArray (resMul) - -'Array of VARIANTs containing arrays -Dim mulAr2(1) As Variant -Dim arr2(9) As Long -For i = 0 To 1 - ' Dim arr(9) As Long - For j = 0 To 9 - arr2(j) = i * 10 + j - Next j - mulAr2(i) = arr2 -Next i - -resMul = 0 -resMul = objOleTest.methodSequence(mulAr2) -arr = 0 -Dim tmpVar As Variant -For countDim2 = 0 To 1 - arr = resMul(countDim2) - tmpVar = mulAr2(countDim2) - For countDim1 = 0 To 9 - Debug.Print arr(countDim1) - If arr(countDim1) <> tmpVar(countDim1) Then - MsgBox "Error Multidimensional Array" - End If - Next countDim1 -Next countDim2 - -'Array containing interfaces (element type is VT_DISPATCH) -Dim arArEventListener(1, 2) As Object -For i = 0 To 1 - For j = 0 To 2 - Set arArEventListener(i, j) = CreateObject("VBasicEventListener.VBEventListener") - arArEventListener(i, j).setQuiet True - Next -Next -'The function calls disposing on the listeners -seq = objOleTest.methodXEventListenersMul(arArEventListener) -For i = 0 To 1 - For j = 0 To 2 - If arArEventListener(i, j).disposingCalled = False Then - MsgBox "Error" - End If - Next -Next - -'Array containing interfaces (element type is VT_VARIANT containing VT_DISPATCH) -Dim arArEventListener2(1, 2) As Variant -For i = 0 To 1 - For j = 0 To 2 - Set arArEventListener2(i, j) = CreateObject("VBasicEventListener.VBEventListener") - arArEventListener2(i, j).setQuiet True - Next -Next -'The function calls disposing on the listeners -seq = objOleTest.methodXEventListenersMul(arArEventListener2) -For i = 0 To 1 - For j = 0 To 2 - If arArEventListener2(i, j).disposingCalled = False Then - MsgBox "Error" - End If - Next -Next - -' SAFEARRAY of VARIANTS containing SAFEARRAYs -'The ultimate element type is VT_DISPATCH ( XEventListener) -Dim arEventListener4(1) As Variant -Dim seq1(2) As Object -Dim seq2(2) As Object -For i = 0 To 2 - Set seq1(i) = CreateObject("VBasicEventListener.VBEventListener") - Set seq2(i) = CreateObject("VBasicEventListener.VBEventListener") - seq1(i).setQuiet True - seq2(i).setQuiet True -Next -arEventListener4(0) = seq1 -arEventListener4(1) = seq2 -'The function calls disposing on the listeners -seq = objOleTest.methodXEventListenersMul(arEventListener4) -For i = 0 To 2 - If seq1(i).disposingCalled = False Or seq2(i).disposingCalled = False Then - MsgBox "Error" - End If -Next - -End Function - -Function createHiddenDocument() -'Try to create a hidden document -Dim objPropValue -Set objPropValue = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue") -'Set the members. If this fails then there is an Error -objPropValue.Name = "hidden" -objPropValue.Handle = -1 -objPropValue.Value = True - -'create a hidden document -'Create the Desktop -Dim objDesktop As Object -Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop") -'Open a new empty writer document -Dim args(0) As Object -Set args(0) = objPropValue -Set createHiddenDocument = objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args()) -End Function diff --git a/extensions/test/ole/VisualBasic/Module1.vb b/extensions/test/ole/VisualBasic/Module1.vb new file mode 100644 index 000000000000..364af636585f --- /dev/null +++ b/extensions/test/ole/VisualBasic/Module1.vb @@ -0,0 +1,853 @@ +Option Strict Off
+Option Explicit On
+Module Module1
+
+Private objServiceManager As Object
+Private objCoreReflection As Object
+Private objOleTest As Object
+Private objEventListener As Object
+'General counter
+Dim i As Integer
+Dim j As Integer
+Dim sError As String
+Dim outHyper, inHyper, retHyper As Object
+
+Public Sub Main()
+ objServiceManager = CreateObject("com.sun.star.ServiceManager")
+ objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
+ ' extensions/test/ole/cpnt
+ objOleTest = objServiceManager.createInstance("oletest.OleTest")
+ ' extensions/test/ole/EventListenerSample/VBEventListener
+ objEventListener = CreateObject("VBasicEventListener.VBEventListener")
+ Debug.Print(TypeName(objOleTest))
+
+
+ testBasics()
+ testHyper()
+ testAny()
+ testObjects()
+ testGetStruct()
+ ''dispose not working i103353
+ 'testImplementedInterfaces()
+ testGetValueObject()
+ testArrays()
+ testProps()
+
+ End Sub
+ Function testProps() As Object
+
+ Dim aToolbarItemProp1 As Object
+ aToolbarItemProp1 = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+ Dim aToolbarItemProp2 As Object
+ aToolbarItemProp2 = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+ Dim aToolbarItemProp3 As Object
+ aToolbarItemProp3 = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+ Dim properties(2) As Object
+
+ aToolbarItemProp1.Name = "CommandURL"
+ aToolbarItemProp1.Value = "macro:///standard.module1.TestIt"
+ aToolbarItemProp2.Name = "Label"
+ aToolbarItemProp2.Value = "Test"
+ aToolbarItemProp3.Name = "Type"
+ aToolbarItemProp3.Value = 0
+
+ properties(0) = aToolbarItemProp1
+ properties(1) = aToolbarItemProp2
+ properties(2) = aToolbarItemProp3
+
+
+ Dim dummy(-1) As Object
+
+ Dim Desktop As Object
+ Desktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+ Dim Doc As Object
+ Doc = Desktop.loadComponentFromURL("private:factory/swriter", "_blank", 2, dummy)
+ Dim LayoutManager As Object
+ LayoutManager = Doc.currentController.Frame.LayoutManager
+
+ LayoutManager.createElement("private:resource/toolbar/user_toolbar1")
+ LayoutManager.showElement("private:resource/toolbar/user_toolbar1")
+ Dim ToolBar As Object
+ ToolBar = LayoutManager.getElement("private:resource/toolbar/user_toolbar1")
+ Dim settings As Object
+ settings = ToolBar.getSettings(True)
+
+ 'the changes are here:
+ Dim aany As Object
+ aany = objServiceManager.Bridge_GetValueObject()
+ Call aany.Set("[]com.sun.star.beans.PropertyValue", properties)
+ Call settings.insertByIndex(0, aany)
+ Call ToolBar.setSettings(settings)
+
+
+ End Function
+
+
+ Function testBasics() As Object
+ ' In Parameter, simple types
+ '============================================
+ Dim tmpVar As Object
+ Dim ret As Object
+ Dim outByte, inByte, retByte As Byte
+ Dim outBool, inBool, retBool As Boolean
+ Dim outShort, inShort, retShort As Short
+ Dim outUShort, inUShort, retUShort As Short
+ Dim outLong, inLong, retLong As Integer
+ Dim outULong, inULong, retULong As Integer
+ Dim outHyper, inHyper, retHyper As Object
+ Dim outUHyper, inUHyper, retUHyper As Object
+ Dim outFloat, inFloat, retFloat As Single
+ Dim outDouble, inDouble, retDouble As Double
+ Dim outString, inString, retString As String
+ Dim retChar, inChar, outChar, retChar2 As Short
+ Dim outCharAsString, inCharAsString, retCharAsString As String
+ Dim outAny, inAny, retAny As Object
+ Dim outType, inType, retType As Object
+ Dim outXInterface, inXInterface, retXInterface As Object
+ Dim outXInterface2, inXInterface2, retXInterface2 As Object
+
+
+ Dim outVarByte As Object
+ Dim outVarBool As Object
+ Dim outVarShort As Object
+ Dim outVarUShort As Object
+ Dim outVarLong As Object
+ Dim outVarULong As Object
+ Dim outVarFloat As Object
+ Dim outVarDouble As Object
+ Dim outVarString As Object
+ Dim outVarChar As Object
+ Dim outVarAny As Object
+ Dim outVarType As Object
+
+ inByte = 10
+ inBool = True
+ inShort = -10
+ inUShort = -100
+ inLong = -1000
+ inHyper = CDec("-9223372036854775808") 'lowest int64
+ inUHyper = CDec("18446744073709551615") ' highest unsigned int64
+ inULong = 10000
+ inFloat = 3.14
+ inDouble = 3.14
+ inString = "Hello World!"
+ inChar = 65
+ inCharAsString = "A"
+ inAny = "Hello World"
+ inType = objServiceManager.Bridge_CreateType("[]long")
+ inXInterface = objCoreReflection
+ inXInterface2 = objEventListener
+
+ retByte = objOleTest.in_methodByte(inByte)
+ retBool = objOleTest.in_methodBool(inBool)
+ retShort = objOleTest.in_methodShort(inShort)
+ retUShort = objOleTest.in_methodUShort(inUShort)
+ retLong = objOleTest.in_methodLong(inLong)
+ retULong = objOleTest.in_methodULong(inULong)
+ retHyper = objOleTest.in_methodHyper(inHyper)
+ retUHyper = objOleTest.in_methodUHyper(inUHyper)
+ retFloat = objOleTest.in_methodFloat(inFloat)
+ retDouble = objOleTest.in_methodDouble(inDouble)
+ retString = objOleTest.in_methodString(inString)
+ retChar = objOleTest.in_methodChar(inChar)
+ retChar2 = objOleTest.in_methodChar(inCharAsString)
+ retAny = objOleTest.in_methodAny(inAny)
+ retType = objOleTest.in_methodType(inType)
+ retXInterface = objOleTest.in_methodXInterface(inXInterface) ' UNO object
+ retXInterface2 = objOleTest.in_methodXInterface(inXInterface2)
+
+ If retByte <> inByte Or retBool <> inBool Or retShort <> inShort Or retUShort <> inUShort _
+ Or retLong <> inLong Or retULong <> inULong Or retHyper <> inHyper _
+ Or retUHyper <> inUHyper Or retFloat <> inFloat Or retDouble <> inDouble _
+ Or retString <> inString Or retChar <> inChar Or retChar2 <> Asc(inCharAsString) _
+ Or retAny <> inAny Or Not (retType.Name = inType.Name) _
+ Or inXInterface IsNot retXInterface Or inXInterface2 IsNot retXInterface2 Then
+ sError = "in - parameter and return value test failed"
+ MsgBox(sError)
+
+ End If
+
+ 'Out Parameter simple types
+ '================================================
+
+
+ objOleTest.testout_methodByte(outByte)
+ objOleTest.testout_methodFloat(outFloat)
+ objOleTest.testout_methodDouble(outDouble)
+ objOleTest.testout_methodBool(outBool)
+ objOleTest.testout_methodShort(outShort)
+ objOleTest.testout_methodUShort(outUShort)
+ objOleTest.testout_methodLong(outLong)
+ objOleTest.testout_methodULong(outULong)
+ objOleTest.testout_methodHyper(outHyper)
+ objOleTest.testout_methodUHyper(outUHyper)
+ objOleTest.testout_methodString(outString)
+ objOleTest.testout_methodChar(outChar)
+ 'outCharAsString is a string. Therfore the returned sal_Unicode value of 65 will be converted
+ 'to a string "65"
+ objOleTest.testout_methodChar(outCharAsString)
+ objOleTest.testout_methodAny(outAny)
+ objOleTest.testout_methodType(outType)
+ 'objOleTest.in_methodXInterface (inXInterface) ' UNO object
+ Call objOleTest.in_methodXInterface(inXInterface) ' UNO object
+ objOleTest.testout_methodXInterface(outXInterface)
+ Call objOleTest.in_methodXInterface(inXInterface2) ' COM object
+ objOleTest.testout_methodXInterface(outXInterface2)
+
+ If outByte <> inByte Or outFloat <> inFloat Or outDouble <> inDouble _
+ Or outBool <> inBool Or outShort <> inShort Or outUShort <> inUShort _
+ Or outLong <> inLong Or outULong <> inULong Or outHyper <> inHyper _
+ Or outUHyper <> inUHyper Or outString <> inString Or outChar <> inChar _
+ Or Not (outCharAsString = "65") Or outAny <> inAny _
+ Or Not (outType.Name = inType.Name) Or inXInterface IsNot outXInterface _
+ Or inXInterface2 IsNot outXInterface2 Then
+
+ sError = "out - parameter test failed!"
+ MsgBox(sError)
+ End If
+
+ 'Out Parameter simple types (VARIANT var)
+ '====================================================
+ objOleTest.testout_methodByte(outVarByte)
+ objOleTest.testout_methodBool(outVarBool)
+ objOleTest.testout_methodChar(outVarChar)
+ objOleTest.testout_methodShort(outVarShort)
+ objOleTest.testout_methodUShort(outVarUShort)
+ objOleTest.testout_methodLong(outVarLong)
+ objOleTest.testout_methodULong(outVarULong)
+ objOleTest.testout_methodString(outVarString)
+ objOleTest.testout_methodFloat(outVarFloat)
+ objOleTest.testout_methodDouble(outVarDouble)
+ objOleTest.testout_methodAny(outVarAny)
+ objOleTest.testout_methodType(outVarType)
+
+ If outVarByte <> inByte Or outVarBool <> inBool Or outVarChar <> inChar _
+ Or outVarShort <> inShort Or outVarUShort <> inUShort _
+ Or outVarLong <> inLong Or outVarULong <> inULong Or outVarString <> inString _
+ Or outVarFloat <> inFloat Or outVarDouble <> inDouble Or outVarAny <> inAny _
+ Or Not (outVarType.Name = inType.Name) Then
+ sError = "out - parameter (VARIANT) test failed!"
+ MsgBox(sError)
+ End If
+
+ 'In/Out simple types
+ '============================================
+ objOleTest.in_methodByte(0)
+ objOleTest.in_methodBool(False)
+ objOleTest.in_methodShort(0)
+ objOleTest.in_methodUShort(0)
+ objOleTest.in_methodLong(0)
+ objOleTest.in_methodULong(0)
+ objOleTest.in_methodHyper(0)
+ objOleTest.in_methodUHyper(0)
+ objOleTest.in_methodFloat(0)
+ objOleTest.in_methodDouble(0)
+ objOleTest.in_methodString(0)
+ objOleTest.in_methodChar(0)
+ objOleTest.in_methodAny(0)
+ objOleTest.in_methodType(objServiceManager.Bridge_CreateType("boolean"))
+ outXInterface = Nothing
+ Call objOleTest.in_methodXInterface(outXInterface)
+
+ outByte = 10
+ retByte = outByte
+ objOleTest.testinout_methodByte(retByte)
+ objOleTest.testinout_methodByte(retByte)
+ outBool = True
+ retBool = outBool
+ objOleTest.testinout_methodBool(retBool)
+ objOleTest.testinout_methodBool(retBool)
+ outShort = 10
+ retShort = outShort
+ objOleTest.testinout_methodShort(retShort)
+ objOleTest.testinout_methodShort(retShort)
+ outUShort = 20
+ retUShort = outUShort
+ objOleTest.testinout_methodUShort(retUShort)
+ objOleTest.testinout_methodUShort(retUShort)
+ outLong = 30
+ retLong = outLong
+ objOleTest.testinout_methodLong(retLong)
+ objOleTest.testinout_methodLong(retLong)
+ outULong = 40
+ retULong = outULong
+ objOleTest.testinout_methodULong(retLong)
+ objOleTest.testinout_methodULong(retLong)
+ outHyper = CDec("9223372036854775807") 'highest positiv value of int64
+ retHyper = outHyper
+ objOleTest.testinout_methodHyper(retHyper)
+ objOleTest.testinout_methodHyper(retHyper)
+ outUHyper = CDec("18446744073709551615") 'highest value of unsigned int64
+ retUHyper = outUHyper
+ objOleTest.testinout_methodUHyper(retUHyper)
+ objOleTest.testinout_methodUHyper(retUHyper)
+ outFloat = 3.14
+ retFloat = outFloat
+ objOleTest.testinout_methodFloat(retFloat)
+ objOleTest.testinout_methodFloat(retFloat)
+ outDouble = 4.14
+ retDouble = outDouble
+ objOleTest.testinout_methodDouble(retDouble)
+ objOleTest.testinout_methodDouble(retDouble)
+ outString = "Hello World!"
+ retString = outString
+ objOleTest.testinout_methodString(retString)
+ objOleTest.testinout_methodString(retString)
+ outChar = 66
+ retChar = outChar
+ objOleTest.testinout_methodChar(retChar)
+ objOleTest.testinout_methodChar(retChar)
+ outCharAsString = "H"
+ retCharAsString = outCharAsString
+ objOleTest.testinout_methodChar(retCharAsString)
+ objOleTest.testinout_methodChar(retCharAsString)
+ outAny = "Hello World 2!"
+ retAny = outAny
+ objOleTest.testinout_methodAny(retAny)
+ objOleTest.testinout_methodAny(retAny)
+ outType = objServiceManager.Bridge_CreateType("long")
+ retType = outType
+ objOleTest.testinout_methodType(retType)
+ objOleTest.testinout_methodType(retType)
+
+ outXInterface = objCoreReflection
+ retXInterface = outXInterface
+ objOleTest.testinout_methodXInterface2(retXInterface)
+
+ If outByte <> retByte Or outBool <> retBool Or outShort <> retShort _
+ Or outUShort <> retUShort Or outLong <> retLong Or outULong <> retULong _
+ Or outHyper <> retHyper Or outUHyper <> outUHyper _
+ Or outFloat <> retFloat Or outDouble <> retDouble _
+ Or outString <> retString Or outChar <> retChar _
+ Or outCharAsString <> retCharAsString _
+ Or outAny <> retAny Or Not (outType.Name = retType.Name) _
+ Or outXInterface IsNot retXInterface Then
+ sError = "in/out - parameter test failed!"
+ MsgBox(sError)
+ End If
+
+ 'Attributes
+ objOleTest.AByte = inByte
+ retByte = 0
+ retByte = objOleTest.AByte
+ objOleTest.AFloat = inFloat
+ retFloat = 0
+ retFloat = objOleTest.AFloat
+ objOleTest.AType = inType
+ retType = Nothing
+
+ retType = objOleTest.AType
+
+ If inByte <> retByte Or inFloat <> retFloat Or Not (inType.Name = retType.Name) Then
+ sError = "Attributes - test failed!"
+ MsgBox(sError)
+ End If
+
+ End Function
+ Function testHyper() As Object
+
+ '======================================================================
+ ' Other Hyper tests
+ Dim emptyVar As Object
+ Dim retAny As Object
+
+ retAny = emptyVar
+ inHyper = CDec("9223372036854775807") 'highest positiv value of int64
+ retAny = objOleTest.in_methodAny(inHyper)
+ sError = "hyper test failed"
+ If inHyper <> retAny Then
+ MsgBox(sError)
+ End If
+ inHyper = CDec("-9223372036854775808") 'lowest negativ value of int64
+ retAny = objOleTest.in_methodAny(inHyper)
+
+ If inHyper <> retAny Then
+ MsgBox(sError)
+ End If
+ inHyper = CDec("18446744073709551615") 'highest positiv value of unsigne int64
+ retAny = objOleTest.in_methodAny(inHyper)
+
+ If inHyper <> retAny Then
+ MsgBox(sError)
+ End If
+ inHyper = CDec(-1)
+ retAny = objOleTest.in_methodAny(inHyper)
+ If inHyper <> retAny Then
+ MsgBox(sError)
+ End If
+ inHyper = CDec(0)
+ retAny = objOleTest.in_methodAny(inHyper)
+ If inHyper <> retAny Then
+ MsgBox(sError)
+ End If
+
+ '==============================================================================
+
+
+ End Function
+ Function testAny() As Object
+ Dim outVAr As Object
+
+ 'Any test. We pass in an any as value object. If it is not correct converted
+ 'then the target component throws a RuntimeException
+ Dim lengthInAny As Integer
+
+ lengthInAny = 10
+ Dim seqLongInAny(10) As Integer
+ For i = 0 To lengthInAny - 1
+ seqLongInAny(i) = i + 10
+ Next
+ Dim anySeqLong As Object
+ anySeqLong = objOleTest.Bridge_GetValueObject()
+ anySeqLong.Set("[]long", seqLongInAny)
+ Dim anySeqRet As Object
+ Err.Clear()
+ On Error Resume Next
+ anySeqRet = objOleTest.other_methodAny(anySeqLong, "[]long")
+
+ If Err.Number <> 0 Then
+ MsgBox("error")
+ End If
+ End Function
+
+ Function testObjects() As Object
+ ' COM obj
+ Dim outVAr As Object
+ Dim retObj As Object
+ 'OleTest receives a COM object that implements XEventListener
+ 'OleTest then calls a disposing on the object. The object then will be
+ 'asked if it has been called
+ objEventListener.setQuiet(True)
+ objEventListener.resetDisposing()
+ retObj = objOleTest.in_methodInvocation(objEventListener)
+ Dim ret As Object
+ ret = objEventListener.disposingCalled
+ If ret = False Then
+ MsgBox("Error")
+ End If
+
+ 'The returned object should be objEventListener, test it by calling disposing
+ ' takes an IDispatch as Param ( EventObject).To provide a TypeMismatch
+ 'we put in another IDispatch
+ retObj.resetDisposing()
+ retObj.disposing(objEventListener)
+ If retObj.disposingCalled = False Then
+ MsgBox("Error")
+ End If
+
+ ' out param gives out the OleTestComponent
+ 'objOleTest.testout_methodXInterface retObj
+ 'outVAr = Null
+ 'retObj.testout_methodAny outVAr
+ 'Debug.Print "test out Interface " & CStr(outVAr)
+ 'If outVAr <> "I am a string in an any" Then
+ ' MsgBox "error"
+ 'End If
+
+
+ 'in out
+ ' in: UNO object, the same is expected as out param
+ ' the function expects OleTest as parameter and sets a value
+
+ Dim myAny As Object
+
+
+
+ Dim objOleTest2 As Object
+ objOleTest2 = objServiceManager.createInstance("oletest.OleTest")
+ 'Set a value
+ objOleTest2.AttrAny2 = "VBString "
+
+ 'testinout_methodXInterfaces substitutes the argument with the object set in in_methodXInterface
+ objOleTest.AttrAny2 = "VBString this string was written in the UNO component to the inout pararmeter"
+ objOleTest.in_methodXInterface(objOleTest)
+ objOleTest.testinout_methodXInterface2(objOleTest2)
+ Dim tmpVar As Object
+ tmpVar = System.DBNull.Value
+ tmpVar = objOleTest2.AttrAny2
+ Debug.Print("in: Uno out: the same object // " & CStr(tmpVar))
+ If tmpVar <> "VBString this string was written in the UNO component to the inout pararmeter" Then
+ MsgBox("error")
+ End If
+
+
+ 'create a struct
+ Dim structClass As Object
+ structClass = objCoreReflection.forName("oletest.SimpleStruct")
+ Dim structInstance As Object
+ structClass.CreateObject(structInstance)
+ structInstance.message = "Now we are in VB"
+ Debug.Print("struct out " & structInstance.message)
+ If structInstance.message <> "Now we are in VB" Then
+ MsgBox("error")
+ End If
+
+ 'put the struct into OleTest. The same struct will be returned with an added String
+ Dim structRet As Object
+ structRet = objOleTest.in_methodStruct(structInstance)
+ Debug.Print("struct in - return " & structRet.message)
+ If structRet.message <> "Now we are in VBThis string was set in OleTest" Then
+ MsgBox("error")
+ End If
+
+
+ End Function
+ Function testGetStruct() As Object
+ 'Bridge_GetStruct
+ '========================================================
+ Dim objDocument As Object
+ objDocument = createHiddenDocument()
+ 'dispose not working i103353
+ 'objDocument.dispose()
+ objDocument.close(True)
+ End Function
+
+ Function testImplementedInterfaces() As Object
+ 'Bridge_ImplementedInterfaces
+ '=================================================
+ ' call an UNO function that takes an XEventListener interface
+ 'We provide a COM implementation (IDispatch) as EventListener
+ 'Open a new empty writer document
+
+ Dim objDocument As Object
+ objDocument = createHiddenDocument()
+ objEventListener.resetDisposing()
+ objDocument.addEventListener(objEventListener)
+ objDocument.dispose()
+ If objEventListener.disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ End Function
+
+ Function testGetValueObject() As Object
+ 'Bridge_GetValueObject
+ '==================================================
+ Dim objVal As Object
+ objVal = objOleTest.Bridge_GetValueObject()
+ Dim arrByte(9) As Byte
+ Dim countvar As Integer
+ For countvar = 0 To 9
+ arrByte(countvar) = countvar
+ Next countvar
+
+ objVal.Set("[]byte", arrByte)
+ Dim ret As Object
+ ret = 0
+ ret = objOleTest.methodByte(objVal)
+ 'Test if ret is the same array
+
+ Dim key As Object
+ key = 0
+ For Each key In ret
+ If ret(key) <> arrByte(key) Then
+ MsgBox("Error")
+ End If
+ Debug.Print(ret(key))
+ Next key
+
+ Dim outByte As Byte
+ outByte = 77
+ Dim retByte As Byte
+ retByte = outByte
+ objVal.InitInOutParam("byte", retByte)
+ objOleTest.testinout_methodByte(objVal)
+ objVal.InitInOutParam("byte", retByte)
+ objOleTest.testinout_methodByte(objVal)
+
+ ret = 0
+ ret = objVal.Get()
+ Debug.Print(ret)
+ If ret <> outByte Then
+ MsgBox("error")
+ End If
+
+ objVal.InitOutParam()
+ Dim inChar As Short
+ inChar = 65
+ objOleTest.in_methodChar(inChar)
+ objOleTest.testout_methodChar(objVal) 'Returns 'A' (65)
+ ret = 0
+ ret = objVal.Get()
+ Debug.Print(ret)
+ If ret <> inChar Then
+ MsgBox("error")
+ End If
+
+ End Function
+
+ Function testArrays() As Object
+ 'Arrays
+ '========================================
+ Dim arrLong(2) As Integer
+ Dim arrObj(2) As Object
+ Dim countvar As Integer
+ For countvar = 0 To 2
+ arrLong(countvar) = countvar + 10
+ Debug.Print(countvar)
+ arrObj(countvar) = CreateObject("VBasicEventListener.VBEventListener")
+ arrObj(countvar).setQuiet(True)
+ Next
+
+ 'Arrays always contain VARIANTS
+ Dim seq() As Object
+ seq = objOleTest.methodLong(arrLong)
+
+ For countvar = 0 To 2
+ Debug.Print(CStr(seq(countvar)))
+ If arrLong(countvar) <> seq(countvar) Then
+ MsgBox("error")
+ End If
+ Next
+ seq = objOleTest.methodXInterface(arrObj)
+ Dim tmp As Object
+ For countvar = 0 To 2
+ seq(countvar).resetDisposing()
+ seq(countvar).disposing(CObj(tmp))
+ If seq(countvar).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+
+ 'Array containing interfaces (element type is VT_DISPATCH)
+ Dim arEventListener(2) As Object
+ For countvar = 0 To 2
+ arEventListener(countvar) = CreateObject("VBasicEventListener.VBEventListener")
+ arEventListener(countvar).setQuiet(True)
+ Next
+
+ 'The function calls disposing on the listeners
+ seq = objOleTest.methodXEventListeners(arEventListener)
+ Dim count As Object
+ For countvar = 0 To 2
+ If arEventListener(countvar).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+ 'Array containing interfaces (element type is VT_VARIANT which contains VT_DISPATCH
+ Dim arEventListener2(2) As Object
+ For countvar = 0 To 2
+ arEventListener2(countvar) = CreateObject("VBasicEventListener.VBEventListener")
+ arEventListener2(countvar).setQuiet(True)
+ Next
+ seq = objOleTest.methodXEventListeners(arEventListener2)
+ For countvar = 0 To 2
+ If arEventListener2(countvar).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+
+ 'Variant containing Array containing interfaces (element type is VT_VARIANT which contains VT_DISPATCH
+ Dim arEventListener3(2) As Object
+ Dim var As Object
+ For countvar = 0 To 2
+ arEventListener3(countvar) = CreateObject("VBasicEventListener.VBEventListener")
+ arEventListener3(countvar).setQuiet(True)
+ Next
+ Dim varContAr As Object
+ varContAr = VB6.CopyArray(arEventListener3)
+ seq = objOleTest.methodXEventListeners(varContAr)
+ For countvar = 0 To 2
+ If arEventListener3(countvar).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+
+ 'Get a sequence created in UNO, out param is Variant ( VT_BYREF|VT_VARIANT)
+ Dim seqX As Object
+
+ objOleTest.testout_methodSequence(seqX)
+ Dim key As Object
+ For Each key In seqX
+ Debug.Print(CStr(seqX(key)))
+ If seqX(key) <> key Then
+ MsgBox("error")
+ End If
+ Next key
+ 'Get a sequence created in UNO, out param is array Variant ( VT_BYREF|VT_VARIANT|VT_ARRAY)
+ Dim seqX2() As Object
+ objOleTest.testout_methodSequence(seqX2)
+
+ For Each key In seqX2
+ Debug.Print(CStr(seqX2(key)))
+ Next key
+
+ 'pass it to UNO and get it back
+ Dim seq7() As Object
+ seq7 = objOleTest.methodLong(seqX)
+ Dim key2 As Object
+ For Each key2 In seq7
+ Debug.Print(CStr(seq7(key2)))
+ If seqX2(key) <> key Then
+ MsgBox("error")
+ End If
+ Next key2
+
+ 'array with starting index != 0
+ Dim seqIndex(2) As Integer
+ Dim seq8() As Object
+ Dim longVal1, longVal2 As Integer
+ longVal1 = 1
+ longVal2 = 2
+ seqIndex(1) = longVal1
+ seqIndex(2) = longVal2
+ 'The bridge returns a Safearray of Variants. It does not yet convert to an _
+ 'array of a particular type!
+ 'Comparing of elements from seq8 (Object) with long values worked without _
+ 'explicit cast as is necessary in VS 2008. Also arrays in VS 2008 start at _
+ 'index 0
+ seq8 = objOleTest.methodLong(seqIndex)
+ If longVal1 <> CInt(seq8(1)) And longVal2 <> CInt(seq8(2)) Then
+ MsgBox("error")
+ End If
+
+ 'in out Array
+ ' arrLong is Long Array
+ Dim inoutVar(2) As Object
+
+ For countvar = 0 To 2
+ inoutVar(countvar) = countvar + 10
+ Next
+
+ objOleTest.testinout_methodSequence(inoutVar)
+
+ countvar = 0
+ For countvar = 0 To 2
+ Debug.Print(CStr(inoutVar(countvar)))
+ If inoutVar(countvar) <> countvar + 11 Then
+ MsgBox("error")
+ End If
+ Next
+
+ 'Multidimensional array
+ '============================================================
+ ' Sequence< Sequence<long> > methodSequence( Sequence< Sequence long> >)
+ ' Real multidimensional array Array
+ ' 9 is Dim 1 (least significant) with C API
+ Dim mulAr(9, 1) As Integer
+ For i = 0 To 1
+ For j = 0 To 9
+ mulAr(j, i) = i * 10 + j
+ Next j
+ Next i
+
+ Dim resMul As Object
+ resMul = objOleTest.methodSequence(mulAr)
+
+ Dim countDim1 As Integer
+ Dim countDim2 As Integer
+ Dim arr As Object
+ For countDim2 = 0 To 1
+ arr = resMul(countDim2)
+ For countDim1 = 0 To 9
+ Debug.Print(arr(countDim1))
+ If arr(countDim1) <> mulAr(countDim1, countDim2) Then
+ MsgBox("Error Multidimensional Array")
+ End If
+ Next countDim1
+ Next countDim2
+ IsArray(resMul)
+
+ 'Array of VARIANTs containing arrays
+ Dim mulAr2(1) As Object
+ Dim arr2(9) As Integer
+ For i = 0 To 1
+ ' Dim arr(9) As Long
+ For j = 0 To 9
+ arr2(j) = i * 10 + j
+ Next j
+ mulAr2(i) = VB6.CopyArray(arr2)
+ Next i
+
+ resMul = 0
+ resMul = objOleTest.methodSequence(mulAr2)
+ arr = 0
+ Dim tmpVar As Object
+ For countDim2 = 0 To 1
+ arr = resMul(countDim2)
+ tmpVar = mulAr2(countDim2)
+ For countDim1 = 0 To 9
+ Debug.Print(arr(countDim1))
+ If arr(countDim1) <> tmpVar(countDim1) Then
+ MsgBox("Error Multidimensional Array")
+ End If
+ Next countDim1
+ Next countDim2
+
+ 'Array containing interfaces (element type is VT_DISPATCH)
+ Dim arArEventListener(1, 2) As Object
+ For i = 0 To 1
+ For j = 0 To 2
+ arArEventListener(i, j) = CreateObject("VBasicEventListener.VBEventListener")
+ arArEventListener(i, j).setQuiet(True)
+ Next
+ Next
+ 'The function calls disposing on the listeners
+ seq = objOleTest.methodXEventListenersMul(arArEventListener)
+ For i = 0 To 1
+ For j = 0 To 2
+ If arArEventListener(i, j).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+ Next
+
+ 'Array containing interfaces (element type is VT_VARIANT containing VT_DISPATCH)
+ Dim arArEventListener2(1, 2) As Object
+ For i = 0 To 1
+ For j = 0 To 2
+ arArEventListener2(i, j) = CreateObject("VBasicEventListener.VBEventListener")
+ arArEventListener2(i, j).setQuiet(True)
+ Next
+ Next
+ 'The function calls disposing on the listeners
+ seq = objOleTest.methodXEventListenersMul(arArEventListener2)
+ For i = 0 To 1
+ For j = 0 To 2
+ If arArEventListener2(i, j).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+ Next
+
+ ' SAFEARRAY of VARIANTS containing SAFEARRAYs
+ 'The ultimate element type is VT_DISPATCH ( XEventListener)
+ Dim arEventListener4(1) As Object
+ Dim seq1(2) As Object
+ Dim seq2(2) As Object
+ For i = 0 To 2
+ seq1(i) = CreateObject("VBasicEventListener.VBEventListener")
+ seq2(i) = CreateObject("VBasicEventListener.VBEventListener")
+ seq1(i).setQuiet(True)
+ seq2(i).setQuiet(True)
+ Next
+ arEventListener4(0) = VB6.CopyArray(seq1)
+ arEventListener4(1) = VB6.CopyArray(seq2)
+ 'The function calls disposing on the listeners
+ seq = objOleTest.methodXEventListenersMul(arEventListener4)
+ For i = 0 To 2
+ If seq1(i).disposingCalled = False Or seq2(i).disposingCalled = False Then
+ MsgBox("Error")
+ End If
+ Next
+
+ End Function
+
+ Function createHiddenDocument() As Object
+ 'Try to create a hidden document
+ Dim objPropValue As Object
+ objPropValue = objOleTest.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+ 'Set the members. If this fails then there is an Error
+ objPropValue.Name = "Hidden"
+ objPropValue.Handle = -1
+ objPropValue.Value = True
+
+ 'create a hidden document
+ 'Create the Desktop
+ Dim objDesktop As Object
+ objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+ 'Open a new empty writer document
+ Dim args(0) As Object
+ args(0) = objPropValue
+ createHiddenDocument = objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
+ End Function
+End Module
diff --git a/extensions/test/ole/VisualBasic/Project1.sln b/extensions/test/ole/VisualBasic/Project1.sln new file mode 100644 index 000000000000..ffff24e8d5d5 --- /dev/null +++ b/extensions/test/ole/VisualBasic/Project1.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Project1", "Project1.vbproj", "{F62D440E-8976-4A6D-91A8-89F09701074F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F62D440E-8976-4A6D-91A8-89F09701074F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F62D440E-8976-4A6D-91A8-89F09701074F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F62D440E-8976-4A6D-91A8-89F09701074F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F62D440E-8976-4A6D-91A8-89F09701074F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/VisualBasic/Project1.vbp b/extensions/test/ole/VisualBasic/Project1.vbp deleted file mode 100644 index 7de912c622bc..000000000000 --- a/extensions/test/ole/VisualBasic/Project1.vbp +++ /dev/null @@ -1,34 +0,0 @@ -Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINXP\System32\Stdole2.tlb#OLE Automation -Module=Module1; Module1.bas -Startup="Sub Main" -HelpFile="" -ExeName32="Project1.exe" -Command32="" -Name="Project1" -HelpContextID="0" -CompatibleMode="0" -MajorVer=1 -MinorVer=0 -RevisionVer=0 -AutoIncrementVer=0 -ServerSupportFiles=0 -VersionCompanyName="StarOffice" -CompilationType=0 -OptimizationType=0 -FavorPentiumPro(tm)=0 -CodeViewDebugInfo=0 -NoAliasing=0 -BoundsCheck=0 -OverflowCheck=0 -FlPointCheck=0 -FDIVCheck=0 -UnroundedFP=0 -StartMode=0 -Unattended=0 -Retained=0 -ThreadPerObject=0 -MaxNumberOfThreads=1 - -[MS Transaction Server] -AutoRefresh=1 diff --git a/extensions/test/ole/VisualBasic/Project1.vbproj b/extensions/test/ole/VisualBasic/Project1.vbproj new file mode 100644 index 000000000000..213d5928ca97 --- /dev/null +++ b/extensions/test/ole/VisualBasic/Project1.vbproj @@ -0,0 +1,90 @@ +<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <MyType>WindowsFormsWithCustomSubMain</MyType>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F62D440E-8976-4A6D-91A8-89F09701074F}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>Project1</AssemblyName>
+ <OutputType>WinExe</OutputType>
+ <StartupObject>Project1.Module1</StartupObject>
+ <AssemblyMajorVersion>1</AssemblyMajorVersion>
+ <AssemblyMinorVersion>0</AssemblyMinorVersion>
+ <AssemblyRevisionNumber>0</AssemblyRevisionNumber>
+ <GenerateRevisionNumber>False</GenerateRevisionNumber>
+ <AssemblyCompanyName>StarOffice</AssemblyCompanyName>
+ <RootNamespace>Project1</RootNamespace>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>.\bin\</OutputPath>
+ <DocumentationFile>Project1.xml</DocumentationFile>
+ <DebugSymbols>True</DebugSymbols>
+ <DefineDebug>True</DefineDebug>
+ <DefineTrace>True</DefineTrace>
+ <DefineConstants>Win32=True</DefineConstants>
+ <PlatformTarget>x86</PlatformTarget>
+ <NoWarn>42016,42017,42018,42019,42032</NoWarn>
+ <DebugType>full</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>.\bin\</OutputPath>
+ <DocumentationFile>Project1.xml</DocumentationFile>
+ <DebugSymbols>False</DebugSymbols>
+ <DefineDebug>False</DefineDebug>
+ <DefineTrace>True</DefineTrace>
+ <DefineConstants>Win32=True</DefineConstants>
+ <PlatformTarget>x86</PlatformTarget>
+ <NoWarn>42016,42017,42018,42019,42032</NoWarn>
+ <DebugType>none</DebugType>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.VisualBasic.Compatibility">
+ <Name>Microsoft.VisualBasic.Compatibility</Name>
+ </Reference>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <Reference Include="System.Data">
+ <Name>System.Data</Name>
+ </Reference>
+ <Reference Include="System.Drawing">
+ <Name>System.Drawing</Name>
+ </Reference>
+ <Reference Include="System.Windows.Forms">
+ <Name>System.Windows.Forms</Name>
+ </Reference>
+ <Reference Include="System.XML">
+ <Name>System.XML</Name>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Import Include="Microsoft.VisualBasic" />
+ <Import Include="Microsoft.VisualBasic.Compatibility" />
+ <Import Include="System" />
+ <Import Include="System.Collections" />
+ <Import Include="System.Data" />
+ <Import Include="System.Diagnostics" />
+ <Import Include="System.Drawing" />
+ <Import Include="System.Windows.Forms" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.vb" />
+ <Compile Include="Module1.vb">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="My Project\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/extensions/test/ole/VisualBasic/Project1.vbw b/extensions/test/ole/VisualBasic/Project1.vbw deleted file mode 100644 index 9b4c2b95fca6..000000000000 --- a/extensions/test/ole/VisualBasic/Project1.vbw +++ /dev/null @@ -1 +0,0 @@ -Module1 = 4, 4, 895, 913, diff --git a/extensions/test/ole/VisualBasic/readme.txt b/extensions/test/ole/VisualBasic/readme.txt index 22add1fb2141..0b18430fca7e 100644 --- a/extensions/test/ole/VisualBasic/readme.txt +++ b/extensions/test/ole/VisualBasic/readme.txt @@ -1,18 +1,18 @@ -Runs a test written in VisualBasic. If no error message appears then the test was ok. - -Requirements: -Installed office -Component oletest.Oletest (extensions/test/ole/cpnt) -Component VBasicEventListener.VBEventListener (extensions/test/ole/EventListenerSample/VBEventListener - - -OleTest is a UNO component. It needs to be registered with the office rdb. Also there are additional -types (oletest.rdb in wntmsci7/bin/) which must be merged with the rdb. -VBEventListener is an ActiveX component. The directory contains a Visual Basic Project and also -the binary VBasicEventListener.dll. This is necessary because the dll contains the type library -which is needed by VB. Otherwise VB would generate a new CLSID on a new build. -The dll must be registered on the system. This is done by -regsvr32 VBasicEventListener.dll -or -by a rebuild of the project. - +Runs a test written in VisualBasic. If no error message appears then the test was ok.
+
+Requirements:
+Installed office
+Component oletest.Oletest (extensions/test/ole/cpnt)
+Component VBasicEventListener.VBEventListener (extensions/test/ole/EventListenerSample/VBEventListener
+
+
+OleTest is a UNO component. It needs to be registered with the office rdb. Also there are additional
+types (oletest.rdb in wntmsci7/bin/) which must be merged with the rdb.
+VBEventListener is an ActiveX component. The directory contains a Visual Basic Project and also
+the binary VBasicEventListener.dll. This is necessary because the dll contains the type library
+which is needed by VB. Otherwise VB would generate a new CLSID on a new build.
+The dll must be registered on the system. This is done by
+regsvr32 VBasicEventListener.dll
+or
+by a rebuild of the project.
+
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index 8a42a958c612..606a2193b794 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -49,7 +49,7 @@ #include <cppuhelper/implbase7.hxx> #include <cppuhelper/implbase1.hxx> #include <com/sun/star/uno/Reference.h> -#include <rtl/ustring> +#include <rtl/ustring.h> #include <com/sun/star/uno/Reference.hxx> #include <oletest/XTestSequence.hpp> #include <oletest/XTestStruct.hpp> @@ -374,7 +374,7 @@ Sequence<OUString> OComponent_getSupportedServiceNames(void) } -extern "C" sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey ) +extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) { if(pRegistryKey) { @@ -395,7 +395,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void } extern "C" void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) + const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { static void * pRet= NULL; if( ! pRet) @@ -421,7 +421,7 @@ extern "C" void * SAL_CALL component_getFactory( } extern "C" void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) + const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } @@ -983,11 +983,11 @@ void SAL_CALL OComponent::testout_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2= 1222; rout3= L" another string"; } -void SAL_CALL OComponent::testout_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException ) +void SAL_CALL OComponent::testout_methodMulParams3(const OUString&, OUString& sout) throw( RuntimeException ) { sout= L"Out Hallo!"; } -void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 in3 ) throw(RuntimeException) +void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 ) throw(RuntimeException) { out1= in1 + 1; out2= in2 + 1; @@ -1091,11 +1091,11 @@ Reference<XInvocation > SAL_CALL OComponent::in_methodInvocation( const Referenc try{ inv->invoke( OUString(RTL_CONSTASCII_USTRINGPARAM("disposing")), params, outIndex, outParams); - }catch(IllegalArgumentException & iae) { + }catch(IllegalArgumentException &) { } - catch(CannotConvertException & cce) { + catch(CannotConvertException &){ } - catch(InvocationTargetException& ite) { + catch(InvocationTargetException&) { } return inv; } @@ -1113,9 +1113,10 @@ SimpleStruct SAL_CALL OComponent::in_methodStruct( const SimpleStruct& aStruct ) "This string was set in OleTest")); return aStruct; } -void SAL_CALL OComponent::in_methodAll( sal_Int8 b, float f, double d, sal_Bool boo, sal_Int16 sh, sal_uInt16 us, - sal_Int32 l, sal_uInt32 ul, const OUString& s, sal_Unicode c, - const Any& a, const Type& t, const Reference<XInvocation>& inv ) throw (RuntimeException) +void SAL_CALL OComponent::in_methodAll( + sal_Int8, float, double, sal_Bool, sal_Int16, sal_uInt16, + sal_Int32, sal_uInt32, const OUString&, sal_Unicode, + const Any&, const Type&, const Reference<XInvocation>&) throw (RuntimeException) { } @@ -1324,7 +1325,7 @@ Property SAL_CALL OComponent::methodStruct2( const Property& aProp ) throw (Runt } // XTestOther ================================================================================== -void SAL_CALL OComponent::other_methodAnyIn(const Any& rAny) throw( RuntimeException ) +void SAL_CALL OComponent::other_methodAnyIn(const Any& ) throw( RuntimeException ) { } void SAL_CALL OComponent::other_methodAnyOut(Any& rAny) throw( RuntimeException ) @@ -1471,8 +1472,8 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Int8 aByte; sal_Int16 aShort; sal_Int32 aLong; - sal_uInt16 aUShort; - sal_uInt32 aULong; +// sal_uInt16 aUShort; +// sal_uInt32 aULong; switch( mode) { @@ -1590,8 +1591,8 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Int8 aByte; sal_Int16 aShort; sal_Int32 aLong; - sal_uInt16 aUShort; - sal_uInt32 aULong; +// sal_uInt16 aUShort; +// sal_uInt32 aULong; xCallback->outValuesAll( xSimple, aSimpleStruct, aSimpleEnum, seqAny, aAny, aBool, aChar, aString, aFloat, aDouble, @@ -1731,7 +1732,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac } case 108: { - float f= 3.14; + float f= 3.14f; xCallback->inoutFloat(f); char buff[1024]; sprintf( buff, "out value float: %f", f); @@ -1811,7 +1812,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Bool aBool= sal_True; sal_Unicode aChar= L'A'; OUString aString( L"OleTest"); - float aFloat=3.14; + float aFloat=3.14f; double aDouble= 3.145; sal_Int8 aByte= 0xf; sal_Int16 aShort= 0xff; @@ -1981,15 +1982,15 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac arAny[6] <<= L'B'; OUString stringParam(L" a string parameter"); arAny[7] <<= stringParam; - float _float= 3.14; + float _float= 3.14f; arAny[8] <<= _float; double _double= 3.145; arAny[9] <<= _double; - sal_Int8 _byte= 0xff; + sal_Int8 _byte= -1; arAny[10] <<= _byte; - sal_Int16 _short= 0xffff; + sal_Int16 _short= -1; arAny[11] <<= _short; - sal_Int32 _long= 0xffffffff; + sal_Int32 _long= -1; arAny[12] <<= _long; // Sequence<Any> params( arAny, 13); @@ -2089,7 +2090,7 @@ Reference< XInterface > SAL_CALL OComponent::getThis( ) throw (RuntimeException return ret; } -void SAL_CALL EventListener::disposing( const ::com::sun::star::lang::EventObject& Source ) throw (RuntimeException) +void SAL_CALL EventListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (RuntimeException) { bCalled= sal_True; } diff --git a/extensions/test/ole/cpnt/readme.txt b/extensions/test/ole/cpnt/readme.txt index 2f9aab8fcadd..46d525efb285 100644 --- a/extensions/test/ole/cpnt/readme.txt +++ b/extensions/test/ole/cpnt/readme.txt @@ -1,15 +1,21 @@ -cpnt.cxx contains a uno component that is uses to test the olebridge -within a JavaScript context. -In particular it has functions using out, in/out and sequence parameter -that have to be specifically treated in JScript because they are represented -by IDispatch objects. +cpnt.cxx contains a uno component that is uses to test the olebridge within a +JavaScript context. In particular it has functions using out, in/out and +sequence parameter that have to be specifically treated in JScript because they +are represented by IDispatch objects. Other clients, such as VBScript, VB and +C++ applications can also use this component for testing. +The service name is oletest.OleTest. +The uno types are also build in this folder. The idl file is in ..\idl. The +types rdb is in wntmscixx.pro\bin\oletest.rdb -The test is run by JavaScript contained in OleTest.htm and JScriptNewStyle.htm. +The service is used by: +OleTest.htm +JScriptNewStyle.htm +ScriptTest.html Prerequisites: -The oletest.dll ( build in this directory) must reside in the <Office Dir>/program -directory and it must have been registered with regcomp.exe. -The types in wntmsci/bin/oletest.rdb must be merged with the applicat.rdb. oletest.rdb -is automatically build in this directory. However the idl file is in test/ole/idl.
\ No newline at end of file +The oletest.dll must be registered, for example in the services.rdb, using +regcomp. Then the uno types contained in oletest.rdb (wntmscixx/bin) must be merged +for example in the offapi.rdb. This is done with regmerge. + diff --git a/extensions/test/ole/cppToUno/testcppuno.cxx b/extensions/test/ole/cppToUno/testcppuno.cxx index cc195ecc025d..3b22df40d3f2 100644 --- a/extensions/test/ole/cppToUno/testcppuno.cxx +++ b/extensions/test/ole/cppToUno/testcppuno.cxx @@ -31,13 +31,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_extensions.hxx" +#pragma warning(disable: 4917) #include <windows.h> #include <comdef.h> #include <tchar.h> #include <atlbase.h> -extern CComModule _Module; #include<atlcom.h> -#include<atlimpl.cpp> #include <stdio.h> #include <com/sun/star/bridge/ModelDependent.hpp> #include <com/sun/star/bridge/XBridgeSupplier2.hpp> @@ -50,9 +49,6 @@ extern CComModule _Module; #include <rtl/string.h> -CComModule _Module; -BEGIN_OBJECT_MAP(ObjectMap) -END_OBJECT_MAP() using namespace com::sun::star::lang; using namespace com::sun::star::uno; @@ -62,13 +58,12 @@ using namespace com::sun::star::bridge::ModelDependent; using namespace cppu; using namespace rtl; HRESULT doTest(); -bool incrementMultidimensionalIndex(sal_Int32 dimensions, - const sal_Int32 * parDimensionLengths, - sal_Int32 * parMultidimensionalIndex); +bool incrementMultidimensionalIndex( + sal_Int32 dimensions, + const sal_Int32 * parDimensionLengths, + sal_Int32 * parMultidimensionalIndex); - - -int __cdecl _tmain( int argc, _TCHAR * argv[] ) +int __cdecl _tmain( int /*argc*/, _TCHAR * /*argv[]*/ ) { HRESULT hr; if( FAILED( hr=CoInitialize(NULL))) @@ -78,8 +73,6 @@ int __cdecl _tmain( int argc, _TCHAR * argv[] ) } - _Module.Init( ObjectMap, GetModuleHandle( NULL)); - if( FAILED(hr=doTest())) { _com_error err( hr); @@ -87,8 +80,6 @@ int __cdecl _tmain( int argc, _TCHAR * argv[] ) MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR); } - - _Module.Term(); CoUninitialize(); return 0; } @@ -99,7 +90,7 @@ int __cdecl _tmain( int argc, _TCHAR * argv[] ) HRESULT doTest() { HRESULT hr= S_OK; - long i,j; + long j = 0; SAFEARRAY* par; CComDispatchDriver disp; CComVariant result; @@ -118,7 +109,7 @@ HRESULT doTest() // one dimensional array par= SafeArrayCreateVector( VT_UI1, 0, 5); unsigned char arbyte[]= { 1,2,3,4,5}; - for( i= 0; i < 5;i++) + for(long i= 0; i < 5;i++) hr= SafeArrayPutElement( par, &i, &arbyte[i]); result.Clear(); @@ -173,7 +164,7 @@ HRESULT doTest() SAFEARRAY* arRet= result.parray; - for( i= 0; i < 2 ; i++) + for(long i= 0; i < 2 ; i++) { CComVariant varx; varx.Clear(); @@ -191,19 +182,16 @@ HRESULT doTest() } SafeArrayDestroy( par); - - - - } return hr; } // left index is least significant -bool incrementMultidimensionalIndex(sal_Int32 dimensions, - const sal_Int32 * parDimensionLengths, - sal_Int32 * parMultidimensionalIndex) +bool incrementMultidimensionalIndex( + sal_Int32 dimensions, + const sal_Int32 * parDimensionLengths, + sal_Int32 * parMultidimensionalIndex) { if( dimensions < 1) return sal_False; diff --git a/extensions/test/ole/cpptest/StdAfx.cpp b/extensions/test/ole/cpptest/StdAfx.cpp deleted file mode 100644 index f1b969bbd312..000000000000 --- a/extensions/test/ole/cpptest/StdAfx.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: StdAfx.cpp,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -// stdafx.cpp : source file that includes just the standard includes -// cpptest.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/extensions/test/ole/cpptest/StdAfx.h b/extensions/test/ole/cpptest/StdAfx.h deleted file mode 100644 index 7e99b36035a4..000000000000 --- a/extensions/test/ole/cpptest/StdAfx.h +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: StdAfx.h,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__84C60723_E38E_11D3_82FC_005004526AB4__INCLUDED_) -#define AFX_STDAFX_H__84C60723_E38E_11D3_82FC_005004526AB4__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -#include <comdef.h> -#include <tchar.h> -#include<atlbase.h> -extern CComModule _Module; -#include<atlcom.h> -#include<atlimpl.cpp> - - -// TODO: reference additional headers your program requires here - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__84C60723_E38E_11D3_82FC_005004526AB4__INCLUDED_) diff --git a/extensions/test/ole/cpptest/cpptest.cpp b/extensions/test/ole/cpptest/cpptest.cpp deleted file mode 100644 index 20da03fc36be..000000000000 --- a/extensions/test/ole/cpptest/cpptest.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: cpptest.cpp,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -// cpptest.cpp : Defines the entry point for the console application. -// - -#include "stdafx.h" - -CComModule _Module; -BEGIN_OBJECT_MAP(ObjectMap) -END_OBJECT_MAP() - - -HRESULT doTest(); - -int main(int argc, char* argv[]) -{ - HRESULT hr; - if( FAILED( hr=CoInitialize(NULL))) - { - _tprintf(_T("CoInitialize failed \n")); - return -1; - } - - - _Module.Init( ObjectMap, GetModuleHandle( NULL)); - - if( FAILED(hr=doTest())) - { - _com_error err( hr); - const TCHAR * errMsg= err.ErrorMessage(); - MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR); - } - - - _Module.Term(); - CoUninitialize(); - return 0; -} - -HRESULT doTest() -{ - HRESULT hr; - CComPtr<IUnknown> spUnkMgr; - - - if( FAILED(hr= spUnkMgr.CoCreateInstance(L"com.sun.star.ServiceManager"))) - return hr; - - IDispatchPtr starManager; - // var starManager=new ActiveXObject("com.sun.star.ServiceManager"); - hr= starManager.CreateInstance(_T("com.sun.star.ServiceManager")); - // var starDesktop=starManager.createInstance("com.sun.star.frame.Desktop"); - _variant_t varP1(L"com.sun.star.frame.Desktop"); - _variant_t varRet; - CComDispatchDriver dispMgr(starManager); - hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet); - CComDispatchDriver dispDesk(varRet.pdispVal); - varP1.Clear(); - varRet.Clear(); - // var bOK=new Boolean(true); - - // var noArgs=new Array(); - // var oDoc=starDesktop.loadComponentFromURL("private:factory/swriter", "Test", 40, noArgs); - IDispatchPtr oDoc; - SAFEARRAY* ar= SafeArrayCreateVector(VT_DISPATCH, 0, 0); - _variant_t args[4]; - args[3]= _variant_t(L"private:factory/swriter"); - args[2]= _variant_t(L"Test"); - args[1]= _variant_t((long) 40); - args[0].vt= VT_ARRAY | VT_DISPATCH;; - args[0].parray= ar; - hr= dispDesk.InvokeN(L"loadComponentFromURL", args, 4, &varRet); - CComDispatchDriver dispDoc(varRet.pdispVal); - varRet.Clear(); - - //var oFieldMaster = oDoc.createInstance("com.sun.star.text.FieldMaster.Database"); - varP1= _variant_t(L"com.sun.star.text.FieldMaster.Database"); - hr= dispDoc.Invoke1(L"createInstance", &varP1, &varRet); - CComDispatchDriver dispFieldMaster(varRet.pdispVal); - varP1.Clear(); - varRet.Clear(); - - //var oObj = oDoc.createInstance("com.sun.star.text.TextField.Database"); - varP1= _variant_t(L"com.sun.star.text.TextField.Database"); - hr= dispDoc.Invoke1(L"createInstance", &varP1, &varRet); - CComDispatchDriver dispField(varRet.pdispVal); - varP1.Clear(); - varRet.Clear(); - - //oObj.attachTextFieldMaster(oFieldMaster); - varP1= _variant_t(dispFieldMaster); - hr= dispField.Invoke1(L"attachTextFieldMaster", &varP1); - - - return S_OK; - -} diff --git a/extensions/test/ole/cpptest/cpptest.cxx b/extensions/test/ole/cpptest/cpptest.cxx index 881907a57084..08c556cffad8 100644 --- a/extensions/test/ole/cpptest/cpptest.cxx +++ b/extensions/test/ole/cpptest/cpptest.cxx @@ -36,21 +36,15 @@ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 +#pragma warning(disable: 4917) #include <comdef.h> #include <tchar.h> #include<atlbase.h> -CComModule _Module; #include<atlcom.h> -#include<atlimpl.cpp> - -//CComModule _Module; -BEGIN_OBJECT_MAP(ObjectMap) -END_OBJECT_MAP() - HRESULT doTest(); -int main(int argc, char* argv[]) +int main(int /*argc*/, char** /*argv*/) { HRESULT hr; if( FAILED( hr=CoInitialize(NULL))) @@ -59,9 +53,6 @@ int main(int argc, char* argv[]) return -1; } - - _Module.Init( ObjectMap, GetModuleHandle( NULL)); - if( FAILED(hr=doTest())) { _com_error err( hr); @@ -69,8 +60,6 @@ int main(int argc, char* argv[]) MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR); } - - _Module.Term(); CoUninitialize(); return 0; } @@ -86,12 +75,20 @@ HRESULT doTest() IDispatchPtr starManager; // var starManager=new ActiveXObject("com.sun.star.ServiceManager"); - hr= starManager.CreateInstance(_T("com.sun.star.ServiceManager")); + if (FAILED(hr= starManager.CreateInstance(_T("com.sun.star.ServiceManager")))) + { + fprintf(stderr, "creating ServiceManager failed\n"); + return hr; + } // var starDesktop=starManager.createInstance("com.sun.star.frame.Desktop"); _variant_t varP1(L"com.sun.star.frame.Desktop"); _variant_t varRet; CComDispatchDriver dispMgr(starManager); - hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet); + if (FAILED(hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet))) + { + fprintf(stderr,"createInstance of Desktop failed\n"); + return hr; + } CComDispatchDriver dispDesk(varRet.pdispVal); varP1.Clear(); varRet.Clear(); @@ -107,29 +104,13 @@ HRESULT doTest() args[1]= _variant_t((long) 40); args[0].vt= VT_ARRAY | VT_DISPATCH;; args[0].parray= ar; - hr= dispDesk.InvokeN(L"loadComponentFromURL", args, 4, &varRet); + if (FAILED(hr= dispDesk.InvokeN(L"loadComponentFromURL", args, 4, &varRet))) + { + fprintf(stderr,"loadComponentFromURL failed\n"); + return hr; + } CComDispatchDriver dispDoc(varRet.pdispVal); varRet.Clear(); - - //var oFieldMaster = oDoc.createInstance("com.sun.star.text.FieldMaster.Database"); - varP1= _variant_t(L"com.sun.star.text.FieldMaster.Database"); - hr= dispDoc.Invoke1(L"createInstance", &varP1, &varRet); - CComDispatchDriver dispFieldMaster(varRet.pdispVal); - varP1.Clear(); - varRet.Clear(); - - //var oObj = oDoc.createInstance("com.sun.star.text.TextField.Database"); - varP1= _variant_t(L"com.sun.star.text.TextField.Database"); - hr= dispDoc.Invoke1(L"createInstance", &varP1, &varRet); - CComDispatchDriver dispField(varRet.pdispVal); - varP1.Clear(); - varRet.Clear(); - - //oObj.attachTextFieldMaster(oFieldMaster); - varP1= _variant_t(dispFieldMaster); - hr= dispField.Invoke1(L"attachTextFieldMaster", &varP1); - - return S_OK; } diff --git a/extensions/test/ole/cpptest/cpptest.dsp b/extensions/test/ole/cpptest/cpptest.dsp deleted file mode 100644 index 3eb24f187265..000000000000 --- a/extensions/test/ole/cpptest/cpptest.dsp +++ /dev/null @@ -1,114 +0,0 @@ -# Microsoft Developer Studio Project File - Name="cpptest" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=cpptest - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "cpptest.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "cpptest.mak" CFG="cpptest - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "cpptest - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "cpptest - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "cpptest - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "cpptest - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "cpptest - Win32 Release" -# Name "cpptest - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\cpptest.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\ReadMe.txt -# End Source File -# End Target -# End Project - diff --git a/extensions/test/ole/cpptest/cpptest.dsw b/extensions/test/ole/cpptest/cpptest.dsw deleted file mode 100644 index 113f08492f76..000000000000 --- a/extensions/test/ole/cpptest/cpptest.dsw +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "cpptest"=.\cpptest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - - diff --git a/extensions/test/ole/cpptest/readme.txt b/extensions/test/ole/cpptest/readme.txt index f38b573a138d..4af8cfee39af 100644 --- a/extensions/test/ole/cpptest/readme.txt +++ b/extensions/test/ole/cpptest/readme.txt @@ -1,2 +1,6 @@ Creates the com.sun.star.ServiceManager with CoCreateInstance in a cpp program. -This little program can be used as starting point for further tests.
\ No newline at end of file +This little program can be used as starting point for further tests. + + +It needs uwinapi.dll, which is in the program folder of OOo (URE\bin in +OOo 3.0) diff --git a/extensions/test/ole/unloading/readme.txt b/extensions/test/ole/unloading/readme.txt index 4320b1d0c3e7..d8b467ddfc8a 100644 --- a/extensions/test/ole/unloading/readme.txt +++ b/extensions/test/ole/unloading/readme.txt @@ -1,6 +1,6 @@ -This project builds a unloadtest.exe. - -Function: Tests if the unloading mechanism works with the olebrdg.dll. -In several tests, all services are created and destroyed and rtl_unloadUnusedModules is called. - -Usage: copy into the <Office>\program directory and run there.
\ No newline at end of file +This project builds a unloadtest.exe.
+
+Function: Tests if the unloading mechanism works with the olebrdg.dll.
+In several tests, all services are created and destroyed and rtl_unloadUnusedModules is called.
+
+Usage: copy into the <Office>\program directory and run there.
diff --git a/extensions/test/ole/unloading/unloadTest.cxx b/extensions/test/ole/unloading/unloadTest.cxx index c4a630b0ddf5..18025ca466eb 100644 --- a/extensions/test/ole/unloading/unloadTest.cxx +++ b/extensions/test/ole/unloading/unloadTest.cxx @@ -60,7 +60,7 @@ sal_Bool test2(); sal_Bool test3(); sal_Bool test4(); -int main(int argc, char* argv[]) +int main(int, char**) { sal_Bool bTest1= test1(); sal_Bool bTest2= test2(); diff --git a/extensions/test/ole/unoTocomCalls/Test/Test.sln b/extensions/test/ole/unoTocomCalls/Test/Test.sln index 164d6f0fbaea..428b736251d9 100644 --- a/extensions/test/ole/unoTocomCalls/Test/Test.sln +++ b/extensions/test/ole/unoTocomCalls/Test/Test.sln @@ -1,21 +1,19 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{13AE4BE8-2467-4B35-800F-154379D54C24}" -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {13AE4BE8-2467-4B35-800F-154379D54C24}.Debug.ActiveCfg = Debug|Win32 - {13AE4BE8-2467-4B35-800F-154379D54C24}.Debug.Build.0 = Debug|Win32 - {13AE4BE8-2467-4B35-800F-154379D54C24}.Release.ActiveCfg = Release|Win32 - {13AE4BE8-2467-4B35-800F-154379D54C24}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{13AE4BE8-2467-4B35-800F-154379D54C24}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {13AE4BE8-2467-4B35-800F-154379D54C24}.Debug|Win32.ActiveCfg = Debug|Win32
+ {13AE4BE8-2467-4B35-800F-154379D54C24}.Debug|Win32.Build.0 = Debug|Win32
+ {13AE4BE8-2467-4B35-800F-154379D54C24}.Release|Win32.ActiveCfg = Release|Win32
+ {13AE4BE8-2467-4B35-800F-154379D54C24}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/unoTocomCalls/Test/Test.vcproj b/extensions/test/ole/unoTocomCalls/Test/Test.vcproj index 501ed4e04697..f31d1ffc4eaa 100644 --- a/extensions/test/ole/unoTocomCalls/Test/Test.vcproj +++ b/extensions/test/ole/unoTocomCalls/Test/Test.vcproj @@ -1,160 +1,247 @@ -<?xml version="1.0" encoding = "Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.00" - Name="Test" - SccProjectName="" - SccLocalPath=""> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\Debug" - IntermediateDirectory=".\Debug" - ConfigurationType="1" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" - BasicRuntimeChecks="3" - RuntimeLibrary="5" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\Debug/Test.pch" - AssemblerListingLocation=".\Debug/" - ObjectFile=".\Debug/" - ProgramDataBaseFileName=".\Debug/" - BrowseInformation="1" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\Debug/Test.exe" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\Debug/Test.pdb" - SubSystem="1"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Debug/Test.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory=".\Release" - IntermediateDirectory=".\Release" - ConfigurationType="1" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" - StringPooling="TRUE" - RuntimeLibrary="4" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\Release/Test.pch" - AssemblerListingLocation=".\Release/" - ObjectFile=".\Release/" - ProgramDataBaseFileName=".\Release/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\Release/Test.exe" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ProgramDatabaseFile=".\Release/Test.pdb" - SubSystem="1"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Release/Test.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - </Configurations> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath=".\StdAfx.cpp"> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - </File> - <File - RelativePath=".\Test.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath=".\StdAfx.h"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> - </Filter> - <File - RelativePath=".\ReadMe.txt"> - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="Test"
+ ProjectGUID="{13AE4BE8-2467-4B35-800F-154379D54C24}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Test.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/Test.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\Debug/Test.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Test.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Test.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Release/Test.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\Release/Test.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\Release/Test.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp index 19a1229a902c..4f78b6d6a33a 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp @@ -223,7 +223,7 @@ STDMETHODIMP CCallback::outFloat(float *outFloat) { if( !outFloat) return E_POINTER; - *outFloat= 3.14; + *outFloat= 3.14f; return S_OK; } @@ -242,7 +242,7 @@ STDMETHODIMP CCallback::outShort(short *outShort) { if(!outShort) return E_POINTER; - *outShort= 0xffff; + *outShort= -1; return S_OK; } @@ -416,7 +416,7 @@ STDMETHODIMP CCallback::inoutShort(short *inoutVal) { if( !inoutVal) return E_POINTER; - *inoutVal= 0xffff; + *inoutVal= -1; return S_OK; } diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.def b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.def index 3fdc5686a563..b2d5e9627f4c 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.def +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.def @@ -3,8 +3,8 @@ LIBRARY "XCallback_Impl.DLL"
EXPORTS
- DllCanUnloadNow @1 PRIVATE
- DllGetClassObject @2 PRIVATE
- DllRegisterServer @3 PRIVATE
- DllUnregisterServer @4 PRIVATE
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.sln b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.sln index d603a7c1024b..62b109fe4afe 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.sln +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.sln @@ -1,33 +1,31 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XCallback_Impl", "XCallback_Impl.vcproj", "{92A6B531-401E-4900-8217-169A96F4168D}" -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release MinDependency - ConfigName.2 = Release MinSize - ConfigName.3 = Unicode Debug - ConfigName.4 = Unicode Release MinDependency - ConfigName.5 = Unicode Release MinSize - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {92A6B531-401E-4900-8217-169A96F4168D}.Debug.ActiveCfg = Debug|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Debug.Build.0 = Debug|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Release MinDependency.ActiveCfg = Release MinDependency|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Release MinDependency.Build.0 = Release MinDependency|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Release MinSize.ActiveCfg = Release MinSize|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Release MinSize.Build.0 = Release MinSize|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Debug.ActiveCfg = Unicode Debug|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Debug.Build.0 = Unicode Debug|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinDependency.ActiveCfg = Unicode Release MinDependency|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinDependency.Build.0 = Unicode Release MinDependency|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinSize.ActiveCfg = Unicode Release MinSize|Win32 - {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinSize.Build.0 = Unicode Release MinSize|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XCallback_Impl", "XCallback_Impl.vcproj", "{92A6B531-401E-4900-8217-169A96F4168D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release MinDependency|Win32 = Release MinDependency|Win32
+ Release MinSize|Win32 = Release MinSize|Win32
+ Unicode Debug|Win32 = Unicode Debug|Win32
+ Unicode Release MinDependency|Win32 = Unicode Release MinDependency|Win32
+ Unicode Release MinSize|Win32 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {92A6B531-401E-4900-8217-169A96F4168D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Debug|Win32.Build.0 = Debug|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Release MinDependency|Win32.ActiveCfg = Release MinDependency|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Release MinDependency|Win32.Build.0 = Release MinDependency|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Release MinSize|Win32.ActiveCfg = Release MinSize|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Release MinSize|Win32.Build.0 = Release MinSize|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinDependency|Win32.ActiveCfg = Unicode Release MinDependency|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinDependency|Win32.Build.0 = Unicode Release MinDependency|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinSize|Win32.ActiveCfg = Unicode Release MinSize|Win32
+ {92A6B531-401E-4900-8217-169A96F4168D}.Unicode Release MinSize|Win32.Build.0 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.vcproj b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.vcproj index c4037f8ea18b..1a9068d31482 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.vcproj +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.vcproj @@ -1,576 +1,816 @@ -<?xml version="1.0" encoding = "Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.00" - Name="XCallback_Impl" - SccProjectName="" - SccLocalPath="" - Keyword="AtlProj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Unicode Release MinSize|Win32" - OutputDirectory=".\ReleaseUMinSize" - IntermediateDirectory=".\ReleaseUMinSize" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="2" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseUMinSize/XCallback_Impl.pch" - AssemblerListingLocation=".\ReleaseUMinSize/" - ObjectFile=".\ReleaseUMinSize/" - ProgramDataBaseFileName=".\ReleaseUMinSize/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="if "%OS%"=="" goto NOTNT -if not "%OS%"=="Windows_NT" goto NOTNT -regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -goto end -:NOTNT -echo Warning : Cannot register Unicode DLL on Windows 95 -:end -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseUMinSize/XCallback_Impl.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\XCallback_Impl.def" - ProgramDatabaseFile=".\ReleaseUMinSize/XCallback_Impl.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseUMinSize/XCallback_Impl.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseUMinSize/XCallback_Impl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Release MinSize|Win32" - OutputDirectory=".\ReleaseMinSize" - IntermediateDirectory=".\ReleaseMinSize" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="2" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseMinSize/XCallback_Impl.pch" - AssemblerListingLocation=".\ReleaseMinSize/" - ObjectFile=".\ReleaseMinSize/" - ProgramDataBaseFileName=".\ReleaseMinSize/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseMinSize/XCallback_Impl.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\XCallback_Impl.def" - ProgramDatabaseFile=".\ReleaseMinSize/XCallback_Impl.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseMinSize/XCallback_Impl.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseMinSize/XCallback_Impl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Unicode Release MinDependency|Win32" - OutputDirectory=".\ReleaseUMinDependency" - IntermediateDirectory=".\ReleaseUMinDependency" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="1" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - Optimization="1" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseUMinDependency/XCallback_Impl.pch" - AssemblerListingLocation=".\ReleaseUMinDependency/" - ObjectFile=".\ReleaseUMinDependency/" - ProgramDataBaseFileName=".\ReleaseUMinDependency/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="if "%OS%"=="" goto NOTNT -if not "%OS%"=="Windows_NT" goto NOTNT -regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -goto end -:NOTNT -echo Warning : Cannot register Unicode DLL on Windows 95 -:end -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseUMinDependency/XCallback_Impl.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\XCallback_Impl.def" - ProgramDatabaseFile=".\ReleaseUMinDependency/XCallback_Impl.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseUMinDependency/XCallback_Impl.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseUMinDependency/XCallback_Impl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Release MinDependency|Win32" - OutputDirectory=".\ReleaseMinDependency" - IntermediateDirectory=".\ReleaseMinDependency" - ConfigurationType="2" - UseOfMFC="0" - UseOfATL="1" - ATLMinimizesCRunTimeLibraryUsage="TRUE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\ReleaseMinDependency/XCallback_Impl.pch" - AssemblerListingLocation=".\ReleaseMinDependency/" - ObjectFile=".\ReleaseMinDependency/" - ProgramDataBaseFileName=".\ReleaseMinDependency/" - WarningLevel="3" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\ReleaseMinDependency/XCallback_Impl.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\XCallback_Impl.def" - ProgramDatabaseFile=".\ReleaseMinDependency/XCallback_Impl.pdb" - SubSystem="2" - ImportLibrary=".\ReleaseMinDependency/XCallback_Impl.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\ReleaseMinDependency/XCallback_Impl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Unicode Debug|Win32" - OutputDirectory=".\DebugU" - IntermediateDirectory=".\DebugU" - ConfigurationType="2" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="1"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\DebugU/XCallback_Impl.pch" - AssemblerListingLocation=".\DebugU/" - ObjectFile=".\DebugU/" - ProgramDataBaseFileName=".\DebugU/" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="if "%OS%"=="" goto NOTNT -if not "%OS%"=="Windows_NT" goto NOTNT -regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -goto end -:NOTNT -echo Warning : Cannot register Unicode DLL on Windows 95 -:end -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\DebugU/XCallback_Impl.dll" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\XCallback_Impl.def" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\DebugU/XCallback_Impl.pdb" - SubSystem="2" - ImportLibrary=".\DebugU/XCallback_Impl.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\DebugU/XCallback_Impl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\Debug" - IntermediateDirectory=".\Debug" - ConfigurationType="2" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="3" - PrecompiledHeaderThrough="stdafx.h" - PrecompiledHeaderFile=".\Debug/XCallback_Impl.pch" - AssemblerListingLocation=".\Debug/" - ObjectFile=".\Debug/" - ProgramDataBaseFileName=".\Debug/" - BrowseInformation="1" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool" - Description="Performing registration" - CommandLine="regsvr32 /s /c "$(TargetPath)" -echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" -" - Outputs="$(OutDir)\regsvr32.trg"/> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\Debug/XCallback_Impl.dll" - LinkIncremental="2" - SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\XCallback_Impl.def" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\Debug/XCallback_Impl.pdb" - SubSystem="2" - ImportLibrary=".\Debug/XCallback_Impl.lib"/> - <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Debug/XCallback_Impl.tlb"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - </Configurations> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath=".\Callback.cpp"> - </File> - <File - RelativePath=".\Simple.cpp"> - </File> - <File - RelativePath=".\StdAfx.cpp"> - <FileConfiguration - Name="Unicode Release MinSize|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinSize|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Release MinDependency|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinDependency|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - </File> - <File - RelativePath=".\XCallback_Impl.cpp"> - </File> - <File - RelativePath=".\XCallback_Impl.def"> - </File> - <File - RelativePath=".\XCallback_Impl.idl"> - <FileConfiguration - Name="Unicode Release MinSize|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\XCallback_Impl.tlb" - HeaderFileName="XCallback_Impl.h" - InterfaceIdentifierFileName="XCallback_Impl_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinSize|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\XCallback_Impl.tlb" - HeaderFileName="XCallback_Impl.h" - InterfaceIdentifierFileName="XCallback_Impl_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Release MinDependency|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\XCallback_Impl.tlb" - HeaderFileName="XCallback_Impl.h" - InterfaceIdentifierFileName="XCallback_Impl_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinDependency|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\XCallback_Impl.tlb" - HeaderFileName="XCallback_Impl.h" - InterfaceIdentifierFileName="XCallback_Impl_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\XCallback_Impl.tlb" - HeaderFileName="XCallback_Impl.h" - InterfaceIdentifierFileName="XCallback_Impl_i.c"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCMIDLTool" - GenerateStublessProxies="TRUE" - TypeLibraryName=".\XCallback_Impl.tlb" - HeaderFileName="XCallback_Impl.h" - InterfaceIdentifierFileName="XCallback_Impl_i.c"/> - </FileConfiguration> - </File> - <File - RelativePath=".\XCallback_Impl.rc"> - <FileConfiguration - Name="Unicode Release MinSize|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinSize|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Release MinDependency|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Release MinDependency|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Unicode Debug|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCResourceCompilerTool" - AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"/> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath=".\Callback.h"> - </File> - <File - RelativePath=".\Resource.h"> - </File> - <File - RelativePath=".\Simple.h"> - </File> - <File - RelativePath=".\StdAfx.h"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> - <File - RelativePath=".\Callback.rgs"> - </File> - <File - RelativePath=".\Simple.rgs"> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="XCallback_Impl"
+ ProjectGUID="{92A6B531-401E-4900-8217-169A96F4168D}"
+ RootNamespace="XCallback_Impl"
+ Keyword="AtlProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Unicode Release MinSize|Win32"
+ OutputDirectory=".\ReleaseUMinSize"
+ IntermediateDirectory=".\ReleaseUMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinSize/XCallback_Impl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinSize/XCallback_Impl.pch"
+ AssemblerListingLocation=".\ReleaseUMinSize/"
+ ObjectFile=".\ReleaseUMinSize/"
+ ProgramDataBaseFileName=".\ReleaseUMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseUMinSize/XCallback_Impl.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\XCallback_Impl.def"
+ ProgramDatabaseFile=".\ReleaseUMinSize/XCallback_Impl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinSize/XCallback_Impl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinSize|Win32"
+ OutputDirectory=".\ReleaseMinSize"
+ IntermediateDirectory=".\ReleaseMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinSize/XCallback_Impl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinSize/XCallback_Impl.pch"
+ AssemblerListingLocation=".\ReleaseMinSize/"
+ ObjectFile=".\ReleaseMinSize/"
+ ProgramDataBaseFileName=".\ReleaseMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseMinSize/XCallback_Impl.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\XCallback_Impl.def"
+ ProgramDatabaseFile=".\ReleaseMinSize/XCallback_Impl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinSize/XCallback_Impl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseUMinDependency"
+ IntermediateDirectory=".\ReleaseUMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinDependency/XCallback_Impl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinDependency/XCallback_Impl.pch"
+ AssemblerListingLocation=".\ReleaseUMinDependency/"
+ ObjectFile=".\ReleaseUMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseUMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseUMinDependency/XCallback_Impl.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\XCallback_Impl.def"
+ ProgramDatabaseFile=".\ReleaseUMinDependency/XCallback_Impl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinDependency/XCallback_Impl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseMinDependency"
+ IntermediateDirectory=".\ReleaseMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinDependency/XCallback_Impl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinDependency/XCallback_Impl.pch"
+ AssemblerListingLocation=".\ReleaseMinDependency/"
+ ObjectFile=".\ReleaseMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseMinDependency/XCallback_Impl.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\XCallback_Impl.def"
+ ProgramDatabaseFile=".\ReleaseMinDependency/XCallback_Impl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinDependency/XCallback_Impl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Debug|Win32"
+ OutputDirectory=".\DebugU"
+ IntermediateDirectory=".\DebugU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\DebugU/XCallback_Impl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\DebugU/XCallback_Impl.pch"
+ AssemblerListingLocation=".\DebugU/"
+ ObjectFile=".\DebugU/"
+ ProgramDataBaseFileName=".\DebugU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\DebugU/XCallback_Impl.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\XCallback_Impl.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\DebugU/XCallback_Impl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\DebugU/XCallback_Impl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/XCallback_Impl.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/XCallback_Impl.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\Debug/XCallback_Impl.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\XCallback_Impl.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/XCallback_Impl.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/XCallback_Impl.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\Callback.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Simple.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\XCallback_Impl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\XCallback_Impl.def"
+ >
+ </File>
+ <File
+ RelativePath=".\XCallback_Impl.idl"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\XCallback_Impl.tlb"
+ HeaderFileName="XCallback_Impl.h"
+ InterfaceIdentifierFileName="XCallback_Impl_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\XCallback_Impl.tlb"
+ HeaderFileName="XCallback_Impl.h"
+ InterfaceIdentifierFileName="XCallback_Impl_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\XCallback_Impl.tlb"
+ HeaderFileName="XCallback_Impl.h"
+ InterfaceIdentifierFileName="XCallback_Impl_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\XCallback_Impl.tlb"
+ HeaderFileName="XCallback_Impl.h"
+ InterfaceIdentifierFileName="XCallback_Impl_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\XCallback_Impl.tlb"
+ HeaderFileName="XCallback_Impl.h"
+ InterfaceIdentifierFileName="XCallback_Impl_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\XCallback_Impl.tlb"
+ HeaderFileName="XCallback_Impl.h"
+ InterfaceIdentifierFileName="XCallback_Impl_i.c"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\XCallback_Impl.rc"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\Callback.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Simple.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\Callback.rgs"
+ >
+ </File>
+ <File
+ RelativePath=".\Simple.rgs"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/unoTocomCalls/readme.txt b/extensions/test/ole/unoTocomCalls/readme.txt index 28dd560f03fd..40841cb0e8f6 100644 --- a/extensions/test/ole/unoTocomCalls/readme.txt +++ b/extensions/test/ole/unoTocomCalls/readme.txt @@ -1,9 +1,9 @@ -The directory XCallback_Impl contains a MSDEV project that -creates a dll containing the ActiveX components -XCallback_Impl.Simple and XCallback_Impl.Callback -Callback implements functions defined in oletest.XCallback -and Simple implements functions defined in oletest.XSimple. -These interfaces are build in extensions/test/ole/cpnt - -The projects in unoToComCalls test the functionality of COM -and JScript object which implement UNO interfaces.
\ No newline at end of file +The directory XCallback_Impl contains a MSDEV project that
+creates a dll containing the ActiveX components
+XCallback_Impl.Simple and XCallback_Impl.Callback
+Callback implements functions defined in oletest.XCallback
+and Simple implements functions defined in oletest.XSimple.
+These interfaces are build in extensions/test/ole/cpnt
+
+The projects in unoToComCalls test the functionality of COM
+and JScript object which implement UNO interfaces.
diff --git a/extensions/util/hidother.src b/extensions/util/hidother.src index 5c14a2e8d08e..3f8fcd5ed7f8 100644 --- a/extensions/util/hidother.src +++ b/extensions/util/hidother.src @@ -30,208 +30,92 @@ #include "../inc/extensio.hrc" -hidspecial HID_BIB_CHANGESOURCE { HelpId = HID_BIB_CHANGESOURCE; } -hidspecial HID_BIB_MAPPINGDLG { HelpId = HID_BIB_MAPPINGDLG; } -hidspecial HID_BIB_TBX_TABLE { HelpId = HID_BIB_TBX_TABLE; } -hidspecial HID_BIB_TBX_SEARCH { HelpId = HID_BIB_TBX_SEARCH; } -hidspecial HID_BIB_TBX_AUTOFILTER { HelpId = HID_BIB_TBX_AUTOFILTER; } +hidspecial HID_ABSPILOT { HelpId = HID_ABSPILOT; } +hidspecial HID_ABSPILOT_CANCEL { HelpId = HID_ABSPILOT_CANCEL; } +hidspecial HID_ABSPILOT_FINISH { HelpId = HID_ABSPILOT_FINISH; } +hidspecial HID_ABSPILOT_NEXT { HelpId = HID_ABSPILOT_NEXT; } +hidspecial HID_ABSPILOT_PREVIOUS { HelpId = HID_ABSPILOT_PREVIOUS; } -hidspecial HID_BIB_IDENTIFIER_POS { HelpId = HID_BIB_IDENTIFIER_POS; } +hidspecial HID_BIB_ADDRESS_POS { HelpId = HID_BIB_ADDRESS_POS; } +hidspecial HID_BIB_ANNOTE_POS { HelpId = HID_BIB_ANNOTE_POS; } hidspecial HID_BIB_AUTHORITYTYPE_POS { HelpId = HID_BIB_AUTHORITYTYPE_POS; } hidspecial HID_BIB_AUTHOR_POS { HelpId = HID_BIB_AUTHOR_POS; } -hidspecial HID_BIB_TITLE_POS { HelpId = HID_BIB_TITLE_POS; } -hidspecial HID_BIB_YEAR_POS { HelpId = HID_BIB_YEAR_POS; } -hidspecial HID_BIB_ISBN_POS { HelpId = HID_BIB_ISBN_POS; } hidspecial HID_BIB_BOOKTITLE_POS { HelpId = HID_BIB_BOOKTITLE_POS; } +hidspecial HID_BIB_CHANGESOURCE { HelpId = HID_BIB_CHANGESOURCE; } hidspecial HID_BIB_CHAPTER_POS { HelpId = HID_BIB_CHAPTER_POS; } +hidspecial HID_BIB_CONTROL_PAGE { HelpId = HID_BIB_CONTROL_PAGE; } +hidspecial HID_BIB_CONTROL_PARENT { HelpId = HID_BIB_CONTROL_PARENT; } +hidspecial HID_BIB_CUSTOM1_POS { HelpId = HID_BIB_CUSTOM1_POS; } +hidspecial HID_BIB_CUSTOM2_POS { HelpId = HID_BIB_CUSTOM2_POS; } +hidspecial HID_BIB_CUSTOM3_POS { HelpId = HID_BIB_CUSTOM3_POS; } +hidspecial HID_BIB_CUSTOM4_POS { HelpId = HID_BIB_CUSTOM4_POS; } +hidspecial HID_BIB_CUSTOM5_POS { HelpId = HID_BIB_CUSTOM5_POS; } +hidspecial HID_BIB_DB_GRIDCTRL { HelpId = HID_BIB_DB_GRIDCTRL; } +hidspecial HID_BIB_DB_TBX { HelpId = HID_BIB_DB_TBX; } +hidspecial HID_BIB_DELETE_RECORD { HelpId = HID_BIB_DELETE_RECORD; } hidspecial HID_BIB_EDITION_POS { HelpId = HID_BIB_EDITION_POS; } hidspecial HID_BIB_EDITOR_POS { HelpId = HID_BIB_EDITOR_POS; } hidspecial HID_BIB_HOWPUBLISHED_POS { HelpId = HID_BIB_HOWPUBLISHED_POS; } +hidspecial HID_BIB_IDENTIFIER_POS { HelpId = HID_BIB_IDENTIFIER_POS; } +hidspecial HID_BIB_INSERT_RECORD { HelpId = HID_BIB_INSERT_RECORD; } hidspecial HID_BIB_INSTITUTION_POS { HelpId = HID_BIB_INSTITUTION_POS; } +hidspecial HID_BIB_ISBN_POS { HelpId = HID_BIB_ISBN_POS; } hidspecial HID_BIB_JOURNAL_POS { HelpId = HID_BIB_JOURNAL_POS; } +hidspecial HID_BIB_MAPPINGDLG { HelpId = HID_BIB_MAPPINGDLG; } hidspecial HID_BIB_MONTH_POS { HelpId = HID_BIB_MONTH_POS; } hidspecial HID_BIB_NOTE_POS { HelpId = HID_BIB_NOTE_POS; } -hidspecial HID_BIB_ANNOTE_POS { HelpId = HID_BIB_ANNOTE_POS; } hidspecial HID_BIB_NUMBER_POS { HelpId = HID_BIB_NUMBER_POS; } hidspecial HID_BIB_ORGANIZATIONS_POS { HelpId = HID_BIB_ORGANIZATIONS_POS; } hidspecial HID_BIB_PAGES_POS { HelpId = HID_BIB_PAGES_POS; } hidspecial HID_BIB_PUBLISHER_POS { HelpId = HID_BIB_PUBLISHER_POS; } -hidspecial HID_BIB_ADDRESS_POS { HelpId = HID_BIB_ADDRESS_POS; } +hidspecial HID_BIB_REPORTTYPE_POS { HelpId = HID_BIB_REPORTTYPE_POS; } hidspecial HID_BIB_SCHOOL_POS { HelpId = HID_BIB_SCHOOL_POS; } hidspecial HID_BIB_SERIES_POS { HelpId = HID_BIB_SERIES_POS; } -hidspecial HID_BIB_REPORTTYPE_POS { HelpId = HID_BIB_REPORTTYPE_POS; } -hidspecial HID_BIB_VOLUME_POS { HelpId = HID_BIB_VOLUME_POS; } +hidspecial HID_BIB_TBX_AUTOFILTER { HelpId = HID_BIB_TBX_AUTOFILTER; } +hidspecial HID_BIB_TBX_SEARCH { HelpId = HID_BIB_TBX_SEARCH; } +hidspecial HID_BIB_TBX_TABLE { HelpId = HID_BIB_TBX_TABLE; } +hidspecial HID_BIB_TITLE_POS { HelpId = HID_BIB_TITLE_POS; } hidspecial HID_BIB_URL_POS { HelpId = HID_BIB_URL_POS; } -hidspecial HID_BIB_CUSTOM1_POS { HelpId = HID_BIB_CUSTOM1_POS; } -hidspecial HID_BIB_CUSTOM2_POS { HelpId = HID_BIB_CUSTOM2_POS; } -hidspecial HID_BIB_CUSTOM3_POS { HelpId = HID_BIB_CUSTOM3_POS; } -hidspecial HID_BIB_CUSTOM4_POS { HelpId = HID_BIB_CUSTOM4_POS; } -hidspecial HID_BIB_CUSTOM5_POS { HelpId = HID_BIB_CUSTOM5_POS; } - -hidspecial HID_BIB_DB_TBX { HelpId = HID_BIB_DB_TBX; } -hidspecial HID_BIB_DB_GRIDCTRL { HelpId = HID_BIB_DB_GRIDCTRL; } -hidspecial HID_BIB_CONTROL_PAGE { HelpId = HID_BIB_CONTROL_PAGE; } -hidspecial HID_BIB_CONTROL_PARENT { HelpId = HID_BIB_CONTROL_PARENT; } - -hidspecial HID_GRIDWIZARD_PREVIOUS { HelpId = HID_GRIDWIZARD_PREVIOUS; }; -hidspecial HID_GRIDWIZARD_NEXT { HelpId = HID_GRIDWIZARD_NEXT; } -hidspecial HID_GRIDWIZARD_CANCEL { HelpId = HID_GRIDWIZARD_CANCEL; } -hidspecial HID_GRIDWIZARD_FINISH { HelpId = HID_GRIDWIZARD_FINISH; } -hidspecial HID_GROUPWIZARD_PREVIOUS { HelpId = HID_GROUPWIZARD_PREVIOUS; } -hidspecial HID_GROUPWIZARD_NEXT { HelpId = HID_GROUPWIZARD_NEXT; } -hidspecial HID_GROUPWIZARD_CANCEL { HelpId = HID_GROUPWIZARD_CANCEL; } -hidspecial HID_GROUPWIZARD_FINISH { HelpId = HID_GROUPWIZARD_FINISH; } -hidspecial HID_LISTWIZARD_PREVIOUS { HelpId = HID_LISTWIZARD_PREVIOUS; } -hidspecial HID_LISTWIZARD_NEXT { HelpId = HID_LISTWIZARD_NEXT; } -hidspecial HID_LISTWIZARD_CANCEL { HelpId = HID_LISTWIZARD_CANCEL; } -hidspecial HID_LISTWIZARD_FINISH { HelpId = HID_LISTWIZARD_FINISH; } -hidspecial HID_DBIWIZARD_PREVIOUS { HelpId = HID_DBIWIZARD_PREVIOUS; } -hidspecial HID_DBIWIZARD_NEXT { HelpId = HID_DBIWIZARD_NEXT; } -hidspecial HID_DBIWIZARD_CANCEL { HelpId = HID_DBIWIZARD_CANCEL; } -hidspecial HID_DBIWIZARD_FINISH { HelpId = HID_DBIWIZARD_FINISH; } -hidspecial UID_DBIWIZARD_SOURCESTATS { HelpId = UID_DBIWIZARD_SOURCESTATS; } -hidspecial UID_DBIWIZARD_SOURCEFILE { HelpId = UID_DBIWIZARD_SOURCEFILE; } -hidspecial UID_DBIWIZARD_QUERIES { HelpId = UID_DBIWIZARD_QUERIES; } -hidspecial UID_DBIWIZARD_FORMS { HelpId = UID_DBIWIZARD_FORMS; } -hidspecial UID_DBIWIZARD_FORMS_SAVETO { HelpId = UID_DBIWIZARD_FORMS_SAVETO; } -hidspecial UID_BIB_FRAME_WINDOW { HelpId = UID_BIB_FRAME_WINDOW;} +hidspecial HID_BIB_VOLUME_POS { HelpId = HID_BIB_VOLUME_POS; } +hidspecial HID_BIB_YEAR_POS { HelpId = HID_BIB_YEAR_POS; } -hidspecial HID_ABSPILOT_PREVIOUS { HelpId = HID_ABSPILOT_PREVIOUS; } -hidspecial HID_ABSPILOT_NEXT { HelpId = HID_ABSPILOT_NEXT; } -hidspecial HID_ABSPILOT_CANCEL { HelpId = HID_ABSPILOT_CANCEL; } -hidspecial HID_ABSPILOT_FINISH { HelpId = HID_ABSPILOT_FINISH; } -hidspecial HID_ABSPILOT { HelpId = HID_ABSPILOT; } +hidspecial HID_CHECK_FOR_UPD_CANCEL { HelpId = HID_CHECK_FOR_UPD_CANCEL; } +hidspecial HID_CHECK_FOR_UPD_CLOSE { HelpId = HID_CHECK_FOR_UPD_CLOSE; } +hidspecial HID_CHECK_FOR_UPD_DESCRIPTION { HelpId = HID_CHECK_FOR_UPD_DESCRIPTION; } +hidspecial HID_CHECK_FOR_UPD_DLG { HelpId = HID_CHECK_FOR_UPD_DLG; } +hidspecial HID_CHECK_FOR_UPD_DOWNLOAD { HelpId = HID_CHECK_FOR_UPD_DOWNLOAD; } +hidspecial HID_CHECK_FOR_UPD_DOWNLOAD2 { HelpId = HID_CHECK_FOR_UPD_DOWNLOAD2; } +hidspecial HID_CHECK_FOR_UPD_INSTALL { HelpId = HID_CHECK_FOR_UPD_INSTALL; } +hidspecial HID_CHECK_FOR_UPD_PAUSE { HelpId = HID_CHECK_FOR_UPD_PAUSE; } +hidspecial HID_CHECK_FOR_UPD_RESUME { HelpId = HID_CHECK_FOR_UPD_RESUME; } +hidspecial HID_CHECK_FOR_UPD_STATUS { HelpId = HID_CHECK_FOR_UPD_STATUS; } -hidspecial UID_ABSPILOT_HELP { HelpId = UID_ABSPILOT_HELP; } hidspecial HID_DBIWIZARD { HelpId = HID_DBIWIZARD; } -hidspecial UID_DBIWIZARD_HELP { HelpId = UID_DBIWIZARD_HELP; } +hidspecial HID_DBIWIZARD_CANCEL { HelpId = HID_DBIWIZARD_CANCEL; } hidspecial HID_DBIWIZARD_FILESELECTION { HelpId = HID_DBIWIZARD_FILESELECTION; } +hidspecial HID_DBIWIZARD_FINISH { HelpId = HID_DBIWIZARD_FINISH; } +hidspecial HID_DBIWIZARD_NEXT { HelpId = HID_DBIWIZARD_NEXT; } +hidspecial HID_DBIWIZARD_PREVIOUS { HelpId = HID_DBIWIZARD_PREVIOUS; } -hidspecial HID_BIB_DELETE_RECORD { HelpId = HID_BIB_DELETE_RECORD; } -hidspecial HID_BIB_INSERT_RECORD { HelpId = HID_BIB_INSERT_RECORD; } - -hidspecial HID_PROP_TITLE { HelpId = HID_PROP_TITLE; } -hidspecial HID_PROP_STEP { HelpId = HID_PROP_STEP; } -hidspecial HID_PROP_VALUE { HelpId = HID_PROP_VALUE; } -hidspecial HID_PROP_PROGRESSVALUE { HelpId = HID_PROP_PROGRESSVALUE; } -hidspecial HID_PROP_PROGRESSVALUE_MIN { HelpId = HID_PROP_PROGRESSVALUE_MIN; } -hidspecial HID_PROP_PROGRESSVALUE_MAX { HelpId = HID_PROP_PROGRESSVALUE_MAX; } -hidspecial HID_PROP_SCROLLVALUE { HelpId = HID_PROP_SCROLLVALUE; } -hidspecial HID_PROP_SCROLLVALUE_MIN { HelpId = HID_PROP_SCROLLVALUE_MIN; } -hidspecial HID_PROP_SCROLLVALUE_MAX { HelpId = HID_PROP_SCROLLVALUE_MAX; } -hidspecial HID_PROP_LINEINCREMENT { HelpId = HID_PROP_LINEINCREMENT; } -hidspecial HID_PROP_BLOCKINCREMENT { HelpId = HID_PROP_BLOCKINCREMENT; } -hidspecial HID_PROP_VISIBLESIZE { HelpId = HID_PROP_VISIBLESIZE; } -hidspecial HID_PROP_ORIENTATION { HelpId = HID_PROP_ORIENTATION; } -hidspecial HID_PROP_POSITIONX { HelpId = HID_PROP_POSITIONX; } -hidspecial HID_PROP_POSITIONY { HelpId = HID_PROP_POSITIONY; } -hidspecial HID_PROP_PUSHBUTTONTYPE { HelpId = HID_PROP_PUSHBUTTONTYPE; } -hidspecial HID_PROP_STATE { HelpId = HID_PROP_STATE; } -hidspecial HID_PROP_SCALEIMAGE { HelpId = HID_PROP_SCALEIMAGE; } -hidspecial HID_PROP_BOUND_CELL { HelpId = HID_PROP_BOUND_CELL; } -hidspecial HID_PROP_LIST_CELL_RANGE { HelpId = HID_PROP_LIST_CELL_RANGE; } -hidspecial HID_PROP_CELL_EXCHANGE_TYPE { HelpId = HID_PROP_CELL_EXCHANGE_TYPE; } -hidspecial HID_PROP_SELECTEDITEMS { HelpId = HID_PROP_SELECTEDITEMS; } -hidspecial HID_PROP_SCROLLVALUEMIN { HelpId = HID_PROP_SCROLLVALUE_MIN; } -hidspecial HID_PROP_DEFAULT_SCROLLVALUE { HelpId = HID_PROP_DEFAULT_SCROLLVALUE; } -hidspecial HID_PROP_REPEAT_DELAY { HelpId = HID_PROP_REPEAT_DELAY; } -hidspecial HID_PROP_SYMBOLCOLOR { HelpId = HID_PROP_SYMBOLCOLOR; } -hidspecial HID_PROP_SPINVALUE { HelpId = HID_PROP_SPINVALUE; } -hidspecial HID_PROP_SPINVALUE_MIN { HelpId = HID_PROP_SPINVALUE_MIN; } -hidspecial HID_PROP_SPINVALUE_MAX { HelpId = HID_PROP_SPINVALUE_MAX; } -hidspecial HID_PROP_DEFAULT_SPINVALUE { HelpId = HID_PROP_DEFAULT_SPINVALUE; } -hidspecial HID_PROP_SPININCREMENT { HelpId = HID_PROP_SPININCREMENT; } -hidspecial HID_PROP_REPEAT { HelpId = HID_PROP_REPEAT; } -hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } -hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } -hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } -hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } -hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } -hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } -hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } -hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } -hidspecial UID_PROP_DLG_SYMBOLCOLOR { HelpId = UID_PROP_DLG_SYMBOLCOLOR; } -hidspecial UID_EVT_MACRODLG { HelpId = UID_EVT_MACRODLG; } -hidspecial HID_PROP_WORDBREAK { HelpId = HID_PROP_WORDBREAK; } -hidspecial HID_PROP_SHOW_SCROLLBARS { HelpId = HID_PROP_SHOW_SCROLLBARS; } -hidspecial HID_PROP_TABORDER_CONTROLS { HelpId = HID_PROP_TABORDER_CONTROLS; } -hidspecial HID_PROP_ICONSIZE { HelpId = HID_PROP_ICONSIZE; } -hidspecial HID_PROP_SHOW_POSITION { HelpId = HID_PROP_SHOW_POSITION; } -hidspecial HID_PROP_SHOW_NAVIGATION { HelpId = HID_PROP_SHOW_NAVIGATION; } -hidspecial HID_PROP_SHOW_RECORDACTIONS { HelpId = HID_PROP_SHOW_RECORDACTIONS; } -hidspecial HID_PROP_SHOW_FILTERSORT { HelpId = HID_PROP_SHOW_FILTERSORT; } - -hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } -hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } -hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } -hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } -hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } -hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } -hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } -hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } -hidspecial UID_PROP_DLG_TABINDEX { HelpId = UID_PROP_DLG_TABINDEX; } -hidspecial UID_PROP_DLG_SQLCOMMAND { HelpId = UID_PROP_DLG_SQLCOMMAND; } -hidspecial UID_PROP_DLG_FORMLINKFIELDS { HelpId = UID_PROP_DLG_FORMLINKFIELDS; } -hidspecial HID_FIELDLINK_DETAIL_COLUMN { HelpId = HID_FIELDLINK_DETAIL_COLUMN; } -hidspecial HID_FIELDLINK_MASTER_COLUMN { HelpId = HID_FIELDLINK_MASTER_COLUMN; } -hidspecial UID_FIELDLINK_DETAIL1 { HelpId = UID_FIELDLINK_DETAIL1; } -hidspecial UID_FIELDLINK_MASTER1 { HelpId = UID_FIELDLINK_MASTER1; } -hidspecial UID_FIELDLINK_DETAIL2 { HelpId = UID_FIELDLINK_DETAIL2; } -hidspecial UID_FIELDLINK_MASTER2 { HelpId = UID_FIELDLINK_MASTER2; } -hidspecial UID_FIELDLINK_DETAIL3 { HelpId = UID_FIELDLINK_DETAIL3; } -hidspecial UID_FIELDLINK_MASTER3 { HelpId = UID_FIELDLINK_MASTER3; } -hidspecial UID_FIELDLINK_DETAIL4 { HelpId = UID_FIELDLINK_DETAIL4; } -hidspecial UID_FIELDLINK_MASTER4 { HelpId = UID_FIELDLINK_MASTER4; } -hidspecial UID_PROP_DLG_FILTER { HelpId = UID_PROP_DLG_FILTER; } -hidspecial UID_PROP_DLG_ORDER { HelpId = UID_PROP_DLG_ORDER; } -hidspecial UID_PROP_DLG_SELECTION { HelpId = UID_PROP_DLG_SELECTION; } -hidspecial UID_PROP_DLG_SYMBOLCOLOR { HelpId = UID_PROP_DLG_SYMBOLCOLOR; } -hidspecial UID_BRWEVT_APPROVEACTIONPERFORMED { HelpId = UID_BRWEVT_APPROVEACTIONPERFORMED; } -hidspecial UID_BRWEVT_ACTIONPERFORMED { HelpId = UID_BRWEVT_ACTIONPERFORMED; } -hidspecial UID_BRWEVT_CHANGED { HelpId = UID_BRWEVT_CHANGED; } -hidspecial UID_BRWEVT_TEXTCHANGED { HelpId = UID_BRWEVT_TEXTCHANGED; } -hidspecial UID_BRWEVT_ITEMSTATECHANGED { HelpId = UID_BRWEVT_ITEMSTATECHANGED; } -hidspecial UID_BRWEVT_FOCUSGAINED { HelpId = UID_BRWEVT_FOCUSGAINED; } -hidspecial UID_BRWEVT_FOCUSLOST { HelpId = UID_BRWEVT_FOCUSLOST; } -hidspecial UID_BRWEVT_KEYTYPED { HelpId = UID_BRWEVT_KEYTYPED; } -hidspecial UID_BRWEVT_KEYUP { HelpId = UID_BRWEVT_KEYUP; } -hidspecial UID_BRWEVT_MOUSEENTERED { HelpId = UID_BRWEVT_MOUSEENTERED; } -hidspecial UID_BRWEVT_MOUSEDRAGGED { HelpId = UID_BRWEVT_MOUSEDRAGGED; } -hidspecial UID_BRWEVT_MOUSEMOVED { HelpId = UID_BRWEVT_MOUSEMOVED; } -hidspecial UID_BRWEVT_MOUSEPRESSED { HelpId = UID_BRWEVT_MOUSEPRESSED; } -hidspecial UID_BRWEVT_MOUSERELEASED { HelpId = UID_BRWEVT_MOUSERELEASED; } -hidspecial UID_BRWEVT_MOUSEEXITED { HelpId = UID_BRWEVT_MOUSEEXITED; } -hidspecial UID_BRWEVT_APPROVERESETTED { HelpId = UID_BRWEVT_APPROVERESETTED; } -hidspecial UID_BRWEVT_RESETTED { HelpId = UID_BRWEVT_RESETTED; } -hidspecial UID_BRWEVT_SUBMITTED { HelpId = UID_BRWEVT_SUBMITTED; } -hidspecial UID_BRWEVT_BEFOREUPDATE { HelpId = UID_BRWEVT_BEFOREUPDATE; } -hidspecial UID_BRWEVT_AFTERUPDATE { HelpId = UID_BRWEVT_AFTERUPDATE; } -hidspecial UID_BRWEVT_LOADED { HelpId = UID_BRWEVT_LOADED; } -hidspecial UID_BRWEVT_RELOADING { HelpId = UID_BRWEVT_RELOADING; } -hidspecial UID_BRWEVT_RELOADED { HelpId = UID_BRWEVT_RELOADED; } -hidspecial UID_BRWEVT_UNLOADING { HelpId = UID_BRWEVT_UNLOADING; } -hidspecial UID_BRWEVT_UNLOADED { HelpId = UID_BRWEVT_UNLOADED; } -hidspecial UID_BRWEVT_CONFIRMDELETE { HelpId = UID_BRWEVT_CONFIRMDELETE; } -hidspecial UID_BRWEVT_APPROVEROWCHANGE { HelpId = UID_BRWEVT_APPROVEROWCHANGE; } -hidspecial UID_BRWEVT_ROWCHANGE { HelpId = UID_BRWEVT_ROWCHANGE; } -hidspecial UID_BRWEVT_POSITIONING { HelpId = UID_BRWEVT_POSITIONING; } -hidspecial UID_BRWEVT_POSITIONED { HelpId = UID_BRWEVT_POSITIONED; } -hidspecial UID_BRWEVT_APPROVEPARAMETER { HelpId = UID_BRWEVT_APPROVEPARAMETER; } -hidspecial UID_BRWEVT_ERROROCCURED { HelpId = UID_BRWEVT_ERROROCCURED; } -hidspecial UID_BRWEVT_ADJUSTMENTVALUECHANGED { HelpId = UID_BRWEVT_ADJUSTMENTVALUECHANGED; } -hidspecial HID_PROP_AUTOLINEBREAK { HelpId = HID_PROP_AUTOLINEBREAK; } -hidspecial HID_PROP_TEXTTYPE { HelpId = HID_PROP_TEXTTYPE; } -hidspecial HID_PROP_LINEEND_FORMAT { HelpId = HID_PROP_LINEEND_FORMAT; } +hidspecial HID_DLG_DBCHANGE { HelpId = HID_DLG_DBCHANGE; } +hidspecial HID_DLG_MAPPING { HelpId = HID_DLG_MAPPING; } hidspecial HID_EVT_ACTIONPERFORMED { HelpId = HID_EVT_ACTIONPERFORMED; } +hidspecial HID_EVT_ADJUSTMENTVALUECHANGED { HelpId = HID_EVT_ADJUSTMENTVALUECHANGED; } hidspecial HID_EVT_AFTERUPDATE { HelpId = HID_EVT_AFTERUPDATE; } +hidspecial HID_EVT_APPROVEACTIONPERFORMED { HelpId = HID_EVT_APPROVEACTIONPERFORMED; } +hidspecial HID_EVT_APPROVEPARAMETER { HelpId = HID_EVT_APPROVEPARAMETER; } +hidspecial HID_EVT_APPROVERESETTED { HelpId = HID_EVT_APPROVERESETTED; } +hidspecial HID_EVT_APPROVEROWCHANGE { HelpId = HID_EVT_APPROVEROWCHANGE; } hidspecial HID_EVT_BEFOREUPDATE { HelpId = HID_EVT_BEFOREUPDATE; } +hidspecial HID_EVT_CHANGED { HelpId = HID_EVT_CHANGED; } hidspecial HID_EVT_CONFIRMDELETE { HelpId = HID_EVT_CONFIRMDELETE; } hidspecial HID_EVT_ERROROCCURED { HelpId = HID_EVT_ERROROCCURED; } hidspecial HID_EVT_FOCUSGAINED { HelpId = HID_EVT_FOCUSGAINED; } hidspecial HID_EVT_FOCUSLOST { HelpId = HID_EVT_FOCUSLOST; } hidspecial HID_EVT_ITEMSTATECHANGED { HelpId = HID_EVT_ITEMSTATECHANGED; } hidspecial HID_EVT_KEYTYPED { HelpId = HID_EVT_KEYTYPED; } +hidspecial HID_EVT_KEYUP { HelpId = HID_EVT_KEYUP; } hidspecial HID_EVT_LOADED { HelpId = HID_EVT_LOADED; } hidspecial HID_EVT_MOUSEDRAGGED { HelpId = HID_EVT_MOUSEDRAGGED; } hidspecial HID_EVT_MOUSEENTERED { HelpId = HID_EVT_MOUSEENTERED; } @@ -240,72 +124,314 @@ hidspecial HID_EVT_MOUSEMOVED { HelpId = HID_EVT_MOUSEMOVED; } hidspecial HID_EVT_MOUSEPRESSED { HelpId = HID_EVT_MOUSEPRESSED; } hidspecial HID_EVT_MOUSERELEASED { HelpId = HID_EVT_MOUSERELEASED; } hidspecial HID_EVT_POSITIONED { HelpId = HID_EVT_POSITIONED; } +hidspecial HID_EVT_POSITIONING { HelpId = HID_EVT_POSITIONING; } +hidspecial HID_EVT_RELOADED { HelpId = HID_EVT_RELOADED; } +hidspecial HID_EVT_RELOADING { HelpId = HID_EVT_RELOADING; } hidspecial HID_EVT_RESETTED { HelpId = HID_EVT_RESETTED; } +hidspecial HID_EVT_ROWCHANGE { HelpId = HID_EVT_ROWCHANGE; } hidspecial HID_EVT_SUBMITTED { HelpId = HID_EVT_SUBMITTED; } hidspecial HID_EVT_TEXTCHANGED { HelpId = HID_EVT_TEXTCHANGED; } hidspecial HID_EVT_UNLOADED { HelpId = HID_EVT_UNLOADED; } -hidspecial HID_EVT_CHANGED { HelpId = HID_EVT_CHANGED; } -hidspecial HID_EVT_APPROVEACTIONPERFORMED { HelpId = HID_EVT_APPROVEACTIONPERFORMED; } -hidspecial HID_EVT_APPROVERESETTED { HelpId = HID_EVT_APPROVERESETTED; } -hidspecial HID_EVT_KEYUP { HelpId = HID_EVT_KEYUP; } -hidspecial HID_EVT_APPROVEPARAMETER { HelpId = HID_EVT_APPROVEPARAMETER; } -hidspecial HID_EVT_POSITIONING { HelpId = HID_EVT_POSITIONING; } -hidspecial HID_EVT_RELOADED { HelpId = HID_EVT_RELOADED; } -hidspecial HID_EVT_APPROVEROWCHANGE { HelpId = HID_EVT_APPROVEROWCHANGE; } -hidspecial HID_EVT_ROWCHANGE { HelpId = HID_EVT_ROWCHANGE; } -hidspecial HID_EVT_RELOADING { HelpId = HID_EVT_RELOADING; } hidspecial HID_EVT_UNLOADING { HelpId = HID_EVT_UNLOADING; } -hidspecial HID_EVT_ADJUSTMENTVALUECHANGED { HelpId = HID_EVT_ADJUSTMENTVALUECHANGED; } -hidspecial HID_PROP_TOGGLE { HelpId = HID_PROP_TOGGLE; } + +hidspecial HID_FIELDLINK_DETAIL_COLUMN { HelpId = HID_FIELDLINK_DETAIL_COLUMN; } +hidspecial HID_FIELDLINK_MASTER_COLUMN { HelpId = HID_FIELDLINK_MASTER_COLUMN; } + +hidspecial HID_GRIDWIZARD_CANCEL { HelpId = HID_GRIDWIZARD_CANCEL; } +hidspecial HID_GRIDWIZARD_FINISH { HelpId = HID_GRIDWIZARD_FINISH; } +hidspecial HID_GRIDWIZARD_NEXT { HelpId = HID_GRIDWIZARD_NEXT; } +hidspecial HID_GRIDWIZARD_PREVIOUS { HelpId = HID_GRIDWIZARD_PREVIOUS; }; +hidspecial HID_GROUPWIZARD_CANCEL { HelpId = HID_GROUPWIZARD_CANCEL; } +hidspecial HID_GROUPWIZARD_FINISH { HelpId = HID_GROUPWIZARD_FINISH; } +hidspecial HID_GROUPWIZARD_NEXT { HelpId = HID_GROUPWIZARD_NEXT; } +hidspecial HID_GROUPWIZARD_PREVIOUS { HelpId = HID_GROUPWIZARD_PREVIOUS; } + +hidspecial HID_LISTWIZARD_CANCEL { HelpId = HID_LISTWIZARD_CANCEL; } +hidspecial HID_LISTWIZARD_FINISH { HelpId = HID_LISTWIZARD_FINISH; } +hidspecial HID_LISTWIZARD_NEXT { HelpId = HID_LISTWIZARD_NEXT; } +hidspecial HID_LISTWIZARD_PREVIOUS { HelpId = HID_LISTWIZARD_PREVIOUS; } + +hidspecial HID_PROP_ALIGN { HelpId = HID_PROP_ALIGN; } +hidspecial HID_PROP_ALLOW_ADDITIONS { HelpId = HID_PROP_ALLOW_ADDITIONS; } +hidspecial HID_PROP_ALLOW_DELETIONS { HelpId = HID_PROP_ALLOW_DELETIONS; } +hidspecial HID_PROP_ALLOW_EDITS { HelpId = HID_PROP_ALLOW_EDITS; } +hidspecial HID_PROP_ANCHOR_TYPE { HelpId = HID_PROP_ANCHOR_TYPE; } +hidspecial HID_PROP_AUTOCOMPLETE { HelpId = HID_PROP_AUTOCOMPLETE; } +hidspecial HID_PROP_AUTOLINEBREAK { HelpId = HID_PROP_AUTOLINEBREAK; } +hidspecial HID_PROP_BACKGROUNDCOLOR { HelpId = HID_PROP_BACKGROUNDCOLOR; } +hidspecial HID_PROP_BINDING_NAME { HelpId = HID_PROP_BINDING_NAME; } +hidspecial HID_PROP_BIND_EXPRESSION { HelpId = HID_PROP_BIND_EXPRESSION; } +hidspecial HID_PROP_BLOCKINCREMENT { HelpId = HID_PROP_BLOCKINCREMENT; } +hidspecial HID_PROP_BORDER { HelpId = HID_PROP_BORDER; } +hidspecial HID_PROP_BORDERCOLOR { HelpId = HID_PROP_BORDERCOLOR; } +hidspecial HID_PROP_BOUNDCOLUMN { HelpId = HID_PROP_BOUNDCOLUMN; } +hidspecial HID_PROP_BOUND_CELL { HelpId = HID_PROP_BOUND_CELL; } +hidspecial HID_PROP_BUTTONTYPE { HelpId = HID_PROP_BUTTONTYPE; } +hidspecial HID_PROP_CELL_EXCHANGE_TYPE { HelpId = HID_PROP_CELL_EXCHANGE_TYPE; } +hidspecial HID_PROP_CLASSID { HelpId = HID_PROP_CLASSID; } +hidspecial HID_PROP_CONTROLLABEL { HelpId = HID_PROP_CONTROLLABEL; } +hidspecial HID_PROP_CONTROLSOURCE { HelpId = HID_PROP_CONTROLSOURCE; } +hidspecial HID_PROP_CURRENCYSYMBOL { HelpId = HID_PROP_CURRENCYSYMBOL; } +hidspecial HID_PROP_CURRSYM_POSITION { HelpId = HID_PROP_CURRSYM_POSITION; } +hidspecial HID_PROP_CURSORSOURCE { HelpId = HID_PROP_CURSORSOURCE; } +hidspecial HID_PROP_CURSORSOURCETYPE { HelpId = HID_PROP_CURSORSOURCETYPE; } +hidspecial HID_PROP_CURSORTYPE { HelpId = HID_PROP_CURSORTYPE; } +hidspecial HID_PROP_CYCLE { HelpId = HID_PROP_CYCLE; } +hidspecial HID_PROP_DATAENTRY { HelpId = HID_PROP_DATAENTRY; } +hidspecial HID_PROP_DATASOURCE { HelpId = HID_PROP_DATASOURCE; } +hidspecial HID_PROP_DATE { HelpId = HID_PROP_DATE; } +hidspecial HID_PROP_DATEFORMAT { HelpId = HID_PROP_DATEFORMAT; } +hidspecial HID_PROP_DATEMAX { HelpId = HID_PROP_DATEMAX; } +hidspecial HID_PROP_DATEMIN { HelpId = HID_PROP_DATEMIN; } +hidspecial HID_PROP_DECIMAL_ACCURACY { HelpId = HID_PROP_DECIMAL_ACCURACY; } +hidspecial HID_PROP_DECORATION { HelpId = HID_PROP_DECORATION; } +hidspecial HID_PROP_DEFAULTVALUE { HelpId = HID_PROP_DEFAULTVALUE; } +hidspecial HID_PROP_DEFAULT_BUTTON { HelpId = HID_PROP_DEFAULT_BUTTON; } +hidspecial HID_PROP_DEFAULT_DATE { HelpId = HID_PROP_DEFAULT_DATE; } +hidspecial HID_PROP_DEFAULT_LONG_VALUE { HelpId = HID_PROP_DEFAULT_LONG_VALUE; } +hidspecial HID_PROP_DEFAULT_SCROLLVALUE { HelpId = HID_PROP_DEFAULT_SCROLLVALUE; } +hidspecial HID_PROP_DEFAULT_SELECT_SEQ { HelpId = HID_PROP_DEFAULT_SELECT_SEQ; } +hidspecial HID_PROP_DEFAULT_SPINVALUE { HelpId = HID_PROP_DEFAULT_SPINVALUE; } +hidspecial HID_PROP_DEFAULT_STATE { HelpId = HID_PROP_DEFAULT_STATE; } +hidspecial HID_PROP_DEFAULT_TIME { HelpId = HID_PROP_DEFAULT_TIME; } +hidspecial HID_PROP_DIRTY { HelpId = HID_PROP_DIRTY; } +hidspecial HID_PROP_DROPDOWN { HelpId = HID_PROP_DROPDOWN; } +hidspecial HID_PROP_ECHO_CHAR { HelpId = HID_PROP_ECHO_CHAR; } +hidspecial HID_PROP_EDITABLE { HelpId = HID_PROP_EDITABLE; } +hidspecial HID_PROP_EDITMASK { HelpId = HID_PROP_EDITMASK; } +hidspecial HID_PROP_EFFECTIVEDEFAULT { HelpId = HID_PROP_EFFECTIVEDEFAULT; } +hidspecial HID_PROP_EFFECTIVEMAX { HelpId = HID_PROP_EFFECTIVEMAX; } +hidspecial HID_PROP_EFFECTIVEMIN { HelpId = HID_PROP_EFFECTIVEMIN; } +hidspecial HID_PROP_EMPTY_IS_NULL { HelpId = HID_PROP_EMPTY_IS_NULL; } +hidspecial HID_PROP_ENABLED { HelpId = HID_PROP_ENABLED; } +hidspecial HID_PROP_ENABLE_VISIBLE { HelpId = HID_PROP_ENABLE_VISIBLE; } +hidspecial HID_PROP_ESCAPE_PROCESSING { HelpId = HID_PROP_ESCAPE_PROCESSING; } +hidspecial HID_PROP_FILLCOLOR { HelpId = HID_PROP_FILLCOLOR; } +hidspecial HID_PROP_FILTER { HelpId = HID_PROP_FILTER; } +hidspecial HID_PROP_FILTERPROPOSAL { HelpId = HID_PROP_FILTERPROPOSAL; } hidspecial HID_PROP_FOCUSONCLICK { HelpId = HID_PROP_FOCUSONCLICK; } +hidspecial HID_PROP_FONT { HelpId = HID_PROP_FONT; } +hidspecial HID_PROP_FORMATKEY { HelpId = HID_PROP_FORMATKEY; } +hidspecial HID_PROP_GROUPBOX { HelpId = HID_PROP_GROUPBOX; } +hidspecial HID_PROP_HEIGHT { HelpId = HID_PROP_HEIGHT; } +hidspecial HID_PROP_HELPTEXT { HelpId = HID_PROP_HELPTEXT; } +hidspecial HID_PROP_HELPURL { HelpId = HID_PROP_HELPURL; } +hidspecial HID_PROP_HIDDEN_VALUE { HelpId = HID_PROP_HIDDEN_VALUE; } hidspecial HID_PROP_HIDEINACTIVESELECTION { HelpId = HID_PROP_HIDEINACTIVESELECTION; } -hidspecial HID_PROP_VISUALEFFECT { HelpId = HID_PROP_VISUALEFFECT; } -hidspecial HID_PROP_BORDERCOLOR { HelpId = HID_PROP_BORDERCOLOR; } -hidspecial UID_PROP_DLG_BORDERCOLOR { HelpId = UID_PROP_DLG_BORDERCOLOR; } +hidspecial HID_PROP_HSCROLL { HelpId = HID_PROP_HSCROLL; } +hidspecial HID_PROP_ICONSIZE { HelpId = HID_PROP_ICONSIZE; } hidspecial HID_PROP_IMAGEPOSITION { HelpId = HID_PROP_IMAGEPOSITION; } +hidspecial HID_PROP_IMAGE_URL { HelpId = HID_PROP_IMAGE_URL; } +hidspecial HID_PROP_INPUT_REQUIRED { HelpId = HID_PROP_INPUT_REQUIRED; } +hidspecial HID_PROP_INVOKES_STOP_NOT_EDITING { HelpId = HID_PROP_INVOKES_STOP_NOT_EDITING; } +hidspecial HID_PROP_LABEL { HelpId = HID_PROP_LABEL; } +hidspecial HID_PROP_LEFT { HelpId = HID_PROP_LEFT; } +hidspecial HID_PROP_LINECOLOR { HelpId = HID_PROP_LINECOLOR; } +hidspecial HID_PROP_LINECOUNT { HelpId = HID_PROP_LINECOUNT; } +hidspecial HID_PROP_LINEEND_FORMAT { HelpId = HID_PROP_LINEEND_FORMAT; } +hidspecial HID_PROP_LINEINCREMENT { HelpId = HID_PROP_LINEINCREMENT; } +hidspecial HID_PROP_LISTINDEX { HelpId = HID_PROP_LISTINDEX; } +hidspecial HID_PROP_LISTSOURCE { HelpId = HID_PROP_LISTSOURCE; } +hidspecial HID_PROP_LISTSOURCETYPE { HelpId = HID_PROP_LISTSOURCETYPE; } +hidspecial HID_PROP_LIST_BINDING { HelpId = HID_PROP_LIST_BINDING; } +hidspecial HID_PROP_LIST_CELL_RANGE { HelpId = HID_PROP_LIST_CELL_RANGE; } +hidspecial HID_PROP_LITERALMASK { HelpId = HID_PROP_LITERALMASK; } +hidspecial HID_PROP_LOCKED { HelpId = HID_PROP_LOCKED; } +hidspecial HID_PROP_MASTERFIELDS { HelpId = HID_PROP_MASTERFIELDS; } +hidspecial HID_PROP_MAXTEXTLEN { HelpId = HID_PROP_MAXTEXTLEN; } +hidspecial HID_PROP_MULTILINE { HelpId = HID_PROP_MULTILINE; } +hidspecial HID_PROP_MULTISELECTION { HelpId = HID_PROP_MULTISELECTION; } +hidspecial HID_PROP_NAME { HelpId = HID_PROP_NAME; } +hidspecial HID_PROP_NAVIGATION { HelpId = HID_PROP_NAVIGATION; } +hidspecial HID_PROP_NAVIGATIONBAR { HelpId = HID_PROP_NAVIGATIONBAR; } +hidspecial HID_PROP_NOLABEL { HelpId = HID_PROP_NOLABEL; } +hidspecial HID_PROP_OLDVALUE { HelpId = HID_PROP_OLDVALUE; } +hidspecial HID_PROP_ORIENTATION { HelpId = HID_PROP_ORIENTATION; } +hidspecial HID_PROP_POSITIONX { HelpId = HID_PROP_POSITIONX; } +hidspecial HID_PROP_POSITIONY { HelpId = HID_PROP_POSITIONY; } +hidspecial HID_PROP_PRINTABLE { HelpId = HID_PROP_PRINTABLE; } +hidspecial HID_PROP_PROGRESSVALUE { HelpId = HID_PROP_PROGRESSVALUE; } +hidspecial HID_PROP_PROGRESSVALUE_MAX { HelpId = HID_PROP_PROGRESSVALUE_MAX; } +hidspecial HID_PROP_PROGRESSVALUE_MIN { HelpId = HID_PROP_PROGRESSVALUE_MIN; } +hidspecial HID_PROP_PUSHBUTTONTYPE { HelpId = HID_PROP_PUSHBUTTONTYPE; } +hidspecial HID_PROP_READONLY { HelpId = HID_PROP_READONLY; } +hidspecial HID_PROP_RECORDMARKER { HelpId = HID_PROP_RECORDMARKER; } +hidspecial HID_PROP_REFVALUE { HelpId = HID_PROP_REFVALUE; } +hidspecial HID_PROP_REPEAT { HelpId = HID_PROP_REPEAT; } +hidspecial HID_PROP_REPEAT_DELAY { HelpId = HID_PROP_REPEAT_DELAY; } +hidspecial HID_PROP_REQUIRED { HelpId = HID_PROP_REQUIRED; } +hidspecial HID_PROP_RIGHT { HelpId = HID_PROP_RIGHT; } +hidspecial HID_PROP_ROOT_DISPLAYED { HelpId = HID_PROP_ROOT_DISPLAYED; } +hidspecial HID_PROP_ROWHEIGHT { HelpId = HID_PROP_ROWHEIGHT; } +hidspecial HID_PROP_ROW_HEIGHT { HelpId = HID_PROP_ROW_HEIGHT; } +hidspecial HID_PROP_SCALEIMAGE { HelpId = HID_PROP_SCALEIMAGE; } +hidspecial HID_PROP_SCROLLVALUE { HelpId = HID_PROP_SCROLLVALUE; } +hidspecial HID_PROP_SCROLLVALUEMIN { HelpId = HID_PROP_SCROLLVALUE_MIN; } +hidspecial HID_PROP_SCROLLVALUE_MAX { HelpId = HID_PROP_SCROLLVALUE_MAX; } +hidspecial HID_PROP_SCROLLVALUE_MIN { HelpId = HID_PROP_SCROLLVALUE_MIN; } +hidspecial HID_PROP_SEARCHING { HelpId = HID_PROP_SEARCHING; } +hidspecial HID_PROP_SELECTEDITEMS { HelpId = HID_PROP_SELECTEDITEMS; } +hidspecial HID_PROP_SELECTION_TYPE { HelpId = HID_PROP_SELECTION_TYPE; } +hidspecial HID_PROP_SHOWS_HANDLES { HelpId = HID_PROP_SHOWS_HANDLES; } +hidspecial HID_PROP_SHOWS_ROOT_HANDLES { HelpId = HID_PROP_SHOWS_ROOT_HANDLES; } +hidspecial HID_PROP_SHOWTHOUSANDSEP { HelpId = HID_PROP_SHOWTHOUSANDSEP; } +hidspecial HID_PROP_SHOW_FILTERSORT { HelpId = HID_PROP_SHOW_FILTERSORT; } +hidspecial HID_PROP_SHOW_NAVIGATION { HelpId = HID_PROP_SHOW_NAVIGATION; } +hidspecial HID_PROP_SHOW_POSITION { HelpId = HID_PROP_SHOW_POSITION; } +hidspecial HID_PROP_SHOW_RECORDACTIONS { HelpId = HID_PROP_SHOW_RECORDACTIONS; } +hidspecial HID_PROP_SHOW_SCROLLBARS { HelpId = HID_PROP_SHOW_SCROLLBARS; } +hidspecial HID_PROP_SLAVEFIELDS { HelpId = HID_PROP_SLAVEFIELDS; } +hidspecial HID_PROP_SORT_CRITERIA { HelpId = HID_PROP_SORT_CRITERIA; } +hidspecial HID_PROP_SPIN { HelpId = HID_PROP_SPIN; } +hidspecial HID_PROP_SPININCREMENT { HelpId = HID_PROP_SPININCREMENT; } +hidspecial HID_PROP_SPINVALUE { HelpId = HID_PROP_SPINVALUE; } +hidspecial HID_PROP_SPINVALUE_MAX { HelpId = HID_PROP_SPINVALUE_MAX; } +hidspecial HID_PROP_SPINVALUE_MIN { HelpId = HID_PROP_SPINVALUE_MIN; } +hidspecial HID_PROP_STATE { HelpId = HID_PROP_STATE; } +hidspecial HID_PROP_STEP { HelpId = HID_PROP_STEP; } +hidspecial HID_PROP_STRICTFORMAT { HelpId = HID_PROP_STRICTFORMAT; } +hidspecial HID_PROP_STRINGITEMLIST { HelpId = HID_PROP_STRINGITEMLIST; } +hidspecial HID_PROP_SUBMISSION_ID { HelpId = HID_PROP_SUBMISSION_ID; } +hidspecial HID_PROP_SUBMIT_ACTION { HelpId = HID_PROP_SUBMIT_ACTION; } +hidspecial HID_PROP_SUBMIT_ENCODING { HelpId = HID_PROP_SUBMIT_ENCODING; } +hidspecial HID_PROP_SUBMIT_METHOD { HelpId = HID_PROP_SUBMIT_METHOD; } +hidspecial HID_PROP_SUBMIT_TARGET { HelpId = HID_PROP_SUBMIT_TARGET; } +hidspecial HID_PROP_SYMBOLCOLOR { HelpId = HID_PROP_SYMBOLCOLOR; } +hidspecial HID_PROP_TABINDEX { HelpId = HID_PROP_TABINDEX; } +hidspecial HID_PROP_TABORDER_CONTROLS { HelpId = HID_PROP_TABORDER_CONTROLS; } +hidspecial HID_PROP_TABSTOP { HelpId = HID_PROP_TABSTOP; } +hidspecial HID_PROP_TAG { HelpId = HID_PROP_TAG; } +hidspecial HID_PROP_TARGET_FRAME { HelpId = HID_PROP_TARGET_FRAME; } +hidspecial HID_PROP_TARGET_URL { HelpId = HID_PROP_TARGET_URL; } +hidspecial HID_PROP_TEXT { HelpId = HID_PROP_TEXT; } +hidspecial HID_PROP_TEXTTYPE { HelpId = HID_PROP_TEXTTYPE; } +hidspecial HID_PROP_TIME { HelpId = HID_PROP_TIME; } +hidspecial HID_PROP_TIMEFORMAT { HelpId = HID_PROP_TIMEFORMAT; } +hidspecial HID_PROP_TIMEMAX { HelpId = HID_PROP_TIMEMAX; } +hidspecial HID_PROP_TIMEMIN { HelpId = HID_PROP_TIMEMIN; } +hidspecial HID_PROP_TITLE { HelpId = HID_PROP_TITLE; } +hidspecial HID_PROP_TOGGLE { HelpId = HID_PROP_TOGGLE; } +hidspecial HID_PROP_TRISTATE { HelpId = HID_PROP_TRISTATE; } +hidspecial HID_PROP_UNCHECKEDREFVALUE { HelpId = HID_PROP_UNCHECKEDREFVALUE; } +hidspecial HID_PROP_UNIQUE { HelpId = HID_PROP_UNIQUE; } +hidspecial HID_PROP_VALUE { HelpId = HID_PROP_VALUE; } +hidspecial HID_PROP_VALUEMAX { HelpId = HID_PROP_VALUEMAX; } +hidspecial HID_PROP_VALUEMIN { HelpId = HID_PROP_VALUEMIN; } +hidspecial HID_PROP_VALUESTEP { HelpId = HID_PROP_VALUESTEP; } +hidspecial HID_PROP_VERTICAL_ALIGN { HelpId = HID_PROP_VERTICAL_ALIGN; } +hidspecial HID_PROP_VISIBLESIZE { HelpId = HID_PROP_VISIBLESIZE; } +hidspecial HID_PROP_VISUALEFFECT { HelpId = HID_PROP_VISUALEFFECT; } +hidspecial HID_PROP_VSCROLL { HelpId = HID_PROP_VSCROLL; } +hidspecial HID_PROP_WHEEL_BEHAVIOR { HelpId = HID_PROP_WHEEL_BEHAVIOR; } +hidspecial HID_PROP_WIDTH { HelpId = HID_PROP_WIDTH; } +hidspecial HID_PROP_WORDBREAK { HelpId = HID_PROP_WORDBREAK; } +hidspecial HID_PROP_WRITING_MODE { HelpId = HID_PROP_WRITING_MODE; } hidspecial HID_PROP_XML_DATA_MODEL { HelpId = HID_PROP_XML_DATA_MODEL; } -hidspecial HID_PROP_BIND_EXPRESSION { HelpId = HID_PROP_BIND_EXPRESSION; } -hidspecial HID_PROP_XSD_REQUIRED { HelpId = HID_PROP_XSD_REQUIRED; } -hidspecial HID_PROP_XSD_RELEVANT { HelpId = HID_PROP_XSD_RELEVANT; } -hidspecial HID_PROP_XSD_READONLY { HelpId = HID_PROP_XSD_READONLY; } -hidspecial HID_PROP_XSD_CONSTRAINT { HelpId = HID_PROP_XSD_CONSTRAINT; } hidspecial HID_PROP_XSD_CALCULATION { HelpId = HID_PROP_XSD_CALCULATION; } +hidspecial HID_PROP_XSD_CONSTRAINT { HelpId = HID_PROP_XSD_CONSTRAINT; } hidspecial HID_PROP_XSD_DATA_TYPE { HelpId = HID_PROP_XSD_DATA_TYPE; } -hidspecial HID_PROP_XSD_WHITESPACES { HelpId = HID_PROP_XSD_WHITESPACES; } -hidspecial HID_PROP_XSD_PATTERN { HelpId = HID_PROP_XSD_PATTERN; } +hidspecial HID_PROP_XSD_FRACTION_DIGITS { HelpId = HID_PROP_XSD_FRACTION_DIGITS; } hidspecial HID_PROP_XSD_LENGTH { HelpId = HID_PROP_XSD_LENGTH; } -hidspecial HID_PROP_XSD_MIN_LENGTH { HelpId = HID_PROP_XSD_MIN_LENGTH; } +hidspecial HID_PROP_XSD_MAX_EXCLUSIVE { HelpId = HID_PROP_XSD_MAX_EXCLUSIVE; } +hidspecial HID_PROP_XSD_MAX_INCLUSIVE { HelpId = HID_PROP_XSD_MAX_INCLUSIVE; } hidspecial HID_PROP_XSD_MAX_LENGTH { HelpId = HID_PROP_XSD_MAX_LENGTH; } +hidspecial HID_PROP_XSD_MIN_EXCLUSIVE { HelpId = HID_PROP_XSD_MIN_EXCLUSIVE; } +hidspecial HID_PROP_XSD_MIN_INCLUSIVE { HelpId = HID_PROP_XSD_MIN_INCLUSIVE; } +hidspecial HID_PROP_XSD_MIN_LENGTH { HelpId = HID_PROP_XSD_MIN_LENGTH; } +hidspecial HID_PROP_XSD_PATTERN { HelpId = HID_PROP_XSD_PATTERN; } +hidspecial HID_PROP_XSD_READONLY { HelpId = HID_PROP_XSD_READONLY; } +hidspecial HID_PROP_XSD_RELEVANT { HelpId = HID_PROP_XSD_RELEVANT; } +hidspecial HID_PROP_XSD_REQUIRED { HelpId = HID_PROP_XSD_REQUIRED; } +hidspecial HID_PROP_XSD_TOTAL_DIGITS { HelpId = HID_PROP_XSD_TOTAL_DIGITS; } +hidspecial HID_PROP_XSD_WHITESPACES { HelpId = HID_PROP_XSD_WHITESPACES; } + +hidspecial HID_PROTOCOLS { HelpId = HID_PROTOCOLS; } +hidspecial HID_SELECTION_TLB { HelpId = HID_SELECTION_TLB; } + +hidspecial UID_ABSPILOT_HELP { HelpId = UID_ABSPILOT_HELP; } +hidspecial UID_BIB_FRAME_WINDOW { HelpId = UID_BIB_FRAME_WINDOW;} + +hidspecial UID_BRWEVT_ACTIONPERFORMED { HelpId = UID_BRWEVT_ACTIONPERFORMED; } +hidspecial UID_BRWEVT_ADJUSTMENTVALUECHANGED { HelpId = UID_BRWEVT_ADJUSTMENTVALUECHANGED; } +hidspecial UID_BRWEVT_AFTERUPDATE { HelpId = UID_BRWEVT_AFTERUPDATE; } +hidspecial UID_BRWEVT_APPROVEACTIONPERFORMED { HelpId = UID_BRWEVT_APPROVEACTIONPERFORMED; } +hidspecial UID_BRWEVT_APPROVEPARAMETER { HelpId = UID_BRWEVT_APPROVEPARAMETER; } +hidspecial UID_BRWEVT_APPROVERESETTED { HelpId = UID_BRWEVT_APPROVERESETTED; } +hidspecial UID_BRWEVT_APPROVEROWCHANGE { HelpId = UID_BRWEVT_APPROVEROWCHANGE; } +hidspecial UID_BRWEVT_BEFOREUPDATE { HelpId = UID_BRWEVT_BEFOREUPDATE; } +hidspecial UID_BRWEVT_CHANGED { HelpId = UID_BRWEVT_CHANGED; } +hidspecial UID_BRWEVT_CONFIRMDELETE { HelpId = UID_BRWEVT_CONFIRMDELETE; } +hidspecial UID_BRWEVT_ERROROCCURED { HelpId = UID_BRWEVT_ERROROCCURED; } +hidspecial UID_BRWEVT_FOCUSGAINED { HelpId = UID_BRWEVT_FOCUSGAINED; } +hidspecial UID_BRWEVT_FOCUSLOST { HelpId = UID_BRWEVT_FOCUSLOST; } +hidspecial UID_BRWEVT_ITEMSTATECHANGED { HelpId = UID_BRWEVT_ITEMSTATECHANGED; } +hidspecial UID_BRWEVT_KEYTYPED { HelpId = UID_BRWEVT_KEYTYPED; } +hidspecial UID_BRWEVT_KEYUP { HelpId = UID_BRWEVT_KEYUP; } +hidspecial UID_BRWEVT_LOADED { HelpId = UID_BRWEVT_LOADED; } +hidspecial UID_BRWEVT_MOUSEDRAGGED { HelpId = UID_BRWEVT_MOUSEDRAGGED; } +hidspecial UID_BRWEVT_MOUSEENTERED { HelpId = UID_BRWEVT_MOUSEENTERED; } +hidspecial UID_BRWEVT_MOUSEEXITED { HelpId = UID_BRWEVT_MOUSEEXITED; } +hidspecial UID_BRWEVT_MOUSEMOVED { HelpId = UID_BRWEVT_MOUSEMOVED; } +hidspecial UID_BRWEVT_MOUSEPRESSED { HelpId = UID_BRWEVT_MOUSEPRESSED; } +hidspecial UID_BRWEVT_MOUSERELEASED { HelpId = UID_BRWEVT_MOUSERELEASED; } +hidspecial UID_BRWEVT_POSITIONED { HelpId = UID_BRWEVT_POSITIONED; } +hidspecial UID_BRWEVT_POSITIONING { HelpId = UID_BRWEVT_POSITIONING; } +hidspecial UID_BRWEVT_RELOADED { HelpId = UID_BRWEVT_RELOADED; } +hidspecial UID_BRWEVT_RELOADING { HelpId = UID_BRWEVT_RELOADING; } +hidspecial UID_BRWEVT_RESETTED { HelpId = UID_BRWEVT_RESETTED; } +hidspecial UID_BRWEVT_ROWCHANGE { HelpId = UID_BRWEVT_ROWCHANGE; } +hidspecial UID_BRWEVT_SUBMITTED { HelpId = UID_BRWEVT_SUBMITTED; } +hidspecial UID_BRWEVT_TEXTCHANGED { HelpId = UID_BRWEVT_TEXTCHANGED; } +hidspecial UID_BRWEVT_UNLOADED { HelpId = UID_BRWEVT_UNLOADED; } +hidspecial UID_BRWEVT_UNLOADING { HelpId = UID_BRWEVT_UNLOADING; } + +hidspecial UID_DBIWIZARD_FORMS { HelpId = UID_DBIWIZARD_FORMS; } +hidspecial UID_DBIWIZARD_FORMS_SAVETO { HelpId = UID_DBIWIZARD_FORMS_SAVETO; } +hidspecial UID_DBIWIZARD_HELP { HelpId = UID_DBIWIZARD_HELP; } +hidspecial UID_DBIWIZARD_QUERIES { HelpId = UID_DBIWIZARD_QUERIES; } +hidspecial UID_DBIWIZARD_SOURCEFILE { HelpId = UID_DBIWIZARD_SOURCEFILE; } +hidspecial UID_DBIWIZARD_SOURCESTATS { HelpId = UID_DBIWIZARD_SOURCESTATS; } + +hidspecial UID_EVT_MACRODLG { HelpId = UID_EVT_MACRODLG; } + +hidspecial UID_FIELDLINK_DETAIL1 { HelpId = UID_FIELDLINK_DETAIL1; } +hidspecial UID_FIELDLINK_DETAIL2 { HelpId = UID_FIELDLINK_DETAIL2; } +hidspecial UID_FIELDLINK_DETAIL3 { HelpId = UID_FIELDLINK_DETAIL3; } +hidspecial UID_FIELDLINK_DETAIL4 { HelpId = UID_FIELDLINK_DETAIL4; } +hidspecial UID_FIELDLINK_MASTER1 { HelpId = UID_FIELDLINK_MASTER1; } +hidspecial UID_FIELDLINK_MASTER2 { HelpId = UID_FIELDLINK_MASTER2; } +hidspecial UID_FIELDLINK_MASTER3 { HelpId = UID_FIELDLINK_MASTER3; } +hidspecial UID_FIELDLINK_MASTER4 { HelpId = UID_FIELDLINK_MASTER4; } + +hidspecial UID_PROP_ADD_DATA_TYPE { HelpId = UID_PROP_ADD_DATA_TYPE; } +hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } +hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } +hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } +hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } +hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } +hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } hidspecial UID_PROP_DLG_BIND_EXPRESSION { HelpId = UID_PROP_DLG_BIND_EXPRESSION; } -hidspecial UID_PROP_DLG_XSD_REQUIRED { HelpId = UID_PROP_DLG_XSD_REQUIRED; } -hidspecial UID_PROP_DLG_XSD_RELEVANT { HelpId = UID_PROP_DLG_XSD_RELEVANT; } -hidspecial UID_PROP_DLG_XSD_READONLY { HelpId = UID_PROP_DLG_XSD_READONLY; } -hidspecial UID_PROP_DLG_XSD_CONSTRAINT { HelpId = UID_PROP_DLG_XSD_CONSTRAINT; } +hidspecial UID_PROP_DLG_BORDERCOLOR { HelpId = UID_PROP_DLG_BORDERCOLOR; } +hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } +hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } +hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } +hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } +hidspecial UID_PROP_DLG_FILTER { HelpId = UID_PROP_DLG_FILTER; } +hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } +hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } +hidspecial UID_PROP_DLG_FORMLINKFIELDS { HelpId = UID_PROP_DLG_FORMLINKFIELDS; } +hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } +hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } +hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } +hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } +hidspecial UID_PROP_DLG_ORDER { HelpId = UID_PROP_DLG_ORDER; } +hidspecial UID_PROP_DLG_SELECTION { HelpId = UID_PROP_DLG_SELECTION; } +hidspecial UID_PROP_DLG_SQLCOMMAND { HelpId = UID_PROP_DLG_SQLCOMMAND; } +hidspecial UID_PROP_DLG_SYMBOLCOLOR { HelpId = UID_PROP_DLG_SYMBOLCOLOR; } +hidspecial UID_PROP_DLG_TABINDEX { HelpId = UID_PROP_DLG_TABINDEX; } hidspecial UID_PROP_DLG_XSD_CALCULATION { HelpId = UID_PROP_DLG_XSD_CALCULATION; } -hidspecial UID_PROP_ADD_DATA_TYPE { HelpId = UID_PROP_ADD_DATA_TYPE; } +hidspecial UID_PROP_DLG_XSD_CONSTRAINT { HelpId = UID_PROP_DLG_XSD_CONSTRAINT; } +hidspecial UID_PROP_DLG_XSD_READONLY { HelpId = UID_PROP_DLG_XSD_READONLY; } +hidspecial UID_PROP_DLG_XSD_RELEVANT { HelpId = UID_PROP_DLG_XSD_RELEVANT; } +hidspecial UID_PROP_DLG_XSD_REQUIRED { HelpId = UID_PROP_DLG_XSD_REQUIRED; } hidspecial UID_PROP_REMOVE_DATA_TYPE { HelpId = UID_PROP_REMOVE_DATA_TYPE; } -hidspecial HID_PROP_XSD_TOTAL_DIGITS { HelpId = HID_PROP_XSD_TOTAL_DIGITS; } -hidspecial HID_PROP_XSD_FRACTION_DIGITS { HelpId = HID_PROP_XSD_FRACTION_DIGITS; } -hidspecial HID_PROP_XSD_MAX_INCLUSIVE { HelpId = HID_PROP_XSD_MAX_INCLUSIVE; } -hidspecial HID_PROP_XSD_MAX_EXCLUSIVE { HelpId = HID_PROP_XSD_MAX_EXCLUSIVE; } -hidspecial HID_PROP_XSD_MIN_INCLUSIVE { HelpId = HID_PROP_XSD_MIN_INCLUSIVE; } -hidspecial HID_PROP_XSD_MIN_EXCLUSIVE { HelpId = HID_PROP_XSD_MIN_EXCLUSIVE; } -hidspecial HID_PROP_UNCHECKEDREFVALUE { HelpId = HID_PROP_UNCHECKEDREFVALUE; } -hidspecial HID_PROP_SUBMISSION_ID { HelpId = HID_PROP_SUBMISSION_ID; } -hidspecial HID_PROP_LIST_BINDING { HelpId = HID_PROP_LIST_BINDING; } -hidspecial HID_PROP_BINDING_NAME { HelpId = HID_PROP_BINDING_NAME; } - -hidspecial HID_CHECK_FOR_UPD_DLG { HelpId = HID_CHECK_FOR_UPD_DLG; } -hidspecial HID_CHECK_FOR_UPD_CLOSE { HelpId = HID_CHECK_FOR_UPD_CLOSE; } -hidspecial HID_CHECK_FOR_UPD_PAUSE { HelpId = HID_CHECK_FOR_UPD_PAUSE; } -hidspecial HID_CHECK_FOR_UPD_RESUME { HelpId = HID_CHECK_FOR_UPD_RESUME; } -hidspecial HID_CHECK_FOR_UPD_DOWNLOAD { HelpId = HID_CHECK_FOR_UPD_DOWNLOAD; } -hidspecial HID_CHECK_FOR_UPD_DOWNLOAD2 { HelpId = HID_CHECK_FOR_UPD_DOWNLOAD2; } -hidspecial HID_CHECK_FOR_UPD_INSTALL { HelpId = HID_CHECK_FOR_UPD_INSTALL; } -hidspecial HID_CHECK_FOR_UPD_STATUS { HelpId = HID_CHECK_FOR_UPD_STATUS; } -hidspecial HID_CHECK_FOR_UPD_DESCRIPTION { HelpId = HID_CHECK_FOR_UPD_DESCRIPTION; } -hidspecial HID_CHECK_FOR_UPD_CANCEL { HelpId = HID_CHECK_FOR_UPD_CANCEL; } -hidspecial HID_PROP_NOLABEL { HelpId = HID_PROP_NOLABEL; } -hidspecial HID_PROP_INPUT_REQUIRED { HelpId = HID_PROP_INPUT_REQUIRED; } -hidspecial HID_PROP_WRITING_MODE { HelpId = HID_PROP_WRITING_MODE; } -hidspecial HID_PROP_ANCHOR_TYPE { HelpId = HID_PROP_ANCHOR_TYPE; } diff --git a/forms/qa/integration/forms/TestSkeleton.java b/forms/qa/integration/forms/TestSkeleton.java index f16083664cbe..8f2765b3a6d5 100644 --- a/forms/qa/integration/forms/TestSkeleton.java +++ b/forms/qa/integration/forms/TestSkeleton.java @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TestSkeleton.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -29,61 +26,50 @@ ************************************************************************/ package integration.forms; -import com.sun.star.uno.UnoRuntime; - -import com.sun.star.lang.XMultiServiceFactory; - -import com.sun.star.util.XCloseable; +import com.sun.star.uno.Exception; -import integration.forms.DocumentHelper; - -public class TestSkeleton extends complexlib.ComplexTestCase +public class TestSkeleton extends TestCase { - private DocumentHelper m_document; - private FormLayer m_formLayer; - private XMultiServiceFactory m_orb; - - /** Creates a new instance of ValueBinding */ + /** Creates a new instance of TestSkeleton */ public TestSkeleton() { + super( DocumentType.WRITER ); } /* ------------------------------------------------------------------ */ public String[] getTestMethodNames() { return new String[] { - "checkSomething" + "checkTestSkeleton" }; } /* ------------------------------------------------------------------ */ public String getTestObjectName() { - return "Form Control Spreadsheet Cell Binding Test"; + return "Test Skeleton"; + } + + /* ------------------------------------------------------------------ */ + public void checkTestSkeleton() throws com.sun.star.uno.Exception, java.lang.Exception + { } /* ------------------------------------------------------------------ */ - public void before() throws com.sun.star.uno.Exception, java.lang.Exception + public void before() throws Exception, java.lang.Exception { - m_orb = (XMultiServiceFactory)param.getMSF(); - m_document = DocumentHelper.blankTextDocument( m_orb ); - m_formLayer = new FormLayer( m_document ); + super.before(); } /* ------------------------------------------------------------------ */ - public void after() throws com.sun.star.uno.Exception, java.lang.Exception + public void after() throws Exception, java.lang.Exception { - // close our document - if ( m_document != null ) - { - XCloseable closeDoc = (XCloseable)UnoRuntime.queryInterface( XCloseable.class, - m_document.getDocument() ); - closeDoc.close( true ); - } + super.before(); } /* ------------------------------------------------------------------ */ - public void checkSomething() throws com.sun.star.uno.Exception, java.lang.Exception + protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception { + super.prepareDocument(); } -} + } diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index b9b2b6cb5936..c307783f179b 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -345,6 +345,7 @@ void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, sal_B aForbiddenProperties.insert( PROPERTY_VERTICALALIGN ); aForbiddenProperties.insert( PROPERTY_IMAGE_URL ); aForbiddenProperties.insert( PROPERTY_IMAGE_POSITION ); + aForbiddenProperties.insert( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ) ); if ( !bAllowDropDown ) aForbiddenProperties.insert( PROPERTY_DROPDOWN ); diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 3491c2142449..1d6d204ea977 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -733,6 +733,8 @@ void OComboBoxModel::onDisconnectedDbColumn() // reset the string item list if ( !hasExternalListSource() ) setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( m_aDesignModeStringItems ) ); + + m_aListRowSet.dispose(); } //------------------------------------------------------------------------------ diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 6e700c28f6d8..23c05be9f89f 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -239,22 +239,9 @@ Sequence<Type> OControl::_getTypes() } //------------------------------------------------------------------------------ -void OControl::initFormControlPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _rxPeer ) +void OControl::initFormControlPeer( const Reference< XWindowPeer >& /*_rxPeer*/ ) { - try - { - Reference< XVclWindowPeer > xVclWindowPeer( _rxPeer, UNO_QUERY_THROW ); - - // #i63103# - form controls should only react on the mouse wheel when they're focused - xVclWindowPeer->setProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WheelWithoutFocus" ) ), - makeAny( sal_Bool( sal_False ) ) - ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } + // nothing to do here } // OComponentHelper @@ -2164,9 +2151,9 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) try { + sal_Int32 nFieldType = DataType::OTHER; if ( xFieldCandidate.is() ) { - sal_Int32 nFieldType = 0; xFieldCandidate->getPropertyValue( PROPERTY_FIELDTYPE ) >>= nFieldType; if ( approveDbColumnType( nFieldType ) ) impl_setField_noNotify( xFieldCandidate ); @@ -2178,6 +2165,8 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) { if( m_xField->getPropertySetInfo()->hasPropertyByName( PROPERTY_VALUE ) ) { + m_nFieldType = nFieldType; + // an wertaenderungen horchen m_xField->addPropertyChangeListener( PROPERTY_VALUE, this ); m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY ); diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 9ca5a1b02ef3..ef0abf146632 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -104,6 +104,7 @@ OGridControlModel::OGridControlModel(const Reference<XMultiServiceFactory>& _rxF ,m_nBorder(1) ,m_nWritingMode( WritingMode2::CONTEXT ) ,m_nContextWritingMode( WritingMode2::CONTEXT ) + ,m_bEnableVisible(sal_True) ,m_bEnable(sal_True) ,m_bNavigation(sal_True) ,m_bRecordMarker(sal_True) @@ -130,6 +131,7 @@ OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const m_aDefaultControl = _pOriginal->m_aDefaultControl; m_bEnable = _pOriginal->m_bEnable; + m_bEnableVisible = _pOriginal->m_bEnableVisible; m_bNavigation = _pOriginal->m_bNavigation; m_nBorder = _pOriginal->m_nBorder; m_nWritingMode = _pOriginal->m_nWritingMode; @@ -457,7 +459,7 @@ void OGridControlModel::_reset() //------------------------------------------------------------------------------ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const { - BEGIN_DESCRIBE_BASE_PROPERTIES( 36 ) + BEGIN_DESCRIBE_BASE_PROPERTIES( 37 ) DECL_PROP1(NAME, ::rtl::OUString, BOUND); DECL_PROP2(CLASSID, sal_Int16, READONLY, TRANSIENT); DECL_PROP1(TAG, ::rtl::OUString, BOUND); @@ -465,6 +467,7 @@ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) DECL_PROP3(TABSTOP, sal_Bool, BOUND, MAYBEDEFAULT, MAYBEVOID); DECL_PROP2(HASNAVIGATION, sal_Bool, BOUND, MAYBEDEFAULT); DECL_PROP1(ENABLED, sal_Bool, BOUND); + DECL_PROP2(ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT); DECL_PROP1(BORDER, sal_Int16, BOUND); DECL_PROP2(BORDERCOLOR, sal_Int16, BOUND, MAYBEVOID); DECL_PROP1(DEFAULTCONTROL, ::rtl::OUString, BOUND); @@ -538,6 +541,9 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co case PROPERTY_ID_ENABLED: setBOOL(rValue, m_bEnable); break; + case PROPERTY_ID_ENABLEVISIBLE: + setBOOL(rValue, m_bEnableVisible); + break; case PROPERTY_ID_BORDER: rValue <<= (sal_Int16)m_nBorder; break; @@ -616,6 +622,9 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any& case PROPERTY_ID_ENABLED: bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bEnable); break; + case PROPERTY_ID_ENABLEVISIBLE: + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bEnableVisible); + break; case PROPERTY_ID_BORDER: bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nBorder); break; @@ -687,6 +696,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con case PROPERTY_ID_ENABLED: m_bEnable = getBOOL(rValue); break; + case PROPERTY_ID_ENABLEVISIBLE: + m_bEnableVisible = getBOOL(rValue); + break; case PROPERTY_ID_RECORDMARKER: m_bRecordMarker = getBOOL(rValue); break; @@ -744,6 +756,7 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const case PROPERTY_ID_RECORDMARKER: case PROPERTY_ID_DISPLAYSYNCHRON: case PROPERTY_ID_ENABLED: + case PROPERTY_ID_ENABLEVISIBLE: aReturn = makeBoolAny(sal_True); break; diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx index 56981f54349b..f5bb60489e45 100644 --- a/forms/source/component/Grid.hxx +++ b/forms/source/component/Grid.hxx @@ -28,22 +28,22 @@ * ************************************************************************/ -#include "errorbroadcaster.hxx"
-#include "FormComponent.hxx"
-#include "formcontrolfont.hxx"
-#include "InterfaceContainer.hxx"
-
-/** === begin UNO includes === **/
-#include <com/sun/star/form/XGridColumnFactory.hpp>
-#include <com/sun/star/form/XLoadable.hpp>
-#include <com/sun/star/sdb/XRowSetSupplier.hpp>
-#include <com/sun/star/sdb/XRowSetChangeBroadcaster.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-/** === end UNO includes === **/
-
-#include <comphelper/proparrhlp.hxx>
-#include <cppuhelper/implbase7.hxx>
-#include <tools/link.hxx>
+#include "errorbroadcaster.hxx" +#include "FormComponent.hxx" +#include "formcontrolfont.hxx" +#include "InterfaceContainer.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/form/XGridColumnFactory.hpp> +#include <com/sun/star/form/XLoadable.hpp> +#include <com/sun/star/sdb/XRowSetSupplier.hpp> +#include <com/sun/star/sdb/XRowSetChangeBroadcaster.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> +/** === end UNO includes === **/ + +#include <comphelper/proparrhlp.hxx> +#include <cppuhelper/implbase7.hxx> +#include <tools/link.hxx> //......................................................................... namespace frm @@ -101,6 +101,7 @@ class OGridControlModel :public OControlModel sal_Int16 m_nBorder; sal_Int16 m_nWritingMode; sal_Int16 m_nContextWritingMode; + sal_Bool m_bEnableVisible : 1; sal_Bool m_bEnable : 1; sal_Bool m_bNavigation : 1; sal_Bool m_bRecordMarker : 1; diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 236f64f762a8..abe5b5c45488 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -84,6 +84,7 @@ namespace frm getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder; getPropertyDefaultByHandle( PROPERTY_ID_DELAY ) >>= m_nDelay; getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled; + getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible; getPropertyDefaultByHandle( PROPERTY_ID_SHOW_POSITION ) >>= m_bShowPosition; getPropertyDefaultByHandle( PROPERTY_ID_SHOW_NAVIGATION ) >>= m_bShowNavigation; getPropertyDefaultByHandle( PROPERTY_ID_SHOW_RECORDACTIONS ) >>= m_bShowActions; @@ -107,6 +108,7 @@ namespace frm m_sHelpText = _pOriginal->m_sHelpText; m_sHelpURL = _pOriginal->m_sHelpURL; m_bEnabled = _pOriginal->m_bEnabled; + m_bEnableVisible = _pOriginal->m_bEnableVisible; m_nIconSize = _pOriginal->m_nIconSize; m_nBorder = _pOriginal->m_nBorder; m_nDelay = _pOriginal->m_nDelay; @@ -125,6 +127,7 @@ namespace frm REGISTER_PROP_2( HELPTEXT, m_sHelpText, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT ); + REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( ICONSIZE, m_nIconSize, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( BORDER, m_nBorder, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( DELAY, m_nDelay, BOUND, MAYBEDEFAULT ); @@ -444,6 +447,7 @@ namespace frm break; case PROPERTY_ID_ENABLED: + case PROPERTY_ID_ENABLEVISIBLE: case PROPERTY_ID_SHOW_POSITION: case PROPERTY_ID_SHOW_NAVIGATION: case PROPERTY_ID_SHOW_RECORDACTIONS: diff --git a/forms/source/component/navigationbar.hxx b/forms/source/component/navigationbar.hxx index a1f525e61980..1dd94eff2bbc 100644 --- a/forms/source/component/navigationbar.hxx +++ b/forms/source/component/navigationbar.hxx @@ -70,6 +70,7 @@ namespace frm sal_Int16 m_nBorder; sal_Int32 m_nDelay; sal_Bool m_bEnabled; + sal_Bool m_bEnableVisible; sal_Bool m_bShowPosition; sal_Bool m_bShowNavigation; sal_Bool m_bShowActions; diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx index 1eaee92f8421..bf2d5d4d7446 100644 --- a/forms/source/inc/frm_strings.hxx +++ b/forms/source/inc/frm_strings.hxx @@ -113,6 +113,7 @@ namespace frm FORMS_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle" ); FORMS_CONSTASCII_STRING( PROPERTY_CONTROLSOURCE, "DataField" ); FORMS_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled" ); + FORMS_CONSTASCII_STRING( PROPERTY_ENABLEVISIBLE, "EnableVisible" ); FORMS_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly" ); FORMS_CONSTASCII_STRING( PROPERTY_RELEVANT, "Relevant" ); FORMS_CONSTASCII_STRING( PROPERTY_ISREADONLY, "IsReadOnly" ); diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc index 0a3e3739d31a..df94d1575a5a 100644 --- a/forms/source/inc/property.hrc +++ b/forms/source/inc/property.hrc @@ -206,7 +206,7 @@ namespace frm #define PROPERTY_ID_FILTERPROPOSAL (PROPERTY_ID_START +162) // BOOL #define PROPERTY_ID_FIELDSOURCE (PROPERTY_ID_START +163) // String #define PROPERTY_ID_TABLENAME (PROPERTY_ID_START +164) // String - // FREE +#define PROPERTY_ID_ENABLEVISIBLE (PROPERTY_ID_START +165) // BOOL // FREE // FREE // FREE diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx index 564cd822f145..12cc73e10264 100644 --- a/forms/source/misc/property.cxx +++ b/forms/source/misc/property.cxx @@ -106,6 +106,7 @@ void PropertyInfoService::initialize() ADD_PROP_ASSIGNMENT(CYCLE); ADD_PROP_ASSIGNMENT(CONTROLSOURCE); ADD_PROP_ASSIGNMENT(ENABLED); + ADD_PROP_ASSIGNMENT(ENABLEVISIBLE); ADD_PROP_ASSIGNMENT(SPIN); ADD_PROP_ASSIGNMENT(READONLY); ADD_PROP_ASSIGNMENT(FILTER); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index ca2bf688a92d..d38b350ada32 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -88,6 +88,7 @@ namespace frm getPropertyDefaultByHandle( PROPERTY_ID_DEFAULTCONTROL ) >>= m_sDefaultControl; getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder; getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled; + getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible; getPropertyDefaultByHandle( PROPERTY_ID_HARDLINEBREAKS ) >>= m_bHardLineBreaks; getPropertyDefaultByHandle( PROPERTY_ID_HSCROLL ) >>= m_bHScroll; getPropertyDefaultByHandle( PROPERTY_ID_VSCROLL ) >>= m_bVScroll; @@ -124,6 +125,7 @@ namespace frm m_sHelpURL = _pOriginal->m_sHelpURL; m_nBorder = _pOriginal->m_nBorder; m_bEnabled = _pOriginal->m_bEnabled; + m_bEnableVisible = _pOriginal->m_bEnableVisible; m_bHardLineBreaks = _pOriginal->m_bHardLineBreaks; m_bHScroll = _pOriginal->m_bHScroll; m_bVScroll = _pOriginal->m_bVScroll; @@ -188,6 +190,7 @@ namespace frm REGISTER_PROP_2( HELPTEXT, m_sHelpText, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT ); + REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( BORDER, m_nBorder, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( HARDLINEBREAKS, m_bHardLineBreaks, BOUND, MAYBEDEFAULT ); REGISTER_PROP_2( HSCROLL, m_bHScroll, BOUND, MAYBEDEFAULT ); @@ -456,6 +459,7 @@ namespace frm break; case PROPERTY_ID_ENABLED: + case PROPERTY_ID_ENABLEVISIBLE: case PROPERTY_ID_PRINTABLE: case PROPERTY_ID_HIDEINACTIVESELECTION: aDefault <<= (sal_Bool)sal_True; diff --git a/forms/source/richtext/richtextmodel.hxx b/forms/source/richtext/richtextmodel.hxx index b124f76c4237..5e905e2873ad 100644 --- a/forms/source/richtext/richtextmodel.hxx +++ b/forms/source/richtext/richtextmodel.hxx @@ -83,6 +83,7 @@ namespace frm sal_Int16 m_nContextWritingMode; sal_Int16 m_nBorder; sal_Bool m_bEnabled; + sal_Bool m_bEnableVisible; sal_Bool m_bHardLineBreaks; sal_Bool m_bHScroll; sal_Bool m_bVScroll; diff --git a/forms/util/makefile.mk b/forms/util/makefile.mk index 1e99e6446f47..17f594ba7c4f 100644 --- a/forms/util/makefile.mk +++ b/forms/util/makefile.mk @@ -73,7 +73,7 @@ SHL1STDLIBS= \ $(COMPHELPERLIB) \ $(DBTOOLSLIB) \ $(TKLIB) \ - $(SVXLIB) \ + $(SVXCORELIB) \ $(UCBHELPERLIB) \ $(LIBXML2LIB) \ $(ICUUCLIB) \ diff --git a/package/inc/ImplValidCharacters.hxx b/package/inc/ImplValidCharacters.hxx deleted file mode 100644 index 54c4b9930ec3..000000000000 --- a/package/inc/ImplValidCharacters.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: ImplValidCharacters.hxx,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _IMPL_VALID_CHARACTERS_HXX_ -#define _IMPL_VALID_CHARACTERS_HXX_ - -#include <sal/types.h> - -static sal_Bool Impl_IsValidChar ( const sal_Unicode *pChar, sal_Int16 nLength, sal_Bool bSlashAllowed ) -{ - for ( sal_Int16 i = 0 ; i < nLength ; i++ ) - { - switch ( pChar[i] ) - { - case '\\': - case '?': - case '<': - case '>': - case '\"': - case '|': - case ':': - return sal_False; - case '/': - if ( !bSlashAllowed ) - return sal_False; - break; - default: - if ( pChar[i] < 32 || pChar[i] > 127 ) - return sal_False; - } - } - return sal_True; -} -#endif diff --git a/package/inc/Inflater.hxx b/package/inc/Inflater.hxx index 7520ba672058..7805a9cc84bb 100644 --- a/package/inc/Inflater.hxx +++ b/package/inc/Inflater.hxx @@ -40,7 +40,7 @@ class Inflater { protected: sal_Bool bFinish, bFinished, bSetParams, bNeedDict; - sal_Int32 nOffset, nLength; + sal_Int32 nOffset, nLength, nLastInflateError; z_stream* pStream; com::sun::star::uno::Sequence < sal_Int8 > sInBuffer; sal_Int32 doInflateBytes (com::sun::star::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength); @@ -53,6 +53,8 @@ public: sal_Bool SAL_CALL finished( ); sal_Int32 SAL_CALL doInflateSegment( ::com::sun::star::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ); void SAL_CALL end( ); + + sal_Int32 getLastInflateError() { return nLastInflateError; } }; #endif diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 8b02a6114227..2946c14f98ff 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -743,65 +743,6 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream() return xInputStream; } -//----------------------------------------------- -void OWriteStream_Impl::CopyTempFileToOutput( uno::Reference< io::XOutputStream > xOutStream ) -{ - OSL_ENSURE( xOutStream.is(), "The stream must be specified!\n" ); - OSL_ENSURE( m_aTempURL.getLength() || m_xCacheStream.is(), "The temporary must exist!\n" ); - - uno::Reference< io::XInputStream > xTempInStream; - - if ( m_xCacheStream.is() ) - { - if ( !m_xCacheSeek.is() ) - throw uno::RuntimeException(); - sal_Int64 nPos = m_xCacheSeek->getPosition(); - - try - { - m_xCacheSeek->seek( 0 ); - uno::Reference< io::XInputStream > xTempInp = m_xCacheStream->getInputStream(); - if ( xTempInp.is() ) - ::comphelper::OStorageHelper::CopyInputToOutput( xTempInStream, xOutStream ); - } - catch( uno::Exception& aException ) - { - AddLog( aException.Message ); - AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Quiet exception" ) ) ); - - m_xCacheSeek->seek( nPos ); - throw io::IOException(); //TODO: - } - - m_xCacheSeek->seek( nPos ); - } - else if ( m_aTempURL.getLength() ) - { - uno::Reference < ucb::XSimpleFileAccess > xTempAccess( - GetServiceFactory()->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), - uno::UNO_QUERY ); - - if ( !xTempAccess.is() ) - throw uno::RuntimeException(); // TODO: - - try - { - xTempInStream = xTempAccess->openFileRead( m_aTempURL ); - } - catch( uno::Exception& aException ) - { - AddLog( aException.Message ); - AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Quiet exception" ) ) ); - } - - if ( !xTempInStream.is() ) - throw io::IOException(); //TODO: - - ::comphelper::OStorageHelper::CopyInputToOutput( xTempInStream, xOutStream ); - } -} - // ================================================================================================= //----------------------------------------------- diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index 107ffd8f0ba8..9e4c00d5a45d 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -161,8 +161,6 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetTempFileAsStream(); ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetTempFileAsInputStream(); - void CopyTempFileToOutput( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutStream ); - ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream_Impl( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess ); diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx index 178767b06cdc..62228bf22c8e 100644 --- a/package/source/zipapi/Inflater.cxx +++ b/package/source/zipapi/Inflater.cxx @@ -45,12 +45,12 @@ using namespace com::sun::star::uno; /** Provides general purpose decompression using the ZLIB library */ Inflater::Inflater(sal_Bool bNoWrap) -: bFinish(sal_False), - bFinished(sal_False), +: bFinished(sal_False), bSetParams(sal_False), bNeedDict(sal_False), nOffset(0), nLength(0), + nLastInflateError(0), pStream(NULL) { pStream = new z_stream; @@ -120,16 +120,23 @@ void SAL_CALL Inflater::end( ) sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength) { - sal_Int32 nResult; + if ( !pStream ) + { + nLastInflateError = Z_STREAM_ERROR; + return 0; + } + + nLastInflateError = 0; + pStream->next_in = ( unsigned char* ) ( sInBuffer.getConstArray() + nOffset ); pStream->avail_in = nLength; pStream->next_out = reinterpret_cast < unsigned char* > ( rBuffer.getArray() + nNewOffset ); pStream->avail_out = nNewLength; #ifdef SYSTEM_ZLIB - nResult = ::inflate(pStream, bFinish ? Z_SYNC_FLUSH : Z_PARTIAL_FLUSH); + sal_Int32 nResult = ::inflate(pStream, Z_PARTIAL_FLUSH); #else - nResult = ::z_inflate(pStream, bFinish ? Z_SYNC_FLUSH : Z_PARTIAL_FLUSH); + sal_Int32 nResult = ::z_inflate(pStream, Z_PARTIAL_FLUSH); #endif switch (nResult) @@ -140,15 +147,19 @@ sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 n nOffset += nLength - pStream->avail_in; nLength = pStream->avail_in; return nNewLength - pStream->avail_out; + case Z_NEED_DICT: bNeedDict = sal_True; nOffset += nLength - pStream->avail_in; nLength = pStream->avail_in; - case Z_BUF_ERROR: - return 0; - case Z_DATA_ERROR: return 0; + + default: + // it is no error, if there is no input or no output + if ( nLength && nNewLength ) + nLastInflateError = nResult; } + return 0; } diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index cb99c085bc28..1eba064a2165 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -230,7 +230,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa OUString( RTL_CONSTASCII_USTRINGPARAM( "Should not be possible to read more then requested!" ) ), Reference< XInterface >() ); - if ( maInflater.finished() ) + if ( maInflater.finished() || maInflater.getLastInflateError() ) throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ), Reference< XInterface >() ); @@ -244,6 +244,10 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa mxZipSeek->seek ( mnZipCurrent ); sal_Int32 nToRead = std::min ( nDiff, std::max ( nRequestedBytes, static_cast< sal_Int32 >( 8192 ) ) ); sal_Int32 nZipRead = mxZipStream->readBytes ( maCompBuffer, nToRead ); + if ( nZipRead < nToRead ) + throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "No expected data!" ) ), + Reference< XInterface >() ); + mnZipCurrent += nZipRead; // maCompBuffer now has the data, check if we need to decrypt // before passing to the Inflater diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 8954db47d63c..65e8369e9095 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -37,9 +37,7 @@ #include <PackageConstants.hxx> #include <ZipEntry.hxx> #include <ZipFile.hxx> -#ifndef _VOS_REF_H_ #include <vos/ref.hxx> -#endif #include <com/sun/star/io/XOutputStream.hpp> #include <comphelper/storagehelper.hxx> diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx index 51bcfa697213..78fbb7423aa7 100644 --- a/package/source/zippackage/ZipPackageEntry.cxx +++ b/package/source/zippackage/ZipPackageEntry.cxx @@ -31,10 +31,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_package.hxx" #include <ZipPackageEntry.hxx> -#ifndef _COM_SUN_STAR_PACKAGE_ZIP_ZIPCONSTANTS_HPP_ #include <com/sun/star/packages/zip/ZipConstants.hpp> -#endif -#include <vos/diagnose.hxx> +#include <osl/diagnose.h> #include <ZipPackageFolder.hxx> #include <ZipPackageStream.hxx> diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst index 4a6504388f53..1215d7a69223 100644 --- a/setup_native/prj/build.lst +++ b/setup_native/prj/build.lst @@ -2,8 +2,10 @@ pk setup_native : soltools xml2cmp sal unoil officecfg NULL pk setup_native usr1 - all sn_mkout NULL pk setup_native\scripts\source nmake - u sn_source NULL pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL +pk setup_native\source\mac nmake - u sn_mac NULL pk setup_native\source\win32\customactions\tools nmake - w sn_tools NULL pk setup_native\source\win32\customactions\relnotes nmake - w sn_relnotes NULL +pk setup_native\source\win32\customactions\rebase nmake - w sn_rebase NULL pk setup_native\source\win32\customactions\regactivex nmake - w sn_regactivex NULL pk setup_native\source\win32\customactions\regpatchactivex nmake - w sn_regpatchactivex NULL pk setup_native\source\win32\customactions\reg4allmsdoc nmake - w sn_reg4allmsdoc NULL diff --git a/setup_native/prj/d.lst b/setup_native/prj/d.lst index a5df50320a73..3be9984f8728 100644 --- a/setup_native/prj/d.lst +++ b/setup_native/prj/d.lst @@ -19,6 +19,7 @@ mkdir: %_DEST%\bin%_EXT%\userscripts ..\%__SRC%\bin\javaloader.sh %_DEST%\bin%_EXT%\javaloader.sh ..\%__SRC%\bin\stclient_wrapper.sh %_DEST%\bin%_EXT%\stclient_wrapper ..\%__SRC%\bin\stclient_wrapper.exe %_DEST%\bin%_EXT%\stclient_wrapper.exe +..\%__SRC%\misc\mac_ulffiles_dest\*.ulf %_DEST%\bin%_EXT%\*.ulf ..\source\win32\msi-encodinglist.txt %_DEST%\bin%_EXT%\msi-encodinglist.txt ..\source\win32\patchlist.txt %_DEST%\bin%_EXT%\patchlist.txt ..\source\win32\desktophelper.txt %_DEST%\bin%_EXT%\desktophelper.txt @@ -27,6 +28,8 @@ mkdir: %_DEST%\bin%_EXT%\userscripts ..\source\win32\nsis\*.ico %_DEST%\bin%_EXT%\*.ico ..\source\win32\nsis\*.bmp %_DEST%\bin%_EXT%\*.bmp ..\source\linux\*.dat %_DEST%\bin%_EXT%\*.dat +..\source\mac\*.icns %_DEST%\bin%_EXT%\*.icns +..\source\mac\Info.plist.langpack %_DEST%\bin%_EXT%\Info.plist.langpack ..\source\java\openofficeorg_setup.gif %_DEST%\bin%_EXT%\osl\Setup.gif ..\source\java\javaversion.dat %_DEST%\bin%_EXT%\javaversion.dat ..\source\java\javaversion2.dat %_DEST%\bin%_EXT%\javaversion2.dat @@ -35,6 +38,9 @@ mkdir: %_DEST%\bin%_EXT%\userscripts ..\source\packinfo\*.pcp %_DEST%\bin%_EXT%\*.pcp ..\scripts\admin.pl %_DEST%\bin%_EXT%\admin.pl ..\scripts\*.txt %_DEST%\bin%_EXT%\*.txt +..\scripts\mac_install.script %_DEST%\bin%_EXT%\mac_install.script +..\scripts\osx_install_languagepack.applescript %_DEST%\bin%_EXT%\osx_install_languagepack.applescript +..\scripts\osx_install_patch.applescript %_DEST%\bin%_EXT%\osx_install_patch.applescript ..\%__SRC%\lib\getuid.so %_DEST%\bin%_EXT%\getuid.so diff --git a/setup_native/scripts/mac_install.script b/setup_native/scripts/mac_install.script new file mode 100644 index 000000000000..2b34da1b04ed --- /dev/null +++ b/setup_native/scripts/mac_install.script @@ -0,0 +1,10 @@ +#!/bin/bash + +# shell script as a workaraound since it is hard to impossible to store compiled +# applescript in CVS and running osacompile would require a GUI session while +# building (or root privileges) +# using osascript only works when the shell script is camouflaged as application + +MY_DIR=$(dirname "$0") + +osascript "$MY_DIR/osx_install.applescript" diff --git a/setup_native/scripts/osx_install_languagepack.applescript b/setup_native/scripts/osx_install_languagepack.applescript new file mode 100644 index 000000000000..33d376adec1b --- /dev/null +++ b/setup_native/scripts/osx_install_languagepack.applescript @@ -0,0 +1,115 @@ +(* +This script is meant to + 1) Identify installed instances of the product + 2) check whether the user has write-access (and if not + ask for authentification) + 3) install the shipped tarball +*) + +-- strings for localisations - to be meant to be replaced +-- by a makefile or similar +set OKLabel to "[OKLabel]" +set InstallLabel to "[InstallLabel]" +set AbortLabel to "[AbortLabel]" +set intro to "[IntroText1] + +[IntroText2] + +[IntroText3]" +set chooseMyOwn to "[ChooseMyOwnText]" +set listPrompt to "[ListPromptText]" +set chooseManual to "[ChooseManualText]" +set listOKLabel to "[ListOKLabelText]" +set listCancelLabel to "[ListCancelLabel]" +set appInvalid to "[AppInvalidText1] + +[AppInvalidText2]" -- string will begin with the chosen application's name +set startInstall to "[StartInstallText1] + +[StartInstallText2]" +set IdentifyQ to "[IdentifyQText] + +[IdentifyQText2]" +set IdentifyYES to "[IdentifyYES]" +set IdentifyNO to "[IdentifyNO]" +set installFailed to "[InstallFailedText]" +set installComplete to "[InstallCompleteText] + +[InstallCompleteText2]" + +set sourcedir to (do shell script "dirname " & quoted form of POSIX path of (path to of me)) + +display dialog intro buttons {AbortLabel, InstallLabel} default button 2 + +if (button returned of result) is AbortLabel then + return 2 +end if + +set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLPRODUCTNAME].app'\"") & " +" & chooseMyOwn + +-- the choice returned is of type "list" +-- Show selection dialog only if more than one or no product was found +if (get first paragraph of found_ooos) is "" then + set the choice to (choose from list of paragraphs in found_ooos default items (get last paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + if choice is false then + -- do nothing, the user cancelled the installation + return 2 --aborted by user + else if (choice as string) is chooseMyOwn then + -- yeah, one needs to use "choose file", otherwise + -- the user would not be able to select the .app + set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) + end if +else if (get second paragraph of found_ooos) is chooseMyOwn then + -- set choice to found installation + set the choice to (get first paragraph of found_ooos) +else + set the choice to (choose from list of paragraphs in found_ooos default items (get first paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + if choice is false then + -- do nothing, the user cancelled the installation + return 2 --aborted by user + else if (choice as string) is chooseMyOwn then + -- yeah, one needs to use "choose file", otherwise + -- the user would not be able to select the .app + set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) + end if +end if + +-- now only check whether the path is really from [PRODUCTNAME] +try + do shell script "grep '<string>[PRODUCTNAME] [PRODUCTVERSION]' " & quoted form of (choice as string) & "/Contents/Info.plist" +on error + display dialog (choice as string) & appInvalid buttons {InstallLabel} default button 1 with icon 0 + return 3 --wrong target-directory +end try + +(* +display dialog startInstall buttons {AbortLabel, InstallLabel} default button 2 + +if (button returned of result) is AbortLabel then + return 2 +end if +*) + +set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " -xjf " & quoted form of sourcedir & "/tarball.tar.bz2" +try + do shell script tarCommand + +on error errMSG number errNUM + display dialog IdentifyQ buttons {IdentifyYES, IdentifyNO} with icon 2 + if (button returned of result) is IdentifyYES then + try + do shell script tarCommand with administrator privileges + on error errMSG number errNUM + display dialog installFailed buttons {OKLabel} default button 1 with icon 0 + -- -60005 username/password wrong + -- -128 aborted by user + -- 2 error from tar - tarball not found (easy to test) + return errNUM + end try + else + return 2 -- aborted by user + end if +end try + +display dialog installComplete buttons {OKLabel} default button 1 diff --git a/setup_native/scripts/osx_install_patch.applescript b/setup_native/scripts/osx_install_patch.applescript new file mode 100644 index 000000000000..33a9d4126339 --- /dev/null +++ b/setup_native/scripts/osx_install_patch.applescript @@ -0,0 +1,113 @@ +(* +This script is meant to + 1) Identify installed instances of the product + 2) check whether the user has write-access (and if not + ask for authentification) + 3) install the shipped tarball +*) + +-- strings for localisations - to be meant to be replaced +-- by a makefile or similar +set OKLabel to "[OKLabel]" +set InstallLabel to "[InstallLabel]" +set AbortLabel to "[AbortLabel]" +set intro to "[IntroText1] + +[IntroText2] + +[IntroText3]" +set chooseMyOwn to "[ChooseMyOwnText]" +set listPrompt to "[ListPromptText]" +set chooseManual to "[ChooseManualText]" +set listOKLabel to "[ListOKLabelText]" +set listCancelLabel to "[ListCancelLabel]" +set appInvalid to "[AppInvalidText1] + +[AppInvalidText2]" -- string will begin with the chosen application's name +set startInstall to "[StartInstallText1] + +[StartInstallText2]" +set IdentifyQ to "[IdentifyQText] + +[IdentifyQText2]" +set IdentifyYES to "[IdentifyYES]" +set IdentifyNO to "[IdentifyNO]" +set installFailed to "[InstallFailedText]" +set installComplete to "[InstallCompleteTextPatch]" + +set sourcedir to (do shell script "dirname " & quoted form of POSIX path of (path to of me)) + +display dialog intro buttons {AbortLabel, InstallLabel} default button 2 + +if (button returned of result) is AbortLabel then + return 2 +end if + +set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLPRODUCTNAME].app'\"") & " +" & chooseMyOwn + +-- the choice returned is of type "list" +-- Show selection dialog only if more than one or no product was found +if (get first paragraph of found_ooos) is "" then + set the choice to (choose from list of paragraphs in found_ooos default items (get last paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + if choice is false then + -- do nothing, the user cancelled the installation + return 2 --aborted by user + else if (choice as string) is chooseMyOwn then + -- yeah, one needs to use "choose file", otherwise + -- the user would not be able to select the .app + set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) + end if +else if (get second paragraph of found_ooos) is chooseMyOwn then + -- set choice to found installation + set the choice to (get first paragraph of found_ooos) +else + set the choice to (choose from list of paragraphs in found_ooos default items (get first paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + if choice is false then + -- do nothing, the user cancelled the installation + return 2 --aborted by user + else if (choice as string) is chooseMyOwn then + -- yeah, one needs to use "choose file", otherwise + -- the user would not be able to select the .app + set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) + end if +end if + +-- now only check whether the path is really from [PRODUCTNAME] +try + do shell script "grep '<string>[PRODUCTNAME] [PRODUCTVERSION]' " & quoted form of (choice as string) & "/Contents/Info.plist" +on error + display dialog (choice as string) & appInvalid buttons {InstallLabel} default button 1 with icon 0 + return 3 --wrong target-directory +end try + +(* +display dialog startInstall buttons {AbortLabel, InstallLabel} default button 2 + +if (button returned of result) is AbortLabel then + return 2 +end if +*) + +set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " -xjf " & quoted form of sourcedir & "/tarball.tar.bz2" +try + do shell script tarCommand + +on error errMSG number errNUM + display dialog IdentifyQ buttons {IdentifyYES, IdentifyNO} with icon 2 + if (button returned of result) is IdentifyYES then + try + do shell script tarCommand with administrator privileges + on error errMSG number errNUM + display dialog installFailed buttons {OKLabel} default button 1 with icon 0 + -- -60005 username/password wrong + -- -128 aborted by user + -- 2 error from tar - tarball not found (easy to test) + return errNUM + end try + else + return 2 -- aborted by user + end if +end try + +display dialog installComplete buttons {OKLabel} default button 1 diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c index 926c2b809af2..9af63f4f079d 100644 --- a/setup_native/scripts/source/getuid.c +++ b/setup_native/scripts/source/getuid.c @@ -88,13 +88,29 @@ int fstatat64(int fildes, const char *path, struct stat64 *buf, int flag) return ret; } - -#elif defined LINUX +#elif defined LINUX uid_t getuid (void) {return 0;} uid_t geteuid (void) {return 0;} /* This is to fool tar */ +#ifdef X86_64 +int __lxstat(int n, const char *path, struct stat *buf) +{ + int ret = 0; + static int (*p_lstat) (int n, const char *path, struct stat *buf) = NULL; + if (p_lstat == NULL) + p_lstat = (int (*)(int n, const char *path, struct stat *buf)) + dlsym (RTLD_NEXT, "__lxstat"); + ret = (*p_lstat)(n, path, buf); + if (buf != NULL) + { + buf->st_uid = 0; /* root */ + buf->st_gid = 0; /* root */ + } + return ret; +} +#else int __lxstat64(int n, const char *path, struct stat64 *buf) { int ret = 0; @@ -105,13 +121,12 @@ int __lxstat64(int n, const char *path, struct stat64 *buf) ret = (*p_lstat)(n, path, buf); if (buf != NULL) { - buf->st_uid = 0; /* root */ - buf->st_gid = 0; /* root */ + buf->st_uid = 0; + buf->st_gid = 0; } - return ret; } - +#endif #endif #ifdef _cplusplus diff --git a/setup_native/source/java/javaversion2.dat b/setup_native/source/java/javaversion2.dat index 120bed23d7bf..87172c3a6495 100644 --- a/setup_native/source/java/javaversion2.dat +++ b/setup_native/source/java/javaversion2.dat @@ -30,30 +30,30 @@ #************************************************************************* # GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})") -JAVAVERSION=Java 6 Update 13 -WINDOWSJAVAVERSION=Java 6 Update 13 +JAVAVERSION=Java 6 Update 16 +WINDOWSJAVAVERSION=Java 6 Update 16 # Windows (scp2 and downloadtemplate.nsi) -WINDOWSJAVAFILENAME=jre-6u13-windows-i586-p.exe -WINDOWSJAVAREGISTRYENTRY=1.6.0_13 +WINDOWSJAVAFILENAME=jre-6u16-windows-i586.exe +WINDOWSJAVAREGISTRYENTRY=1.6.0_16 # Linux (scp2) -LINUXJAVAFILENAME=jre-6u13-linux-i586.rpm +LINUXJAVAFILENAME=jre-6u16-linux-i586.rpm # Linux (rpmUnit.xml, rpm -qp <filename> ) -LINUXJAVANAME=jre-1.6.0_13-fcs +LINUXJAVANAME=jre-1.6.0_16-fcs # Linux-x64 (scp2) -LINUXX64JAVAFILENAME=jre-6u13-linux-amd64.rpm +LINUXX64JAVAFILENAME=jre-6u16-linux-amd64.rpm # Solaris Sparc (scp2) -SOLSJAVARTPACKED=SUNWj6rt_1_6_0_13_sparc.tar.gz -SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_13_sparc.tar.gz -SOLSJAVAMANPACKED=SUNWj6man_1_6_0_13_sparc.tar.gz +SOLSJAVARTPACKED=SUNWj6rt_1_6_0_16_sparc.tar.gz +SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_16_sparc.tar.gz +SOLSJAVAMANPACKED=SUNWj6man_1_6_0_16_sparc.tar.gz # Solaris x86 (scp2) -SOLIJAVARTPACKED=SUNWj6rt_1_6_0_13_x86.tar.gz -SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_13_x86.tar.gz -SOLIJAVAMANPACKED=SUNWj6man_1_6_0_13_x86.tar.gz +SOLIJAVARTPACKED=SUNWj6rt_1_6_0_16_x86.tar.gz +SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_16_x86.tar.gz +SOLIJAVAMANPACKED=SUNWj6man_1_6_0_16_x86.tar.gz # Solaris (pkgUnit.xml, needs only to be changed in major changes) SOLARISJAVART=SUNWj6rt diff --git a/setup_native/source/mac/Info.plist.langpack b/setup_native/source/mac/Info.plist.langpack new file mode 100644 index 000000000000..3c1eb2c6f369 --- /dev/null +++ b/setup_native/source/mac/Info.plist.langpack @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <!-- UTI declarations for OS X >= 10.4 --> + <key>UTExportedTypeDeclarations</key> + + <key>UTImportedTypeDeclarations</key> + + <key>CFBundleExecutable</key> + <string>[FULLPRODUCTNAME]</string> + <key>CFBundleGetInfoString</key> + <string>[FULLPRODUCTNAME]</string> + <key>CFBundleIconFile</key> + <string>ooo3_installer.icns</string> + <key>CFBundleShortVersionString</key> + <string>9</string> + <key>CFBundleIdentifier</key> + <string>org.openoffice.script</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>[FULLPRODUCTNAME]</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>OOo3</string> + <key>LSRequiresCarbon</key> + <string>1</string> + <key>NSPrincipalClass</key> + <string>VCL_NSApplication</string> +</dict> +</plist> + diff --git a/setup_native/source/mac/macinstall.ulf b/setup_native/source/mac/macinstall.ulf new file mode 100644 index 000000000000..4651d93e03ab --- /dev/null +++ b/setup_native/source/mac/macinstall.ulf @@ -0,0 +1,68 @@ +[OKLabel] +en-US = "Ok" + +[InstallLabel] +en-US = "Install" + +[AbortLabel] +en-US = "Abort" + +[IntroText1] +en-US = "Welcome to the [FULLPRODUCTNAME] Installation Wizard" + +[IntroText2] +en-US = "This installation will update your installed versions of [PRODUCTNAME]" + +[IntroText3] +en-US = "This might take a moment." + +[ChooseMyOwnText] +en-US = "Not listed (choose location in an extra step)" + +[ListPromptText] +en-US = "Choose [PRODUCTNAME] [PRODUCTVERSION] installation for which you want to install the [FULLPRODUCTNAME]" + +[ChooseManualText] +en-US = "Point the dialog to your [PRODUCTNAME] [PRODUCTVERSION] installation." + +[ListOKLabelText] +en-US = "Install" + +[ListCancelLabel] +en-US = "Abort" + +[AppInvalidText1] +en-US = "This is not a valid [PRODUCTNAME] [PRODUCTVERSION] installation." + +[AppInvalidText2] +en-US = "Run the installer again and choose a valid [PRODUCTNAME] [PRODUCTVERSION] installation" + +[StartInstallText1] +en-US = "Click Install to start the installation" + +[StartInstallText2] +en-US = "Installation might take a minute..." + +[IdentifyQText] +en-US = "Installation failed, most likely your account does not have the necessary privileges." + +[IdentifyQText2] +en-US = "Do you want to identify as administrator and try again?" + +[IdentifyYES] +en-US = "Yes, identify" + +[IdentifyNO] +en-US = "No, abort installation" + +[InstallFailedText] +en-US = "Installation failed." + +[InstallCompleteText] +en-US = "Installation of [PRODUCTNAME] language pack completed." + +[InstallCompleteText2] +en-US = "Call 'Tools-Options-Language Settings' to change the user interface language." + +[InstallCompleteTextPatch] +en-US = "Installation of [FULLPRODUCTNAME] completed" diff --git a/setup_native/source/mac/makefile.mk b/setup_native/source/mac/makefile.mk new file mode 100644 index 000000000000..026073b65c44 --- /dev/null +++ b/setup_native/source/mac/makefile.mk @@ -0,0 +1,65 @@ +#************************************************************************* +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.5 $ +# +# last change: $Author: rt $ $Date: 2005-09-07 18:20:20 $ +# +# The Contents of this file are made available subject to +# the terms of GNU Lesser General Public License Version 2.1. +# +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2005 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +#************************************************************************* + +PRJ=..$/.. + +PRJNAME=setup_native +TARGET=mac_ulffiles + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# ------------------------------------------------------------------ + +ULFFILES = macinstall.ulf + +ULFDESTFILES=$(foreach,i,$(ULFFILES) $(MISC)$/$(TARGET)_dest$/$i) + +# --- Targets ------------------------------------------------------ + +.IF "$(OS)"=="MACOSX" +ALLTAR : $(ULFDESTFILES) +.ENDIF + +.INCLUDE : target.mk + +.IF "$(WITH_LANG)"!="" +$(MISC)$/$(TARGET)_dest$/%.ulf : $(COMMONMISC)$/$(TARGET)$/%.ulf +.ELSE # "$(WITH_LANG)"!="" +$(MISC)$/$(TARGET)_dest$/%.ulf : %.ulf +.ENDIF # "$(WITH_LANG)"!="" + @-$(MKDIRHIER) $(MISC)$/$(TARGET)_dest + $(COPY) $< $@ diff --git a/setup_native/source/mac/ooo3_installer.icns b/setup_native/source/mac/ooo3_installer.icns Binary files differnew file mode 100644 index 000000000000..e064ad70479d --- /dev/null +++ b/setup_native/source/mac/ooo3_installer.icns diff --git a/setup_native/source/packinfo/package_names_ext.txt b/setup_native/source/packinfo/package_names_ext.txt index b10c2cb85448..18e167948cb2 100644 --- a/setup_native/source/packinfo/package_names_ext.txt +++ b/setup_native/source/packinfo/package_names_ext.txt @@ -8,10 +8,14 @@ SUNWfreetype2 FreeType2 font library SUNWgnome-base-libs GNOME base GUI libraries - platform dependent files, /usr filesystem SUNWgnome-config GNOME configuration framework - platform dependent files, /usr filesystem SUNWgnome-vfs GNOME Virtual File System Framework and application/MIME type registry - platform dependent files, /usr filesystem +SUNWgzip The GNU Zip (gzip) compression utility +SUNWmfrun Motif RunTime Kit SUNWkvm Core Architecture, (Kvm) SUNWlibC Sun Workshop Compilers Bundled libC +SUNWPython The Python interpreter, libraries and utilities SUNWxwplt X Window System platform software SUNWxwrtl X Window System & Graphics Runtime Library Links in /usr/lib +SUNWzlibr The Zip compression library (Root) SUNWbtool CCS tools bundled with SunOS SUNWxcu4 XCU4 Utilities diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt index 0bea0106c6b8..cd0885b2184f 100755 --- a/setup_native/source/packinfo/packinfo_office.txt +++ b/setup_native/source/packinfo/packinfo_office.txt @@ -162,7 +162,7 @@ End Start module = "gid_Module_Optional_Binfilter" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-binfilter" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-binfilter" freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" @@ -177,7 +177,7 @@ End Start module = "gid_Module_Optional_Grfflt" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-graphicfilter" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-graphicfilter" freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" @@ -192,7 +192,7 @@ End Start module = "gid_Module_Oooimprovement" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-oooimprovement" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05,SUNWmfrun" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-oooimprovement" freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" @@ -207,7 +207,7 @@ End Start module = "gid_Module_Optional_Testtool" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-testtool" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05,SUNWmfrun" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-testtool" freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" @@ -282,7 +282,7 @@ End Start module = "gid_Module_Optional_Onlineupdate" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-onlineupdate" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, SUNWlibC" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, SUNWlibC, SUNWgzip" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-onlineupdate" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" copyright = "1999-2005 by Sun Microsystems" @@ -296,7 +296,7 @@ End Start module = "gid_Module_Optional_Pyuno" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-pyuno" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, SUNWPython" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-pyuno" freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" @@ -371,7 +371,7 @@ End Start module = "gid_Module_Oo_Linguistic" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-ooolinguistic" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-ooolinguistic" freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" @@ -387,7 +387,7 @@ Start module = "gid_Module_Root_Files_2" script = "shellscripts_module.txt" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02" -solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, SUNWlibC" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, SUNWlibC, SUNWmfrun" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core02" requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01" freebsdrequires = "" diff --git a/setup_native/source/packinfo/packinfo_office_lang.txt b/setup_native/source/packinfo/packinfo_office_lang.txt index b3e193265280..8f3f6dddefbd 100755 --- a/setup_native/source/packinfo/packinfo_office_lang.txt +++ b/setup_native/source/packinfo/packinfo_office_lang.txt @@ -29,6 +29,7 @@ vendor = "OpenOffice.org" description = "Language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" End Start @@ -44,6 +45,7 @@ vendor = "OpenOffice.org" description = "Language fonts module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" End Start @@ -59,6 +61,7 @@ vendor = "OpenOffice.org" description = "Language resource module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" End Start @@ -74,6 +77,7 @@ vendor = "OpenOffice.org" description = "Language help module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01" End Start @@ -89,6 +93,7 @@ vendor = "OpenOffice.org" description = "Writer language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-writer" End Start @@ -104,6 +109,7 @@ vendor = "OpenOffice.org" description = "Calc language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-calc" End Start @@ -119,6 +125,7 @@ vendor = "OpenOffice.org" description = "Impress language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-impress" End Start @@ -134,6 +141,7 @@ vendor = "OpenOffice.org" description = "Draw language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-draw" End Start @@ -149,6 +157,7 @@ vendor = "OpenOffice.org" description = "Math language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-math" End Start @@ -164,6 +173,7 @@ vendor = "OpenOffice.org" description = "Base language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-base" End Start @@ -179,6 +189,7 @@ vendor = "OpenOffice.org" description = "Legacy filters (e.g. StarOffice 5.2) for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-binfilter" End Start @@ -194,4 +205,5 @@ vendor = "OpenOffice.org" description = "Online update language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING" destpath = "/opt" packageversion = "%OOOPACKAGEVERSION" +pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-onlineupdate" End diff --git a/setup_native/source/packinfo/packinfo_ure.txt b/setup_native/source/packinfo/packinfo_ure.txt index 5f5801742ae1..425243e9bfd7 100755 --- a/setup_native/source/packinfo/packinfo_ure.txt +++ b/setup_native/source/packinfo/packinfo_ure.txt @@ -32,6 +32,7 @@ Start module = "gid_Module_Root" solarispackagename = "%SOLSUREPACKAGEPREFIX-ure" +solarisrequires = "SUNWzlibr" packagename = "%UREPACKAGEPREFIX-ure" copyright = "2005-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" @@ -44,6 +45,7 @@ End Start module = "gid_Module_Root_Ure_Hidden" solarispackagename = "%SOLSUREPACKAGEPREFIX-ure" +solarisrequires = "SUNWzlibr" packagename = "%UREPACKAGEPREFIX-ure" copyright = "2005-2009 by OpenOffice.org" solariscopyright = "solariscopyrightfile" diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt index f756869510fe..2d9056b6b153 100755 --- a/setup_native/source/packinfo/shellscripts_extensions.txt +++ b/setup_native/source/packinfo/shellscripts_extensions.txt @@ -22,20 +22,32 @@ else mkdir "$$INSTDIR" fi +# +# Need to check diskless service install and make sure use the correct unpkg +# +DISKLESS_SRVC=`echo $$BASEDIR | /usr/bin/grep export/Solaris_[1-9][0-9]/usr_$${ARCH}.all` +if [ "$$DISKLESS_SRVC" ]; then + UNOPKG=/export/Solaris_11/usr_`uname -p`.all/opt/staroffice9/program/unopkg + POSTRUN=$$PKG_INSTALL_ROOT/usr_`uname -p`.all/usr/lib/postrun + CLIENT_BASEDIR=$$PKG_INSTALL_ROOT/usr_$${ARCH}.all +else + UNOPKG=$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg + POSTRUN=$$PKG_INSTALL_ROOT/usr/lib/postrun +fi # Use postrun command on Solaris where available (OpenSolaris) -if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then +if [ -x $$POSTRUN ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "umask 022" echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" add --shared --bundled \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" -) | $$PKG_INSTALL_ROOT/usr/lib/postrun -b -c UNOPKG +) | $$POSTRUN -b -c UNOPKG if [ "$$?" != "0" ]; then echo "\nERROR: Installation of UNO extension ${OXTFILENAME}" - echo " through $$PKG_INSTALL_ROOT/usr/lib/postrun failed." + echo " through $$POSTRUN failed." exit 1 fi else # No postrun available, try running unopkg directly - "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" add --shared --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$UNOPKG" add --shared --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' if [ "$$?" != "0" ]; then echo "\nERROR: Installation of UNO extension ${OXTFILENAME} failed." test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root install requires SUNWpostrun package to be installed" @@ -48,7 +60,7 @@ if [ -n "$$INSTDIR" ]; then rm -rf "$$INSTDIR" fi -exit 0 +exit 0 END %preremove << END @@ -79,7 +91,7 @@ if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then echo "umask 022" echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" remove --shared --bundled \"${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" echo "rm -rf \"$$INSTDIR\"" -) | $$PKG_INSTALL_ROOT/usr/lib/postrun -b -c UNOPKG +) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG else # No postrun available, try running unopkg directly test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0 diff --git a/setup_native/source/win32/customactions/indexingfilter/makefile.mk b/setup_native/source/win32/customactions/indexingfilter/makefile.mk index ae7fc33a524f..7f8df5bad93a 100644 --- a/setup_native/source/win32/customactions/indexingfilter/makefile.mk +++ b/setup_native/source/win32/customactions/indexingfilter/makefile.mk @@ -39,7 +39,6 @@ ENABLE_EXCEPTIONS=TRUE DYNAMIC_CRT= NO_DEFAULT_STL=TRUE USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/javafilter/makefile.mk b/setup_native/source/win32/customactions/javafilter/makefile.mk index 0c71f1268bd8..fc9cd828dfcc 100644 --- a/setup_native/source/win32/customactions/javafilter/makefile.mk +++ b/setup_native/source/win32/customactions/javafilter/makefile.mk @@ -39,7 +39,6 @@ TARGET=jfregca NO_DEFAULT_STL=TRUE ENABLE_EXCEPTIONS=TRUE DYNAMIC_CRT= -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk index 5246b4717fd5..76906308a676 100644 --- a/setup_native/source/win32/customactions/languagepacks/makefile.mk +++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk @@ -40,7 +40,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/patch/makefile.mk b/setup_native/source/win32/customactions/patch/makefile.mk index 996b4fc38e5d..2f3b952aeb2c 100755 --- a/setup_native/source/win32/customactions/patch/makefile.mk +++ b/setup_native/source/win32/customactions/patch/makefile.mk @@ -39,7 +39,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/quickstarter/makefile.mk b/setup_native/source/win32/customactions/quickstarter/makefile.mk index 44ce1a2b1acf..4d56f45adeca 100644 --- a/setup_native/source/win32/customactions/quickstarter/makefile.mk +++ b/setup_native/source/win32/customactions/quickstarter/makefile.mk @@ -42,7 +42,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/rebase/makefile.mk b/setup_native/source/win32/customactions/rebase/makefile.mk new file mode 100644 index 000000000000..6694c8cde6cc --- /dev/null +++ b/setup_native/source/win32/customactions/rebase/makefile.mk @@ -0,0 +1,94 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.7 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/..$/.. +PRJNAME=setup_native +TARGET=rebase + +# --- Settings ----------------------------------------------------- + +LIBTARGET=NO +ENABLE_EXCEPTIONS=TRUE +NO_DEFAULT_STL=TRUE +DYNAMIC_CRT= +USE_DEFFILE=TRUE +MINGW_NODLL=YES + +.INCLUDE : settings.mk + +.IF "$(USE_SYSTEM_STL)" != "YES" +CFLAGS+=-D_STLP_USE_STATIC_LIB +.ENDIF + +UWINAPILIB= + +# --- Files -------------------------------------------------------- + +.IF "$(GUI)"=="WNT" + +STDSHL += \ + $(ADVAPI32LIB)\ + $(SHELL32LIB)\ + $(MSILIB) + +.IF "$(USE_SYSTEM_STL)" != "YES" +STDSHL += $(LIBSTLPORTST) +.ENDIF + +.IF "$(COM)"=="GCC" +STDSHL+= \ + $(KERNEL32LIB)\ + -lmsvcrt \ + $(PSDK_HOME)$/lib$/imagehlp.lib +.ELSE +STDSHL+= \ + Imagehlp.lib +.ENDIF + +SHL1OBJS = \ + $(SLO)$/rebase.obj + +SHL1TARGET = $(TARGET) +SHL1IMPLIB = i$(TARGET) + +SHL1DEF = $(MISC)$/$(SHL1TARGET).def +SHL1BASE = 0x1c000000 +DEF1NAME=$(SHL1TARGET) +SHL1DEPN=$(SHL1OBJS) +DEF1EXPORTFILE=$(TARGET).dxp + +.ENDIF + +# --- Targets -------------------------------------------------------------- + +.INCLUDE : target.mk + +# ------------------------------------------------------------------------- diff --git a/setup_native/source/win32/customactions/rebase/rebase.cxx b/setup_native/source/win32/customactions/rebase/rebase.cxx new file mode 100644 index 000000000000..4d031bee908a --- /dev/null +++ b/setup_native/source/win32/customactions/rebase/rebase.cxx @@ -0,0 +1,168 @@ +#undef UNICODE +#undef _UNICODE + +#pragma once + +#ifdef _MSC_VER +#pragma warning(push, 1) /* disable warnings within system headers */ +#endif +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <msiquery.h> +#include <imagehlp.h> +#include <tchar.h> +#include <strsafe.h> +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#include <malloc.h> +#include <time.h> +#include <string> + +const DWORD PE_Signature = 0x00004550; + +#ifdef DEBUG +inline void OutputDebugStringFormat( LPCSTR pFormat, ... ) +{ + CHAR buffer[1024]; + va_list args; + + va_start( args, pFormat ); + StringCchVPrintfA( buffer, sizeof(buffer), pFormat, args ); + OutputDebugStringA( buffer ); +} +#else +static inline void OutputDebugStringFormat( LPCSTR, ... ) +{ +} +#endif + +static bool IsValidHandle( HANDLE handle ) +{ + return NULL != handle && INVALID_HANDLE_VALUE != handle; +} + +static std::string GetMsiProperty(MSIHANDLE handle, const std::string& sProperty) +{ + std::string result; + TCHAR szDummy[1] = TEXT(""); + DWORD nChars = 0; + + if (MsiGetProperty(handle, sProperty.c_str(), szDummy, &nChars) == ERROR_MORE_DATA) + { + DWORD nBytes = ++nChars * sizeof(TCHAR); + LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes)); + ZeroMemory( buffer, nBytes ); + MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars); + result = buffer; + } + return result; +} + +static BOOL rebaseImage( const std::string& filePath, LPVOID address ) +{ + ULONG ulOldImageSize; + ULONG_PTR lpOldImageBase; + ULONG ulNewImageSize; + ULONG_PTR lpNewImageBase = reinterpret_cast<ULONG_PTR>(address); + + BOOL bResult = ReBaseImage( + filePath.c_str(), + "", + TRUE, + FALSE, + FALSE, + 0, + &ulOldImageSize, + &lpOldImageBase, + &ulNewImageSize, + &lpNewImageBase, + (ULONG)time(NULL) ); + + return bResult; +} + +static BOOL rebaseImage( MSIHANDLE /*handle*/, const std::string& sFilePath, LPVOID address ) +{ + std::string mystr; + mystr = "Full file: " + sFilePath; + + BOOL bResult = rebaseImage( sFilePath, address ); + + if ( !bResult ) + { + OutputDebugStringFormat( "Rebasing library %s failed", mystr.c_str() ); + } + + return bResult; +} + +static BOOL rebaseImagesInFolder( MSIHANDLE handle, const std::string& sPath, LPVOID address ) +{ + std::string sDir = sPath; + std::string sPattern = sPath + TEXT("*.dll"); + + WIN32_FIND_DATA aFindFileData; + HANDLE hFind = FindFirstFile( sPattern.c_str(), &aFindFileData ); + + if ( IsValidHandle(hFind) ) + { + BOOL fSuccess = false; + + do + { + std::string sLibFile = sDir + aFindFileData.cFileName; + rebaseImage( handle, sLibFile, address ); + fSuccess = FindNextFile( hFind, &aFindFileData ); + } + while ( fSuccess ); + + FindClose( hFind ); + } + + return ERROR_SUCCESS; +} + +static BOOL rebaseImages( MSIHANDLE handle, LPVOID pAddress ) +{ + std::string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); + std::string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); + + std::string sBasisDir = sBasisInstallPath + TEXT("program\\"); + std::string sOfficeDir = sOfficeInstallPath + TEXT("program\\"); + std::string sUreDir = sUreInstallPath + TEXT("bin\\"); + + BOOL bResult = rebaseImagesInFolder( handle, sBasisDir, pAddress ); + bResult &= rebaseImagesInFolder( handle, sOfficeDir, pAddress ); + bResult &= rebaseImagesInFolder( handle, sUreDir, pAddress ); + + return bResult; +} + +static BOOL IsServerSystem( MSIHANDLE /*handle*/ ) +{ + OSVERSIONINFOEX osVersionInfoEx; + osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + GetVersionEx(reinterpret_cast<LPOSVERSIONINFO>(&osVersionInfoEx)); + + if ( osVersionInfoEx.wProductType != VER_NT_WORKSTATION ) + return TRUE; + else + return FALSE; +} + +extern "C" BOOL __stdcall RebaseLibrariesOnProperties( MSIHANDLE handle ) +{ + static LPVOID pDefault = reinterpret_cast<LPVOID>(0x10000000); + + std::string sDontOptimizeLibs = GetMsiProperty(handle, TEXT("DONTOPTIMIZELIBS")); + if ( sDontOptimizeLibs.length() > 0 && sDontOptimizeLibs == "1" ) + return TRUE; + + if ( !IsServerSystem( handle )) + return rebaseImages( handle, pDefault ); + + return TRUE; +} diff --git a/setup_native/source/win32/customactions/rebase/rebase.dxp b/setup_native/source/win32/customactions/rebase/rebase.dxp new file mode 100644 index 000000000000..47ea23951f04 --- /dev/null +++ b/setup_native/source/win32/customactions/rebase/rebase.dxp @@ -0,0 +1 @@ +RebaseLibrariesOnProperties
diff --git a/setup_native/source/win32/customactions/regactivex/makefile.mk b/setup_native/source/win32/customactions/regactivex/makefile.mk index 45707071d33f..96300d45ba0d 100644 --- a/setup_native/source/win32/customactions/regactivex/makefile.mk +++ b/setup_native/source/win32/customactions/regactivex/makefile.mk @@ -39,7 +39,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/regpatchactivex/makefile.mk b/setup_native/source/win32/customactions/regpatchactivex/makefile.mk index 7c194e94b1d3..69511c936f0e 100644 --- a/setup_native/source/win32/customactions/regpatchactivex/makefile.mk +++ b/setup_native/source/win32/customactions/regpatchactivex/makefile.mk @@ -55,7 +55,11 @@ INCPRE+=.\Include SLOFILES = $(SLO)$/regpatchactivex.obj .IF "$(COM)"=="GCC" -SHL1STDLIBS= -lmingw32 -lstdc++ -lgcc -lmsvcrt +SHL1STDLIBS += -lstdc++ +.IF "$(MINGW_GCCLIB_EH)"=="YES" +SHL1STDLIBS += -lgcc_eh +.ENDIF +SHL1STDLIBS += -lgcc -lmingw32 -lmoldname -lmsvcrt .ELSE SHL1STDLIBS= .ENDIF diff --git a/setup_native/source/win32/customactions/relnotes/makefile.mk b/setup_native/source/win32/customactions/relnotes/makefile.mk index 8d3af6286009..b83d58468ec6 100644 --- a/setup_native/source/win32/customactions/relnotes/makefile.mk +++ b/setup_native/source/win32/customactions/relnotes/makefile.mk @@ -40,7 +40,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk index 14546c834807..e7dc9a561883 100644 --- a/setup_native/source/win32/customactions/shellextensions/makefile.mk +++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk @@ -39,7 +39,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/setup_native/source/win32/customactions/tools/makefile.mk b/setup_native/source/win32/customactions/tools/makefile.mk index 2c6a63a6fff2..e7a6c44d6ee3 100644 --- a/setup_native/source/win32/customactions/tools/makefile.mk +++ b/setup_native/source/win32/customactions/tools/makefile.mk @@ -40,7 +40,6 @@ ENABLE_EXCEPTIONS=TRUE NO_DEFAULT_STL=TRUE DYNAMIC_CRT= USE_DEFFILE=TRUE -MINGW_NODLL=YES .INCLUDE : settings.mk diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java index 25dadf1643d3..2043d5b932c3 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.java +++ b/wizards/com/sun/star/wizards/common/FileAccess.java @@ -419,7 +419,7 @@ public class FileAccess **/ public static void combinePaths(XMultiServiceFactory xMSF, ArrayList _aFirstPath, String _sSecondPath) throws NoValidPathException { - for (int i = 0; i < _aFirstPath.size(); i++) + for (int i = 0; i < _aFirstPath.size(); ++i) { String sOnePath = (String) _aFirstPath.get(i); sOnePath = addPath(sOnePath, _sSecondPath); @@ -431,6 +431,7 @@ public class FileAccess else { _aFirstPath.remove(i); + --i; } } } diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index 25563f5b9a78..27c1601d919d 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -115,7 +115,7 @@ public class RelationController extends CommandName try { CommandName oLocCommandName = new CommandName(super.getCommandMetaData(), _sreferencedtablename); - XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), _sreferencedtablename); + XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), oLocCommandName.getTableName()); XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet); boolean bleaveLoop = false; Vector aMasterFieldNamesVector = new Vector(); @@ -128,7 +128,7 @@ public class RelationController extends CommandName { sPrimaryCatalog = xRow.getString(PKTABLE_CAT); } - if (super.getCommandMetaData().xDBMetaData.supportsCatalogsInDataManipulation()) + if (super.getCommandMetaData().xDBMetaData.supportsSchemasInDataManipulation()) { sPrimarySchema = xRow.getString(PKTABLE_SCHEM); } @@ -137,7 +137,7 @@ public class RelationController extends CommandName String sForeignColumnName = xRow.getString(FKCOLUMN_NAME); if (JavaTools.isSame(getTableName(), sPrimaryTableName)) { - if (JavaTools.isSame(getSchemaName(), sPrimarySchema)) + if (sPrimarySchema == null || JavaTools.isSame(getSchemaName(), sPrimarySchema)) { if (JavaTools.isSame(getCatalogName(), sPrimaryCatalog)) { diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index 43e250302781..cf0389b84ff3 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -59,6 +59,8 @@ import com.sun.star.wizards.ui.XFieldSelectionListener; */ public class ScenarioSelector extends FieldSelection implements XItemListener, XFieldSelectionListener { + final static int PRIVATE = 0; + final static int BUSINESS = 1; private XFixedText lblExplanation; private XFixedText lblCategories; @@ -163,18 +165,18 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X { e.printStackTrace(System.out); } - initializeCategory(0); + initializeCategory(BUSINESS); } public int getCategory() { if (optBusiness.getState()) { - curcategory = 0; + curcategory = BUSINESS; } else { - curcategory = 1; + curcategory = PRIVATE; } return curcategory; } @@ -183,11 +185,11 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X { if (optBusiness.getState()) { - initializeCategory(0); + initializeCategory(BUSINESS); } else { - initializeCategory(1); + initializeCategory(PRIVATE); } } diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 6dbc246ca84c..3191c62d639f 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -341,7 +341,8 @@ public class FilterComponent case DataType.BIGINT: case DataType.INTEGER: case DataType.SMALLINT: - aValue = String.valueOf(((Double) aValue).intValue()); + if ( AnyConverter.isDouble(aValue) ) + aValue = String.valueOf(((Double) aValue).intValue()); break; case DataType.BIT: case DataType.BOOLEAN: @@ -351,7 +352,8 @@ public class FilterComponent //curValue = new Boolean(dblvalue == 1.0); // wrong! we need a string, not a boolean value // converts the '1.0'/'0.0' (EffectiveValue) to a 'boolean' String like 'true'/'false' - aValue = String.valueOf(((Double) aValue).intValue() == 1); + if ( AnyConverter.isDouble(aValue) ) + aValue = String.valueOf(((Double) aValue).intValue() == 1); break; default: aValue = String.valueOf(aValue); @@ -413,7 +415,9 @@ public class FilterComponent String sreturn = JavaTools.replaceSubString(_BaseString, FieldName, "<FIELDNAME>"); String soperator = sLogicOperators[_filtercondition.Handle - 1]; sreturn = JavaTools.replaceSubString(sreturn, soperator, "<LOGICOPERATOR>"); - String sDisplayValue = AnyConverter.toString(_filtercondition.Value); + String sDisplayValue = ""; + if ( !AnyConverter.isVoid(_filtercondition.Value) ) + sDisplayValue = AnyConverter.toString(_filtercondition.Value); sreturn = JavaTools.replaceSubString(sreturn, sDisplayValue, "<VALUE>"); return sreturn; } diff --git a/xmlsecurity/prj/build.lst b/xmlsecurity/prj/build.lst index b9853a77c6f2..cd438326bd00 100644 --- a/xmlsecurity/prj/build.lst +++ b/xmlsecurity/prj/build.lst @@ -1,4 +1,4 @@ -xs xmlsecurity : l10n xmloff unotools offapi unoil svx MOZ:moz SO:moz_prebuilt LIBXMLSEC:libxmlsec NULL +xs xmlsecurity : l10n xmloff unotools offapi unoil svx MOZ:moz SO:moz_prebuilt LIBXMLSEC:libxmlsec NSS:nss NULL xs xmlsecurity usr1 - all xs_mkout NULL xs xmlsecurity\inc nmake - all xs_inc NULL xs xmlsecurity\source\framework nmake - all xs_fw xs_inc NULL diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 831eb48befae..c65aed21dd3f 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -254,7 +254,8 @@ Sequence< ::com::sun::star::security::DocumentSignatureInformation > DocumentDig if (rSigInfo.Signer.is()) { try { - rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer); + rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer, + Sequence<Reference<css::security::XCertificate> >()); } catch (SecurityException& ) { OSL_ENSURE(0, "Verification of certificate failed"); rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID; diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 0d77d05df31c..fb9b41d5f637 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -126,7 +126,8 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif maKeyImg.SetImage( Image( XMLSEC_RES( IMG_KEY_HC ) ) ); //Verify the certificate - sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(mpDlg->mxCert); + sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(mpDlg->mxCert, + Sequence<Reference<css::security::XCertificate> >()); //We currently have two status //These errors are alloweds sal_Int32 validCertErrors = css::security::CertificateValidity::VALID @@ -481,7 +482,8 @@ void CertificateViewerCertPathTP::ActivatePage() const Reference< security::XCertificate > rCert = pCertPath[ --i ]; String sName = XmlSec::GetContentPart( rCert->getSubjectName() ); //Verify the certificate - sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(rCert); + sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(rCert, + Sequence<Reference<css::security::XCertificate> >()); //We currently have two status //These errors are alloweds sal_Int32 validCertErrors = css::security::CertificateValidity::VALID diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index e0c27b59c3c0..109959be1554 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -530,7 +530,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() { //check the validity of the cert try { - sal_Int32 certResult = xSecEnv->verifyCertificate(xCert); + sal_Int32 certResult = xSecEnv->verifyCertificate(xCert, + Sequence<css::uno::Reference<css::security::XCertificate> >()); //These errors are alloweds sal_Int32 validErrors = css::security::CertificateValidity::VALID diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index c6c71c01a677..1b35d2b968bc 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -882,7 +882,33 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl :: createCertificateFr return createCertificateFromRaw( rawCert ) ; } -sal_Int32 SecurityEnvironment_MSCryptImpl :: verifyCertificate( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& aCert ) throw( ::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException ) { + +HCERTSTORE getCertStoreForIntermediatCerts( + const Sequence< Reference< ::com::sun::star::security::XCertificate > >& seqCerts) +{ + HCERTSTORE store = NULL; + store = CertOpenStore( + CERT_STORE_PROV_MEMORY, 0, NULL, 0, NULL); + if (store == NULL) + return NULL; + + for (int i = 0; i < seqCerts.getLength(); i++) + { + Sequence<sal_Int8> data = seqCerts[i]->getEncoded(); + PCCERT_CONTEXT cert = CertCreateCertificateContext( + X509_ASN_ENCODING, ( const BYTE* )&data[0], data.getLength()); + //Adding the certificate creates a copy and not just increases the ref count + //Therefore we free later the certificate that we now add + CertAddCertificateContextToStore(store, cert, CERT_STORE_ADD_ALWAYS, NULL); + CertFreeCertificateContext(cert); + } + return store; +} +sal_Int32 SecurityEnvironment_MSCryptImpl :: verifyCertificate( + const Reference< ::com::sun::star::security::XCertificate >& aCert, + const Sequence< Reference< ::com::sun::star::security::XCertificate > >& seqCerts) + throw( ::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException ) +{ sal_Int32 validity = 0; PCCERT_CHAIN_CONTEXT pChainContext = NULL; PCCERT_CONTEXT pCertContext = NULL; @@ -913,52 +939,50 @@ sal_Int32 SecurityEnvironment_MSCryptImpl :: verifyCertificate( const ::com::sun chainPara.cbSize = sizeof( CERT_CHAIN_PARA ) ; chainPara.RequestedUsage = certUsage ; + + HCERTSTORE hCollectionStore = NULL; + HCERTSTORE hIntermediateCertsStore = NULL; BOOL bChain = FALSE; if( pCertContext != NULL ) { - HCERTSTORE hAdditionalStore = NULL; - HCERTSTORE hCollectionStore = NULL; - if (m_hCertStore && m_hKeyStore) + hIntermediateCertsStore = + getCertStoreForIntermediatCerts(seqCerts); + + //Merge m_hCertStore and m_hKeyStore and the store of the intermediate + //certificates into one store. + hCollectionStore = CertOpenStore( + CERT_STORE_PROV_COLLECTION , + 0 , + NULL , + 0 , + NULL + ) ; + if (hCollectionStore != NULL) { - //Merge m_hCertStore and m_hKeyStore into one store. - hCollectionStore = CertOpenStore( - CERT_STORE_PROV_COLLECTION , - 0 , - NULL , - 0 , - NULL - ) ; - if (hCollectionStore != NULL) - { - CertAddStoreToCollection ( - hCollectionStore , - m_hCertStore , - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG , - 0) ; - CertAddStoreToCollection ( - hCollectionStore , - m_hCertStore , - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG , - 0) ; - hAdditionalStore = hCollectionStore; - } + CertAddStoreToCollection ( + hCollectionStore , + m_hCertStore , + CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG , + 0) ; + CertAddStoreToCollection ( + hCollectionStore , + m_hCertStore , + CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG , + 0) ; + CertAddStoreToCollection ( + hCollectionStore, + hIntermediateCertsStore, + CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, + 0); } - //if the merge of both stores failed then we add only m_hCertStore - if (hAdditionalStore == NULL && m_hCertStore) - hAdditionalStore = m_hCertStore; - else if (hAdditionalStore == NULL && m_hKeyStore) - hAdditionalStore = m_hKeyStore; - else - hAdditionalStore = NULL; - //CertGetCertificateChain searches by default in MY, CA, ROOT and TRUST bChain = CertGetCertificateChain( NULL , pCertContext , NULL , //use current system time - hAdditionalStore, + hCollectionStore, &chainPara , CERT_CHAIN_REVOCATION_CHECK_CHAIN | CERT_CHAIN_TIMESTAMP_TIME , NULL , @@ -967,8 +991,6 @@ sal_Int32 SecurityEnvironment_MSCryptImpl :: verifyCertificate( const ::com::sun if (!bChain) pChainContext = NULL; - //Close the additional store - CertCloseStore(hCollectionStore, CERT_CLOSE_STORE_CHECK_FLAG); } if(bChain && pChainContext != NULL ) @@ -1081,6 +1103,12 @@ sal_Int32 SecurityEnvironment_MSCryptImpl :: verifyCertificate( const ::com::sun if (pChainContext) CertFreeCertificateChain(pChainContext); + //Close the additional store, do not destroy the contained certs + CertCloseStore(hCollectionStore, CERT_CLOSE_STORE_CHECK_FLAG); + //Close the temporary store containing the intermediate certificates and make + //sure all certificates are deleted. + CertCloseStore(hIntermediateCertsStore, CERT_CLOSE_STORE_CHECK_FLAG); + return validity ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx index 9770d5c1cba7..f1441184602f 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx @@ -108,7 +108,11 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper4< virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromAscii( const ::rtl::OUString& asciiCertificate ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ; - virtual ::sal_Int32 SAL_CALL verifyCertificate( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert ) throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ; + virtual ::sal_Int32 SAL_CALL verifyCertificate( + const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert, + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< + ::com::sun::star::security::XCertificate > >& intermediateCertificates) + throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ; virtual ::sal_Int32 SAL_CALL getCertificateCharacters( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert ) throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ; virtual ::rtl::OUString SAL_CALL getSecurityEnvironmentInformation( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index d0e6670fd2ff..4a290ae2feb5 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -28,22 +28,20 @@ * ************************************************************************/ + // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmlsecurity.hxx" + +//todo before commit: nssrenam.h is not delivered!!! +#include "nssrenam.h" +#include "cert.h" +#include "secerr.h" + #include <sal/config.h> #include "securityenvironment_nssimpl.hxx" #include "x509certificate_nssimpl.hxx" #include <rtl/uuid.h> -#include "nspr.h" -#include "nss.h" -#include "secport.h" -#include "secitem.h" -#include "secder.h" -#include "secerr.h" -#include "limits.h" -#include "certt.h" -#include "prerror.h" #include <sal/types.h> //For reasons that escape me, this is what xmlsec does when size_t is not 4 @@ -64,7 +62,7 @@ #include <xmlsecurity/biginteger.hxx> #include <rtl/logfile.h> #include <com/sun/star/task/XInteractionHandler.hpp> - +#include <vector> #include "boost/scoped_array.hpp" // MM : added for password exception @@ -84,6 +82,7 @@ using ::com::sun::star::security::XCertificate ; extern X509Certificate_NssImpl* NssCertToXCert( CERTCertificate* cert ) ; extern X509Certificate_NssImpl* NssPrivKeyToXCert( SECKEYPrivateKey* ) ; + char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) { uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); @@ -748,17 +747,23 @@ Reference< XCertificate > SecurityEnvironment_NssImpl :: createCertificateFromAs return createCertificateFromRaw( rawCert ) ; } -sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& aCert ) throw( ::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException ) { +sal_Int32 SecurityEnvironment_NssImpl :: +verifyCertificate( const Reference< csss::XCertificate >& aCert, + const Sequence< Reference< csss::XCertificate > >& intermediateCerts ) + throw( ::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException ) +{ sal_Int32 validity = 0; const X509Certificate_NssImpl* xcert ; const CERTCertificate* cert ; - + ::std::vector<CERTCertificate*> vecTmpNSSCertificates; Reference< XUnoTunnel > xCertTunnel( aCert, UNO_QUERY ) ; if( !xCertTunnel.is() ) { throw RuntimeException() ; } - + OSL_TRACE("[xmlsecurity] Start verification of certificate: %s", + OUStringToOString( + aCert->getIssuerName(), osl_getThreadTextEncoding()).getStr()); xcert = reinterpret_cast<X509Certificate_NssImpl*>( @@ -769,7 +774,38 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st cert = xcert->getNssCert() ; if( cert != NULL ) + { + + //prepare the intermediate certificates + CERTCertDBHandle * certDb = m_pHandler != NULL ? m_pHandler : CERT_GetDefaultCertDB(); + for (sal_Int32 i = 0; i < intermediateCerts.getLength(); i++) { + Sequence<sal_Int8> der = intermediateCerts[i]->getEncoded(); + SECItem item; + item.type = siBuffer; + item.data = (unsigned char*)der.getArray(); + item.len = der.getLength(); + + CERTCertificate* certTmp = CERT_NewTempCertificate(certDb, &item, + NULL /* nickname */, + PR_FALSE /* isPerm */, + PR_TRUE /* copyDER */); + if (!certTmp) + { + OSL_TRACE("[xmlsecurity] Failed to add a temporary certificate: %s", + OUStringToOString(intermediateCerts[i]->getIssuerName(), + osl_getThreadTextEncoding()).getStr()); + + } + else + { + OSL_TRACE("[xmlsecurity] Added temporary certificate: %s", + certTmp->subjectName ? certTmp->subjectName : ""); + vecTmpNSSCertificates.push_back(certTmp); + } + } + + int64 timeboundary ; SECStatus status ; @@ -779,15 +815,15 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st // create log - CERTVerifyLog realLog; + CERTVerifyLog realLog; CERTVerifyLog *log; - log = &realLog; + log = &realLog; - log->count = 0; - log->head = NULL; - log->tail = NULL; + log->count = 0; + log->head = NULL; + log->tail = NULL; log->arena = PORT_NewArena( DER_DEFAULT_CHUNKSIZE ); //CERTVerifyLog *log; @@ -798,11 +834,6 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st //log->arena = arena; validity = csss::CertificateValidity::INVALID; - CERTCertificateList * certList; - - certList = CERT_CertChainFromCert( (CERTCertificateStr *) cert, (SECCertUsage) 0, 0); - - if( m_pHandler != NULL ) { //JL: We must not pass a particular usage in the requiredUsages argument (the 4th) because, @@ -894,9 +925,23 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st } else { + validity = ::com::sun::star::security::CertificateValidity::INVALID ; } + //Destroying the temporary certificates + std::vector<CERTCertificate*>::const_iterator cert_i; + for (cert_i = vecTmpNSSCertificates.begin(); cert_i != vecTmpNSSCertificates.end(); cert_i++) + { + OSL_TRACE("[xmlsecurity] Destroying temporary certificate"); + CERT_DestroyCertificate(*cert_i); + } +#if OSL_DEBUG_LEVEL > 1 + if (validity == ::com::sun::star::security::CertificateValidity::VALID) + OSL_TRACE("[xmlsecurity] Certificate is valid."); + else + OSL_TRACE("[xmlsecurity] Certificate is invalid."); +#endif return validity ; } diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx index bfa9295e50fe..d6586794bea5 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx @@ -115,7 +115,13 @@ private : static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ; - virtual ::sal_Int32 SAL_CALL verifyCertificate( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert ) throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ; + virtual ::sal_Int32 SAL_CALL verifyCertificate( + const ::com::sun::star::uno::Reference< + ::com::sun::star::security::XCertificate >& xCert, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > & + intermediateCerts) + throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ; virtual ::sal_Int32 SAL_CALL getCertificateCharacters( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert ) throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ; diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx index 5a3c80dfb162..3255a2d5bf58 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx @@ -54,7 +54,12 @@ #include <sal/types.h> - +#include "rtl/instance.hxx" +#include "rtl/bootstrap.hxx" +#include "rtl/string.hxx" +#include "rtl/strbuf.hxx" +#include "osl/file.hxx" +#include "osl/thread.h" #include <tools/debug.hxx> #include <rtl/logfile.hxx> @@ -64,18 +69,10 @@ #include <com/sun/star/mozilla/XMozillaBootstrap.hpp> #include "nspr.h" -#include "prtypes.h" -#include "pk11func.h" -#ifdef SYSTEM_MOZILLA -#include "nssrenam.h" -#include "secmod.h" -#endif #include "cert.h" -#include "cryptohi.h" -#include "certdb.h" #include "nss.h" -#include "prerror.h" - +#include "secmod.h" +#include "nssckbi.h" namespace cssu = com::sun::star::uno; @@ -83,49 +80,234 @@ namespace cssl = com::sun::star::lang; namespace cssxc = com::sun::star::xml::crypto; using namespace com::sun::star; +using ::rtl::OUString; +using ::rtl::OString; #define SERVICE_NAME "com.sun.star.xml.crypto.SEInitializer" #define IMPLEMENTATION_NAME "com.sun.star.xml.security.bridge.xmlsec.SEInitializer_NssImpl" #define SECURITY_ENVIRONMENT "com.sun.star.xml.crypto.SecurityEnvironment" #define SECURITY_CONTEXT "com.sun.star.xml.crypto.XMLSecurityContext" -bool nsscrypto_initialize( const char* token ) { - static char initialized = 0 ; - //PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - if( !initialized ) { - PR_Init( PR_USER_THREAD, PR_PRIORITY_NORMAL, 1 ) ; +#define ROOT_CERTS "Root Certs for OpenOffice.org" + + +extern "C" void nsscrypto_finalize(); + + +namespace +{ - if( NSS_InitReadWrite( token ) != SECSuccess ) +bool nsscrypto_initialize( const char * sProfile, bool & out_nss_init); + +struct InitNSSInitialize +{ + //path to the database folder + const OString m_sProfile; + InitNSSInitialize(const OString & sProfile): m_sProfile(sProfile) {}; + bool * operator()() + { + static bool bInitialized = false; + bool bNSSInit = false; + bInitialized = nsscrypto_initialize(m_sProfile.getStr(), bNSSInit); + if (bNSSInit) + atexit(nsscrypto_finalize ); + return & bInitialized; + + } +}; + +bool * initNSS(const OString & sProfile) +{ + return rtl_Instance< bool, InitNSSInitialize, + ::osl::MutexGuard, ::osl::GetGlobalMutex >::create( + InitNSSInitialize(sProfile), ::osl::GetGlobalMutex()); +} + +void deleteRootsModule() +{ + SECMODModule *RootsModule = 0; + SECMODModuleList *list = SECMOD_GetDefaultModuleList(); + SECMODListLock *lock = SECMOD_GetDefaultModuleListLock(); + SECMOD_GetReadLock(lock); + + while (!RootsModule && list) + { + SECMODModule *module = list->module; + + for (int i=0; i < module->slotCount; i++) + { + PK11SlotInfo *slot = module->slots[i]; + if (PK11_IsPresent(slot)) + { + if (PK11_HasRootCerts(slot)) { - char * error = NULL; + OSL_TRACE("[xmlsecurity] The root certifificates module \"%s" + "\" is already loaded: \n%s", + module->commonName, module->dllName); - PR_GetErrorText(error); - if (error) - printf("%s",error); - return false ; + RootsModule = SECMOD_ReferenceModule(module); + break; } + } + } + list = list->next; + } + SECMOD_ReleaseReadLock(lock); -#ifdef SYSTEM_MOZILLA - if (!SECMOD_HasRootCerts()) + if (RootsModule) + { + PRInt32 modType; + if (SECSuccess == SECMOD_DeleteModule(RootsModule->commonName, &modType)) + { + OSL_TRACE("[xmlsecurity] Deleted module \"%s\".", RootsModule->commonName); + } + else { - SECMOD_AddNewModule("Root Certs", "libnssckbi" SAL_DLLEXTENSION, - 0, 0); + OSL_TRACE("[xmlsecurity] Failed to delete \"%s\" : \n%s", + RootsModule->commonName, RootsModule->dllName); } + SECMOD_DestroyModule(RootsModule); + RootsModule = 0; + } +} + +//Older versions of Firefox (FF), for example FF2, and Thunderbird (TB) 2 write +//the roots certificate module (libnssckbi.so), which they use, into the +//profile. This module will then already be loaded during NSS_Init (and the +//other init functions). This fails in two cases. First, FF3 was used to create +//the profile, or possibly used that profile before, and second the profile was +//used on a different platform. +// +//Then one needs to add the roots module oneself. This should be done with +//SECMOD_LoadUserModule rather then SECMOD_AddNewModule. The latter would write +//the location of the roots module to the profile, which makes FF2 and TB2 use +//it instead of there own module. +// +//When using SYSTEM_MOZILLA then the libnss3.so lib is typically found in +///usr/lib. This folder may, however, NOT contain the roots certificate +//module. That is, just providing the library name in SECMOD_LoadUserModule or +//SECMOD_AddNewModule will FAIL to load the mozilla unless the LD_LIBRARY_PATH +//contains an FF or TB installation. +//ATTENTION: DO NOT call this function directly instead use initNSS +//return true - whole initialization was successful +//param out_nss_init = true: at least the NSS initialization (NSS_InitReadWrite +//was successful and therefor NSS_Shutdown should be called when terminating. +bool nsscrypto_initialize( const char* token, bool & out_nss_init ) +{ + bool return_value = true; + + OSL_TRACE("[xmlsecurity] Using profile: %s", token); + + PR_Init( PR_USER_THREAD, PR_PRIORITY_NORMAL, 1 ) ; + + if( NSS_InitReadWrite( token ) != SECSuccess ) + { + char * error = NULL; + + PR_GetErrorText(error); + if (error) + printf("%s",error); + return false ; + } + out_nss_init = true; + +#if defined SYSTEM_MOZILLA + if (!SECMOD_HasRootCerts()) + { #endif + deleteRootsModule(); + +#if defined SYSTEM_MOZILLA + OUString rootModule(RTL_CONSTASCII_USTRINGPARAM("libnssckbi"SAL_DLLEXTENSION)); +#else + OUString rootModule(RTL_CONSTASCII_USTRINGPARAM("${OOO_BASE_DIR}/program/libnssckbi"SAL_DLLEXTENSION)); +#endif + ::rtl::Bootstrap::expandMacros(rootModule); + + OUString rootModulePath; + if (::osl::File::E_None == ::osl::File::getSystemPathFromFileURL(rootModule, rootModulePath)) + { + ::rtl::OString ospath = ::rtl::OUStringToOString(rootModulePath, osl_getThreadTextEncoding()); + ::rtl::OStringBuffer pkcs11moduleSpec; + pkcs11moduleSpec.append("name=\""); + pkcs11moduleSpec.append(ROOT_CERTS); + pkcs11moduleSpec.append("\" library=\""); + pkcs11moduleSpec.append(ospath.getStr()); + pkcs11moduleSpec.append("\""); + + SECMODModule * RootsModule = + SECMOD_LoadUserModule( + const_cast<char*>(pkcs11moduleSpec.makeStringAndClear().getStr()), + 0, // no parent + PR_FALSE); // do not recurse + + if (RootsModule) + { + + bool found = RootsModule->loaded; + + SECMOD_DestroyModule(RootsModule); + RootsModule = 0; + if (found) + OSL_TRACE("[xmlsecurity] Added new root certificate module " + "\""ROOT_CERTS"\" contained in \n%s", ospath.getStr()); + else + { + OSL_TRACE("[xmlsecurity] FAILED to load the new root certificate module " + "\""ROOT_CERTS"\" contained in \n%s", ospath.getStr()); + return_value = false; + } + } + else + { + OSL_TRACE("[xmlsecurity] FAILED to add new root certifice module: " + "\""ROOT_CERTS"\" contained in \n%s", ospath.getStr()); + return_value = false; - initialized = 1 ; + } + } + else + { + OSL_TRACE("[xmlsecurity] Adding new root certificate module failed."); + return_value = false; + } +#if SYSTEM_MOZILLA } +#endif - return true ; + return return_value; } + // must be extern "C" because we pass the function pointer to atexit -extern "C" void nsscrypto_finalize() { +extern "C" void nsscrypto_finalize() +{ + SECMODModule *RootsModule = SECMOD_FindModule(ROOT_CERTS); + + if (RootsModule) + { + + if (SECSuccess == SECMOD_UnloadUserModule(RootsModule)) + { + OSL_TRACE("[xmlsecurity] Unloaded module \""ROOT_CERTS"\"."); + } + else + { + OSL_TRACE("[xmlsecurity] Failed unloadeding module \""ROOT_CERTS"\"."); + } + SECMOD_DestroyModule(RootsModule); + } + else + { + OSL_TRACE("[xmlsecurity] Unloading module \""ROOT_CERTS + "\" failed because it was not found."); + } PK11_LogoutAll(); NSS_Shutdown(); } + bool getMozillaCurrentProfile( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rxMSF, rtl::OUString& profilePath) @@ -143,7 +325,7 @@ bool getMozillaCurrentProfile( else { RTL_LOGFILE_TRACE( "getMozillaCurrentProfile: Using MozillaBootstrap..." ); - mozilla::MozillaProductType productTypes[4] = { + mozilla::MozillaProductType productTypes[4] = { mozilla::MozillaProductType_Thunderbird, mozilla::MozillaProductType_Mozilla, mozilla::MozillaProductType_Firefox, @@ -180,6 +362,8 @@ bool getMozillaCurrentProfile( } } +} // namespace + SEInitializer_NssImpl::SEInitializer_NssImpl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rxMSF) :mxMSF( rxMSF ) @@ -238,7 +422,7 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL return NULL; } ----*/ - if( !nsscrypto_initialize( sCertDir.getStr() ) ) + if( ! *initNSS( sCertDir.getStr() ) ) { RTL_LOGFILE_TRACE( "XMLSEC: Error - nsscrypto_initialize() failed." ); if ( NSS_NoDB_Init(NULL) != SECSuccess ) @@ -251,8 +435,6 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL RTL_LOGFILE_TRACE( "XMLSEC: NSS_NoDB_Init works, enough for verifying signatures..." ); } } - else - atexit(nsscrypto_finalize ); pCertHandle = CERT_GetDefaultCertDB() ; diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx index c457b4fb8a30..d6b5e189330e 100644 --- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx @@ -30,14 +30,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmlsecurity.hxx" -#include <sal/config.h> -#include <rtl/uuid.h> -#include "x509certificate_nssimpl.hxx" -#ifndef _CERTIFICATEEXTENSION_NSSIMPL_HXX_ -#include "certificateextension_xmlsecimpl.hxx" -#endif + +#include "nssrenam.h" #include "nspr.h" #include "nss.h" #include "secder.h" @@ -48,6 +44,17 @@ #include "pk11func.h" //MM : end + + +#include <sal/config.h> +#include <rtl/uuid.h> +#include "x509certificate_nssimpl.hxx" + +#ifndef _CERTIFICATEEXTENSION_NSSIMPL_HXX_ +#include "certificateextension_xmlsecimpl.hxx" +#endif + + using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::security ; using ::rtl::OUString ; diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx index 51b2b2fd1d7f..bb16bcc7fb6e 100644 --- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx @@ -40,9 +40,6 @@ #include "com/sun/star/uno/SecurityException.hpp" #include <com/sun/star/security/XCertificate.hpp> -#ifdef SYSTEM_MOZILLA -#include "nssrenam.h" -#endif #include "cert.h" class X509Certificate_NssImpl : public ::cppu::WeakImplHelper2< diff --git a/xmlsecurity/util/makefile.mk b/xmlsecurity/util/makefile.mk index e3f78a45592f..cfc012a78cd2 100644 --- a/xmlsecurity/util/makefile.mk +++ b/xmlsecurity/util/makefile.mk @@ -152,7 +152,7 @@ SHL4STDLIBS=\ $(SALLIB) \ $(SVLLIB) \ $(XMLOFFLIB) \ - $(SVXLIB) + $(SVXCORELIB) SHL4VERSIONMAP = xmlsecurity.map SHL4DEPN= |