[Libreoffice-commits] core.git: Branch 'private/kohei/xlsx-import-speedup' - 139 commits - accessibility/inc accessibility/source android/abs-lib basctl/source basegfx/source binaryurp/source bin/gbuild-to-ide bridges/source canvas/source chart2/AllLangResTarget_chartcontroller.mk chart2/qa chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk connectivity/source cppcanvas/source cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/source dtrans/source editeng/source filter/source forms/source formula/source framework/source helpcontent2 i18npool/source idlc/inc idlc/source idlc/test include/basegfx include/com include/editeng include/filter include/oox include/osl include/sal include/sax include/sfx2 include/svl include/svtools include/svx include/toolkit include/tools include/vcl instsetoo_native/CustomTarget_setup.mk instsetoo_native/Package_setup.mk Makefile.in offapi/com offapi/UnoApi_offapi.mk oox/Library_oox.mk oox/source pyuno/source qadevOOo/tests re portdesign/source sal/osl sal/rtl sal/textenc sax/source sc/inc sc/Library_scfilt.mk sc/qa sc/source sfx2/qa sfx2/source sfx2/uiconfig solenv/bin solenv/gbuild solenv/gcc-wrappers starmath/inc starmath/source starmath/uiconfig svl/source svtools/AllLangResTarget_svt.mk svtools/Library_svt.mk svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/AllLangResTarget_svx.mk svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk sw/inc sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk toolkit/source tools/Library_tl.mk tools/source translations ucb/source unoidl/CustomTarget_unoidl-write_test.mk unoidl/Module_unoidl.mk unoidl/source uui/source vcl/generic vcl/inc vcl/source winaccessibility/source wizards/com writerfilter/Library_writerfilter.mk writerfilter/source xmloff/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Nov 27 11:51:05 PST 2013


Rebased ref, commits from common ancestor:
commit 88df79be2f4b3e4af36fc51dbcdaa30ddc652674
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Nov 27 14:05:45 2013 -0500

    We shouldn't check isValid() here.
    
    When the referenced range consists of entirely empty cells, we get
    an empty array, which is correct, but an empty array returns false when
    calling isValid(), which is not correct.  After some thought, it's best
    not to check for isValid() here.
    
    Change-Id: I50dcea4f2b55d5f5c6f1226cca4106ddcad62145

diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx
index 55b2709..b295fee 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -116,9 +116,9 @@ bool ScGroupTokenConverter::convert(ScTokenArray& rCode)
                     // returned array equals or greater than the requested
                     // length.
 
-                    formula::VectorRefArray aArray = mrDoc.FetchVectorRefArray(aRefPos, nLen);
-                    if (!aArray.isValid())
-                        return false;
+                    formula::VectorRefArray aArray;
+                    if (nLen)
+                        aArray = mrDoc.FetchVectorRefArray(aRefPos, nLen);
 
                     formula::SingleVectorRefToken aTok(aArray, nLen);
                     mrGroupTokens.AddToken(aTok);
@@ -184,9 +184,9 @@ bool ScGroupTokenConverter::convert(ScTokenArray& rCode)
                 for (SCCOL i = aAbs.aStart.Col(); i <= aAbs.aEnd.Col(); ++i)
                 {
                     aRefPos.SetCol(i);
-                    formula::VectorRefArray aArray = mrDoc.FetchVectorRefArray(aRefPos, nArrayLength);
-                    if (!aArray.isValid())
-                        return false;
+                    formula::VectorRefArray aArray;
+                    if (nArrayLength)
+                        aArray = mrDoc.FetchVectorRefArray(aRefPos, nArrayLength);
 
                     aArrays.push_back(aArray);
                 }
commit b294ca2c404409a7e35f1025fcfd7e2aaf9b5fb2
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Wed Nov 27 20:25:04 2013 +0100

    no need to escape tilde in glade dialogs
    
    Change-Id: I7a7c059c7a6925204aeef19c3640d9ffbff4e6de

diff --git a/starmath/uiconfig/smath/ui/smathsettings.ui b/starmath/uiconfig/smath/ui/smathsettings.ui
index f567673..1b983c2 100644
--- a/starmath/uiconfig/smath/ui/smathsettings.ui
+++ b/starmath/uiconfig/smath/ui/smathsettings.ui
@@ -239,7 +239,7 @@
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkCheckButton" id="norightspaces">
-                    <property name="label" translatable="yes">Ig_nore _~ and ` at the end of the line</property>
+                    <property name="label" translatable="yes">Ig_nore ~ and ` at the end of the line</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
commit 0710299634a2276749c36ed86a5a60a20d63073f
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Nov 27 18:11:34 2013 +0000

    sc: threaded parsing of the core data inside large XLSX files
    
    Enabled in experimental mode only or via SC_IMPORT_THREADS=<N> this
    allows significant parallelisation of sheet reading. I also implement
    a simple thread pool to manage that.
    
    Change-Id: I66c72211f2699490230e993a374c26b1892eac12

diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index 499f873..eb0d5d2 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -211,6 +211,7 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
 	sc/source/filter/oox/tablebuffer \
 	sc/source/filter/oox/tablefragment \
 	sc/source/filter/oox/themebuffer \
+	sc/source/filter/oox/threadpool \
 	sc/source/filter/oox/unitconverter \
 	sc/source/filter/oox/viewsettings \
 	sc/source/filter/oox/workbookfragment \
diff --git a/sc/source/filter/inc/sheetdatacontext.hxx b/sc/source/filter/inc/sheetdatacontext.hxx
index b492d2a..3f3e377 100644
--- a/sc/source/filter/inc/sheetdatacontext.hxx
+++ b/sc/source/filter/inc/sheetdatacontext.hxx
@@ -23,6 +23,9 @@
 #include "excelhandlers.hxx"
 #include "richstring.hxx"
 #include "sheetdatabuffer.hxx"
