You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/11/27 18:25:54 UTC
svn commit: r1546124 [7/33] - in /openoffice/branches/alg/aw080: ./ main/
main/accessibility/inc/accessibility/extended/
main/accessibility/inc/accessibility/helper/
main/accessibility/inc/accessibility/standard/
main/accessibility/source/extended/ mai...
Modified: openoffice/branches/alg/aw080/main/offapi/com/sun/star/accessibility/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/offapi/com/sun/star/accessibility/makefile.mk?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/offapi/com/sun/star/accessibility/makefile.mk (original)
+++ openoffice/branches/alg/aw080/main/offapi/com/sun/star/accessibility/makefile.mk Wed Nov 27 17:25:40 2013
@@ -47,15 +47,18 @@ IDLFILES=\
AccessibleTableModelChangeType.idl \
AccessibleTextType.idl \
IllegalAccessibleComponentStateException.idl \
+ MSAAService.idl \
TextSegment.idl \
XAccessible.idl \
XAccessibleAction.idl \
XAccessibleComponent.idl \
XAccessibleContext.idl \
XAccessibleEditableText.idl \
+ XAccessibleExtendedAttributes.idl \
XAccessibleEventBroadcaster.idl \
XAccessibleEventListener.idl \
XAccessibleExtendedComponent.idl \
+ XAccessibleGroupPosition.idl \
XAccessibleHyperlink.idl \
XAccessibleHypertext.idl \
XAccessibleImage.idl \
@@ -65,10 +68,15 @@ IDLFILES=\
XAccessibleSelection.idl \
XAccessibleStateSet.idl \
XAccessibleTable.idl \
+ XAccessibleTableSelection.idl \
XAccessibleText.idl \
XAccessibleTextAttributes.idl \
XAccessibleTextMarkup.idl \
- XAccessibleValue.idl
+ XAccessibleTextSelection.idl \
+ XAccessibleGetAccFlowTo.idl \
+ XAccessibleValue.idl \
+ XMSAAService.idl
+
# ------------------------------------------------------------------
Modified: openoffice/branches/alg/aw080/main/postprocess/packcomponents/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/postprocess/packcomponents/makefile.mk?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/postprocess/packcomponents/makefile.mk (original)
+++ openoffice/branches/alg/aw080/main/postprocess/packcomponents/makefile.mk Wed Nov 27 17:25:40 2013
@@ -328,6 +328,7 @@ my_components += \
java_uno_accessbridge \
sysmail \
sysdtrans \
+ winaccessibility \
wininetbe1
.END
Modified: openoffice/branches/alg/aw080/main/postprocess/prj/build.lst
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/postprocess/prj/build.lst?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/postprocess/prj/build.lst (original)
+++ openoffice/branches/alg/aw080/main/postprocess/prj/build.lst Wed Nov 27 17:25:40 2013
@@ -1,4 +1,4 @@
-po postprocess :: svgio accessibility automation basctl bean chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
+po postprocess :: svgio accessibility automation basctl bean chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext smoketestdoc uui writerfilter winaccessibility oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
po postprocess usr1 - all po_mkout NULL
po postprocess\checkxml nmake - all po_checkxml NULL
po postprocess\checkdeliver nmake - all po_checkdlv NULL
Modified: openoffice/branches/alg/aw080/main/postprocess/rebase/coffbase.txt
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/postprocess/rebase/coffbase.txt?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/postprocess/rebase/coffbase.txt (original)
+++ openoffice/branches/alg/aw080/main/postprocess/rebase/coffbase.txt Wed Nov 27 17:25:40 2013
@@ -246,8 +246,6 @@ spellmi.dll 0x000000005e5e0000 0x00
splmi.dll 0x000000005e5a0000 0x00030000
srtrs1.dll 0x000000005e570000 0x00020000
ssleay32.dll 0x000000005e520000 0x00040000
-stlport_vc7145.dll 0x000000005e470000 0x000a0000
-stlport_vc71_stldebug45.dll 0x000000005e340000 0x00120000
stocservices.uno.dll 0x000000005e310000 0x00020000
store3.dll 0x000000005e2e0000 0x00020000
streams.uno.dll 0x000000005e2b0000 0x00020000
Modified: openoffice/branches/alg/aw080/main/sal/cppunittester/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/cppunittester/makefile.mk?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/cppunittester/makefile.mk (original)
+++ openoffice/branches/alg/aw080/main/sal/cppunittester/makefile.mk Wed Nov 27 17:25:40 2013
@@ -35,13 +35,6 @@ all:
.ELSE
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
-
CFLAGSCXX += $(CPPUNIT_CFLAGS)
OBJFILES = $(APP1OBJS)
Modified: openoffice/branches/alg/aw080/main/sal/inc/rtl/string.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/inc/rtl/string.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/inc/rtl/string.hxx (original)
+++ openoffice/branches/alg/aw080/main/sal/inc/rtl/string.hxx Wed Nov 27 17:25:40 2013
@@ -419,7 +419,7 @@ public:
@return a hash code value for this object.
- @see rtl::OStringHash for convenient use of STLPort's hash_map
+ @see rtl::OStringHash for convenient use of hash_map / unordered_map
*/
sal_Int32 hashCode() const SAL_THROW(())
{
@@ -911,7 +911,7 @@ public:
/** A helper to use OStrings with hash maps.
Instances of this class are unary function objects that can be used as
- hash function arguments to STLPort's hash_map and similar constructs.
+ hash function arguments to unordered_map, hash_map and similar constructs.
*/
struct OStringHash
{
Modified: openoffice/branches/alg/aw080/main/sal/inc/sal/main.h
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/inc/sal/main.h?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/inc/sal/main.h (original)
+++ openoffice/branches/alg/aw080/main/sal/inc/sal/main.h Wed Nov 27 17:25:40 2013
@@ -43,6 +43,8 @@ void SAL_CALL sal_detail_deinitialize();
#define INCL_LOADEXCEPTQ
#include <exceptq.h>
+#include <osl/process.h>
+
#define sal_detail_initialize(a,b) \
EXCEPTIONREGISTRATIONRECORD exRegRec = {0}; \
LoadExceptq(&exRegRec, NULL, NULL); \
Modified: openoffice/branches/alg/aw080/main/sal/osl/w32/signal.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/osl/w32/signal.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/osl/w32/signal.cxx (original)
+++ openoffice/branches/alg/aw080/main/sal/osl/w32/signal.cxx Wed Nov 27 17:25:40 2013
@@ -36,6 +36,8 @@
#endif
#include <ErrorRep.h>
#include <systools/win32/uwinapi.h>
+#include <eh.h>
+#include <stdexcept>
typedef struct _oslSignalHandlerImpl
{
@@ -423,10 +425,53 @@ oslSignalAction SAL_CALL osl_raiseSignal
/*****************************************************************************/
/* osl_setErrorReporting */
/*****************************************************************************/
+
+void win_seh_translator( unsigned nSEHCode, _EXCEPTION_POINTERS* pExcPtrs)
+{
+ (void*)pExcPtrs; // currently unused, but useful inside a debugger
+ const char* pSEHName = NULL;
+ switch( nSEHCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION: pSEHName = "SEH Exception: ACCESS VIOLATION"; break;
+ case EXCEPTION_DATATYPE_MISALIGNMENT: pSEHName = "SEH Exception: DATATYPE MISALIGNMENT"; break;
+ case EXCEPTION_BREAKPOINT: /*pSEHName = "SEH Exception: BREAKPOINT";*/ break;
+ case EXCEPTION_SINGLE_STEP: /*pSEHName = "SEH Exception: SINGLE STEP";*/ break;
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: pSEHName = "SEH Exception: ARRAY BOUNDS EXCEEDED"; break;
+ case EXCEPTION_FLT_DENORMAL_OPERAND: pSEHName = "SEH Exception: DENORMAL FLOAT OPERAND"; break;
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO: pSEHName = "SEH Exception: FLOAT DIVIDE_BY_ZERO"; break;
+ case EXCEPTION_FLT_INEXACT_RESULT: pSEHName = "SEH Exception: FLOAT INEXACT RESULT"; break;
+ case EXCEPTION_FLT_INVALID_OPERATION: pSEHName = "SEH Exception: INVALID FLOAT OPERATION"; break;
+ case EXCEPTION_FLT_OVERFLOW: pSEHName = "SEH Exception: FLOAT OVERFLOW"; break;
+ case EXCEPTION_FLT_STACK_CHECK: pSEHName = "SEH Exception: FLOAT STACK_CHECK"; break;
+ case EXCEPTION_FLT_UNDERFLOW: pSEHName = "SEH Exception: FLOAT UNDERFLOW"; break;
+ case EXCEPTION_INT_DIVIDE_BY_ZERO: pSEHName = "SEH Exception: INTEGER DIVIDE_BY_ZERO"; break;
+ case EXCEPTION_INT_OVERFLOW: pSEHName = "SEH Exception: INTEGER OVERFLOW"; break;
+ case EXCEPTION_PRIV_INSTRUCTION: pSEHName = "SEH Exception: PRIVILEDGED INSTRUCTION"; break;
+ case EXCEPTION_IN_PAGE_ERROR: pSEHName = "SEH Exception: IN_PAGE_ERROR"; break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION: pSEHName = "SEH Exception: ILLEGAL INSTRUCTION"; break;
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION: pSEHName = "SEH Exception: NONCONTINUABLE EXCEPTION"; break;
+ case EXCEPTION_STACK_OVERFLOW: pSEHName = "SEH Exception: STACK OVERFLOW"; break;
+ case EXCEPTION_INVALID_DISPOSITION: pSEHName = "SEH Exception: INVALID DISPOSITION"; break;
+ case EXCEPTION_GUARD_PAGE: pSEHName = "SEH Exception: GUARD PAGE"; break;
+ case EXCEPTION_INVALID_HANDLE: pSEHName = "SEH Exception: INVALID HANDLE"; break;
+// case EXCEPTION_POSSIBLE_DEADLOCK: pSEHName = "SEH Exception: POSSIBLE DEADLOCK"; break;
+ default: pSEHName = "Unknown SEH Exception"; break;
+ }
+
+ if( pSEHName)
+ throw std::runtime_error( pSEHName);
+}
+
sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
{
sal_Bool bOld = bErrorReportingEnabled;
bErrorReportingEnabled = bEnable;
+ if( !bEnable) // if the crash reporter is disabled
+ {
+ // fall back to handle Window's SEH events as C++ exceptions
+ _set_se_translator( win_seh_translator);
+ }
+
return bOld;
}
Modified: openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_arena.c
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_arena.c?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_arena.c (original)
+++ openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_arena.c Wed Nov 27 17:25:40 2013
@@ -1212,16 +1212,9 @@ SAL_CALL rtl_machdep_alloc (
#elif defined(SAL_W32)
addr = VirtualAlloc (NULL, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE);
#elif defined(SAL_OS2)
- {
- APIRET rc;
- addr = 0;
- // Use DosAlloc* to get a 4KB page aligned address.
- rc = DosAllocMem( &addr, size, PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_ANY);
- if (rc) {
- fprintf( stderr, "sal3::DosAllocMem failed rc=%d\n", rc);
- addr = 0;
- }
- }
+ /* Use valloc() to use libc 16MB chunks when allocating high memory, to reduce
+ virtual address fragmentation. */
+ addr = valloc( size);
#endif /* (SAL_UNX || SAL_W32 || SAL_OS2) */
if (addr != MAP_FAILED)
@@ -1256,7 +1249,7 @@ SAL_CALL rtl_machdep_free (
#elif defined(SAL_W32)
(void) VirtualFree ((LPVOID)(pAddr), (SIZE_T)(0), MEM_RELEASE);
#elif defined(SAL_OS2)
- (void) DosFreeMem( pAddr);
+ free(pAddr);
#endif /* (SAL_UNX || SAL_W32) */
}
Modified: openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_cache.c
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_cache.c?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_cache.c (original)
+++ openoffice/branches/alg/aw080/main/sal/rtl/source/alloc_cache.c Wed Nov 27 17:25:40 2013
@@ -39,6 +39,10 @@
#ifdef OS2
#undef OSL_TRACE
#define OSL_TRACE 1 ? ((void)0) : _OSL_GLOBAL osl_trace
+
+#define INCL_DOS
+#include <os2.h>
+
#endif
/* ================================================================= *
@@ -55,9 +59,12 @@ struct rtl_cache_list_st
rtl_memory_lock_type m_lock;
rtl_cache_type m_cache_head;
-#if defined(SAL_UNX) || defined(SAL_OS2)
+#if defined(SAL_UNX)
pthread_t m_update_thread;
pthread_cond_t m_update_cond;
+#elif defined(SAL_OS2)
+ TID m_update_thread;
+ HEV m_update_cond;
#elif defined(SAL_W32)
HANDLE m_update_thread;
HANDLE m_update_cond;
@@ -1376,7 +1383,7 @@ rtl_cache_wsupdate_fini (void);
/* ================================================================= */
-#if defined(SAL_UNX) || defined(SAL_OS2)
+#if defined(SAL_UNX)
#include <sys/time.h>
@@ -1431,6 +1438,62 @@ rtl_cache_wsupdate_fini (void)
/* ================================================================= */
+#elif defined(SAL_OS2)
+
+static void
+rtl_cache_wsupdate_all (void * arg);
+
+static void rtl_cache_fini (void);
+
+static void
+rtl_cache_wsupdate_init (void)
+{
+ ULONG ulThreadId;
+ APIRET rc;
+
+ RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
+ g_cache_list.m_update_done = 0;
+
+ // we use atexit() because this allows CRT exit to process handler before
+ // threads are killed. Otherwise with __attribute__(destructor) this
+ // function is called when DosExit starts processing DLL destruction
+ // which happens after ALL threads have been killed...
+ atexit( rtl_cache_fini);
+
+ //g_cache_list.m_update_cond = CreateEvent (0, TRUE, FALSE, 0);
+ /* Warp3 FP29 or Warp4 FP4 or better required */
+ rc = DosCreateEventSem( NULL, &g_cache_list.m_update_cond, 0x0800, 0);
+
+ g_cache_list.m_update_thread = (ULONG) _beginthread( rtl_cache_wsupdate_all, NULL,
+ 65*1024, (void*) 10);
+ RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+}
+
+static void
+rtl_cache_wsupdate_wait (unsigned int seconds)
+{
+ APIRET rc;
+ if (seconds > 0)
+ {
+ RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+ rc = DosWaitEventSem(g_cache_list.m_update_cond, seconds*1000);
+ RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
+ }
+}
+
+static void
+rtl_cache_wsupdate_fini (void)
+{
+ APIRET rc;
+ RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
+ g_cache_list.m_update_done = 1;
+ rc = DosPostEventSem(g_cache_list.m_update_cond);
+ RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+ rc = DosWaitThread(&g_cache_list.m_update_thread, DCWW_WAIT);
+}
+
+/* ================================================================= */
+
#elif defined(SAL_W32)
static DWORD WINAPI
@@ -1542,8 +1605,10 @@ rtl_cache_wsupdate (
/** rtl_cache_wsupdate_all()
*
*/
-#if defined(SAL_UNX) || defined(SAL_OS2)
+#if defined(SAL_UNX)
static void *
+#elif defined(SAL_OS2)
+static void
#elif defined(SAL_W32)
static DWORD WINAPI
#endif /* SAL_UNX || SAL_W32 */
@@ -1570,7 +1635,9 @@ rtl_cache_wsupdate_all (void * arg)
}
RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+#if !defined(SAL_OS2)
return (0);
+#endif
}
/* ================================================================= *
@@ -1699,7 +1766,7 @@ rtl_cache_init (void)
Delegated the call to "rtl_cache_fini()" into a dummy C++ object,
see alloc_fini.cxx .
*/
-#if defined(__GNUC__) && !defined(MACOSX)
+#if defined(__GNUC__) && !defined(MACOSX) && !defined(SAL_OS2)
static void rtl_cache_fini (void) __attribute__((destructor));
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#pragma fini(rtl_cache_fini)
Modified: openoffice/branches/alg/aw080/main/sal/rtl/source/bootstrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/rtl/source/bootstrap.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/rtl/source/bootstrap.cxx (original)
+++ openoffice/branches/alg/aw080/main/sal/rtl/source/bootstrap.cxx Wed Nov 27 17:25:40 2013
@@ -605,8 +605,6 @@ void Bootstrap_Impl::expandValue(
namespace {
struct bootstrap_map {
- // map<> may be preferred here, but hash_map<> is implemented fully inline,
- // thus there is no need to link against the stlport:
typedef std::hash_map<
rtl::OUString, Bootstrap_Impl *,
rtl::OUStringHash, std::equal_to< rtl::OUString >,
Modified: openoffice/branches/alg/aw080/main/sal/util/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sal/util/makefile.mk?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sal/util/makefile.mk (original)
+++ openoffice/branches/alg/aw080/main/sal/util/makefile.mk Wed Nov 27 17:25:40 2013
@@ -125,20 +125,6 @@ SHL1STDLIBS+= -z allextract -staticlib=C
SHL1STDLIBS=-lmmap -lpthread
.ENDIF # OS2
-# If we compile sal with STLport checking iterators
-# we need to link against the STLport
-.IF "$(USE_STLP_DEBUG)" != ""
-SHL1STDLIBS+=$(LIBSTLPORT)
-.ENDIF
-
-#The irony that using the system STL instead of
-#stlport requires that we link libsal with the
-#LIBSTLPORT alias which is not required when using
-#stlport is not lost on me
-.IF "$(USE_SYSTEM_STL)"=="YES"
-SHL1STDLIBS+=$(LIBSTLPORT)
-.ENDIF
-
.IF "$(OS)"=="MACOSX"
SHL1STDLIBS+=-framework CoreFoundation -framework Carbon
.ENDIF
Modified: openoffice/branches/alg/aw080/main/sax/qa/cppunit/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sax/qa/cppunit/makefile.mk?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sax/qa/cppunit/makefile.mk (original)
+++ openoffice/branches/alg/aw080/main/sax/qa/cppunit/makefile.mk Wed Nov 27 17:25:40 2013
@@ -38,13 +38,6 @@ ENABLE_EXCEPTIONS=TRUE
.ELSE # "$(WITH_CPPUNIT)" != "YES"
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
-
CFLAGSCXX += $(CPPUNIT_CFLAGS)
DLLPRE = # no leading "lib" on .so files
Modified: openoffice/branches/alg/aw080/main/sc/inc/chgtrack.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/inc/chgtrack.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/inc/chgtrack.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/inc/chgtrack.hxx Wed Nov 27 17:25:40 2013
@@ -44,8 +44,25 @@
#endif
#define DEBUG_CHANGETRACK 0
+//IAccessibility2 Implementation 2009-----
+class ScChangeAction;
+class ScAppOptions;
+class ScActionColorChanger
+{
+private:
+ const ScAppOptions& rOpt;
+ const ScStrCollection& rUsers;
+ String aLastUserName;
+ sal_uInt16 nLastUserIndex;
+ ColorData nColor;
-
+public:
+ ScActionColorChanger( const ScChangeTrack& rTrack );
+ ~ScActionColorChanger() {}
+ void Update( const ScChangeAction& rAction );
+ ColorData GetColor() const { return nColor; }
+};
+//-----IAccessibility2 Implementation 2009
class ScBaseCell;
class ScDocument;
Modified: openoffice/branches/alg/aw080/main/sc/inc/detfunc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/inc/detfunc.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/inc/detfunc.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/inc/detfunc.hxx Wed Nov 27 17:25:40 2013
@@ -155,6 +155,9 @@ public:
static ColorData GetCommentColor();
static void InitializeColors();
static sal_Bool IsColorsInitialized();
+//IAccessibility2 Implementation 2009-----
+ static void AppendChangTrackNoteSeparator(String &str);
+//-----IAccessibility2 Implementation 2009
};
Modified: openoffice/branches/alg/aw080/main/sc/inc/document.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/inc/document.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/inc/document.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/inc/document.hxx Wed Nov 27 17:25:40 2013
@@ -443,7 +443,23 @@ private:
sal_Int16 mnNamedRangesLockCount;
+//IAccessibility2 Implementation 2009-----
+ String msDocAccTitle;
public:
+ // SC_DLLPUBLIC sal_Bool RowHidden( SCROW nRow, SCTAB nTab );
+ //inline sal_Bool RowHidden( SCROW nRow, SCTAB nTab ); // FillInfo
+ virtual void setDocAccTitle( const String& rTitle ) { msDocAccTitle = rTitle; }
+ virtual const String getDocAccTitle() const { return msDocAccTitle; }
+
+private:
+ sal_Bool bReadOnly; // MT: Really needed???
+
+public:
+ virtual void setDocReadOnly( sal_Bool b){ bReadOnly = b; }
+ virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
+ sal_Bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder);
+ void GetCellChangeTrackNote( const ScAddress &cell,String &strTrackText,sal_Bool &pbLeftEdge);
+//-----IAccessibility2 Implementation 2009
SC_DLLPUBLIC sal_uLong GetCellCount() const; // alle Zellen
SCSIZE GetCellCount(SCTAB nTab, SCCOL nCol) const;
sal_uLong GetWeightedCount() const; // Formeln und Edit staerker gewichtet
@@ -454,7 +470,7 @@ public:
public:
SC_DLLPUBLIC ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
SfxObjectShell* pDocShell = NULL );
- SC_DLLPUBLIC ~ScDocument();
+ SC_DLLPUBLIC virtual ~ScDocument();
inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
GetServiceManager() const { return xServiceManager; }
@@ -469,6 +485,9 @@ public:
SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
XColorListSharedPtr GetColorTable();
+//IAccessibility2 Implementation 2009-----
+ ScTable* GetTableByIndex(sal_Int32 nIndex);
+//-----IAccessibility2 Implementation 2009
SC_DLLPUBLIC sfx2::LinkManager* GetLinkManager() const;
SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
Modified: openoffice/branches/alg/aw080/main/sc/inc/dptablecache.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/inc/dptablecache.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/inc/dptablecache.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/inc/dptablecache.hxx Wed Nov 27 17:25:40 2013
@@ -22,14 +22,11 @@
#ifndef DPTABLECACHE_HXX
#define DPTABLECACHE_HXX
-// Wang Xu Ming -- 12/21/2008
// Add Data Cache Support.
#ifndef SC_SCGLOB_HXX
#include "global.hxx"
#endif
-//Added by PengYunQuan for SODC_16015
#include <svl/zforlist.hxx>
-//end
#include <vector>
#include "dpglobal.hxx"
Modified: openoffice/branches/alg/aw080/main/sc/inc/drwlayer.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/inc/drwlayer.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/inc/drwlayer.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/inc/drwlayer.hxx Wed Nov 27 17:25:40 2013
@@ -228,6 +228,10 @@ public:
static IMapObject* GetHitIMapObject(SdrObject& rObject, const basegfx::B2DPoint& rWinPoint, const Window& rCmpWnd);
static ScMacroInfo* GetMacroInfo( SdrObject* pObj, sal_Bool bCreate = sal_False );
+//IAccessibility2 Implementation 2009-----
+ virtual ImageMap* GetImageMapForObject(SdrObject* pObj);
+ virtual sal_Int32 GetHyperlinkCount(SdrObject* pObj);
+//-----IAccessibility2 Implementation 2009
private:
static SfxObjectShell* pGlobalDrawPersist; // fuer AllocModel
Modified: openoffice/branches/alg/aw080/main/sc/inc/table.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/inc/table.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/inc/table.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/inc/table.hxx Wed Nov 27 17:25:40 2013
@@ -937,6 +937,11 @@ private:
SCROW mnCurRow;
SCROW mnUBound;
};
+
+//IAccessibility2 Implementation 2009-----
+public :
+ ScColumn* GetColumnByIndex(sal_Int32 index);
+//-----IAccessibility2 Implementation 2009
};
Modified: openoffice/branches/alg/aw080/main/sc/source/core/data/documen2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/data/documen2.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/data/documen2.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/data/documen2.cxx Wed Nov 27 17:25:40 2013
@@ -87,6 +87,11 @@
#include "recursionhelper.hxx"
#include "lookupcache.hxx"
#include "externalrefmgr.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "appoptio.hxx"
+#include "scmod.hxx"
+#include "../../ui/inc/viewutil.hxx"
+//-----IAccessibility2 Implementation 2009
#include "tabprotection.hxx"
#include "formulaparserpool.hxx"
#include "clipparam.hxx"
@@ -211,6 +216,9 @@ ScDocument::ScDocument( ScDocumentMode e
eGrammar( formula::FormulaGrammar::GRAM_NATIVE ),
bStyleSheetUsageInvalid( sal_True ),
mbUndoEnabled( true ),
+//IAccessibility2 Implementation 2009-----
+ bReadOnly(sal_False),
+//-----IAccessibility2 Implementation 2009
mbAdjustHeightEnabled( true ),
mbExecuteLinkEnabled( true ),
mbChangeReadOnlyEnabled( false ),
@@ -1295,3 +1303,158 @@ void ScDocument::ClearLookupCaches()
if( pLookupCacheMapImpl )
pLookupCacheMapImpl->clear();
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder)
+{
+ ScChangeTrack* pTrack = GetChangeTrack();
+ ScChangeViewSettings* pSettings = GetChangeViewSettings();
+ if ( !pTrack || !pTrack->GetFirst() || !pSettings || !pSettings->ShowChanges() )
+ return sal_False; // nix da oder abgeschaltet
+ ScActionColorChanger aColorChanger(*pTrack);
+ // Clipping passiert von aussen
+ //! ohne Clipping, nur betroffene Zeilen painten ??!??!?
+ const ScChangeAction* pAction = pTrack->GetFirst();
+ while (pAction)
+ {
+ ScChangeActionType eType;
+ if ( pAction->IsVisible() )
+ {
+ eType = pAction->GetType();
+ const ScBigRange& rBig = pAction->GetBigRange();
+ if ( rBig.aStart.Tab() == cell.Tab())
+ {
+ ScRange aRange = rBig.MakeRange();
+ if ( eType == SC_CAT_DELETE_ROWS )
+ aRange.aEnd.SetRow( aRange.aStart.Row() );
+ else if ( eType == SC_CAT_DELETE_COLS )
+ aRange.aEnd.SetCol( aRange.aStart.Col() );
+ if (ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ if (aRange.In(cell))
+ {
+ if (pColCellBoder != NULL)
+ {
+ aColorChanger.Update( *pAction );
+ Color aColor( aColorChanger.GetColor() );
+ *pColCellBoder = aColor;
+ }
+ return sal_True;
+ }
+ }
+ }
+ if ( eType == SC_CAT_MOVE &&
+ ((const ScChangeActionMove*)pAction)->
+ GetFromRange().aStart.Tab() == cell.Col() )
+ {
+ ScRange aRange = ((const ScChangeActionMove*)pAction)->
+ GetFromRange().MakeRange();
+ if (ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ if (aRange.In(cell))
+ {
+ if (pColCellBoder != NULL)
+ {
+ aColorChanger.Update( *pAction );
+ Color aColor( aColorChanger.GetColor() );
+ *pColCellBoder = aColor;
+ }
+ return sal_True;
+ }
+ }
+ }
+ }
+ pAction = pAction->GetNext();
+ }
+ return sal_False;
+}
+void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos,String &aTrackText,sal_Bool &bLeftEdge)
+{
+ aTrackText=String();
+ // Change-Tracking
+ ScChangeTrack* pTrack = GetChangeTrack();
+ ScChangeViewSettings* pSettings = GetChangeViewSettings();
+ if ( pTrack && pTrack->GetFirst() && pSettings && pSettings->ShowChanges())
+ {
+ const ScChangeAction* pFound = NULL;
+ const ScChangeAction* pFoundContent = NULL;
+ const ScChangeAction* pFoundMove = NULL;
+ long nModified = 0;
+ const ScChangeAction* pAction = pTrack->GetFirst();
+ while (pAction)
+ {
+ if ( pAction->IsVisible() &&
+ ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ ScChangeActionType eType = pAction->GetType();
+ const ScBigRange& rBig = pAction->GetBigRange();
+ if ( rBig.aStart.Tab() == aCellPos.Tab())
+ {
+ ScRange aRange = rBig.MakeRange();
+ if ( eType == SC_CAT_DELETE_ROWS )
+ aRange.aEnd.SetRow( aRange.aStart.Row() );
+ else if ( eType == SC_CAT_DELETE_COLS )
+ aRange.aEnd.SetCol( aRange.aStart.Col() );
+ if ( aRange.In( aCellPos ) )
+ {
+ pFound = pAction; // der letzte gewinnt
+ switch ( eType )
+ {
+ case SC_CAT_CONTENT :
+ pFoundContent = pAction;
+ break;
+ case SC_CAT_MOVE :
+ pFoundMove = pAction;
+ break;
+ default:
+ break;
+ }
+ ++nModified;
+ }
+ }
+ if ( eType == SC_CAT_MOVE )
+ {
+ ScRange aRange =
+ ((const ScChangeActionMove*)pAction)->
+ GetFromRange().MakeRange();
+ if ( aRange.In( aCellPos ) )
+ {
+ pFound = pAction;
+ ++nModified;
+ }
+ }
+ }
+ pAction = pAction->GetNext();
+ }
+ if ( pFound )
+ {
+ if ( pFoundContent && pFound->GetType() != SC_CAT_CONTENT )
+ pFound = pFoundContent; // Content gewinnt
+ if ( pFoundMove && pFound->GetType() != SC_CAT_MOVE &&
+ pFoundMove->GetActionNumber() >
+ pFound->GetActionNumber() )
+ pFound = pFoundMove; // Move gewinnt
+ // bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
+ if ( pFound->GetType() == SC_CAT_DELETE_COLS )
+ bLeftEdge = sal_True;
+ DateTime aDT = pFound->GetDateTime();
+ aTrackText = pFound->GetUser();
+ aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
+ aTrackText += ScGlobal::pLocaleData->getDate(aDT);
+ aTrackText += ' ';
+ aTrackText += ScGlobal::pLocaleData->getTime(aDT);
+ aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ":\n" ));
+ String aComStr=pFound->GetComment();
+ if(aComStr.Len()>0)
+ {
+ aTrackText += aComStr;
+ aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "\n( " ));
+ }
+ pFound->GetDescription( aTrackText, this );
+ if(aComStr.Len()>0)
+ {
+ aTrackText +=')';
+ }
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
Modified: openoffice/branches/alg/aw080/main/sc/source/core/data/document.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/data/document.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/data/document.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/data/document.cxx Wed Nov 27 17:25:40 2013
@@ -200,6 +200,15 @@ sal_Bool ScDocument::GetTable( const Str
return sal_False;
}
+//IAccessibility2 Implementation 2009-----
+ScTable* ScDocument::GetTableByIndex(sal_Int32 nIndex)
+{
+ if ( nIndex <= MAXTAB && nIndex >= 0)
+ return pTab[nIndex];
+
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool ScDocument::ValidTabName( const String& rName ) const
{
Modified: openoffice/branches/alg/aw080/main/sc/source/core/data/dpsave.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/data/dpsave.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/data/dpsave.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/data/dpsave.cxx Wed Nov 27 17:25:40 2013
@@ -1506,7 +1506,6 @@ void ScDPSaveDimension::Refresh( const c
};
//remove unused members
- //SODC_19124
for (MemberList::iterator i=maMemberList.begin(); i != maMemberList.end() ; )
{
rtl::OUString aMemberName = (*i)->GetName();
Modified: openoffice/branches/alg/aw080/main/sc/source/core/data/dptablecache.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/data/dptablecache.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/data/dptablecache.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/data/dptablecache.cxx Wed Nov 27 17:25:40 2013
@@ -196,8 +196,8 @@ ScDPItemData::ScDPItemData( ScDocument*
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
{
- SetString ( aDocStr ); //[SODC_19347] add liyi
- //bErr = sal_True; //[SODC_19347] del liyi
+ SetString ( aDocStr );
+ //bErr = sal_True;
mbFlag |= MK_ERR;
}
else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
@@ -293,8 +293,7 @@ sal_Int32 ScDPItemData::Compare( const S
else
return ScGlobal::GetCollator()->compareString( rA.aString, rB.aString );
}
-//
-//Wang Xu Ming SODC_17561
+
#ifdef DEBUG
void ScDPItemData::dump() const
{
@@ -304,7 +303,6 @@ void ScDPItemData::dump() const
DBG_TRACE1( "mbFlag= %d", mbFlag);
}
#endif
-//End
TypedStrData* ScDPItemData::CreateTypeString( )
{
@@ -740,9 +738,8 @@ bool ScDPTableDataCache::ValidQuery( SCR
if ( bMatchWholeCell )
{
bOk = pTransliteration->isEqual( aCellStr, *rEntry.pStr );
- //Added by zhaosz,for sodc_2702,20060808
+
String aStr = *rEntry.pStr;//"f*"
- //modified by weihuaw,for SODC_16698
//use another way to find "*" in aStr
sal_Bool bHasStar = sal_False;
xub_StrLen nIndex;
@@ -1044,7 +1041,7 @@ const ScDPItemData* ScDPTableDataCache::
SCCOL ScDPTableDataCache::GetDimensionIndex(String sName) const
{
- for ( size_t n = 1; n < mrLabelNames.size(); n ++ ) //defects, label name map wrong SODC_17590, SODC_18932,SODC_18827,SODC_18960,SODC_18923
+ for ( size_t n = 1; n < mrLabelNames.size(); n ++ ) //defects, label name map wrong
{
if ( mrLabelNames[n]->GetString() == sName )
return (SCCOL)(n-1);
Modified: openoffice/branches/alg/aw080/main/sc/source/core/data/drwlayer.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/data/drwlayer.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/data/drwlayer.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/data/drwlayer.cxx Wed Nov 27 17:25:40 2013
@@ -2059,7 +2059,27 @@ ScMacroInfo* ScDrawLayer::GetMacroInfo(
}
return 0;
}
+//IAccessibility2 Implementation 2009-----
+ImageMap* ScDrawLayer::GetImageMapForObject(SdrObject* pObj)
+{
+ ScIMapInfo* pIMapInfo = const_cast<ScIMapInfo*>( GetIMapInfo( pObj ) );
+ if ( pIMapInfo )
+ {
+ return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
+ }
+ return NULL;
+}
+sal_Int32 ScDrawLayer::GetHyperlinkCount(SdrObject* pObj)
+{
+ sal_Int32 nHLCount = 0;
+ ScMacroInfo* pMacroInfo = GetMacroInfo(pObj, sal_False);
+ if (pMacroInfo)
+ // MT IA2: GetHlink*( doesn|t exist in DEV300 anymore...
+ nHLCount = 0; // pMacroInfo->GetHlink().getLength() > 0 ? 1 : 0;
+ return nHLCount;
+}
+//-----IAccessibility2 Implementation 2009
void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist) // static
{
DBG_ASSERT(!pGlobalDrawPersist,"SetGlobalDrawPersist mehrfach");
Modified: openoffice/branches/alg/aw080/main/sc/source/core/data/table2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/data/table2.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/data/table2.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/data/table2.cxx Wed Nov 27 17:25:40 2013
@@ -3308,3 +3308,14 @@ sal_uLong ScTable::GetColOffset( SCCOL n
return n;
}
+//IAccessibility2 Implementation 2009-----
+ScColumn* ScTable::GetColumnByIndex(sal_Int32 index)
+{
+ if( index <= MAXCOL && index >= 0 )
+ {
+ return &(aCol[index]);
+ }
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
+
Modified: openoffice/branches/alg/aw080/main/sc/source/core/tool/detfunc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/core/tool/detfunc.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/core/tool/detfunc.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/core/tool/detfunc.cxx Wed Nov 27 17:25:40 2013
@@ -1723,3 +1723,10 @@ sal_Bool ScDetectiveFunc::IsColorsInitia
return bColorsInitialized;
}
+//IAccessibility2 Implementation 2009-----
+void ScDetectiveFunc::AppendChangTrackNoteSeparator(String &aDisplay)
+{
+ aDisplay.AppendAscii( RTL_CONSTASCII_STRINGPARAM("\n--------\n") );
+}
+//-----IAccessibility2 Implementation 2009
+
Modified: openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCell.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCell.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCell.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCell.cxx Wed Nov 27 17:25:40 2013
@@ -40,7 +40,9 @@
#include "editsrc.hxx"
#include "dociter.hxx"
#include "cell.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include "validat.hxx"
+//-----IAccessibility2 Implementation 2009
#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX
#include <unotools/accessiblestatesethelper.hxx>
#endif
@@ -58,6 +60,9 @@
#include <comphelper/sequence.hxx>
#include <float.h>
+//IAccessibility2 Implementation 2009-----
+#include "AccessibleSpreadsheet.hxx"
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -117,11 +122,11 @@ void SAL_CALL ScAccessibleCell::disposin
//===== XInterface =====================================================
-IMPLEMENT_FORWARD_XINTERFACE2( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase )
+IMPLEMENT_FORWARD_XINTERFACE3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
//===== XTypeProvider ===================================================
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase )
+IMPLEMENT_FORWARD_XTYPEPROVIDER3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
//===== XAccessibleComponent ============================================
@@ -240,6 +245,25 @@ uno::Reference<XAccessibleStateSet> SAL_
pStateSet->AddState(AccessibleStateType::DEFUNC);
else
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::MULTI_LINE);
+ pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
+ if (IsOpaque(xParentStates))
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ pStateSet->AddState(AccessibleStateType::SELECTABLE);
+ if (IsSelected())
+ pStateSet->AddState(AccessibleStateType::SELECTED);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ pStateSet->AddState(AccessibleStateType::TRANSIENT);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ return pStateSet;
+ }
+//-----IAccessibility2 Implementation 2009
if (IsEditable(xParentStates))
{
pStateSet->AddState(AccessibleStateType::EDITABLE);
@@ -248,6 +272,9 @@ uno::Reference<XAccessibleStateSet> SAL_
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::MULTI_LINE);
pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
+//IAccessibility2 Implementation 2009-----
+ pStateSet->AddState(AccessibleStateType::FOCUSABLE);
+//-----IAccessibility2 Implementation 2009
if (IsOpaque(xParentStates))
pStateSet->AddState(AccessibleStateType::OPAQUE);
pStateSet->AddState(AccessibleStateType::SELECTABLE);
@@ -344,6 +371,17 @@ sal_Bool ScAccessibleCell::IsOpaque(
sal_Bool ScAccessibleCell::IsSelected()
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ const ScAccessibleSpreadsheet *pSheet =static_cast<const ScAccessibleSpreadsheet*>(mxParent.get());
+ if (pSheet)
+ {
+ return pSheet->IsScAddrFormulaSel(maCellAddress);
+ }
+ return sal_False;
+ }
+//-----IAccessibility2 Implementation 2009
sal_Bool bResult(sal_False);
if (mpViewShell && mpViewShell->GetViewData())
{
@@ -363,6 +401,12 @@ ScDocument* ScAccessibleCell::GetDocumen
::std::auto_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return ::std::auto_ptr< SvxEditSource >();
+ }
+//-----IAccessibility2 Implementation 2009
::std::auto_ptr < ScAccessibleTextData > pAccessibleCellTextData
( new ScAccessibleCellTextData( pViewShell, aCell, eSplitPos, this ) );
::std::auto_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleCellTextData));
@@ -453,3 +497,146 @@ void ScAccessibleCell::AddRelation(const
pRelationSet->AddRelation(aRelation);
}
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString ReplaceOneChar(::rtl::OUString oldOUString, ::rtl::OUString replacedChar, ::rtl::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;
+}
+::rtl::OUString ReplaceFourChar(::rtl::OUString oldOUString)
+{
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii("\\"),::rtl::OUString::createFromAscii("\\\\"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(";"),::rtl::OUString::createFromAscii("\\;"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii("="),::rtl::OUString::createFromAscii("\\="));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(","),::rtl::OUString::createFromAscii("\\,"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(":"),::rtl::OUString::createFromAscii("\\:"));
+ return oldOUString;
+}
+
+uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any strRet;
+ if (mpViewShell)
+ {
+ const ::rtl::OUString strAttr(::rtl::OUString::createFromAscii(":"));
+ const ::rtl::OUString strSplit(::rtl::OUString::createFromAscii(";"));
+ ::rtl::OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
+ strFor = strFor.replaceAt(0,1,::rtl::OUString::createFromAscii(""));
+ strFor = ReplaceFourChar(strFor);
+ strFor =::rtl::OUString::createFromAscii("Formula:") + strFor;
+ strFor +=strSplit;
+ strFor +=::rtl::OUString::createFromAscii("Note:");
+ strFor +=ReplaceFourChar(GetAllDisplayNote());
+ strFor +=strSplit;
+ strFor += getShadowAttrs();//the string returned contains the spliter ";"
+ strFor += getBorderAttrs();//the string returned contains the spliter ";"
+ //end of cell attributes
+ if( mpDoc )
+ {
+ strFor += ::rtl::OUString::createFromAscii("isdropdown:");
+ if( IsDropdown() )
+ strFor+= ::rtl::OUString::createFromAscii("true");
+ else
+ strFor+= ::rtl::OUString::createFromAscii("false");
+ strFor += ::rtl::OUString::createFromAscii(";");
+ }
+ strRet <<= strFor ;
+ }
+ return strRet;
+}
+
+// cell has its own ParaIndent property, so when calling character attributes on cell, the ParaIndent should replace the ParaLeftMargin if its value is not zero.
+uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes );
+ beans::PropertyValue *pAttribs = aAttribs.getArray();
+
+ sal_uInt16 nParaIndent = static_cast< const SfxUInt16Item* >( mpDoc->GetAttr( maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_INDENT ) )->GetValue();
+ if (nParaIndent > 0)
+ {
+ ::rtl::OUString sLeftMarginName (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaLeftMargin")));
+ for (int i = 0; i < aAttribs.getLength(); ++i)
+ {
+ if (sLeftMarginName == pAttribs[i].Name)
+ {
+ pAttribs[i].Value = uno::makeAny( nParaIndent );
+ break;
+ }
+ }
+ }
+ return aAttribs;
+}
+
+sal_Bool ScAccessibleCell::IsFormulaMode()
+{
+ ScAccessibleSpreadsheet* pSheet =static_cast<ScAccessibleSpreadsheet*>(mxParent.get());
+ if (pSheet)
+ {
+ return pSheet->IsFormulaMode();
+ }
+ return sal_False;
+}
+sal_Bool ScAccessibleCell::IsDropdown()
+{
+ sal_uInt16 nPosX = maCellAddress.Col();
+ sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
+ sal_uInt16 nTab = maCellAddress.Tab();
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_VALIDDATA ) )->GetValue();
+ if( nValidation )
+ {
+ const ScValidationData* pData = mpDoc->GetValidationEntry( nValidation );
+ if( pData && pData->HasSelectionList() )
+ return sal_True;
+ }
+ //-----IAccessibility2 Implementation 2009
+ ScMergeFlagAttr* pAttr;
+ pAttr = (ScMergeFlagAttr*)mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG );
+ if( pAttr->HasAutoFilter() )
+ {
+ return sal_True;
+ }
+ else
+ {
+ sal_uInt16 nTabCount = mpDoc->GetTableCount();
+ if ( nTab+1<nTabCount && mpDoc->IsScenario(nTab+1) && !mpDoc->IsScenario(nTab) )
+ {
+ sal_uInt16 i;
+ ScMarkData aMarks;
+ for (i=nTab+1; i<nTabCount && mpDoc->IsScenario(i); i++)
+ mpDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME );
+ ScRangeList aRanges;
+ aMarks.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_Bool bHasScenario;
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.Count();
+ for (i=0; i<nRangeCount; i++)
+ {
+ ScRange aRange = *aRanges.GetObject(i);
+ mpDoc->ExtendTotalMerge( aRange );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
+ // MT IA2: Not used: sal_Bool bIsInScen = sal_False;
+ if ( bTextBelow )
+ {
+ bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aEnd.Row() == nPosY-1);
+ }
+ else
+ {
+ bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aStart.Row() == nPosY+1);
+ }
+ if( bHasScenario ) return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
Modified: openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCellBase.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCellBase.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCellBase.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleCellBase.cxx Wed Nov 27 17:25:40 2013
@@ -38,7 +38,10 @@
#include "sc.hrc"
#endif
#include "unonames.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include "detfunc.hxx"
+#include "chgtrack.hxx"
+//-----IAccessibility2 Implementation 2009
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#endif
@@ -52,6 +55,11 @@
#include <rtl/uuid.h>
#include <comphelper/sequence.hxx>
#include <sfx2/objsh.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/sheet/XSheetAnnotation.hpp>
+#include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
+//-----IAccessibility2 Implementation 2009
#include <float.h>
@@ -226,17 +234,20 @@ sal_Int32
ScAccessibleCellBase::createAccessibleName(void)
throw (uno::RuntimeException)
{
- String sName( ScResId(STR_ACC_CELL_NAME) );
+//IAccessibility2 Implementation 2009-----
+ //String sName( ScResId(STR_ACC_CELL_NAME) );
String sAddress;
// Document not needed, because only the cell address, but not the tablename is needed
// always us OOO notation
maCellAddress.Format( sAddress, SCA_VALID, NULL );
- sName.SearchAndReplaceAscii("%1", sAddress);
+ //sName.SearchAndReplaceAscii("%1", sAddress);
/* #i65103# ZoomText merges cell address and contents, e.g. if value 2 is
contained in cell A1, ZT reads "cell A twelve" instead of "cell A1 - 2".
Simple solution: Append a space character to the cell address. */
- sName.Append( ' ' );
- return rtl::OUString(sName);
+ //sName.Append( ' ' );
+ //return rtl::OUString(sName);
+ return rtl::OUString(sAddress);
+//-----IAccessibility2 Implementation 2009
}
//===== XAccessibleValue ================================================
@@ -249,8 +260,14 @@ uno::Any SAL_CALL
IsObjectValid();
uno::Any aAny;
if (mpDoc)
- aAny <<= mpDoc->GetValue(maCellAddress);
-
+//IAccessibility2 Implementation 2009-----
+ //aAny <<= mpDoc->GetValue(maCellAddress);
+ {
+ String valStr;
+ mpDoc->GetString(maCellAddress.Col(),maCellAddress.Row(),maCellAddress.Tab(), valStr);
+ aAny <<= rtl::OUString(valStr);
+ }
+//-----IAccessibility2 Implementation 2009
return aAny;
}
@@ -339,3 +356,305 @@ sal_Bool ScAccessibleCellBase::IsEditabl
bEditable = sal_True;
return bEditable;
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString SAL_CALL ScAccessibleCellBase::GetNote(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ rtl::OUString msNote;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference <sheet::XSheetAnnotationAnchor> xAnnotationAnchor ( xCell, uno::UNO_QUERY);
+ if(xAnnotationAnchor.is())
+ {
+ uno::Reference <sheet::XSheetAnnotation> xSheetAnnotation = xAnnotationAnchor->getAnnotation();
+ if (xSheetAnnotation.is())
+ {
+ uno::Reference <text::XSimpleText> xText (xSheetAnnotation, uno::UNO_QUERY);
+ if (xText.is())
+ {
+ msNote = xText->getString();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return msNote;
+}
+#ifndef _COM_SUN_STAR_TABLE_SHADOWFORMAT_HPP_
+#include <com/sun/star/table/ShadowFormat.hpp>
+#endif
+::rtl::OUString SAL_CALL ScAccessibleCellBase::getShadowAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ table::ShadowFormat aShadowFmt;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHADOW)));
+ aAny >>= aShadowFmt;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ //construct shadow attributes string
+ rtl::OUString sShadowAttrs( RTL_CONSTASCII_USTRINGPARAM("Shadow:") );
+ rtl::OUString sInnerSplit( RTL_CONSTASCII_USTRINGPARAM(",") );
+ rtl::OUString sOuterSplit( RTL_CONSTASCII_USTRINGPARAM(";") );
+ sal_Int32 nLocationVal = 0;
+ switch( aShadowFmt.Location )
+ {
+ case table::ShadowLocation_TOP_LEFT:
+ nLocationVal = 1;
+ break;
+ case table::ShadowLocation_TOP_RIGHT:
+ nLocationVal = 2;
+ break;
+ case table::ShadowLocation_BOTTOM_LEFT:
+ nLocationVal = 3;
+ break;
+ case table::ShadowLocation_BOTTOM_RIGHT:
+ nLocationVal = 4;
+ break;
+ default:
+ break;
+ }
+ //if there is no shadow property for the cell
+ if ( nLocationVal == 0 )
+ {
+ sShadowAttrs += sOuterSplit;
+ return sShadowAttrs;
+ }
+ //else return all the shadow properties
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Location=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Int32)nLocationVal );
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShadowWidth=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Int32)aShadowFmt.ShadowWidth ) ;
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsTransparent=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Bool)aShadowFmt.IsTransparent ) ;
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Color=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Int32)aShadowFmt.Color );
+ sShadowAttrs += sOuterSplit;
+ return sShadowAttrs;
+}
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+::rtl::OUString SAL_CALL ScAccessibleCellBase::getBorderAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ table::BorderLine aTopBorder;
+ table::BorderLine aBottomBorder;
+ table::BorderLine aLeftBorder;
+ table::BorderLine aRightBorder;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_TOPBORDER)));
+ aAny >>= aTopBorder;
+ aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_BOTTBORDER)));
+ aAny >>= aBottomBorder;
+ aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_LEFTBORDER)));
+ aAny >>= aLeftBorder;
+ aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_RIGHTBORDER)));
+ aAny >>= aRightBorder;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ Color aColor;
+ sal_Bool bIn = mpDoc ? mpDoc->IsCellInChangeTrack(maCellAddress,&aColor) : sal_False;
+ if (bIn)
+ {
+ aTopBorder.Color = aColor.GetColor();
+ aBottomBorder.Color = aColor.GetColor();
+ aLeftBorder.Color = aColor.GetColor();
+ aRightBorder.Color = aColor.GetColor();
+ aTopBorder.OuterLineWidth =2;
+ aBottomBorder.OuterLineWidth =2;
+ aLeftBorder.OuterLineWidth =2;
+ aRightBorder.OuterLineWidth =2;
+ }
+
+ //construct border attributes string
+ rtl::OUString sBorderAttrs;
+ rtl::OUString sInnerSplit( RTL_CONSTASCII_USTRINGPARAM(",") );
+ rtl::OUString sOuterSplit( RTL_CONSTASCII_USTRINGPARAM(";") );
+ //top border
+ //if top of the cell has no border
+ if ( aTopBorder.InnerLineWidth == 0 && aTopBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopBorder:;") );
+ }
+ else//add all the border properties to the return string.
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //bottom border
+ if ( aBottomBorder.InnerLineWidth == 0 && aBottomBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomBorde:;") );
+ }
+ else
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //left border
+ if ( aLeftBorder.InnerLineWidth == 0 && aLeftBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorder:;") );
+ }
+ else
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //right border
+ if ( aRightBorder.InnerLineWidth == 0 && aRightBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorder:;") );
+ }
+ else
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ return sBorderAttrs;
+}
+//end of cell attributes
+
+::rtl::OUString SAL_CALL ScAccessibleCellBase::GetAllDisplayNote(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::rtl::OUString strNote;
+ String strTrackText;
+ if (mpDoc)
+ {
+ sal_Bool bLeftedge=sal_False;
+ mpDoc->GetCellChangeTrackNote(maCellAddress,strTrackText,bLeftedge);
+ }
+ if (strTrackText.Len() > 0 )
+ {
+ ScDetectiveFunc::AppendChangTrackNoteSeparator(strTrackText);
+ strNote = strTrackText;
+ }
+ strNote += GetNote();
+ return strNote;
+}
+//-----IAccessibility2 Implementation 2009
Modified: openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx Wed Nov 27 17:25:40 2013
@@ -31,17 +31,32 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <comphelper/accessiblekeybindinghelper.hxx>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <vcl/keycodes.hxx>
+//-----IAccessibility2 Implementation 2009
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX
#include <unotools/accessiblestatesethelper.hxx>
+#endif
#include <rtl/uuid.h>
#include <tools/gen.hxx>
#include <toolkit/helper/convert.hxx>
#include <tools/debug.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <unotools/accessiblerelationsethelper.hxx>
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
class ScAccessibleDataPilotButton
: public ScAccessibleContextBase
+//IAccessibility2 Implementation 2009-----
+ , public ::com::sun::star::accessibility::XAccessibleAction
+//-----IAccessibility2 Implementation 2009
{
public:
//===== internal ========================================================
@@ -63,6 +78,19 @@ public:
protected:
virtual ~ScAccessibleDataPilotButton(void);
public:
+//IAccessibility2 Implementation 2009-----
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ ///===== XInterface =====================================================
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+//-----IAccessibility2 Implementation 2009
///===== XAccessibleComponent ============================================
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
@@ -104,7 +132,10 @@ public:
::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException);
-
+//IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet >
+ SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
///===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
@@ -296,6 +327,10 @@ void ScAccessibleDataPilotControl::GotFo
{
DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
+//IAccessibility2 Implementation 2009-----
+ if(maChildren.size()==0)
+ return ;
+//-----IAccessibility2 Implementation 2009
sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -308,7 +343,10 @@ void ScAccessibleDataPilotControl::LostF
if (mpFieldWindow)
{
DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
-
+//IAccessibility2 Implementation 2009-----
+ if(maChildren.size()==0)
+ return ;
+//-----IAccessibility2 Implementation 2009
sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -518,7 +556,11 @@ ScAccessibleDataPilotButton::ScAccessibl
::com::sun::star::accessibility::XAccessible>& rxParent,
ScPivotFieldWindow* pFieldWindow,
sal_Int32 nIndex)
- : ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
+//IAccessibility2 Implementation 2009-----
+//change role frome PUSH_BUTTON to BUTTON_MENU
+ //: ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
+ : ScAccessibleContextBase(rxParent, AccessibleRole::BUTTON_MENU),
+//-----IAccessibility2 Implementation 2009
mpFieldWindow(pFieldWindow),
mnIndex(nIndex)
{
@@ -657,7 +699,23 @@ uno::Reference<XAccessibleStateSet> SAL_
return pStateSet;
}
+//IAccessibility2 Implementation 2009-----
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet >
+ SAL_CALL ScAccessibleDataPilotButton::getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ if(mxParent.is())
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = mxParent;
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+
+ return xSet;
+}
+//-----IAccessibility2 Implementation 2009
///===== XServiceInfo ====================================================
::rtl::OUString SAL_CALL ScAccessibleDataPilotButton::getImplementationName(void)
@@ -685,6 +743,10 @@ uno::Sequence<sal_Int8> SAL_CALL ScAcces
::rtl::OUString SAL_CALL ScAccessibleDataPilotButton::createAccessibleDescription(void)
throw (::com::sun::star::uno::RuntimeException)
{
+//IAccessibility2 Implementation 2009-----
+ if (mpFieldWindow)
+ return mpFieldWindow->GetHelpText();
+//-----IAccessibility2 Implementation 2009
return rtl::OUString();
}
@@ -721,3 +783,67 @@ Rectangle ScAccessibleDataPilotButton::G
else
return Rectangle();
}
+//IAccessibility2 Implementation 2009-----
+// -----------------------------------------------------------------------------
+// XAccessibleAction
+// -----------------------------------------------------------------------------
+sal_Int32 ScAccessibleDataPilotButton::getAccessibleActionCount( ) throw (uno::RuntimeException)
+{
+ return 1;
+}
+// -----------------------------------------------------------------------------
+sal_Bool ScAccessibleDataPilotButton::doAccessibleAction ( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ return sal_True;
+}
+// -----------------------------------------------------------------------------
+::rtl::OUString ScAccessibleDataPilotButton::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "press" ) );
+}
+// -----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< XAccessibleKeyBinding > ScAccessibleDataPilotButton::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper = new comphelper::OAccessibleKeyBindingHelper();
+ ::com::sun::star::uno::Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ ScPivotFieldWindow* pWindow = mpFieldWindow;
+ if ( pWindow )
+ {
+ awt::KeyStroke aKeyStroke;
+ aKeyStroke.Modifiers = 0;
+ aKeyStroke.KeyCode = KEY_SPACE;
+ pKeyBindingHelper->AddKeyBinding( aKeyStroke );
+ }
+ return xKeyBinding;
+}
+//===== XInterface =====================================================
+uno::Any SAL_CALL ScAccessibleDataPilotButton::queryInterface( uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Any aAny (ScAccessibleContextBase::queryInterface(rType));
+ if(!aAny.hasValue())
+ {
+ aAny = ::cppu::queryInterface (rType,
+ static_cast<XAccessibleAction*>(this)
+ );
+ }
+ return aAny;
+}
+void SAL_CALL ScAccessibleDataPilotButton::acquire()
+ throw ()
+{
+ ScAccessibleContextBase::acquire();
+}
+void SAL_CALL ScAccessibleDataPilotButton::release()
+ throw ()
+{
+ ScAccessibleContextBase::release();
+}
+//-----IAccessibility2 Implementation 2009
+