openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1546358 [3/9] - in /openoffice/branches/capstone2013/main: vcl/inc/win/ winaccessibility/source/UAccCOM/ winaccessibility/source/UAccCOMIDL/ winaccessibility/source/service/
Date Thu, 28 Nov 2013 12:54:23 GMT
Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.h
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.h?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.h (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.h Thu Nov 28 12:54:21 2013
@@ -0,0 +1,175 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef __ACCTABLE_H_
+#define __ACCTABLE_H_
+
+#include "resource.h"       // main symbols
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccTable implements IAccessibleTable interface.
+ */
+class ATL_NO_VTABLE CAccTable :
+            public CComObjectRoot,
+            public CComCoClass<CAccTable, &CLSID_AccTable>,
+            public IAccessibleTable,
+            public CUNOXWrapper
+
+{
+public:
+    CAccTable()
+    {
+            }
+    virtual ~CAccTable()
+    {
+            }
+
+    BEGIN_COM_MAP(CAccTable)
+    COM_INTERFACE_ENTRY(IAccessibleTable)
+    COM_INTERFACE_ENTRY(IUNOXWrapper)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    END_COM_MAP()
+
+    static HRESULT WINAPI _SmartQI(void* pv,
+                                   REFIID iid, void** ppvObject, DWORD)
+    {
+        return ((CAccTable*)pv)->SmartQI(iid,ppvObject);
+    }
+
+    HRESULT SmartQI(REFIID iid, void** ppvObject)
+    {
+        if( m_pOuterUnknown )
+            return OuterQueryInterface(iid,ppvObject);
+        return E_FAIL;
+    }
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_ACCTABLE)
+
+    // IAccessibleTable
+public:
+    // IAccessibleTable
+
+    // Gets accessible table cell.
+    STDMETHOD(get_accessibleAt)(long row, long column, IUnknown * * accessible);
+
+    // Gets accessible table caption.
+    STDMETHOD(get_caption)(IUnknown * * accessible);
+
+    // Gets accessible column description (as string).
+    STDMETHOD(get_columnDescription)(long column, BSTR * description);
+
+    // Gets number of columns spanned by table cell.
+    STDMETHOD(get_columnExtentAt)(long row, long column, long * nColumnsSpanned);
+
+    // Gets accessible column header.
+    STDMETHOD(get_columnHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingRowIndex);
+
+    // Gets total number of columns in table.
+    STDMETHOD(get_nColumns)(long * columnCount);
+
+    // Gets total number of rows in table.
+    STDMETHOD(get_nRows)(long * rowCount);
+
+    // Gets total number of selected columns.
+    STDMETHOD(get_nSelectedColumns)(long * columnCount);
+
+    // Gets total number of selected rows.
+    STDMETHOD(get_nSelectedRows)(long * rowCount);
+
+    // Gets accessible row description (as string).
+    STDMETHOD(get_rowDescription)(long row, BSTR * description);
+
+    // Gets number of rows spanned by a table cell.
+    STDMETHOD(get_rowExtentAt)(long row, long column, long * nRowsSpanned);
+
+    // Gets accessible row header.
+    STDMETHOD(get_rowHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingColumnIndex);
+
+    // Gets list of row indexes currently selected (0-based).
+    STDMETHOD(get_selectedRows)(long maxRows, long **rows, long * nRows);
+
+    // Gets list of column indexes currently selected (0-based).
+    STDMETHOD(get_selectedColumns)(long maxColumns, long **columns, long * numColumns);
+
+    // Gets accessible table summary.
+    STDMETHOD(get_summary)(IUnknown * * accessible);
+
+    // Determines if table column is selected.
+    STDMETHOD(get_isColumnSelected)(long column, unsigned char * isSelected);
+
+    // Determines if table row is selected.
+    STDMETHOD(get_isRowSelected)(long row, unsigned char * isSelected);
+
+    // Determines if table cell is selected.
+    STDMETHOD(get_isSelected)(long row, long column, unsigned char * isSelected);
+
+    // Selects a row and unselect all previously selected rows.
+    STDMETHOD(selectRow)(long row );
+
+
+    // Selects a column and unselect all previously selected columns.
+
+    STDMETHOD(selectColumn)(long column);
+
+    // Unselects one row, leaving other selected rows selected (if any).
+    STDMETHOD(unselectRow)(long row);
+
+    // Unselects one column, leaving other selected columns selected (if any).
+    STDMETHOD(unselectColumn)(long column);
+
+    //get Column index
+    STDMETHOD(get_columnIndex)(long childIndex, long * columnIndex);
+
+    STDMETHOD(get_rowIndex)(long childIndex, long * rowIndex);
+
+    STDMETHOD(get_childIndex)(long rowIndex,long columnIndex, long * childIndex);
+
+    STDMETHOD(get_nSelectedChildren)(long *childCount);
+
+    STDMETHOD(get_selectedChildren)(long maxChildren, long **children, long *nChildren);
+
+    STDMETHOD(get_rowColumnExtentsAtIndex)( long index,
+                                            long  *row,
+                                            long  *column,
+                                            long  *rowExtents,
+                                            long  *columnExtents,
+                                            boolean  *isSelected) ;
+
+    STDMETHOD(get_modelChange)(IA2TableModelChange  *modelChange);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+    com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleTable> pRXTable;
+
+    inline com::sun::star::accessibility::XAccessibleTable* GetXInterface()
+    {
+        return pRXTable.get();
+    }
+};
+
+#endif //__ACCTABLE_H_

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.h
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.rgs?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.rgs (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.rgs Thu Nov 28 12:54:21 2013
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccTable.1 = s 'AccTable Class'
+	{
+		CLSID = s '{92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6}'
+	}
+	UAccCOM.AccTable = s 'AccTable Class'
+	{
+		CLSID = s '{92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6} = s 'AccTable Class'
+		{
+			ProgID = s 'UAccCOM.AccTable.1'
+			VersionIndependentProgID = s 'UAccCOM.AccTable'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTable.rgs
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.cpp?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.cpp (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.cpp Thu Nov 28 12:54:21 2013
@@ -0,0 +1,282 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccText.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+   * Get special selection.
+   * @param startOffset Start selection offset.
+   * @param endOffset   End selection offset.
+   * @param success     Variant to accept the result of if the method call is successful.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::addSelection(long startOffset, long endOffset)//, unsigned char * success)
+{
+    
+    return CAccTextBase::get_addSelection(startOffset, endOffset);//, success);
+}
+
+/**
+   * Get special attributes.
+   * @param offset Offset.
+   * @param startOffset Variant to accept start offset.
+   * @param endOffset   Variant to accept end offset.
+   * @param textAttributes     Variant to accept attributes.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes)
+{
+    
+    return CAccTextBase::get_attributes(offset, startOffset, endOffset, textAttributes);
+}
+
+/**
+   * Get caret position.
+   * @param offset     Variant to accept caret offset.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_caretOffset(long * offset)
+{
+    
+    return CAccTextBase::get_caretOffset(offset);
+}
+
+/**
+   * Get character count.
+   * @param nCharacters  Variant to accept character count.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_characterCount(long * nCharacters)
+{
+    
+    return CAccTextBase::get_characterCount(nCharacters);
+}
+
+/**
+   * Get character extents.
+   * @param offset  Offset.
+   * @param x Variant to accpet x position.
+   * @param y Variant to accpet y position.
+   * @param width Variant to accpet width.
+   * @param Height Variant to accpet height.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height)
+{
+    
+    return CAccTextBase::get_characterExtents(offset, coordType, x, y, width, height);
+}
+
+/**
+   * Get slections count.
+   * @param nSelections Variant to accpet slections count.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_nSelections(long * nSelections)
+{
+    
+    return CAccTextBase::get_nSelections(nSelections);
+}
+
+/**
+   * Get offset of some special point.
+   * @param x X position of one point.
+   * @param x Y position of one point.
+   * @param coordType Type.
+   * @param offset Variant to accept offset.
+   * @return Result.
+*/
+
+STDMETHODIMP CAccText::get_offsetAtPoint(long x, long y, IA2CoordinateType coordType, long * offset)
+{
+    
+    return CAccTextBase::get_offsetAtPoint(x, y, coordType, offset);
+}
+
+/**
+   * Get selection range.
+   * @param selection selection count.
+   * @param startOffset Variant to accept the start offset of special selection.
+   * @param endOffset Variant to accept the end offset of special selection.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_selection(long selection, long * startOffset, long * endOffset)
+{
+    
+    return CAccTextBase::get_selection(selection, startOffset, endOffset);
+}
+
+/**
+   * Get special text.
+   * @param startOffset Start position of special range.
+   * @param endOffset   End position of special range.
+   * @param text        Variant to accept the text of special range.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_text(long startOffset, long endOffset, BSTR * text)
+{
+    
+    return CAccTextBase::get_text(startOffset, endOffset, text);
+}
+
+/**
+   * Get special text before some position.
+   * @param offset Special position.
+   * @param boundaryType Boundary type.
+   * @param startOffset Variant to accept the start offset.
+   * @param endOffset   Variant to accept the end offset.
+   * @param text        Variant to accept the special text.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+    
+    return CAccTextBase::get_textBeforeOffset(offset, boundaryType,
+            startOffset, endOffset, text);
+}
+
+/**
+   * Get special text after some position.
+   * @param offset Special position.
+   * @param boundaryType Boundary type.
+   * @param startOffset Variant to accept the start offset.
+   * @param endOffset   Variant to accept the end offset.
+   * @param text        Variant to accept the special text.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+    
+    return CAccTextBase::get_textAfterOffset(offset, boundaryType,
+            startOffset, endOffset, text);
+}
+
+/**
+   * Get special text at some position.
+   * @param offset Special position.
+   * @param boundaryType Boundary type.
+   * @param startOffset Variant to accept the start offset.
+   * @param endOffset   Variant to accept the end offset.
+   * @param text        Variant to accept the special text.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+    
+    return CAccTextBase::get_textAtOffset(offset, boundaryType,
+                                          startOffset, endOffset, text);
+}
+
+/**
+   * Remove selection.
+   * @param selectionIndex Special selection index
+   * @param success Variant to accept the memthod called result.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::removeSelection(long selectionIndex)//, unsigned char * success)
+{
+    
+    return CAccTextBase::removeSelection(selectionIndex);//, success);
+}
+
+/**
+   * Set caret position.
+   * @param offset Special position.
+   * @param success Variant to accept the memthod called result.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::setCaretOffset(long offset)
+{
+    
+    return CAccTextBase::setCaretOffset(offset);
+}
+
+/**
+   * Set special selection.
+   * @param selectionIndex Special selection index.
+   * @param startOffset start position.
+   * @param endOffset end position.
+   * @param success Variant to accept the memthod called result.
+   * @return Result.
+*/
+
+STDMETHODIMP CAccText::setSelection(long selectionIndex, long startOffset, long endOffset)
+{
+    
+    return CAccTextBase::setSelection(selectionIndex, startOffset,
+                                      endOffset);
+}
+
+/**
+   * Get characters count.
+   * @param nCharacters Variant to accept the characters count.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::get_nCharacters(long * nCharacters)
+{
+    
+    return CAccTextBase::get_nCharacters(nCharacters);
+}
+
+STDMETHODIMP CAccText::get_newText( IA2TextSegment *newText)
+{
+    return CAccTextBase::get_newText(newText);
+}
+
+STDMETHODIMP CAccText::get_oldText( IA2TextSegment *oldText)
+{
+    return CAccTextBase::get_oldText(oldText);
+}
+
+/**
+   * Scroll to special sub-string .
+   * @param startIndex Start index of sub string.
+   * @param endIndex   End index of sub string.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::scrollSubstringToPoint(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y )
+{
+    
+    return CAccTextBase::scrollSubstringToPoint(startIndex, endIndex, coordinateType, x, y);
+}
+
+STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2ScrollType scrollType)
+{
+    
+    return CAccTextBase::scrollSubstringTo(startIndex, endIndex,scrollType);
+}
+
+/**
+   * Put UNO interface.
+   * @param pXInterface UNO interface.
+   * @return Result.
+*/
+STDMETHODIMP CAccText::put_XInterface(long pXInterface)
+{
+    
+    return CAccTextBase::put_XInterface(pXInterface);
+}
+

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.h
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.h?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.h (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.h Thu Nov 28 12:54:21 2013
@@ -0,0 +1,140 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#if !defined(AFX_ACCTEXT_H__F06C5496_9959_4C7C_873E_A8D50CFB290D__INCLUDED_)
+#define AFX_ACCTEXT_H__F06C5496_9959_4C7C_873E_A8D50CFB290D__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h"       // main symbols
+
+#include "AccTextBase.h"
+
+/**
+ * CAccText implements IAccessibleText interface.
+ */
+class ATL_NO_VTABLE CAccText :
+            public CComObjectRoot,
+            public CComCoClass<CAccText,&CLSID_AccText>,
+            public IAccessibleText,
+            public CAccTextBase
+{
+public:
+    CAccText()
+    {
+            }
+    ~CAccText()
+    {
+            }
+
+    BEGIN_COM_MAP(CAccText)
+    COM_INTERFACE_ENTRY(IAccessibleText)
+    COM_INTERFACE_ENTRY(IUNOXWrapper)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    END_COM_MAP()
+
+    static HRESULT WINAPI _SmartQI(void* pv,
+                                   REFIID iid, void** ppvObject, DWORD)
+    {
+        return ((CAccText*)pv)->SmartQI(iid,ppvObject);
+    }
+
+    HRESULT SmartQI(REFIID iid, void** ppvObject)
+    {
+        if( m_pOuterUnknown )
+            return OuterQueryInterface(iid,ppvObject);
+        return E_FAIL;
+    }
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_AccText)
+
+    // IAccessibleText
+public:
+    // IAccessibleText
+
+    // Adds a text selection.
+    STDMETHOD(addSelection)(long startOffset, long endOffset);//, unsigned char * success);
+
+    // Gets text attributes.
+    STDMETHOD(get_attributes)(long offset, long * startOffset, long * endOffset, BSTR * textAttributes);
+
+    // Gets caret offset.
+    STDMETHOD(get_caretOffset)(long * offset);
+
+    // Gets total number of characters.
+    STDMETHOD(get_characterCount)(long * nCharacters);
+
+    // Gets bounding rect containing the glyph(s) representing the character
+    // at the specified text offset
+    STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height);
+
+    // Gets number of active non-contiguous selections.
+    STDMETHOD(get_nSelections)(long * nSelections);
+
+    // Gets bounding rect for the glyph at a certain point.
+    STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, long * offset);
+
+    // Gets character offsets of N-th active text selection.
+    STDMETHOD(get_selection)(long selection, long * startOffset, long * endOffset);
+
+    // Gets a range of text by offset NOTE: returned string may be longer
+    // than endOffset-startOffset bytes if text contains multi-byte characters.
+    STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+
+    // Gets a specified amount of text that ends before a specified offset.
+    STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+    // Gets a specified amount of text that spans the specified offset.
+    STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+    // Gets a specified amount of text that starts after a specified offset.
+    STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+    // Unselects a range of text.
+    STDMETHOD(removeSelection)(long selectionIndex);//, unsigned char * success);
+
+    // Moves text caret.
+    STDMETHOD(setCaretOffset)(long offset);//, unsigned char * success);
+
+    // Changes the bounds of an existing selection.
+    STDMETHOD(setSelection)(long selectionIndex, long startOffset, long endOffset);//, unsigned char * success);
+
+    // Gets total number of characters.
+    // NOTE: this may be different than the total number of bytes required
+    // to store the text, if the text contains multi-byte characters.
+    STDMETHOD(get_nCharacters)(long * nCharacters);
+
+    // Makes specific part of string visible on screen.
+    STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum IA2ScrollType scrollType);
+    STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y );
+
+    STDMETHOD(get_newText)( IA2TextSegment *newText);
+
+    STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+};
+
+#endif // !defined(AFX_ACCTEXT_H__F06C5496_9959_4C7C_873E_A8D50CFB290D__INCLUDED_)

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.h
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.rgs?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.rgs (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.rgs Thu Nov 28 12:54:21 2013
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccText.1 = s 'AccText Class'
+	{
+		CLSID = s '{6D8AB08B-CCE9-471E-8A41-35773D5263F5}'
+	}
+	UAccCOM.AccText = s 'AccText Class'
+	{
+		CLSID = s '{6D8AB08B-CCE9-471E-8A41-35773D5263F5}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {6D8AB08B-CCE9-471E-8A41-35773D5263F5} = s 'AccText Class'
+		{
+			ProgID = s 'UAccCOM.AccText.1'
+			VersionIndependentProgID = s 'UAccCOM.AccText'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccText.rgs
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.cpp?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.cpp (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.cpp Thu Nov 28 12:54:21 2013
@@ -0,0 +1,995 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccTextBase.cpp: implementation of the CAccTextBase class.
+//////////////////////////////////////////////////////////////////////
+#include "stdafx.h"
+#include <string>
+#define WNT
+
+#include <com/sun/star/accessibility/AccessibleTextType.hpp>
+#include "AccTextBase.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextSelection.hpp>
+#include "MAccessible.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace rtl;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+OUString ReplaceFourChar(OUString oldOUString);
+
+CAccTextBase::CAccTextBase()
+{}
+
+CAccTextBase::~CAccTextBase()
+{}
+
+
+/**
+   * Get special selection.
+   * @param startOffset Start selection offset.
+   * @param endOffset   End selection offset.
+   * @param success     Variant to accept the result of if the method call is successful.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_addSelection(long startOffset, long endOffset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK XInterface#
+    if(pUNOInterface == NULL)
+        return E_FAIL;
+
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+    Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+    if( pRExtension.is() )
+    {
+        pRExtension->addSelection(0, startOffset, endOffset);
+        return S_OK;
+    }
+    else
+    {
+        GetXInterface()->setSelection(startOffset, endOffset);
+        return S_OK;
+    }
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get special attributes.
+   * @param offset Offset.
+   * @param startOffset Variant to accept start offset.
+   * @param endOffset   Variant to accept end offset.
+   * @param textAttributes     Variant to accept attributes.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (startOffset == NULL || endOffset == NULL || textAttributes == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+    {
+        return E_FAIL;
+    }
+
+    if( offset < 0 || offset > GetXInterface()->getCharacterCount() )
+        return E_FAIL;
+
+	std::wstring strAttrs;  
+
+    strAttrs += L"Version:1;";
+
+    Sequence< ::com::sun::star::beans::PropertyValue > pValues = GetXInterface()->getCharacterAttributes(offset, Sequence< rtl::OUString >());
+    int nCount = pValues.getLength();
+
+    short numberingLevel = 0;
+    OUString numberingPrefix;
+	Any anyNumRule;
+    bool bHaveNumberingPrefixAttr = false;
+	bool bHaveNumberingLevel = false;
+	bool bHaveNumberingRules = false;
+    for(int i =0; i<nCount; i++)
+    {
+
+        ::com::sun::star::beans::PropertyValue &pValue = pValues[i];
+        if(pValue.Name.compareTo(OUString::createFromAscii("NumberingLevel"))==0)
+        {
+			if (pValue.Value != Any())
+				pValue.Value >>= numberingLevel;
+			else
+				numberingLevel = -1;
+			bHaveNumberingLevel = true;
+            continue;
+        }
+        if(pValue.Name.compareTo(OUString::createFromAscii("NumberingPrefix"))==0)
+        {
+            pValue.Value >>=numberingPrefix;
+            bHaveNumberingPrefixAttr = true;
+            continue;
+        }
+        if(pValue.Name.compareTo(OUString::createFromAscii("NumberingRules"))==0)
+        {
+			bHaveNumberingRules = true;
+			anyNumRule = pValue.Value;
+			continue;
+        }
+		if (bHaveNumberingLevel && bHaveNumberingRules && bHaveNumberingPrefixAttr)
+		{
+			OLECHAR numProps[512] = {0};
+			strAttrs+=L";";
+			numberingPrefix = ReplaceFourChar(numberingPrefix);
+			CMAccessible::get_OLECHAR4Numbering(anyNumRule,numberingLevel,numberingPrefix,numProps);
+			strAttrs += numProps;
+			bHaveNumberingLevel = 0;
+			bHaveNumberingRules = 0;
+		}
+		if( (bHaveNumberingPrefixAttr && i > 1 ) ||
+			(!bHaveNumberingPrefixAttr && i > 0 ) ) //element 0 is NumberingPrefix, not write alone
+		{
+			strAttrs+=L";";
+		}
+        strAttrs += pValue.Name.getStr();
+        strAttrs += L":";
+
+        OLECHAR pTemp[2048] = {0};
+
+        if (pValue.Name.compareTo(OUString::createFromAscii("CharBackColor"))==0 ||
+                pValue.Name.compareTo(OUString::createFromAscii("CharColor"))==0 ||
+                pValue.Name.compareTo(OUString::createFromAscii("CharUnderlineColor"))==0 )
+        {
+            unsigned long nColor;
+            pValue.Value >>= nColor;
+            OLECHAR pBuf[64];
+            swprintf( pBuf, L"%08X", nColor );
+            pTemp[0]=L'#';
+            wcscat( pTemp, pBuf );
+
+        }
+        else
+        {
+            CMAccessible::get_OLECHARFromAny(pValue.Value,pTemp);
+        }
+
+        strAttrs +=pTemp;
+    }
+	strAttrs +=L";";
+    // #CHECK#
+    if(*textAttributes)
+        SysFreeString(*textAttributes);
+    *textAttributes = SysAllocString(strAttrs.c_str());
+
+    if( offset < GetXInterface()->getCharacterCount() )
+    {
+        TextSegment textSeg = GetXInterface()->getTextAtIndex(offset, AccessibleTextType::ATTRIBUTE_RUN);
+        *startOffset = textSeg.SegmentStart;
+        *endOffset = textSeg.SegmentEnd;
+    }
+    else
+    {
+        *startOffset = offset;
+        *endOffset = offset;
+    }
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get caret position.
+   * @param offset     Variant to accept caret offset.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_caretOffset(long * offset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (offset == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+    {
+        *offset = 0;
+        return S_OK;
+    }
+
+    *offset = GetXInterface()->getCaretPosition();
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get character count.
+   * @param nCharacters  Variant to accept character count.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_characterCount(long * nCharacters)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (nCharacters == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+    {
+        *nCharacters = 0;
+        return S_OK;
+    }
+
+    *nCharacters = GetXInterface()->getCharacterCount();
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get character extents.
+   * @param offset  Offset.
+   * @param x Variant to accept x position.
+   * @param y Variant to accept y position.
+   * @param width Variant to accept width.
+   * @param Height Variant to accept height.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (x == NULL || height == NULL || y == NULL || width == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    if(offset < 0 || offset > GetXInterface()->getCharacterCount() )
+        return E_FAIL;
+
+    com::sun::star::awt::Rectangle rectangle;
+    rectangle = GetXInterface()->getCharacterBounds(offset);
+
+    //IA2Point aPoint;
+    com::sun::star::awt::Point aPoint;
+
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+    if( !pRContext.is() )
+    {
+        return E_FAIL;
+    }
+    Reference<XAccessibleComponent> pRComp(pRContext,UNO_QUERY);
+    if( pRComp.is() )
+    {
+        if(coordType == IA2_COORDTYPE_SCREEN_RELATIVE)
+        {
+            ::com::sun::star::awt::Point pt = pRComp->getLocationOnScreen();
+            aPoint.X = pt.X;
+            aPoint.Y = pt.Y;
+        }
+        else if(coordType == IA2_COORDTYPE_PARENT_RELATIVE)
+        {
+            ::com::sun::star::awt::Point pt = pRComp->getLocation();
+            aPoint.X = pt.X;
+            aPoint.Y = pt.Y;
+        }
+    }
+    rectangle.X = rectangle.X + aPoint.X;
+    rectangle.Y = rectangle.Y + aPoint.Y;
+
+    *x = rectangle.X;
+    *y = rectangle.Y;
+
+    // GetXInterface()->getCharacterBounds() have different implement in different acc component
+    // But we need return the width/height == 1 for every component when offset == text length.
+    // So we ignore the return result of GetXInterface()->getCharacterBounds() when offset == text length.
+    if( offset == GetXInterface()->getCharacterCount() )
+    {
+        *width = 1;
+        *height = 1;
+    }
+    else
+    {
+        *width = rectangle.Width;
+        *height = rectangle.Height;
+    }
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get selections count.
+   * @param nSelections Variant to accept selections count.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_nSelections(long * nSelections)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (nSelections == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(pUNOInterface == NULL)
+    {
+        *nSelections = 0;
+        return S_OK;
+    }
+
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+    Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+    if( pRExtension.is() )
+    {
+        *nSelections = pRExtension->getSelectedPortionCount();
+        return S_OK;
+    }
+
+    long iLength = GetXInterface()->getSelectedText().getLength();
+    if( iLength> 0)
+    {
+        *nSelections = 1;
+        return S_OK;
+    }
+
+    *nSelections = 0;
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get offset of some special point.
+   * @param x X position of one point.
+   * @param x Y position of one point.
+   * @param coordType Type.
+   * @param offset Variant to accept offset.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_offsetAtPoint(long x, long y, IA2CoordinateType, long * offset)
+{
+	CHECK_ENABLE_INF
+    ENTER_PROTECTED_BLOCK
+
+    if (offset == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    com::sun::star::awt::Point point;
+    point.X = x;
+    point.Y = y;
+    *offset = GetXInterface()->getIndexAtPoint(point);
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get selection range.
+   * @param selection selection count.
+   * @param startOffset Variant to accept the start offset of special selection.
+   * @param endOffset Variant to accept the end offset of special selection.
+   * @return Result.
+*/
+
+STDMETHODIMP CAccTextBase::get_selection(long selectionIndex, long * startOffset, long * endOffset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (startOffset == NULL || endOffset == NULL )
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(pUNOInterface == NULL )
+        return E_FAIL;
+
+    long nSelection = 0;
+    get_nSelections(&nSelection);
+
+    if(selectionIndex >= nSelection || selectionIndex < 0 )
+        return E_FAIL;
+
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+    Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+    if( pRExtension.is() )
+    {
+        *startOffset = pRExtension->getSeletedPositionStart(selectionIndex);
+        *endOffset = pRExtension->getSeletedPositionEnd(selectionIndex);
+        return S_OK;
+    }
+    else if(GetXInterface()->getSelectionEnd() > -1)
+    {
+        *startOffset = GetXInterface()->getSelectionStart();
+        *endOffset = GetXInterface()->getSelectionEnd();
+        return S_OK;
+    }
+
+    *startOffset = 0;
+    *endOffset = 0;
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get special text.
+   * @param startOffset Start position of special range.
+   * @param endOffset   End position of special range.
+   * @param text        Variant to accept the text of special range.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_text(long startOffset, long endOffset, BSTR * text)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (text == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    if (endOffset < -1 || endOffset < startOffset )
+    {
+        return E_FAIL;
+    }
+
+    ::rtl::OUString ouStr;
+    if (endOffset == -1 )
+    {
+        long nLen=0;
+        if(SUCCEEDED(get_characterCount(&nLen)))
+        {
+            ouStr = GetXInterface()->getTextRange( 0, nLen );
+        }
+    }
+    else
+    {
+        ouStr = GetXInterface()->getTextRange( startOffset, endOffset );
+    }
+
+    SysFreeString(*text);
+    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get special text before some position.
+   * @param offset Special position.
+   * @param boundaryType Boundary type.
+   * @param startOffset Variant to accept the start offset.
+   * @param endOffset   Variant to accept the end offset.
+   * @param text        Variant to accept the special text.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK#
+    if (startOffset == NULL || endOffset == NULL || text == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    // In New UNO IAccessibleText.idl these constant values are defined as follows:
+    //
+    //  const long TEXT_BOUNDARY_CHAR = -1;
+    //  const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
+    //  const long TEXT_BOUNDARY_START_OF_WORD = -3;
+    //  const long TEXT_BOUNDARY_END_OF_WORD = -4;
+    //  const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
+    //  const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
+    //  const long TEXT_BOUNDARY_START_OF_LINE = -7;
+    //  const long TEXT_BOUNDARY_END_OF_LINE = -8;
+    //
+    // In UNO, the corresponding values are as follows:
+    //
+    //  const short CHARACTER = 1;
+    //  const short WORD = 2;
+    //  const short SENTENCE = 3;
+    //  const short PARAGRAPH = 4;
+    //  const short LINE = 5;
+    //  const short GLYPH = 6;
+    //  const short ATTRIBUTE_RUN = 7;
+    //
+
+    long			lUnoBoundaryType;
+
+    switch(boundaryType)
+    {
+    case IA2_TEXT_BOUNDARY_CHAR:
+        lUnoBoundaryType = 1; // CHARACTER;
+        break;
+    case IA2_TEXT_BOUNDARY_WORD:
+        lUnoBoundaryType = 2; // WORD;
+        break;
+    case IA2_TEXT_BOUNDARY_SENTENCE:
+        lUnoBoundaryType = 3; // SENTENCE;
+        break;
+    case IA2_TEXT_BOUNDARY_LINE:
+        lUnoBoundaryType = 5; // LINE;
+        break;
+    case IA2_TEXT_BOUNDARY_PARAGRAPH:
+        lUnoBoundaryType = 4;
+        break;
+    case IA2_TEXT_BOUNDARY_ALL:
+        {
+            long nChar;
+            get_nCharacters( &nChar );
+            *startOffset = 0;
+            *endOffset = nChar;
+            return get_text(0, nChar, text);
+        }
+        break;
+    default:
+        return E_FAIL;
+    }
+
+    TextSegment segment = GetXInterface()->getTextBeforeIndex( offset, sal_Int16(lUnoBoundaryType));
+    ::rtl::OUString ouStr = segment.SegmentText;
+    SysFreeString(*text);
+    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *startOffset = segment.SegmentStart;
+    *endOffset = segment.SegmentEnd;
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get special text after some position.
+   * @param offset Special position.
+   * @param boundaryType Boundary type.
+   * @param startOffset Variant to accept the start offset.
+   * @param endOffset   Variant to accept the end offset.
+   * @param text        Variant to accept the special text.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (startOffset == NULL || endOffset == NULL || text == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    // In New UNO IAccessibleText.idl these constant values are defined as follows:
+    //
+    //  const long TEXT_BOUNDARY_CHAR = -1;
+    //  const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
+    //  const long TEXT_BOUNDARY_START_OF_WORD = -3;
+    //  const long TEXT_BOUNDARY_END_OF_WORD = -4;
+    //  const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
+    //  const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
+    //  const long TEXT_BOUNDARY_START_OF_LINE = -7;
+    //  const long TEXT_BOUNDARY_END_OF_LINE = -8;
+    //
+    // In UNO, the corresponding values are as follows:
+    //
+    //  const short CHARACTER = 1;
+    //  const short WORD = 2;
+    //  const short SENTENCE = 3;
+    //  const short PARAGRAPH = 4;
+    //  const short LINE = 5;
+    //  const short GLYPH = 6;
+    //  const short ATTRIBUTE_RUN = 7;
+    //
+
+    long			lUnoBoundaryType;
+    switch(boundaryType)
+    {
+    case IA2_TEXT_BOUNDARY_CHAR:
+        lUnoBoundaryType = 1; // CHARACTER;
+        break;
+    case IA2_TEXT_BOUNDARY_WORD:
+        lUnoBoundaryType = 2; // WORD;
+        break;
+    case IA2_TEXT_BOUNDARY_SENTENCE:
+        lUnoBoundaryType = 3; // SENTENCE;
+        break;
+    case IA2_TEXT_BOUNDARY_LINE:
+        lUnoBoundaryType = 5; // LINE;
+        break;
+    case IA2_TEXT_BOUNDARY_PARAGRAPH:
+        lUnoBoundaryType = 4;
+        break;
+    case IA2_TEXT_BOUNDARY_ALL:
+        {
+            long nChar;
+            get_nCharacters( &nChar );
+            *startOffset = 0;
+            *endOffset = nChar;
+            return get_text(0, nChar, text);
+        }
+        break;
+    default:
+        return E_FAIL;
+    }
+
+    TextSegment segment = GetXInterface()->getTextBehindIndex( offset, sal_Int16(lUnoBoundaryType));
+    ::rtl::OUString ouStr = segment.SegmentText;
+    SysFreeString(*text);
+    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *startOffset = segment.SegmentStart;
+    *endOffset = segment.SegmentEnd;
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get special text at some position.
+   * @param offset Special position.
+   * @param boundaryType Boundary type.
+   * @param startOffset Variant to accept the start offset.
+   * @param endOffset   Variant to accept the end offset.
+   * @param text        Variant to accept the special text.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+    
+
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (startOffset == NULL || text == NULL ||endOffset == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    // In New UNO IAccessibleText.idl these constant values are defined as follows:
+    //
+    //  const long TEXT_BOUNDARY_CHAR = -1;
+    //  const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
+    //  const long TEXT_BOUNDARY_START_OF_WORD = -3;
+    //  const long TEXT_BOUNDARY_END_OF_WORD = -4;
+    //  const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
+    //  const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
+    //  const long TEXT_BOUNDARY_START_OF_LINE = -7;
+    //  const long TEXT_BOUNDARY_END_OF_LINE = -8;
+    //
+    // In UNO, the corresponding values are as follows:
+    //
+    //  const short CHARACTER = 1;
+    //  const short WORD = 2;
+    //  const short SENTENCE = 3;
+    //  const short PARAGRAPH = 4;
+    //  const short LINE = 5;
+    //  const short GLYPH = 6;
+    //  const short ATTRIBUTE_RUN = 7;
+    //
+
+    long			lUnoBoundaryType;
+
+    switch(boundaryType)
+    {
+    case IA2_TEXT_BOUNDARY_CHAR:
+        lUnoBoundaryType = 1; // CHARACTER;
+        break;
+    case IA2_TEXT_BOUNDARY_WORD:
+        lUnoBoundaryType = 2; // WORD;
+        break;
+    case IA2_TEXT_BOUNDARY_SENTENCE:
+        lUnoBoundaryType = 3; // SENTENCE;
+        break;
+    case IA2_TEXT_BOUNDARY_LINE:
+        lUnoBoundaryType = 5; // LINE;
+        break;
+    case IA2_TEXT_BOUNDARY_PARAGRAPH:
+        lUnoBoundaryType = 4;
+        break;
+    case IA2_TEXT_BOUNDARY_ALL:
+        {
+            long nChar;
+            get_nCharacters( &nChar );
+            *startOffset = 0;
+            *endOffset = nChar;
+            return get_text(0, nChar, text);
+        }
+        break;
+    default:
+        return E_FAIL;
+    }
+
+    TextSegment segment = GetXInterface()->getTextAtIndex( offset, sal_Int16(lUnoBoundaryType));
+    ::rtl::OUString ouStr = segment.SegmentText;
+    SysFreeString(*text);
+    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *startOffset = segment.SegmentStart;
+    *endOffset = segment.SegmentEnd;
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Remove selection.
+   * @param selectionIndex Special selection index
+   * @param success Variant to accept the memthod called result.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::removeSelection(long selectionIndex)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK XInterface#
+    if(pUNOInterface == NULL)
+    {
+        return E_FAIL;
+    }
+
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+    Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+    if( pRExtension.is() )
+    {
+        pRExtension->removeSelection(selectionIndex);
+        return S_OK;
+    }
+	else
+    {
+        GetXInterface()->setSelection(0, 0);
+        return S_OK;
+    }
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Set caret position.
+   * @param offset Special position.
+   * @param success Variant to accept the memthod called result.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::setCaretOffset(long offset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK XInterface#
+    if(!pRXText.is())
+        return E_FAIL;
+
+    GetXInterface()->setCaretPosition( offset);
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Set special selection.
+   * @param selectionIndex Special selection index.
+   * @param startOffset start position.
+   * @param endOffset end position.
+   * @param success Variant to accept the memthod called result.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::setSelection(long, long startOffset, long endOffset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK XInterface#
+    if(!pRXText.is())
+    {
+        return E_FAIL;
+    }
+
+    GetXInterface()->setSelection( startOffset,	endOffset );
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get characters count.
+   * @param nCharacters Variant to accept the characters count.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_nCharacters(long * nCharacters)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (nCharacters == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXText.is())
+    {
+        *nCharacters = 0;
+        return S_OK;
+    }
+
+    *nCharacters = GetXInterface()->getCharacterCount();
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+// added by qiuhd, 2006/07/03, for direver 07/11
+STDMETHODIMP CAccTextBase::get_newText( IA2TextSegment *)
+{
+    return E_NOTIMPL;
+}
+
+STDMETHODIMP CAccTextBase::get_oldText( IA2TextSegment *)
+{
+    return E_NOTIMPL;
+}
+
+/**
+   * Scroll to special sub-string .
+   * @param startIndex Start index of sub string.
+   * @param endIndex   End index of sub string.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::scrollSubstringToPoint(long, long, IA2CoordinateType, long, long )
+{
+    
+
+    ENTER_PROTECTED_BLOCK
+
+    return E_NOTIMPL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccTextBase::scrollSubstringTo(long, long, IA2ScrollType)
+{
+    
+
+    ENTER_PROTECTED_BLOCK
+
+    return E_NOTIMPL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Put UNO interface.
+   * @param pXInterface UNO interface.
+   * @return Result.
+*/
+STDMETHODIMP CAccTextBase::put_XInterface(long pXInterface)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    CUNOXWrapper::put_XInterface(pXInterface);
+    //special query.
+    if(pUNOInterface == NULL)
+        return E_FAIL;
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+    if( !pRContext.is() )
+    {
+        return E_FAIL;
+    }
+    Reference<XAccessibleText> pRXI(pRContext,UNO_QUERY);
+    if( !pRXI.is() )
+        pRXText = NULL;
+    else
+        pRXText = pRXI;
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString replaceStr)
+{
+    int iReplace = -1;
+    iReplace = oldOUString.lastIndexOf(replacedChar);
+    if (iReplace > -1)
+    {
+        for(;iReplace>-1;)
+        {
+            oldOUString = oldOUString.replaceAt(iReplace,1, replaceStr);
+            iReplace=oldOUString.lastIndexOf(replacedChar,iReplace);
+        }
+    }
+    return oldOUString;
+
+}
+OUString ReplaceFourChar(OUString oldOUString)
+{
+    oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii("\\"),OUString::createFromAscii("\\\\"));
+    oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii(";"),OUString::createFromAscii("\\;"));
+    oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii("="),OUString::createFromAscii("\\="));
+    oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii(","),OUString::createFromAscii("\\,"));
+    oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii(":"),OUString::createFromAscii("\\:"));
+    return oldOUString;
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.h
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.h?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.h (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.h Thu Nov 28 12:54:21 2013
@@ -0,0 +1,122 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+// AccTextBase.h: interface for the CAccTextBase class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ACCTEXTBASE_H__B9AE05F6_E28B_4CF3_A8F2_EEE5D2E00B82__INCLUDED_)
+#define AFX_ACCTEXTBASE_H__B9AE05F6_E28B_4CF3_A8F2_EEE5D2E00B82__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WNT
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include "UNOXWrapper.h"
+
+class ATL_NO_VTABLE CAccTextBase : public CUNOXWrapper
+{
+public:
+    CAccTextBase();
+    virtual ~CAccTextBase();
+
+    // IAccessibleText
+public:
+    // IAccessibleText
+
+    // Adds a text selection.
+    STDMETHOD(get_addSelection)(long startOffset, long endOffset);
+
+    // Gets text attributes.
+    STDMETHOD(get_attributes)(long offset, long * startOffset, long * endOffset, BSTR * textAttributes);
+
+    // Gets caret offset.
+    STDMETHOD(get_caretOffset)(long * offset);
+
+    // Gets total number of characters.
+    STDMETHOD(get_characterCount)(long * nCharacters);
+
+    // Gets bounding rect containing the glyph(s) representing the character
+    // at the specified text offset
+    STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height);
+
+    // Gets number of active non-contiguous selections.
+    STDMETHOD(get_nSelections)(long * nSelections);
+
+    // Gets bounding rect for the glyph at a certain point.
+    STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, long * offset);
+
+    // Gets character offsets of N-th active text selection.
+    STDMETHOD(get_selection)(long selectionIndex, long * startOffset, long * endOffset);
+
+    // Gets a range of text by offset NOTE: returned string may be longer
+    // than endOffset-startOffset bytes if text contains multi-byte characters.
+    STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+
+    // Gets a specified amount of text that ends before a specified offset.
+    STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+    // Gets a specified amount of text that spans the specified offset.
+    STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+    // Gets a specified amount of text that starts after a specified offset.
+    STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+    // Unselects a range of text.
+    STDMETHOD(removeSelection)(long selectionIndex);
+
+    // Moves text caret.
+    STDMETHOD(setCaretOffset)(long offset);
+
+    // Changes the bounds of an existing selection.
+    STDMETHOD(setSelection)(long selectionIndex, long startOffset, long endOffset);
+
+    // Gets total number of characters.
+    // NOTE: this may be different than the total number of bytes required
+    // to store the text, if the text contains multi-byte characters.
+    STDMETHOD(get_nCharacters)(long * nCharacters);
+
+    STDMETHOD(get_newText)( IA2TextSegment *newText);
+
+    STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+
+    // Makes specific part of string visible on screen.
+    STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum IA2ScrollType scrollType);
+    STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y );
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+    com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleText> pRXText;
+
+    inline com::sun::star::accessibility::XAccessibleText* GetXInterface()
+    {
+        return pRXText.get();
+    }
+};
+
+#endif // !defined(AFX_ACCTEXTBASE_H__B9AE05F6_E28B_4CF3_A8F2_EEE5D2E00B82__INCLUDED_)

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccTextBase.h
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.cpp?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.cpp (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.cpp Thu Nov 28 12:54:21 2013
@@ -0,0 +1,224 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccValue.h"
+#include "MAccessible.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+   * Get current value.
+   * @param  currentValue Variant that accepts current value.
+   * @return Result.
+   */
+
+STDMETHODIMP CAccValue::get_currentValue(VARIANT * currentValue)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (currentValue == NULL)
+        return E_INVALIDARG;
+    if ( !pRXVal.is() )
+        return E_FAIL;
+
+    // Get Any type value from UNO.
+    ::com::sun::star::uno::Any	anyVal = GetXInterface()->getCurrentValue();
+    // Convert Any to VARIANT.
+    CMAccessible::ConvertAnyToVariant(anyVal, currentValue);
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Set current value.
+   * @param  Value New value should be set.
+   * @param  success If the method is successfully called.
+   * @return Result.
+   */
+STDMETHODIMP CAccValue::setCurrentValue(VARIANT value)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if ( !pRXVal.is() )
+        return E_FAIL;
+
+    HRESULT hRet = S_OK;
+    ::com::sun::star::uno::Any anyVal;
+
+    // Set value according to value type.
+    switch(value.vt)
+    {
+    case VT_UI1:
+        {
+            ::com::sun::star::uno::Type		typeInfo(TypeClass_CHAR, (sal_Char *)"char");
+            anyVal.setValue(&value.bVal, typeInfo);
+        }
+        break;
+
+    case VT_BOOL:
+        {
+            ::com::sun::star::uno::Type		typeInfo(TypeClass_BOOLEAN, (sal_Char *)"bool");
+            anyVal.setValue(&value.boolVal, typeInfo);
+        }
+        break;
+
+    case VT_I2:
+        {
+            ::com::sun::star::uno::Type		typeInfo(TypeClass_SHORT, (sal_Char *)"short");
+            anyVal.setValue(&value.iVal, typeInfo);
+        }
+        break;
+
+    case VT_I4:
+        {
+            ::com::sun::star::uno::Type		typeInfo(TypeClass_LONG, (sal_Char *)"long");
+            anyVal.setValue(&value.lVal, typeInfo);
+        }
+        break;
+
+    case VT_R4:
+        {
+            ::com::sun::star::uno::Type		typeInfo(TypeClass_FLOAT, (sal_Char *)"float");
+            anyVal.setValue(&value.fltVal, typeInfo);
+        }
+        break;
+
+    case VT_R8:
+        {
+            ::com::sun::star::uno::Type		typeInfo(TypeClass_DOUBLE, (sal_Char *)"double");
+            anyVal.setValue(&value.dblVal, typeInfo);
+        }
+        break;
+
+    default:
+        {
+            // Unsupport type conversion.
+            hRet = E_FAIL;
+        }
+        break;
+    }
+
+    if(hRet == S_OK)
+    {
+        hRet = pRXVal->setCurrentValue(anyVal) ? S_OK : E_FAIL ;
+    }
+
+    return hRet;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get maximum value.
+   * @param  maximumValue Variant that accepts maximum value.
+   * @return Result.
+   */
+STDMETHODIMP CAccValue::get_maximumValue(VARIANT *maximumValue)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (maximumValue == NULL)
+        return E_INVALIDARG;
+    if ( !pRXVal.is() )
+        return E_FAIL;
+
+    // Get Any type value from UNO.
+    ::com::sun::star::uno::Any	anyVal = GetXInterface()->getMaximumValue();
+    // Convert Any to VARIANT.
+    CMAccessible::ConvertAnyToVariant(anyVal, maximumValue);
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Get minimum value.
+   * @param  mininumValue Variant that accepts minimum value.
+   * @return Result.
+   */
+STDMETHODIMP CAccValue::get_minimumValue(VARIANT *mininumValue)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (mininumValue == NULL)
+        return E_FAIL;
+    if ( !pRXVal.is() )
+        return E_FAIL;
+
+    // Get Any type value from UNO.
+    ::com::sun::star::uno::Any	anyVal = GetXInterface()->getMinimumValue();
+    // Convert Any to VARIANT.
+    CMAccessible::ConvertAnyToVariant(anyVal, mininumValue);
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+   * Put valid UNO interface into com class.
+   * @param  pXInterface UNO interface.
+   * @return Result.
+   */
+STDMETHODIMP CAccValue::put_XInterface(long pXInterface)
+{
+    
+
+    ENTER_PROTECTED_BLOCK
+
+    CUNOXWrapper::put_XInterface(pXInterface);
+    //special query.
+    if(pUNOInterface == NULL)
+        return E_FAIL;
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+    if( !pRContext.is() )
+    {
+        return E_FAIL;
+    }
+    Reference<XAccessibleValue> pRXI(pRContext,UNO_QUERY);
+    if( !pRXI.is() )
+        pRXVal = NULL;
+    else
+        pRXVal = pRXI.get();
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.h
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.h?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.h (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.h Thu Nov 28 12:54:21 2013
@@ -0,0 +1,104 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#if !defined(AFX_ACCVALUE_H__CBA4972C_4188_4A18_A3CD_4A1FA3DDED38__INCLUDED_)
+#define AFX_ACCVALUE_H__CBA4972C_4188_4A18_A3CD_4A1FA3DDED38__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h"           // main symbols
+
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccValue implements IAccessibleValue interface.
+ */
+class CAccValue :
+            public CComObjectRoot,
+            public CComCoClass<CAccValue,&CLSID_AccValue>,
+            public IAccessibleValue,
+            public CUNOXWrapper
+{
+public:
+    CAccValue()
+    {
+            }
+    virtual ~CAccValue()
+    {
+            }
+
+    BEGIN_COM_MAP(CAccValue)
+    COM_INTERFACE_ENTRY(IAccessibleValue)
+    COM_INTERFACE_ENTRY(IUNOXWrapper)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    END_COM_MAP()
+
+    static HRESULT WINAPI _SmartQI(void* pv,
+                                   REFIID iid, void** ppvObject, DWORD)
+    {
+        return ((CAccValue*)pv)->SmartQI(iid,ppvObject);
+    }
+
+    HRESULT SmartQI(REFIID iid, void** ppvObject)
+    {
+        if( m_pOuterUnknown )
+            return OuterQueryInterface(iid,ppvObject);
+        return E_FAIL;
+    }
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_AccValue)
+
+    // IAccessibleValue
+public:
+    // IAccessibleValue
+
+    // Returns the value of this object as a number.
+    STDMETHOD(get_currentValue)(VARIANT *currentValue);
+
+    // Sets the value of this object to the given number.
+    STDMETHOD(setCurrentValue)(VARIANT value);
+
+    // Returns the maximal value that can be represented by this object.
+    STDMETHOD(get_maximumValue)(VARIANT *maximumValue);
+
+    // Returns the minimal value that can be represented by this object.
+    STDMETHOD(get_minimumValue)(VARIANT *mininumValue);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+    com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleValue> pRXVal;
+
+    inline com::sun::star::accessibility::XAccessibleValue* GetXInterface()
+    {
+        return pRXVal.get();
+    }
+
+};
+
+#endif // !defined(AFX_ACCVALUE_H__CBA4972C_4188_4A18_A3CD_4A1FA3DDED38__INCLUDED_)

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.h
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.rgs?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.rgs (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.rgs Thu Nov 28 12:54:21 2013
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccValue.1 = s 'AccValue Class'
+	{
+		CLSID = s '{730A561B-1AF6-49E1-9C04-9A2F48CD8512}'
+	}
+	UAccCOM.AccValue = s 'AccValue Class'
+	{
+		CLSID = s '{730A561B-1AF6-49E1-9C04-9A2F48CD8512}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {730A561B-1AF6-49E1-9C04-9A2F48CD8512} = s 'AccValue Class'
+		{
+			ProgID = s 'UAccCOM.AccValue.1'
+			VersionIndependentProgID = s 'UAccCOM.AccValue'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccValue.rgs
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h Thu Nov 28 12:54:21 2013
@@ -0,0 +1,157 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef __ACCESSIBLEKEYSTROKE_H_
+#define __ACCESSIBLEKEYSTROKE_H_
+
+#pragma	once
+        
+typedef struct _ACCESSIBLE_KEYSTROKE {
+  short modifiers;
+  short keyCode;
+  char keyChar;
+  short keyFunc;
+} ACCESSIBLE_KEYSTROKE;
+
+const short MODIFIER_SHIFT = 1;
+const short MODIFIER_CTRL = 2;
+const short MODIFIER_ALT = 4;
+
+const short KEYCODE_NUM0 = 256;
+const short KEYCODE_NUM1 = 257;
+const short KEYCODE_NUM2 = 258;
+const short KEYCODE_NUM3 = 259;
+const short KEYCODE_NUM4 = 260;
+const short KEYCODE_NUM5 = 261;
+const short KEYCODE_NUM6 = 262;
+const short KEYCODE_NUM7 = 263;
+const short KEYCODE_NUM8 = 264;
+const short KEYCODE_NUM9 = 265;
+const short KEYCODE_A = 512;
+const short KEYCODE_B = 513;
+const short KEYCODE_C = 514;
+const short KEYCODE_D = 515;
+const short KEYCODE_E = 516;
+const short KEYCODE_F = 517;
+const short KEYCODE_G = 518;
+const short KEYCODE_H = 519;
+const short KEYCODE_I = 520;
+const short KEYCODE_J = 521;
+const short KEYCODE_K = 522;
+const short KEYCODE_L = 523;
+const short KEYCODE_M = 524;
+const short KEYCODE_N = 525;
+const short KEYCODE_O = 526;
+const short KEYCODE_P = 527;
+const short KEYCODE_Q = 528;
+const short KEYCODE_R = 529;
+const short KEYCODE_S = 530;
+const short KEYCODE_T = 531;
+const short KEYCODE_U = 532;
+const short KEYCODE_V = 533;
+const short KEYCODE_W = 534;
+const short KEYCODE_X = 535;
+const short KEYCODE_Y = 536;
+const short KEYCODE_Z = 537;
+const short KEYCODE_F1 = 768;
+const short KEYCODE_F2 = 769;
+const short KEYCODE_F3 = 770;
+const short KEYCODE_F4 = 771;
+const short KEYCODE_F5 = 772;
+const short KEYCODE_F6 = 773;
+const short KEYCODE_F7 = 774;
+const short KEYCODE_F8 = 775;
+const short KEYCODE_F9 = 776;
+const short KEYCODE_F10 = 777;
+const short KEYCODE_F11 = 778;
+const short KEYCODE_F12 = 779;
+const short KEYCODE_F13 = 780;
+const short KEYCODE_F14 = 781;
+const short KEYCODE_F15 = 782;
+const short KEYCODE_F16 = 783;
+const short KEYCODE_F17 = 784;
+const short KEYCODE_F18 = 785;
+const short KEYCODE_F19 = 786;
+const short KEYCODE_F20 = 787;
+const short KEYCODE_F21 = 788;
+const short KEYCODE_F22 = 789;
+const short KEYCODE_F23 = 790;
+const short KEYCODE_F24 = 791;
+const short KEYCODE_F25 = 792;
+const short KEYCODE_F26 = 793;
+const short KEYCODE_DOWN = 1024;
+const short KEYCODE_UP = 1025;
+const short KEYCODE_LEFT = 1026;
+const short KEYCODE_RIGHT = 1027;
+const short KEYCODE_HOME = 1028;
+const short KEYCODE_END = 1029;
+const short KEYCODE_PAGEUP = 1030;
+const short KEYCODE_PAGEDOWN = 1031;
+const short KEYCODE_RETURN = 1280;
+const short KEYCODE_ESCAPE = 1281;
+const short KEYCODE_TAB = 1282;
+const short KEYCODE_BACKSPACE = 1283;
+const short KEYCODE_SPACE = 1284;
+const short KEYCODE_INSERT = 1285;
+const short KEYCODE_DELETE = 1286;
+const short KEYCODE_ADD = 1287;
+const short KEYCODE_SUBTRACT = 1288;
+const short KEYCODE_MULTIPLY = 1289;
+const short KEYCODE_DIVIDE = 1290;
+const short KEYCODE_POINT = 1291;
+const short KEYCODE_COMMA = 1292;
+const short KEYCODE_LESS = 1293;
+const short KEYCODE_GREATER = 1294;
+const short KEYCODE_EQUAL = 1295;
+const short KEYCODE_OPEN = 1296;
+const short KEYCODE_CUT = 1297;
+const short KEYCODE_COPY = 1298;
+const short KEYCODE_PASTE = 1299;
+const short KEYCODE_UNDO = 1300;
+const short KEYCODE_REPEAT = 1301;
+const short KEYCODE_FIND = 1302;
+const short KEYCODE_PROPERTIES = 1303;
+const short KEYCODE_FRONT = 1304;
+const short KEYCODE_CONTEXTMENU = 1305;
+const short KEYCODE_HELP = 1306;
+
+const short SHORTCUT_DONTKNOW = 0;
+const short NEW = 1;
+const short OPEN = 2;
+const short SAVE = 3;
+const short SAVEAS = 4;
+const short PRINT = 5;
+const short CLOSE = 6;
+const short QUIT = 7;
+const short CUT = 8;
+const short COPY = 9;
+const short PASTE = 10;
+const short UNDO = 11;
+const short REDO = 12;
+const short UNODELETE = 13;
+const short REPEAT = 14;
+const short FIND = 15;
+const short FINDBACKWARD = 16;
+const short PROPERTIES = 17;
+const short FRONT = 18;
+
+
+#endif //#define __ACCESSIBLEKEYSTROKE_H_

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp Thu Nov 28 12:54:21 2013
@@ -0,0 +1,35 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#define WNT
+#define _USE_NAMESPACE
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#include "CheckEnableAccessible.h"
+
+
+bool IsEnableAccessibleInterface()
+{
+	return Application::IsEnableAccessInterface();
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.h?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.h (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.h Thu Nov 28 12:54:21 2013
@@ -0,0 +1,30 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _CHECKENABLEACCESSIBLE_HXX
+#define _CHECKENABLEACCESSIBLE_HXX
+
+bool IsEnableAccessibleInterface();
+
+#define CHECK_ENABLE_INF if(!IsEnableAccessibleInterface()){ return S_FALSE; }
+#define CHECK_ENABLE_INF_ZERO if(!IsEnableAccessibleInterface()){ return 0; }
+
+#endif //_CHECKENABLEACCESSIBLE_HXX

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/EnumVariant.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/EnumVariant.cpp?rev=1546358&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/EnumVariant.cpp (added)
+++ openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/EnumVariant.cpp Thu Nov 28 12:54:21 2013
@@ -0,0 +1,227 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "EnumVariant.h"
+#include "MAccessible.h"
+
+#include "act.hxx"
+
+/////////////////////////////////////////////////////////////////////////////
+// CEnumVariant
+
+
+
+/**
+   * enumarate method,get next element
+   * @param  cElements The number of elements to be returned. 
+   * @param  pvar      An array of at least size celt in which the elements are to be returned.
+   * @param  pcElementFetched Pointer to the number of elements returned in rgVar, or Null¡£
+   * @return Result.
+   */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR *pvar,ULONG __RPC_FAR *pcElementFetched)
+{
+    long l1;
+    ULONG l2;
+
+    if (pvar == NULL)
+        return E_INVALIDARG;
+
+	CHECK_ENABLE_INF
+    if (pcElementFetched != NULL)
+        *pcElementFetched = 0;
+
+    // Retrieve the next cElements.
+    for (l1=m_lCurrent, l2=0; l1<m_pXAccessibleSelection->getSelectedAccessibleChildCount() &&
+            l2<cElements; l1++, l2++)
+    {
+        Reference< XAccessible > pRXAcc = m_pXAccessibleSelection->getSelectedAccessibleChild(l1);
+        IAccessible* pChild = NULL;
+        BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild);
+        if(isGet)
+        {
+            pvar[l2].vt = VT_I4;
+            ((IMAccessible*)pChild)->Get_XAccChildID(&pvar[l2].lVal);
+        }
+        else if(pRXAcc.is())
+        {
+            if(CMAccessible::g_pAgent)
+                CMAccessible::g_pAgent->InsertAccObj(pRXAcc.get(),pUNOInterface,NULL);
+            BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild);
+            if(isGet)
+            {
+                pvar[l2].vt = VT_I4;
+                ((IMAccessible*)pChild)->Get_XAccChildID(&pvar[l2].lVal);
+            }
+        }
+    }
+    // Set count of elements retrieved.
+    if (pcElementFetched != NULL)
+        *pcElementFetched = l2;
+    m_lCurrent = l1;
+
+    return (l2 < cElements) ? S_FALSE : NOERROR;
+}
+
+/**
+   * skip the elements in the given range when enumarate elements
+   * @param  cElements The number of elements to skip. 
+   * @return Result.
+   */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Skip(ULONG cElements)
+{
+	CHECK_ENABLE_INF
+    m_lCurrent += cElements;
+    if (m_lCurrent > (long)(m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount()))
+    {
+        m_lCurrent =  m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount();
+        return E_FAIL;
+    }
+    else
+        return NOERROR;
+}
+
+
+/**
+   * reset the enumaration position to initial value
+   * @param 
+   * @return Result.
+   */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Reset( void)
+{
+    m_lCurrent = m_lLBound;
+    return NOERROR;
+}
+
+
+/**
+   *create a new IEnumVariant object,
+   *copy current enumaration container and its state to 
+   *the new object
+   *AT will use the copy object to get elements
+   * @param ppenum On return, pointer to the location of the clone enumerator¡£
+   * @return Result.
+   */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR *ppenum)
+{
+    CEnumVariant * penum = NULL;
+    HRESULT hr;
+    if (ppenum == NULL)
+        return E_INVALIDARG;
+
+    *ppenum = NULL;
+
+    hr = Create(&penum);
+    if( hr == S_OK )
+    {
+        penum->PutSelection((long)pUNOInterface);
+        *ppenum = penum;
+    }
+    else
+    {
+        if (penum)
+            penum->Release();
+    }
+    return hr;
+}
+
+/**
+   *Static public method to create a CLSID_EnumVariant com object.
+   * @param ppenum Pointer to accept com object.
+   * @return Result.
+   */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum)
+{
+	ActivateActContext();
+	HRESULT hr = CoCreateInstance(CLSID_EnumVariant,NULL,
+                                 CLSCTX_SERVER,IID_IEnumVariant,(void **)ppenum);
+	DeactivateActContext();
+	if (S_OK != hr)
+    {
+        return E_FAIL;
+    }
+
+    return S_OK;
+}
+
+/**
+   *Return count of elements in current container
+   * @param.
+   * @return count of elements in current container.
+   */
+long CEnumVariant::GetCountOfElements()
+{
+	CHECK_ENABLE_INF_ZERO
+
+    if(m_pXAccessibleSelection.is())
+        return m_pXAccessibleSelection->getSelectedAccessibleChildCount();
+    return 0;
+}
+
+/**
+   * Set memeber m_pXAccessibleSelection to NULL and m_lCurrent to m_lLBound.
+   * @param.
+   * @return Result
+   */
+STDMETHODIMP CEnumVariant::ClearEnumeration()
+{
+    pUNOInterface = NULL;
+    m_pXAccessibleSelection = NULL;
+    m_lCurrent = m_lLBound;
+    return S_OK;
+}
+
+/**
+   *Static method to fetch XAccessibleSelection
+   * @param pXAcc XAccessible interface.
+   * @return XAccessibleSelection interface.
+   */
+static Reference<XAccessibleSelection> GetXAccessibleSelection(XAccessible* pXAcc)
+{
+    XAccessibleSelection* pSelection = NULL;
+    Reference< XAccessibleContext > pRContext;
+
+    if( pXAcc == NULL)
+        return NULL;
+
+    pRContext = pXAcc->getAccessibleContext();
+    if( !pRContext.is() )
+        return NULL;
+
+    Reference< XAccessibleSelection > pRSelection(pRContext,UNO_QUERY);
+    if( !pRSelection.is() )
+        return NULL;
+
+    return pRSelection;
+}
+
+/**
+   * Put valid UNO XAccessible interface.
+   * @param pXSelection XAccessible interface.
+   * @return Result..
+   */
+STDMETHODIMP CEnumVariant::PutSelection(long pXSelection)
+{
+    pUNOInterface = (XAccessible*)pXSelection;
+    m_pXAccessibleSelection = GetXAccessibleSelection(pUNOInterface);
+    return S_OK;
+}

Propchange: openoffice/branches/capstone2013/main/winaccessibility/source/UAccCOM/EnumVariant.cpp
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message