+#include <vcl/svapp.hxx>
+
+#define MULTI_THREAD_SHEET_PARSING 1
 
 namespace oox {
 namespace xls {
@@ -54,8 +57,16 @@ struct SheetDataContextBase
  */
 class SheetDataContext : public WorksheetContextBase, private SheetDataContextBase
 {
+    // If we are doing threaded parsing, this SheetDataContext
+    // forms the inner loop for bulk data parsing, and for the
+    // duration of this we can drop the solar mutex.
+#if MULTI_THREAD_SHEET_PARSING
+    SolarMutexReleaser aReleaser;
+#endif
+
 public:
     explicit            SheetDataContext( WorksheetFragmentBase& rFragment );
+    virtual            ~SheetDataContext();
 
 protected:
     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index 5170234..9a0f7df 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -90,6 +90,12 @@ SheetDataContext::SheetDataContext( WorksheetFragmentBase& rFragment ) :
     mnRow( -1 ),
     mnCol( -1 )
 {
+    SAL_INFO( "sc.filter",  "start safe sheet data context - unlock\n" );
+}
+
+SheetDataContext::~SheetDataContext()
+{
+    SAL_INFO( "sc.filter",  "end safe sheet data context - relock\n" );
 }
 
 ContextHandlerRef SheetDataContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
diff --git a/sc/source/filter/oox/threadpool.cxx b/sc/source/filter/oox/threadpool.cxx
new file mode 100644
index 0000000..9de1a14
--- /dev/null
+++ b/sc/source/filter/oox/threadpool.cxx
@@ -0,0 +1,162 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "threadpool.hxx"
+
+class ThreadPool::ThreadWorker : public salhelper::Thread
+{
+    ThreadPool    *mpPool;
+    osl::Condition maNewWork;
+public:
+    ThreadWorker( ThreadPool *pPool ) :
+        salhelper::Thread("sheet-import-thread-pool"),
+        mpPool( pPool ) {}
+
+    virtual void execute()
+    {
+        ThreadTask *pTask;
+        while ( ( pTask = waitForWork() ) )
+        {
+            pTask->doWork();
+            delete pTask;
+        }
+    }
+
+    ThreadTask *waitForWork()
+    {
+        ThreadTask *pRet = NULL;
+
+        osl::ResettableMutexGuard aGuard( mpPool->maGuard );
+
+        pRet = mpPool->popWork();
+
+        while( !pRet )
+        {
+            maNewWork.reset();
+
+            if( mpPool->mbTerminate )
+                break;
+
+            aGuard.clear(); // unlock
+
+            maNewWork.wait();
+
+            aGuard.reset(); // lock
+
+            pRet = mpPool->popWork();
+        }
+
+        return pRet;
+    }
+
+    //
+    // Why a condition per worker thread - you may ask.
+    //
+    // Unfortunately the Windows synchronisation API that we wrap
+    // is horribly inadequate cf.
+    //    http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
+    // The existing osl::Condition API should only ever be used
+    // between one producer and one consumer thread to avoid the
+    // lost wakeup problem.
+    //
+    void signalNewWork()
+    {
+        maNewWork.set();
+    }
+};
+
+ThreadPool::ThreadPool( sal_Int32 nWorkers ) :
+    mbTerminate( false )
+{
+    for( sal_Int32 i = 0; i < nWorkers; i++ )
+        maWorkers.push_back( new ThreadWorker( this ) );
+
+    maTasksEmpty.reset();
+
+    osl::MutexGuard aGuard( maGuard );
+    for( size_t i = 0; i < maWorkers.size(); i++ )
+        maWorkers[ i ]->launch();
+}
+
+ThreadPool::~ThreadPool()
+{
+    waitUntilWorkersDone();
+}
+
+/// wait until all the workers have completed and
+/// terminate all threads
+void ThreadPool::waitUntilWorkersDone()
+{
+    waitUntilEmpty();
+
+    osl::ResettableMutexGuard aGuard( maGuard );
+    mbTerminate = true;
+
+    while( !maWorkers.empty() )
+    {
+        rtl::Reference< ThreadWorker > xWorker = maWorkers.back();
+        maWorkers.pop_back();
+        assert( maWorkers.find( xWorker ) == maWorkers.end() );
+        xWorker->signalNewWork();
+        aGuard.clear();
+        { // unlocked
+            xWorker->join();
+            xWorker.clear();
+        }
+        aGuard.reset();
+    }
+}
+
+void ThreadPool::pushTask( ThreadTask *pTask )
+{
+    osl::MutexGuard aGuard( maGuard );
+    maTasks.insert( maTasks.begin(), pTask );
+    // horrible beyond belief:
+    for( size_t i = 0; i < maWorkers.size(); i++ )
+        maWorkers[ i ]->signalNewWork();
+    maTasksEmpty.reset();
+}
+
+ThreadTask *ThreadPool::popWork()
+{
+    if( !maTasks.empty() )
+    {
+        ThreadTask *pTask = maTasks.back();
+        maTasks.pop_back();
+        return pTask;
+    }
+    else
+        maTasksEmpty.set();
+    return NULL;
+}
+
+void ThreadPool::waitUntilEmpty()
+{
+    osl::ResettableMutexGuard aGuard( maGuard );
+
+    if( maWorkers.empty() )
+    { // no threads at all -> execute the work in-line
+        ThreadTask *pTask;
+        while ( ( pTask = popWork() ) )
+        {
+            pTask->doWork();
+            delete pTask;
+        }
+        mbTerminate = true;
+    }
+    else
+    {
+        aGuard.clear();
+        maTasksEmpty.wait();
+        aGuard.reset();
+    }
+    assert( maTasks.empty() );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/oox/threadpool.hxx b/sc/source/filter/oox/threadpool.hxx
new file mode 100644
index 0000000..036534f
--- /dev/null
+++ b/sc/source/filter/oox/threadpool.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef SC_THREADPOOL_HXX
+#define SC_THREADPOOL_HXX
+
+#include <sal/config.h>
+#include <salhelper/thread.hxx>
+#include <osl/mutex.hxx>
+#include <osl/conditn.hxx>
+#include <rtl/ref.hxx>
+#include <vector>
+
+class ThreadTask
+{
+public:
+    virtual      ~ThreadTask() {}
+    virtual void doWork() = 0;
+};
+
+/// A very basic thread pool implementation
+class ThreadPool
+{
+public:
+                ThreadPool( sal_Int32 nWorkers );
+    virtual    ~ThreadPool();
+    void        pushTask( ThreadTask *pTask /* takes ownership */ );
+    void        waitUntilEmpty();
+    void        waitUntilWorkersDone();
+
+private:
+    class ThreadWorker;
+    friend class ThreadWorker;
+
+    ThreadTask *waitForWork( osl::Condition &rNewWork );
+    ThreadTask *popWork();
+
+    osl::Mutex maGuard;
+    osl::Condition maTasksEmpty;
+    bool mbTerminate;
+    std::vector< rtl::Reference< ThreadWorker > > maWorkers;
+    std::vector< ThreadTask * >   maTasks;
+};
+
+#endif // SC_THREADPOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 7acb16a..d3c06ac 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -42,11 +42,16 @@
 #include "workbooksettings.hxx"
 #include "worksheetbuffer.hxx"
 #include "worksheetfragment.hxx"
+#include "sheetdatacontext.hxx"
+#include "threadpool.hxx"
+#include "officecfg/Office/Common.hxx"
 
 #include "document.hxx"
 #include "docsh.hxx"
 #include "calcconfig.hxx"
 
+#include <vcl/svapp.hxx>
+
 #include <oox/core/fastparser.hxx>
 #include <salhelper/thread.hxx>
 #include <osl/conditn.hxx>
@@ -54,8 +59,6 @@
 #include <queue>
 #include <boost/scoped_ptr.hpp>
 
-#define MULTI_THREAD_SHEET_PARSING 0
-
 #include "oox/ole/vbaproject.hxx"
 
 namespace oox {
@@ -204,188 +207,77 @@ namespace {
 typedef std::pair<WorksheetGlobalsRef, FragmentHandlerRef> SheetFragmentHandler;
 typedef std::vector<SheetFragmentHandler> SheetFragmentVector;
 
-#if MULTI_THREAD_SHEET_PARSING
-
-class WorkerThread;
-typedef rtl::Reference<WorkerThread> WorkerThreadRef;
-
-struct WorkerThreadData
-{
-    osl::Mutex maMtx;
-    std::vector<WorkerThreadRef> maThreads;
-};
-
-struct IdleWorkerThreadData
-{
-    osl::Mutex maMtx;
-    osl::Condition maCondAdded;
-    std::queue<WorkerThread*> maThreads;
-};
-
-struct
-{
-    boost::scoped_ptr<WorkerThreadData> mpWorkerThreads;
-    boost::scoped_ptr<IdleWorkerThreadData> mpIdleThreads;
-
-} aThreadGlobals;
-
-enum WorkerAction
-{
-    None = 0,
-    TerminateThread,
-    Work
-};
-
-class WorkerThread : public salhelper::Thread
+class WorkerThread : public ThreadTask
 {
     WorkbookFragment& mrWorkbookHandler;
-    size_t mnID;
-    FragmentHandlerRef mxHandler;
-    boost::scoped_ptr<oox::core::FastParser> mxParser;
-    osl::Mutex maMtxAction;
-    osl::Condition maCondActionChanged;
-    WorkerAction meAction;
-public:
-    WorkerThread( WorkbookFragment& rWorkbookHandler, size_t nID ) :
-        salhelper::Thread("sheet-import-worker-thread"),
-        mrWorkbookHandler(rWorkbookHandler),
-        mnID(nID),
-        mxParser(rWorkbookHandler.getOoxFilter().createParser()),
-        meAction(None) {}
-
-    virtual void execute()
-    {
-        announceIdle();
-
-        // Keep looping until the terminate request is set.
-        for (maCondActionChanged.wait(); true; maCondActionChanged.wait())
-        {
-            osl::MutexGuard aGuard(maMtxAction);
-            if (!maCondActionChanged.check())
-                // Wait again.
-                continue;
-
-            maCondActionChanged.reset();
-
-            if (meAction == TerminateThread)
-                // End the thread.
-                return;
-
-            if (meAction != Work)
-                continue;
-
-#if 0
-            // TODO : This still deadlocks in the fast parser code.
-            mrWorkbookHandler.importOoxFragment(mxHandler, *mxParser);
-#else
-            double val = rand() / static_cast<double>(RAND_MAX);
-            val *= 1000000; // normalize to 1 second.
-            val *= 1.5; // inflate it a bit.
-            usleep(val); // pretend to be working while asleep.
-#endif
-            announceIdle();
-        }
-    }
-
-    void announceIdle()
-    {
-        // Set itself idle to receive a new task from the main thread.
-        osl::MutexGuard aGuard(aThreadGlobals.mpIdleThreads->maMtx);
-        aThreadGlobals.mpIdleThreads->maThreads.push(this);
-        aThreadGlobals.mpIdleThreads->maCondAdded.set();
-    }
+    rtl::Reference<FragmentHandler> mxHandler;
 
-    void terminate()
+public:
+    WorkerThread( WorkbookFragment& rWorkbookHandler,
+                  const rtl::Reference<FragmentHandler>& xHandler ) :
+        mrWorkbookHandler( rWorkbookHandler ),
+        mxHandler( xHandler )
     {
-        osl::MutexGuard aGuard(maMtxAction);
-        meAction = TerminateThread;
-        maCondActionChanged.set();
     }
 
-    void assign( const FragmentHandlerRef& rHandler )
+    virtual void doWork()
     {
-        osl::MutexGuard aGuard(maMtxAction);
-        mxHandler = rHandler;
-        meAction = Work;
-        maCondActionChanged.set();
+        // We hold the solar mutex in all threads except for
+        // the small safe section of the inner loop in
+        // sheetdatacontext.cxx
+        SAL_INFO( "sc.filter",  "start wait on solar\n" );
+        SolarMutexGuard maGuard;
+        SAL_INFO( "sc.filter",  "got solar\n" );
+
+        boost::scoped_ptr<oox::core::FastParser> xParser(
+                mrWorkbookHandler.getOoxFilter().createParser() );
+
+        SAL_INFO( "sc.filter",  "start import\n" );
+        mrWorkbookHandler.importOoxFragment( mxHandler, *xParser );
+        SAL_INFO( "sc.filter",  "end import, release solar\n" );
     }
 };
 
-#endif
-
 void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVector& rSheets )
 {
-#if MULTI_THREAD_SHEET_PARSING // threaded version
-    size_t nThreadCount = 3;
-    if (nThreadCount > rSheets.size())
-        nThreadCount = rSheets.size();
+    sal_Int32 nThreads = std::min( rSheets.size(), (size_t) 4 /* FIXME: ncpus/2 */ );
 
-    // Create new thread globals.
-    aThreadGlobals.mpWorkerThreads.reset(new WorkerThreadData);
-    aThreadGlobals.mpIdleThreads.reset(new IdleWorkerThreadData);
+    Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
 
-    SheetFragmentVector::iterator it = rSheets.begin(), itEnd = rSheets.end();
+    // Force threading off unless experimental mode or env. var is set.
+    if( !officecfg::Office::Common::Misc::ExperimentalMode::get( xContext ) )
+        nThreads = 0;
 
-    {
-        // Initialize worker threads.
-        osl::MutexGuard aGuard(aThreadGlobals.mpWorkerThreads->maMtx);
-        for (size_t i = 0; i < nThreadCount; ++i)
-        {
-            WorkerThreadRef pThread(new WorkerThread(rWorkbookHandler, i));
-            aThreadGlobals.mpWorkerThreads->maThreads.push_back(pThread);
-            pThread->launch();
-        }
-    }
+    const char *pEnv;
+    if( ( pEnv = getenv( "SC_IMPORT_THREADS" ) ) )
+        nThreads = rtl_str_toInt32( pEnv, 10 );
 
-    for (aThreadGlobals.mpIdleThreads->maCondAdded.wait(); true; aThreadGlobals.mpIdleThreads->maCondAdded.wait())
+    if( nThreads != 0 )
     {
-        osl::MutexGuard aGuard(aThreadGlobals.mpIdleThreads->maMtx);
-        if (!aThreadGlobals.mpIdleThreads->maCondAdded.check())
-            // Wait again.
-            continue;
-
-        aThreadGlobals.mpIdleThreads->maCondAdded.reset();
-
-        // Assign work to all idle threads.
-        while (!aThreadGlobals.mpIdleThreads->maThreads.empty())
-        {
-            if (it == itEnd)
-                break;
-
-            WorkerThread* p = aThreadGlobals.mpIdleThreads->maThreads.front();
-            aThreadGlobals.mpIdleThreads->maThreads.pop();
-            p->assign(it->second);
-            ++it;
-        }
+        // test sequential read in this mode
+        if( nThreads < 0)
+            nThreads = 0;
+        ThreadPool aPool( nThreads );
 
-        if (it == itEnd)
-            // Finished!  Exit the loop.
-            break;
-    }
+        SheetFragmentVector::iterator it = rSheets.begin(), itEnd = rSheets.end();
+        for( ; it != itEnd; ++it )
+            aPool.pushTask( new WorkerThread( rWorkbookHandler, it->second ) )
+                ;
 
-    {
-        // Terminate all worker threads.
-        osl::MutexGuard aGuard(aThreadGlobals.mpWorkerThreads->maMtx);
-        for (size_t i = 0, n = aThreadGlobals.mpWorkerThreads->maThreads.size(); i < n; ++i)
         {
-            WorkerThreadRef pWorker = aThreadGlobals.mpWorkerThreads->maThreads[i];
-            pWorker->terminate();
-            if (pWorker.is())
-                pWorker->join();
+            // Ideally no-one else but our worker threads can re-acquire that.
+            // potentially if that causes a problem we might want to extend
+            // the SolarMutex functionality to allow passing it around.
+            SolarMutexReleaser aReleaser;
+            aPool.waitUntilWorkersDone();
         }
     }
-
-    // Delete all thread globals.
-    aThreadGlobals.mpWorkerThreads.reset();
-    aThreadGlobals.mpIdleThreads.reset();
-
-#else // non-threaded version
-    for( SheetFragmentVector::iterator it = rSheets.begin(), itEnd = rSheets.end(); it != itEnd; ++it)
+    else
     {
-        // import the sheet fragment
-        rWorkbookHandler.importOoxFragment(it->second);
+        SheetFragmentVector::iterator it = rSheets.begin(), itEnd = rSheets.end();
+        for( ; it != itEnd; ++it )
+            rWorkbookHandler.importOoxFragment( it->second );
     }
-#endif
 }
 
 }
commit 8bdf8dc075928bd0eb3e49ac0f51727c0677dc37
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 27 16:58:11 2013 +0000

    error C2872: 'accessibility' : ambiguous symbol
    
    Change-Id: Ibff922712e25a846bab1628e87d0d322d1ff0a33
    Reviewed-on: https://gerrit.libreoffice.org/6836
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
index c710f13..1e9d02e 100644
--- a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
+++ b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
@@ -47,12 +47,12 @@ void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::Accessi
         {
             return;
         }
-        Reference < accessibility::XAccessible > xDocAcc = pDocWin->GetAccessible();
+        Reference < css::accessibility::XAccessible > xDocAcc = pDocWin->GetAccessible();
         if ( !xDocAcc.is() )
         {
             return;
         }
-        Reference< accessibility::XAccessibleGetAccFlowTo > xGetAccFlowTo( xDocAcc, UNO_QUERY );
+        Reference< css::accessibility::XAccessibleGetAccFlowTo > xGetAccFlowTo( xDocAcc, UNO_QUERY );
         if ( !xGetAccFlowTo.is() )
         {
             return;
@@ -69,11 +69,11 @@ void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::Accessi
             uno::Sequence< uno::Reference< uno::XInterface > > aSequence( nLen );
             for ( sal_Int32 i = 0; i < nLen; i++ )
             {
-                uno::Reference < accessibility::XAccessible > xAcc;
+                uno::Reference < css::accessibility::XAccessible > xAcc;
                 aAnySeq[i] >>= xAcc;
                 aSequence[i] = xAcc;
             }
-            rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ) );
+            rRelationSet.AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ) );
         }
     }
 }
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index 3b0a4ae..38ee6c6 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -172,7 +172,7 @@ uno::Reference< XAccessibleRelationSet > SvxPixelCtlAccessible::getAccessibleRel
     IsValid();
     Window* pWindow = (Window*)pPixelCtl;
     utl::AccessibleRelationSetHelper* rRelationSet = new utl::AccessibleRelationSetHelper;
