diff options
author | Steve Yin <steve_y@apache.org> | 2013-11-27 13:03:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-27 15:38:59 +0000 |
commit | 60f11adb950e4f9645cc9ecb0f5af8235cc97366 (patch) | |
tree | a4a758c31820e909d266f8b5cd49c651011acae9 /svx/source/unodraw/unoshtxt.cxx | |
parent | e022c608fd927bfec20bdec5bee5b600668eeaac (diff) |
Integrate branch of IAccessible2
Change-Id: I8327fb4ba2a86d4caa52b875221175b80464842a
Diffstat (limited to 'svx/source/unodraw/unoshtxt.cxx')
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index b4b2c62025e7..da2a4810fde7 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -44,6 +44,8 @@ #include <editeng/unotext.hxx> #include <com/sun/star/linguistic2/LinguServiceManager.hpp> #include <comphelper/processfactory.hxx> +#include <svx/svdotable.hxx> +#include "../table/cell.hxx" #include <svx/sdrpaintwindow.hxx> using namespace ::osl; @@ -374,6 +376,29 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) case HINT_BEGEDIT: if( mpObject == pSdrHint->GetObject() ) { + // Once HINT_BEGEDIT is broadcast, each EditSource of + // AccessibleCell will handle it here and call below: + // mpView->GetTextEditOutliner()->SetNotifyHdl(), which + // will replace the Notifer for current editable cell. It + // is totally wrong. So add check here to avoid the + // incorrect replacement of notifer. + // + // Currently it only happens on the editsource of + // AccessibleCell + if (mpObject && mpText) + { + sdr::table::SdrTableObj* pTableObj = PTR_CAST( sdr::table::SdrTableObj, mpObject ); + if(pTableObj) + { + sdr::table::CellRef xCell = pTableObj->getActiveCell(); + if (xCell.is()) + { + sdr::table::Cell* pCellObj = dynamic_cast< sdr::table::Cell* >( mpText ); + if (pCellObj && xCell.get() != pCellObj) + break; + } + } + } // invalidate old forwarder if( !mbForwarderIsEditMode ) { |