-    uno::Reference< accessibility::XAccessibleRelationSet > rSet = rRelationSet;
+    uno::Reference< css::accessibility::XAccessibleRelationSet > rSet = rRelationSet;
     if ( pWindow )
     {
         Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
@@ -180,7 +180,7 @@ uno::Reference< XAccessibleRelationSet > SvxPixelCtlAccessible::getAccessibleRel
         {
             uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
             aSequence[0] = pLabeledBy->GetAccessible();
-            rRelationSet->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+            rRelationSet->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
         }
 
         Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
@@ -188,7 +188,7 @@ uno::Reference< XAccessibleRelationSet > SvxPixelCtlAccessible::getAccessibleRel
         {
             uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
             aSequence[0] = pMemberOf->GetAccessible();
-            rRelationSet->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+            rRelationSet->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
         return rSet;
     }
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index cda769a..15a2ed0 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -366,7 +366,7 @@ Reference< XAccessibleRelationSet > SAL_CALL SvxRectCtlAccessibleContext::getAcc
 {
     //return Reference< XAccessibleRelationSet >();
     utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
-    uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+    uno::Reference< css::accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
     Window* pWindow = mpRepr;
     if ( pWindow )
     {
@@ -376,14 +376,14 @@ Reference< XAccessibleRelationSet > SAL_CALL SvxRectCtlAccessibleContext::getAcc
         {
             uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
             aSequence[0] = pLabeledBy->GetAccessible();
-            pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+            pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
         }
         Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
         if ( pMemberOf && pMemberOf != pWindow )
         {
             uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
             aSequence[0] = pMemberOf->GetAccessible();
-            pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+            pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
     }
     return xSet;
@@ -978,12 +978,12 @@ OUString SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleName( void ) th
 Reference<XAccessibleRelationSet> SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleRelationSet( void ) throw( RuntimeException )
 {
     utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
-    uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+    uno::Reference< css::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 ) );
+        pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
 
     }
 
commit 47d01f8a9aedae45e97dca5889b31be3df6b6fd8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 27 16:54:34 2013 +0000

    Updated core
    Project: help  fb4f27116b49a84dd6463a5feeca40c676c642d2

diff --git a/helpcontent2 b/helpcontent2
index 1a08f80..fb4f271 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1a08f80034749e9f2d8fc94497e3d0cd528afe70
+Subproject commit fb4f27116b49a84dd6463a5feeca40c676c642d2
commit 02d4eb7438a83982b2602ea1d83d5accb1fe11f6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 27 16:42:53 2013 +0000

    convert query delete dialog to .ui
    
    Change-Id: I0ab09c2c54bba4a287ef0f7cc812596958373e15

diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index fd2ccfe..8b90816 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -25,8 +25,9 @@
 #include <vcl/ctrl.hxx>
 #include <vcl/image.hxx>
 #include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
 #include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/layout.hxx>
 #include <rtl/ustring.hxx>
 
 // class SvtFileView -----------------------------------------------------
@@ -216,24 +217,19 @@ namespace svtools {
 
 enum QueryDeleteResult_Impl
 {
-    QUERYDELETE_YES = 0,
-    QUERYDELETE_NO,
-    QUERYDELETE_ALL,
-    QUERYDELETE_CANCEL
+    QUERYDELETE_CANCEL = RET_CANCEL,
+    QUERYDELETE_YES = RET_YES,
+    QUERYDELETE_NO = RET_NO,
+    QUERYDELETE_ALL = -1
 };
 
-class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public ModalDialog
+class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public MessageDialog
 {
-    FixedText               _aEntryLabel;
-    FixedText               _aEntry;
-    FixedText               _aQueryMsg;
-
-    PushButton              _aYesButton;
-    PushButton              _aAllButton;
-    PushButton              _aNoButton;
-    CancelButton            _aCancelButton;
+    PushButton*             m_pYesButton;
+    PushButton*             m_pAllButton;
+    PushButton*             m_pNoButton;
 
-    QueryDeleteResult_Impl  _eResult;
+    QueryDeleteResult_Impl  m_eResult;
 
 private:
 
@@ -244,8 +240,7 @@ public:
                             QueryDeleteDlg_Impl( Window* pParent,
                                                  const OUString& rName );
 
-    void                    EnableAllButton() { _aAllButton.Enable( sal_True ); }
-    QueryDeleteResult_Impl  GetResult() const { return _eResult; }
+    void                    EnableAllButton() { m_pAllButton->Enable(true); }
 };
 
 }
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 301d2f7..e11c5ae 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -27,8 +27,6 @@
 //.............................................................................
 // various unsorted stuff
 
-#define DLG_SVT_QUERYDELETE             (RID_SVTOOLS_START+6)
-
 #define STR_SVT_AUTOMATIC_COLOR         (RID_SVTOOLS_START+16)
 
 #define STR_SVT_FILEVIEW_COLUMN_TITLE   (RID_SVTOOLS_START + 20)
diff --git a/svtools/UIConfig_svt.mk b/svtools/UIConfig_svt.mk
index 153054f..5a6b0ca 100644
--- a/svtools/UIConfig_svt.mk
+++ b/svtools/UIConfig_svt.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svt,\
 	svtools/uiconfig/ui/graphicexport \
 	svtools/uiconfig/ui/placeedit \
 	svtools/uiconfig/ui/printersetupdialog \
+	svtools/uiconfig/ui/querydeletedialog \
 	svtools/uiconfig/ui/restartdialog \
 	svtools/uiconfig/ui/GraphicExportOptionsDialog \
 ))
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 8757ca0..32ee18b 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -59,7 +59,7 @@
 #include <unotools/localfilehelper.hxx>
 #include <ucbhelper/content.hxx>
 #include <ucbhelper/commandenvironment.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 #include <rtl/math.hxx>
 #include <tools/config.hxx>
 #include <osl/mutex.hxx>
@@ -536,7 +536,7 @@ protected:
 
 protected:
     // IEnumerationResultHandler overridables
-    virtual void        enumerationDone( ::svt::EnumerationResult _eResult );
+    virtual void        enumerationDone( ::svt::EnumerationResult eResult );
             void        implEnumerationSuccess();
 
     // ITimeoutHandler
@@ -900,7 +900,7 @@ void ViewTabListBox_Impl::ClearAll()
 // -----------------------------------------------------------------------
 void ViewTabListBox_Impl::DeleteEntries()
 {
-    svtools::QueryDeleteResult_Impl eResult = svtools::QUERYDELETE_YES;
+    short eResult = svtools::QUERYDELETE_YES;
     SvTreeListEntry* pEntry = FirstSelected();
     OUString aURL;
 
@@ -946,10 +946,7 @@ void ViewTabListBox_Impl::DeleteEntries()
             if ( GetSelectionCount() > 1 )
                 aDlg.EnableAllButton();
 
-            if ( aDlg.Execute() == RET_OK )
-                eResult = aDlg.GetResult();
-            else
-                eResult = svtools::QUERYDELETE_CANCEL;
+            eResult = aDlg.Execute();
 
             sDialogPosition = aDlg.GetWindowState( );
         }
@@ -2060,7 +2057,7 @@ void SvtFileView_Impl::onTimeout( CallbackTimer* )
 }
 
 //-----------------------------------------------------------------------
-void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult _eResult )
+void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult eResult )
 {
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( maMutex );
@@ -2074,12 +2071,12 @@ void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult _eResult )
         // this is to prevent race conditions
         return;
 
-    m_eAsyncActionResult = _eResult;
+    m_eAsyncActionResult = eResult;
     m_bRunningAsyncAction = false;
 
     m_aAsyncActionFinished.set();
 
-    if ( svt::SUCCESS == _eResult )
+    if ( svt::SUCCESS == eResult )
         implEnumerationSuccess();
 
     if ( m_aCurrentAsyncActionHandler.IsSet() )
@@ -2541,53 +2538,34 @@ namespace svtools {
 // QueryDeleteDlg_Impl
 // -----------------------------------------------------------------------
 
-QueryDeleteDlg_Impl::QueryDeleteDlg_Impl
-(
-    Window* pParent,
-    const OUString& rName      // entry name
-) :
-
-    ModalDialog( pParent, SvtResId( DLG_SVT_QUERYDELETE ) ),
-
-    _aEntryLabel  ( this, SvtResId( TXT_ENTRY ) ),
-    _aEntry       ( this, SvtResId( TXT_ENTRYNAME ) ),
-    _aQueryMsg    ( this, SvtResId( TXT_QUERYMSG ) ),
-    _aYesButton   ( this, SvtResId( BTN_YES ) ),
-    _aAllButton   ( this, SvtResId( BTN_ALL ) ),
-    _aNoButton    ( this, SvtResId( BTN_NO ) ),
-    _aCancelButton( this, SvtResId( BTN_CANCEL ) ),
-
-    _eResult( QUERYDELETE_YES )
-
+QueryDeleteDlg_Impl::QueryDeleteDlg_Impl(Window* pParent, const OUString& rName)
+    : MessageDialog(pParent, "QueryDeleteDialog", "svt/ui/querydeletedialog.ui")
+    , m_eResult( QUERYDELETE_YES )
 {
-    FreeResource();
+    get(m_pNoButton, "no");
+    get(m_pAllButton, "all");
+    get(m_pYesButton, "yes");
 
     // Handler
     Link aLink( STATIC_LINK( this, QueryDeleteDlg_Impl, ClickLink ) );
-    _aYesButton.SetClickHdl( aLink );
-    _aAllButton.SetClickHdl( aLink );
-    _aNoButton.SetClickHdl( aLink );
+    m_pYesButton->SetClickHdl( aLink );
+    m_pAllButton->SetClickHdl( aLink );
+    m_pNoButton->SetClickHdl( aLink );
 
     // display specified texts
-
-    WinBits nTmpStyle = _aEntry.GetStyle();
-    nTmpStyle |= WB_PATHELLIPSIS;
-    _aEntry.SetStyle( nTmpStyle );
-    _aEntry.SetText( rName );
+    set_secondary_text(get_secondary_text().replaceFirst("%s", rName));
 }
 
 // -----------------------------------------------------------------------
 
 IMPL_STATIC_LINK( QueryDeleteDlg_Impl, ClickLink, PushButton*, pBtn )
 {
-    if ( pBtn == &pThis->_aYesButton )
-        pThis->_eResult = QUERYDELETE_YES;
-    else if ( pBtn == &pThis->_aNoButton )
-        pThis->_eResult = QUERYDELETE_NO;
-    else if ( pBtn == &pThis->_aAllButton )
-        pThis->_eResult = QUERYDELETE_ALL;
-    else if ( pBtn == &pThis->_aCancelButton )
-        pThis->_eResult = QUERYDELETE_CANCEL;
+    if (pBtn == pThis->m_pYesButton)
+        pThis->m_eResult = QUERYDELETE_YES;
+    else if ( pBtn == pThis->m_pNoButton )
+        pThis->m_eResult = QUERYDELETE_NO;
+    else if (pBtn == pThis->m_pAllButton)
+        pThis->m_eResult = QUERYDELETE_ALL;
 
     pThis->EndDialog( RET_OK );
 
diff --git a/svtools/source/contnr/fileview.hrc b/svtools/source/contnr/fileview.hrc
index 2990095..94fed39 100644
--- a/svtools/source/contnr/fileview.hrc
+++ b/svtools/source/contnr/fileview.hrc
@@ -20,14 +20,4 @@
 #define MID_FILEVIEW_DELETE     1
 #define MID_FILEVIEW_RENAME     2
 
-// DLG_SFX_QUERYDELETE ********************************************************
-
-#define TXT_ENTRY                                               1
-#define TXT_ENTRYNAME                                           2
-#define TXT_QUERYMSG                                            3
-#define BTN_YES                                                 4
-#define BTN_NO                                                  5
-#define BTN_ALL                                                 6
-#define BTN_CANCEL                                              7
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src
index 79c122e..10a5c05 100644
--- a/svtools/source/contnr/fileview.src
+++ b/svtools/source/contnr/fileview.src
@@ -98,74 +98,4 @@ Menu RID_FILEVIEW_CONTEXTMENU
     };
 };
 
-ModalDialog DLG_SVT_QUERYDELETE
-{
-    HelpID = "svtools:ModalDialog:DLG_SVT_QUERYDELETE";
-    SVLook = TRUE ;
-    OutputSize = TRUE ;
-    Moveable = TRUE ;
-    Size = MAP_APPFONT ( 221 , 67 ) ;
-    Text [ en-US ] = "Confirm Delete" ;
-
-    FixedText TXT_ENTRY
-    {
-        NoLabel = TRUE;
-        Pos = MAP_APPFONT ( 6 , 6 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Text [ en-US ] = "Entry:" ;
-    };
-
-    FixedText TXT_ENTRYNAME
-    {
-        Pos = MAP_APPFONT ( 52 , 6 ) ;
-        Size = MAP_APPFONT ( 163 , 10 ) ;
-        NoLabel = TRUE ;
-    };
-
-    FixedText TXT_QUERYMSG
-    {
-        NoLabel = TRUE;
-        WordBreak = TRUE;
-        Pos = MAP_APPFONT ( 6 , 19 ) ;
-        Size = MAP_APPFONT ( 209 , 22 ) ;
-        Text [ en-US ] = "Are you sure you want to delete the selected data?" ;
-    };
-
-    PushButton BTN_YES
-    {
-        HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_YES";
-        Pos = MAP_APPFONT ( 6 , 47 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-        Text [ en-US ] = "~Delete" ;
-    };
-
-    PushButton BTN_ALL
-    {
-        HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_ALL";
-        Pos = MAP_APPFONT ( 59 , 47 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        Disable = TRUE ;
-        Text [ en-US ] = "Delete ~All" ;
-    };
-
-    PushButton BTN_NO
-    {
-        HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_NO";
-        Pos = MAP_APPFONT ( 112 , 47 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Do ~Not Delete" ;
-    };
-
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 165 , 47 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/uiconfig/ui/querydeletedialog.ui b/svtools/uiconfig/ui/querydeletedialog.ui
new file mode 100644
index 0000000..8237725
--- /dev/null
+++ b/svtools/uiconfig/ui/querydeletedialog.ui
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="QueryDeleteDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Confirm Delete</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">question</property>
+    <property name="text" translatable="yes">Are you sure you want to delete the selected data?</property>
+    <property name="secondary_text" translatable="yes">Entry: %s</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">center</property>
+            <child>
+              <object class="GtkButton" id="yes">
+                <property name="label" translatable="yes">_Delete</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="all">
+                <property name="label" translatable="yes">Delete _All</property>
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="no">
+                <property name="label" translatable="yes">Do _Not Delete</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="2">yes</action-widget>
+      <action-widget response="-1">all</action-widget>
+      <action-widget response="3">no</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit 6aefcb6a6f90896754f3432e5ae41403998b7ab0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Nov 27 17:08:22 2013 +0100

    forms: avoid deadlock when setting FontControlModel properties
    
    Deadlock found in forms_unoapi on Windows, with
    OGridControlModel::setFastPropertyValue_NoBroadcast() calling event
    handler that tries to lock SolarMutex.
    
    FontControlModel::setFastPropertyValue_NoBroadcast() and its callers in
    3 other classes must not send events via firePropertyChange()
    because they are called by OPropertySetHelper::setFastPropertyValues()
    with its Mutex locked.
    
    It is possible (though sadly quite convoluted) to delay the sending of
    the events by calling setDependentFastPropertyValue() instead.
    
    Change-Id: I0c767cfec01fe1bcaeb1236287b5faf81a2e7441

diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index c81675f..bb52635 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -707,12 +707,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
         default:
             if ( isFontRelatedProperty( nHandle ) )
             {
-                FontDescriptor aOldFont( getFont() );
-
-                FontControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
-
-                if ( isFontAggregateProperty( nHandle ) )
-                    firePropertyChange( PROPERTY_ID_FONT, makeAny( getFont() ), makeAny( aOldFont ) );
+                FontControlModel::setFastPropertyValue_NoBroadcast_impl(
+                    *this, &OGridControlModel::setDependentFastPropertyValue,
+                    nHandle, rValue);
             }
             else
                 OControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index 5745802..4b85cae 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -20,6 +20,7 @@
 #include "formcontrolfont.hxx"
 #include "property.hrc"
 #include "property.hxx"
+#include <cppuhelper/propshlp.hxx>
 #include <comphelper/property.hxx>
 #include <comphelper/types.hxx>
 #include <tools/color.hxx>
@@ -351,104 +352,139 @@ namespace frm
     }
 
     //------------------------------------------------------------------------------
-    void FontControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception )
+    static void setFastPropertyValue_NoBroadcast_implimpl(
+            FontDescriptor & rFont,
+            sal_Int32 nHandle, const Any& rValue) throw (Exception)
     {
-        switch( _nHandle )
+        switch (nHandle)
         {
-        case PROPERTY_ID_TEXTCOLOR:
-            m_aTextColor = _rValue;
-            break;
-
-        case PROPERTY_ID_TEXTLINECOLOR:
-            m_aTextLineColor = _rValue;
-            break;
-
-        case PROPERTY_ID_FONTEMPHASISMARK:
-            _rValue >>= m_nFontEmphasis;
-            break;
-
-        case PROPERTY_ID_FONTRELIEF:
-            _rValue >>= m_nFontRelief;
-            break;
-
-        case PROPERTY_ID_FONT:
-            _rValue >>= m_aFont;
-            break;
-
         case PROPERTY_ID_FONT_NAME:
-            _rValue >>= m_aFont.Name;
+            rValue >>= rFont.Name;
             break;
 
         case PROPERTY_ID_FONT_STYLENAME:
-            _rValue >>= m_aFont.StyleName;
+            rValue >>= rFont.StyleName;
             break;
 
         case PROPERTY_ID_FONT_FAMILY:
-            _rValue >>= m_aFont.Family;
+            rValue >>= rFont.Family;
             break;
 
         case PROPERTY_ID_FONT_CHARSET:
-            _rValue >>= m_aFont.CharSet;
+            rValue >>= rFont.CharSet;
             break;
 
         case PROPERTY_ID_FONT_CHARWIDTH:
-            _rValue >>= m_aFont.CharacterWidth;
+            rValue >>= rFont.CharacterWidth;
             break;
 
         case PROPERTY_ID_FONT_KERNING:
-            _rValue >>= m_aFont.Kerning;
+            rValue >>= rFont.Kerning;
             break;
 
         case PROPERTY_ID_FONT_ORIENTATION:
-            _rValue >>= m_aFont.Orientation;
+            rValue >>= rFont.Orientation;
             break;
 
         case PROPERTY_ID_FONT_PITCH:
-            _rValue >>= m_aFont.Pitch;
+            rValue >>= rFont.Pitch;
             break;
 
         case PROPERTY_ID_FONT_TYPE:
-            _rValue >>= m_aFont.Type;
+            rValue >>= rFont.Type;
             break;
 
         case PROPERTY_ID_FONT_WIDTH:
-            _rValue >>= m_aFont.Width;
+            rValue >>= rFont.Width;
             break;
 
         case PROPERTY_ID_FONT_HEIGHT:
         {
             float nHeight = 0;
-            _rValue >>= nHeight;
-            m_aFont.Height = (sal_Int16)nHeight;
+            rValue >>= nHeight;
+            rFont.Height = (sal_Int16)nHeight;
         }
         break;
 
         case PROPERTY_ID_FONT_WEIGHT:
-            _rValue >>= m_aFont.Weight;
+            rValue >>= rFont.Weight;
             break;
 
         case PROPERTY_ID_FONT_SLANT:
-            _rValue >>= m_aFont.Slant;
+            rValue >>= rFont.Slant;
             break;
 
         case PROPERTY_ID_FONT_UNDERLINE:
-            _rValue >>= m_aFont.Underline;
+            rValue >>= rFont.Underline;
             break;
 
         case PROPERTY_ID_FONT_STRIKEOUT:
-            _rValue >>= m_aFont.Strikeout;
+            rValue >>= rFont.Strikeout;
             break;
 
         case PROPERTY_ID_FONT_WORDLINEMODE:
         {
             sal_Bool bWordLineMode = sal_False;
-            _rValue >>= bWordLineMode;
-            m_aFont.WordLineMode = bWordLineMode;
+            rValue >>= bWordLineMode;
+            rFont.WordLineMode = bWordLineMode;
         }
         break;
 
         default:
-            OSL_FAIL( "FontControlModel::setFastPropertyValue_NoBroadcast: invalid property!" );
+            assert(false); // isFontAggregateProperty
+        }
+    }
+
+    void FontControlModel::setFastPropertyValue_NoBroadcast_impl(
+            ::cppu::OPropertySetHelper & rBase,
+            void (::cppu::OPropertySetHelper::*pSet)(sal_Int32, Any const&),
+            sal_Int32 nHandle, const Any& rValue) throw (Exception)
+    {
+        if (isFontAggregateProperty(nHandle))
+        {
+            // need to fire a event for PROPERTY_ID_FONT too apparently, so:
+            FontDescriptor font(getFont());
+
+            // first set new value on backup copy
+            setFastPropertyValue_NoBroadcast_implimpl(font, nHandle, rValue);
+
+            // then set that as the actual property - will eventually call
+            // this method recursively again...
+            (rBase.*pSet)(PROPERTY_ID_FONT, makeAny(font));
+#ifndef NDEBUG
+            // verify that the nHandle property has the new value
+            Any tmp;
+            getFastPropertyValue(tmp, nHandle);
+            assert(tmp == rValue || PROPERTY_ID_FONT_HEIGHT == nHandle /*rounded*/);
+#endif
+        }
+        else
+        {
+            switch (nHandle)
+            {
+            case PROPERTY_ID_TEXTCOLOR:
+                m_aTextColor = rValue;
+                break;
+
+            case PROPERTY_ID_TEXTLINECOLOR:
+                m_aTextLineColor = rValue;
+                break;
+
+            case PROPERTY_ID_FONTEMPHASISMARK:
+                rValue >>= m_nFontEmphasis;
+                break;
+
+            case PROPERTY_ID_FONTRELIEF:
+                rValue >>= m_nFontRelief;
+                break;
+
+            case PROPERTY_ID_FONT:
+                rValue >>= m_aFont;
+                break;
+
+            default:
+                SAL_WARN("forms.component", "invalid property: " << nHandle);
+            }
         }
     }
 
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index 9baeea7..0aa5311 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -403,12 +403,9 @@ namespace frm
         }
         else if ( isFontRelatedProperty( _nHandle ) )
         {
-            FontDescriptor aOldFont( getFont() );
-
-            FontControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
-
-            if ( isFontAggregateProperty( _nHandle ) )
-                firePropertyChange( PROPERTY_ID_FONT, makeAny( getFont() ), makeAny( aOldFont ) );
+            FontControlModel::setFastPropertyValue_NoBroadcast_impl(
+                    *this, &ONavigationBarModel::setDependentFastPropertyValue,
+                    _nHandle, _rValue);
         }
         else
         {
diff --git a/forms/source/inc/formcontrolfont.hxx b/forms/source/inc/formcontrolfont.hxx
index 4e802ba..e29d93d 100644
--- a/forms/source/inc/formcontrolfont.hxx
+++ b/forms/source/inc/formcontrolfont.hxx
@@ -25,6 +25,10 @@
 #include <com/sun/star/beans/Property.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
+namespace cppu {
+    class OPropertySetHelper;
+}
+
 //.........................................................................
 namespace frm
 {
@@ -74,7 +78,12 @@ namespace frm
 
         void     getFastPropertyValue            ( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const;
         sal_Bool convertFastPropertyValue        ( ::com::sun::star::uno::Any& _rConvertedValue, ::com::sun::star::uno::Any& _rOldValue, sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue ) throw( ::com::sun::star::lang::IllegalArgumentException );
-        void     setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue ) throw ( ::com::sun::star::uno::Exception );
+        void     setFastPropertyValue_NoBroadcast_impl(
+                ::cppu::OPropertySetHelper & rBase,
+                void (::cppu::OPropertySetHelper::*pSet)(
+                    sal_Int32, css::uno::Any const&),
+                sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue)
+            throw ( ::com::sun::star::uno::Exception );
         ::com::sun::star::uno::Any
                  getPropertyDefaultByHandle      ( sal_Int32 _nHandle ) const;
 
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 226badd..592b0d2 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -391,12 +391,9 @@ namespace frm
         }
         else if ( isFontRelatedProperty( _nHandle ) )
         {
-            FontDescriptor aOldFont( getFont() );
-
-            FontControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
-
-            if ( isFontAggregateProperty( _nHandle ) )
-                firePropertyChange( PROPERTY_ID_FONT, makeAny( getFont() ), makeAny( aOldFont ) );
+            FontControlModel::setFastPropertyValue_NoBroadcast_impl(
+                    *this, &ORichTextModel::setDependentFastPropertyValue,
+                    _nHandle, _rValue);
         }
         else
         {
commit e521a803c914e0d3718ae795976948aabbb9c76c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Nov 27 17:06:34 2013 +0100

    FontControlModel::convertFastPropertyValue: fix bad cast of Kerning
    
    Casting sal_Bool to integer lets the comparison always fail.
    
    Change-Id: I33cf9e9b6a65f81166870bdfe32e9a97101501df

diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index cd351e5..5745802 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -301,7 +301,7 @@ namespace frm
             break;
 
         case PROPERTY_ID_FONT_KERNING:
-            bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, (sal_Int16)m_aFont.Kerning );
+            bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aFont.Kerning );
             break;
 
         case PROPERTY_ID_FONT_ORIENTATION:
commit a66090955f9e05905417660fc14e91b352f304d2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 27 16:09:59 2013 +0000

    C2872: 'accessibility' : ambiguous symbol
    
    Change-Id: I9a7f5a768346539f14c1fc84d1c60e99107e3899

diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index 06cae40..28a11fe 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -754,10 +754,10 @@ uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL SvxShowCharSe
     {
         if (mpParent->mrParent.IsEnabled())
         {
-            pStateSet->AddState( accessibility::AccessibleStateType::ENABLED );
+            pStateSet->AddState( css::accessibility::AccessibleStateType::ENABLED );
             // SELECTABLE
-            pStateSet->AddState( accessibility::AccessibleStateType::SELECTABLE );
-            pStateSet->AddState( accessibility::AccessibleStateType::FOCUSABLE );
+            pStateSet->AddState( css::accessibility::AccessibleStateType::SELECTABLE );
+            pStateSet->AddState( css::accessibility::AccessibleStateType::FOCUSABLE );
         }
 
         // SELECTED
commit 7ef4a5bd51c606c70661dd303ebd1eeaec0c3834
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Nov 27 13:00:02 2013 +0000

    removed pCaptionObj from accessibility
    
    it was not initialized but accessed in one place. Checked with symphony code,
    there was a set method which is not in AOO trunk, thus solved accesses to zero
    pointer usage
    
    (cherry picked from commit bd0c3b940f6006d3cb49381230795db667aeb943)
    
    Conflicts:
    	svx/inc/svx/svdobj.hxx
    	svx/source/svdraw/svdobj.cxx
    
    Change-Id: Ic8dec5c6def35753d757066c7ea02e1a92b46f6c

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index ee08d6b..f1b3dbb 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -357,7 +357,6 @@ protected:
     SdrObjUserCall*             pUserCall;
     SdrObjPlusData*             pPlusData;    // Broadcaster, UserData, Konnektoren, ... (Das ist der Bitsack)
 
-    SdrObject*  pCaptionObj;
     sal_uInt32                  nOrdNum;      // Rangnummer des Obj in der Liste
 
     SfxGrabBagItem*             pGrabBagItem; // Holds the GrabBagItem property
@@ -1036,7 +1035,6 @@ public:
     // #i121917#
     virtual bool HasText() const;
 
-    const SdrObject* GetCaptionObj() const;
 protected:
     /** Sets a new UNO shape
       *
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index fa36b9c..bdb7453 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -421,36 +421,27 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL
         throw (::com::sun::star::uno::RuntimeException)
 {
     ::osl::MutexGuard aGuard (maMutex);
-    ::utl::AccessibleRelationSetHelper* pRelationSet =
-        new utl::AccessibleRelationSetHelper;
-    SdrObject* pCaptionSdr = const_cast < SdrObject* > ( m_pShape->GetCaptionObj() )  ;
-    if(pCaptionSdr!=NULL)
-    {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            uno::Reference<drawing::XShape> xCaptionShape ( pCaptionSdr->getUnoShape(),uno::UNO_QUERY);
-            if(xCaptionShape.is())
-            {
-                aSequence[0] = mpParent->GetAccessibleCaption(xCaptionShape);
-                pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
-        }
-    }
-    else
+    ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
+    uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+    aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
+
+    //this mxshape is the captioned shape, only for sw
+    if(aSequence[0].get())
     {
-        //this mxshape is the captioned shape, only for sw
-        if(mpParent->GetAccessibleCaption(mxShape).get())
-        {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
-            pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
-        }
+        pRelationSet->AddRelation(
+            AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
     }
-   if (pRelationSet != NULL)
+
+    if (pRelationSet != NULL)
     {
         return uno::Reference<XAccessibleRelationSet> (
             new ::utl::AccessibleRelationSetHelper (*pRelationSet));
     }
     else
+    {
         return uno::Reference<XAccessibleRelationSet>(NULL);
+    }
+
     return uno::Reference<XAccessibleRelationSet>();
 }
 
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 4016094..b495c5b 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -3128,11 +3128,6 @@ void SdrObject::notifyShapePropertyChange( const ::svx::ShapeProperty _eProperty
         return pSvxShape->getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty );
 }
 
-const SdrObject* SdrObject::GetCaptionObj() const
-{
-    return pCaptionObj;
-}
-
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 // transformation interface for StarOfficeAPI. This implements support for
commit 76bb6d7678669b5af1731fb87e632784cd3c01fc
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 27 16:49:43 2013 +0100

    statement aligned as second statement in if body but not in a statement block
    
    Change-Id: I497a31b35d68a31155fd31bcd3d07e782be944c3

diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index a4b25dd..3b0a4ae 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -94,7 +94,7 @@ uno::Reference< XAccessible > SvxPixelCtlAccessible::getAccessibleChild( sal_Int
     ::osl::MutexGuard   aGuard( m_aMutex );
     IsValid();
     if ( i < 0 || i >= getAccessibleChildCount())
-    throw lang::IndexOutOfBoundsException();
+        throw lang::IndexOutOfBoundsException();
     uno::Reference <XAccessible> xAcc;
     if(pPixelCtl)
     {
commit e556e2890ca2baaf05a2694463b15aee6b803454
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 27 16:48:05 2013 +0100

    -Werror,-Wunused-variable
    
    Change-Id: Ia202059eb891b1088dc276c963e16ede93fe8d05

diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index e433f67..a4b25dd 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -345,7 +345,6 @@ void SvxPixelCtlAccessible::grabFocus(  ) throw (uno::RuntimeException)
 sal_Int32 SvxPixelCtlAccessible::getForeground(  )
         throw (::com::sun::star::uno::RuntimeException)
 {
-    uno::Any aRet;
     ::osl::MutexGuard   aGuard( m_aMutex );
     IsValid();
     return pPixelCtl->GetControlForeground().GetColor();
@@ -354,7 +353,6 @@ sal_Int32 SvxPixelCtlAccessible::getForeground(  )
 sal_Int32 SvxPixelCtlAccessible::getBackground(  )
         throw (::com::sun::star::uno::RuntimeException)
 {
-    uno::Any aRet;
     ::osl::MutexGuard   aGuard( m_aMutex );
     IsValid();
     return pPixelCtl->GetControlBackground().GetColor();
commit 2733831474036f4893e8a90795f5799279d151d0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 27 16:47:32 2013 +0100

    -Werror,-Wunused-variable
    
    Change-Id: Id3e24e7efd84db03d0d1636bf099bac3fede55db

diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index f23b9ab..dc3fb56 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -306,8 +306,6 @@ OUString
                     SdrObject *pSdrObj = pShape->GetSdrObject();
                     if (pSdrObj)
                     {
-                        OUString aTmp(pSdrObj->TakeObjNameSingul());
-
                         if(pSdrObj->ISA(SdrObjCustomShape))
                         {
                             SdrObjCustomShape* pCustomShape = (SdrObjCustomShape*)pSdrObj;
commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366
Author: Steve Yin <steve_y at apache.org>
Date:   Wed Nov 27 13:03:45 2013 +0000

    Integrate branch of IAccessible2
    
    Change-Id: I8327fb4ba2a86d4caa52b875221175b80464842a

diff --git a/include/svx/AccessibleControlShape.hxx b/include/svx/AccessibleControlShape.hxx
index c84391b..3f901e1 100644
--- a/include/svx/AccessibleControlShape.hxx
+++ b/include/svx/AccessibleControlShape.hxx
@@ -59,6 +59,8 @@ public:
         const AccessibleShapeTreeInfo& rShapeTreeInfo);
     virtual ~AccessibleControlShape( );
 
+    ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL  GetControlModel( ) { return m_xControlModel;} ;
+    AccessibleControlShape* SAL_CALL GetLabeledByControlShape();
 protected:
     //---  XAccessible  ----------------------------------------
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/include/svx/AccessibleGraphicShape.hxx b/include/svx/AccessibleGraphicShape.hxx
index b558baa..6347c75 100644
--- a/include/svx/AccessibleGraphicShape.hxx
+++ b/include/svx/AccessibleGraphicShape.hxx
@@ -85,7 +85,8 @@ public:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
         getTypes (void)
         throw (::com::sun::star::uno::RuntimeException);
-
+/// Return this object's role.
+    virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
 protected:
     /// Create a name string that contains the accessible name.
     virtual OUString
diff --git a/include/svx/AccessibleOLEShape.hxx b/include/svx/AccessibleOLEShape.hxx
index 18b6ed2..ce213bb 100644
--- a/include/svx/AccessibleOLEShape.hxx
+++ b/include/svx/AccessibleOLEShape.hxx
@@ -91,7 +91,8 @@ public:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
         getTypes (void)
         throw (::com::sun::star::uno::RuntimeException);
-
+// ====== XAccessibleExtendedAttributes =====================================
+    virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
 protected:
     /// Create a name string that contains the accessible name.
     virtual OUString
diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx
index 56a36d5..a684887 100644
--- a/include/svx/AccessibleShape.hxx
+++ b/include/svx/AccessibleShape.hxx
@@ -28,6 +28,12 @@
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -70,6 +76,10 @@ class IAccessibleParent;
 class SVX_DLLPUBLIC AccessibleShape
     :   public AccessibleContextBase,
         public AccessibleComponentBase,
+        public ::com::sun::star::accessibility::XAccessibleSelection,
+        public ::com::sun::star::accessibility::XAccessibleExtendedAttributes,
+        public ::com::sun::star::accessibility::XAccessibleGroupPosition,
+        public com::sun::star::accessibility::XAccessibleHypertext,
         public IAccessibleViewForwarderListener,
         public ::com::sun::star::document::XEventListener,
         public ::com::sun::star::lang::XUnoTunnel
@@ -95,7 +105,54 @@ public:
     AccessibleShape (
         const AccessibleShapeInfo& rShapeInfo,
         const AccessibleShapeTreeInfo& rShapeTreeInfo);
-
+    AccessibleShape (
+        const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent, const AccessibleShapeTreeInfo& rShapeTreeInfo, sal_Int32 nIndex = -1);
+     //Solution: Overwrite the object's current name.
+    virtual OUString SAL_CALL    getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL    getAccessibleDescription() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet (void) throw (::com::sun::star::uno::RuntimeException);
+//=====  XAccessibleSelection  ============================================
+
+    virtual void SAL_CALL selectAccessibleChild(
+        sal_Int32 nChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException );
+
+    virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+        sal_Int32 nChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException );
+
+    virtual void SAL_CALL clearAccessibleSelection(  )
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+    virtual void SAL_CALL selectAllAccessibleChildren(  )
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+    virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  )
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+        sal_Int32 nSelectedChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL deselectAccessibleChild(
+        sal_Int32 nSelectedChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException );
+
+    // ====== XAccessibleExtendedAttributes =====================================
+    virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+    throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    /// Return this object's role.
+    virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
+    //=====  XAccessibleGroupPosition  =========================================
+    virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+        getGroupPosition( const ::com::sun::star::uno::Any& rAny )
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getObjectLink( const ::com::sun::star::uno::Any& accoject )
+        throw (::com::sun::star::uno::RuntimeException);
     /** The destructor releases its children manager and text engine if
         still existent.  These are responsible to send appropriate events.
     */
@@ -301,6 +358,32 @@ public:
     static AccessibleShape*                                     getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw();
     sal_Int64                                                   SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
 
+    //===== XAccessibleHypertext ========================================================
+    virtual sal_Int32 SAL_CALL getHyperLinkCount()  throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink >
+        SAL_CALL getHyperLink( sal_Int32 nLinkIndex )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    //=====  XAccesibleText  ==================================================
+        virtual sal_Int32 SAL_CALL getCaretPosition(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);//Shen Zhen Jie changed sal_Unicode to sal_uInt32; change back to sal_Unicode
+        virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getCharacterCount(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getSelectedText(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getSelectionStart(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getSelectionEnd(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getText(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
     //===== Misc ========================================================
 
     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
@@ -367,7 +450,12 @@ protected:
     virtual OUString
         CreateAccessibleDescription (void)
         throw (::com::sun::star::uno::RuntimeException);
-
+    virtual OUString
+       GetFullAccessibleName(AccessibleShape *shape)
+       throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString GetStyle();
+    void UpdateDocumentAllSelState(::com::sun::star::uno::Reference<
+        ::com::sun::star::accessibility::XAccessibleStateSet > &xStateSet);
     /** Update the <const>OPAQUE</const> and <const>SELECTED</const> state.
     */
     virtual void UpdateStates (void);
@@ -381,6 +469,8 @@ private:
     SVX_DLLPRIVATE explicit AccessibleShape (const AccessibleShape&);
     /// Don't use the assignment operator.  Do we need this?
     SVX_DLLPRIVATE AccessibleShape& operator= (const AccessibleShape&);
+    //Old accessible name
+    OUString aAccName;
 
     /** Call this method when the title, name, or description of the mxShape
         member (may) have been changed.
diff --git a/include/svx/AccessibleSvxFindReplaceDialog.hxx b/include/svx/AccessibleSvxFindReplaceDialog.hxx
new file mode 100644
index 0000000..5c82f57
--- /dev/null
+++ b/include/svx/AccessibleSvxFindReplaceDialog.hxx
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   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 .
+ */
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#define _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+
+#include <toolkit/awt/vclxwindow.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <toolkit/awt/vclxwindows.hxx>
+
+
+class VCLXAccessibleSvxFindReplaceDialog : public VCLXAccessibleComponent
+{
+public:
+    VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow);
+    virtual ~VCLXAccessibleSvxFindReplaceDialog();
+    virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
+    // XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+class VCLXSvxFindReplaceDialog : public VCLXDialog
+{
+public:
+    VCLXSvxFindReplaceDialog(Window* pSplDlg)
+    {
+        SetWindow(pSplDlg);
+    }
+    virtual ~VCLXSvxFindReplaceDialog()
+    {};
+private:
+    virtual ::com::sun::star::uno::Reference<
+        ::com::sun::star::accessibility::XAccessibleContext >  CreateAccessibleContext()
+    {
+        return new VCLXAccessibleSvxFindReplaceDialog(this);
+    }
+};
+#endif // _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
diff --git a/include/svx/AccessibleTableShape.hxx b/include/svx/AccessibleTableShape.hxx
index e3d3484..a9309ef 100644
--- a/include/svx/AccessibleTableShape.hxx
+++ b/include/svx/AccessibleTableShape.hxx
@@ -30,6 +30,9 @@
 #include <cppuhelper/implbase2.hxx>
 
 #include <svx/AccessibleShape.hxx>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
+#include <cppuhelper/compbase5.hxx>
 
 #include <boost/noncopyable.hpp>
 
@@ -40,14 +43,15 @@ namespace sdr { namespace table {
 namespace accessibility
 {
     class AccessibleTableShapeImpl;
+    class AccessibleCell;
 
     typedef ::cppu::ImplInheritanceHelper2< AccessibleShape,
-                                            ::com::sun::star::accessibility::XAccessibleSelection,
-                                            ::com::sun::star::accessibility::XAccessibleTable
+                                            ::com::sun::star::accessibility::XAccessibleTable,
+                                            ::com::sun::star::view::XSelectionChangeListener
                                           > AccessibleTableShape_Base;
 /** @descr
 */
-class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base
+class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base, public ::com::sun::star::accessibility::XAccessibleTableSelection
 {
 public:
     AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo );
@@ -98,6 +102,15 @@ public:
     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  ) throw ( ::com::sun::star::uno::RuntimeException );
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex )  throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+    //=====  XAccessibleTableSelection ============================================
+    virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
 
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
@@ -105,7 +118,26 @@ public:
     // XComponent
     virtual void SAL_CALL disposing( );
 
+    // XSelectionChangeListener
+    virtual void SAL_CALL
+        disposing (const ::com::sun::star::lang::EventObject& Source)
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual void  SAL_CALL
+        selectionChanged (const ::com::sun::star::lang::EventObject& rEvent)
+        throw (::com::sun::star::uno::RuntimeException);
+    sal_Int32 mnPreviousSelectionCount;
     using AccessibleShape::disposing;
+    friend class AccessibleTableHeaderShape;
+
+    void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
+    // overwrite the SetState & ResetState to do special operation for table cell's internal text
+    virtual sal_Bool SetState (sal_Int16 aState);
+    virtual sal_Bool ResetState (sal_Int16 aState);
+    // The following two methods are used to set state directly on table object, instread of the internal cell or paragraph.
+    sal_Bool SetStateDirectly (sal_Int16 aState);
+    sal_Bool ResetStateDirectly (sal_Int16 aState);
+    // Get the currently active cell which is text editing
+    AccessibleCell* GetActiveAccessibleCell();
 
 protected:
     virtual OUString CreateAccessibleBaseName(void) throw (::com::sun::star::uno::RuntimeException);
@@ -113,10 +145,90 @@ protected:
     sdr::table::SvxTableController* getTableController();
 
     void checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
-    void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
 
 private:
     rtl::Reference< AccessibleTableShapeImpl > mxImpl;
+    sal_Int32 GetIndexOfSelectedChild( sal_Int32 nSelectedChildIndex ) const;
+};
+
+typedef ::cppu::WeakImplHelper5<
+            ::com::sun::star::accessibility::XAccessible,
+            ::com::sun::star::accessibility::XAccessibleComponent,
+            ::com::sun::star::accessibility::XAccessibleContext,
+            ::com::sun::star::accessibility::XAccessibleTable,
+            ::com::sun::star::accessibility::XAccessibleTableSelection >
+            AccessibleTableHeaderShape_BASE;
+
+class AccessibleTableHeaderShape : boost::noncopyable,
+    public MutexOwner,
+    public AccessibleTableHeaderShape_BASE
+{
+public:
+    // bRow, sal_True means rowheader, sal_False means columnheader
+    AccessibleTableHeaderShape( AccessibleTableShape* pTable, sal_Bool bRow );
+    virtual ~AccessibleTableHeaderShape();
+
+    // XAccessible
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException);
+
+    // XAccessibleContext
+    virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::lang::Locale SAL_CALL getLocale(  ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+    //XAccessibleComponent
+    virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Point SAL_CALL getLocation(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Size SAL_CALL getSize(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XAccessibleTable
+    virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleColumnCount(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCaption(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleSummary(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+    //=====  XAccessibleTableSelection  ============================================
+    virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+private:
+    SVX_DLLPRIVATE explicit AccessibleTableHeaderShape( const ::com::sun::star::uno::Reference<
+            ::com::sun::star::accessibility::XAccessible>& rxParent );
+    sal_Bool mbRow;
+    rtl::Reference< AccessibleTableShape > mpTable;
 };
 
 } // end of namespace accessibility
diff --git a/include/svx/ChildrenManager.hxx b/include/svx/ChildrenManager.hxx
index 8de19aa..c2e6df8 100644
--- a/include/svx/ChildrenManager.hxx
+++ b/include/svx/ChildrenManager.hxx
@@ -126,6 +126,8 @@ public:
         GetChild (long nIndex)
         throw (::com::sun::star::uno::RuntimeException,
                ::com::sun::star::lang::IndexOutOfBoundsException);
+        ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> GetChild (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& xShape) throw (::com::sun::star::uno::RuntimeException);
+        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape> GetChildShape (long nIndex) throw (::com::sun::star::uno::RuntimeException);
 
     /** Update the child manager.  Take care of a modified set of children
         and modified visible area.  This method can optimize the update
@@ -189,7 +191,6 @@ public:
     */
     void RemoveFocus (void);
 
-    //=====  IAccessibleViewForwarderListener  ================================
     virtual void ViewForwarderChanged (ChangeType aChangeType,
         const IAccessibleViewForwarder* pViewForwarder);
 
diff --git a/include/svx/EnhancedCustomShapeTypeNames.hxx b/include/svx/EnhancedCustomShapeTypeNames.hxx
index 82ebe96..b91e1eb 100644
--- a/include/svx/EnhancedCustomShapeTypeNames.hxx
+++ b/include/svx/EnhancedCustomShapeTypeNames.hxx
@@ -26,6 +26,7 @@ namespace EnhancedCustomShapeTypeNames
 {
     SVX_DLLPUBLIC MSO_SPT Get( const OUString& );
     SVX_DLLPUBLIC OUString Get( const MSO_SPT );
+    SVX_DLLPUBLIC OUString GetAccName( const OUString& );
 }
 
 #endif
diff --git a/include/svx/IAccessibleParent.hxx b/include/svx/IAccessibleParent.hxx
index f50d024..23e2aa5 100644
--- a/include/svx/IAccessibleParent.hxx
+++ b/include/svx/IAccessibleParent.hxx
@@ -23,7 +23,7 @@
 #include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <sal/types.h>
-
+#include "AccessibleControlShape.hxx"
 namespace accessibility {
 
 class AccessibleShape;
@@ -80,6 +80,16 @@ public:
         const long _nIndex,
         const AccessibleShapeTreeInfo& _rShapeTreeInfo
     )   throw (::com::sun::star::uno::RuntimeException) = 0;
+    //Add this method to support Form Controls
+    virtual AccessibleControlShape* GetAccControlShapeFromModel
+        (::com::sun::star::beans::XPropertySet*)
+        throw (::com::sun::star::uno::RuntimeException){return NULL;};
+    virtual  ::com::sun::star::uno::Reference<
+            ::com::sun::star::accessibility::XAccessible>
+        GetAccessibleCaption (const ::com::sun::star::uno::Reference<
+            ::com::sun::star::drawing::XShape>&)
+            throw (::com::sun::star::uno::RuntimeException){return NULL;};
+    virtual sal_Bool IsDocumentSelAll(){ return sal_False; }
 };
 
 } // end of namespace accessibility
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 829400f..882da38 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -63,6 +63,7 @@ typedef sal_uInt16 CTL_STATE;
 #define CS_NOVERT   2       // no vertikal input information is used
 
 class SvxRectCtlAccessibleContext;
+class SvxPixelCtlAccessible;
 
 class SVX_DLLPUBLIC SvxRectCtl : public Control
 {
@@ -175,7 +176,9 @@ protected:
     Size        aRectSize;
     sal_uInt16*     pPixel;
     sal_Bool        bPaintable;
-
+    //Add member identifying position
+    Point       aFocusPosition;
+    Rectangle   implCalFocusRect( const Point& aPosition );
     void    ChangePixel( sal_uInt16 nPixel );
 
 public:
@@ -203,6 +206,23 @@ public:
 
     void    SetPaintable( sal_Bool bTmp ) { bPaintable = bTmp; }
     void    Reset();
+    SvxPixelCtlAccessible*  m_pAccess;
+    ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >        m_xAccess;
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+    long GetSquares() const { return nSquares ; }
+    long GetWidth() const { return aRectSize.getWidth() ; }
+    long GetHeight() const { return aRectSize.getHeight() ; }
+
+    //Device Pixel .
+    long ShowPosition( const Point &pt);
+
+    long PointToIndex(const Point &pt) const;
+    Point IndexToPoint(long nIndex) const ;
+    long GetFoucsPosIndex() const ;
+    //Keyboard function for key input and focus handling function
+    virtual void        KeyInput( const KeyEvent& rKEvt );
+    virtual void        GetFocus();
+    virtual void        LoseFocus();
 };
 
 /************************************************************************/
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index b780495..bad5c14 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -185,7 +185,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
     private:
         const SfxItemSet*   pSet;
         SfxMapUnit      eCoreUnit;
-        //Sym3_2508    store the attributes passed from pSet
+        // store the attributes passed from pSet
         OUString        aNumCharFmtName;
         void            StoreBulCharFmtName_impl();
         void            StoreMapUnit_impl();
@@ -222,7 +222,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
         virtual sal_Bool IsCustomized(sal_uInt16 nIndex)=0;
         sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel);
         const SfxItemSet* GetItems() { return pSet;}
-        //Sym3_2508    store the attributes passed from pSet
+        // store the attributes passed from pSet
         void SetItems(const SfxItemSet* pArg) { pSet = pArg;StoreBulCharFmtName_impl();StoreMapUnit_impl();}
     protected:
         OUString GetBulCharFmtName();
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index af613d8..908c531 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -28,7 +28,6 @@
 #include <svx/selectioncontroller.hxx>
 #include <svx/svdotable.hxx>
 #include <svx/svdview.hxx>
-//#include <tablemodel.hxx>
 
 class SdrObjEditView;
 class SdrObject;
@@ -102,6 +101,17 @@ public:
 
     SVX_DLLPRIVATE void onTableModified();
 
+    sal_Bool selectRow( sal_Int32 row );
+    sal_Bool selectColumn( sal_Int32 column );
+    sal_Bool deselectRow( sal_Int32 row );
+    sal_Bool deselectColumn( sal_Int32 column );
+    sal_Bool isRowSelected( sal_Int32 nRow );
+    sal_Bool isColumnSelected( sal_Int32 nColumn );
+    sal_Bool isRowHeader();
+    sal_Bool isColumnHeader();
+    ::sdr::table::SdrTableObj* GetTableObj() { return dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() ); }
+    //declare event notification method
+    void NotifySelection( const CellPos& firstPos, const CellPos& lastPos, const CellPos& newPos );
 private:
     SvxTableController(SvxTableController &); // not defined
     void operator =(SvxTableController &); // not defined
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 8797115..316a977 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -130,9 +130,19 @@ public:
 
     sal_Int32       GetTransliterationFlags() const;
 
+    void SetDocWin( Window* pDocWin ) { mpDocWin = pDocWin; }
+    Window* GetDocWin() { return mpDocWin; }
+    void SetSrchFlag( sal_Bool bSuccess = sal_False ) { mbSuccess = bSuccess; }
+    sal_Bool GetSrchFlag() { return mbSuccess; }
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
+        GetComponentInterface( sal_Bool bCreate );
+
     void            SetSaveToModule(bool b);
 
 private:
+    Window*         mpDocWin;
+    sal_Bool        mbSuccess;
+
     VclFrame*       m_pSearchFrame;
     ComboBox*       m_pSearchLB;
     ListBox*        m_pSearchTmplLB;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list