summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSascha Ballach <sab@openoffice.org>2002-05-31 07:06:59 +0000
committerSascha Ballach <sab@openoffice.org>2002-05-31 07:06:59 +0000
commitb1e4a65cb6c929944f58a163f4901c2ac9ac08eb (patch)
treeaaaf42a5e795ab3ba88b60c00252066c2068a0cd /sc
parentab9c3541153e883362f61789995353605a96b53e (diff)
#95584#; protect the object if invalid
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx9
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx73
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx43
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx23
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx27
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx30
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx26
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx33
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx19
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx31
10 files changed, 233 insertions, 81 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index dcdf5fe2420b..6e2cf4ffc83e 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleCellBase.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: sab $ $Date: 2002-03-21 06:42:22 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -133,6 +133,7 @@ sal_Bool SAL_CALL ScAccessibleCellBase::isVisible( )
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
// test whether the cell is hidden (column/row - hidden/filtered)
sal_Bool bVisible(sal_True);
if (mpDoc)
@@ -174,6 +175,7 @@ sal_Int32
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
return mnIndex;
}
@@ -215,6 +217,7 @@ uno::Any SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Any aAny;
if (mpDoc)
aAny <<= mpDoc->GetValue(maCellAddress);
@@ -227,6 +230,7 @@ sal_Bool SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
double fValue;
sal_Bool bResult(sal_False);
if((aNumber >>= fValue) && mpDoc && mpDoc->GetDocumentShell())
@@ -288,6 +292,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 09506d8302d5..cc16d09b9044 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleDocument.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: sab $ $Date: 2002-05-24 15:17:17 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -235,6 +235,8 @@ public:
throw (::com::sun::star::uno::RuntimeException);
///===== Internal ========================================================
+ void SetDrawBroadcaster();
+
sal_Int32 GetCount() const;
uno::Reference< XAccessible > Get(sal_Int32 nIndex) const;
uno::Reference< XAccessible > GetAt(const awt::Point& rPoint) const;
@@ -332,6 +334,16 @@ ScChildrenShapes::~ScChildrenShapes()
}
}
+void ScChildrenShapes::SetDrawBroadcaster()
+{
+ if (mpViewShell)
+ {
+ SfxBroadcaster* pDrawBC = mpViewShell->GetViewData()->GetDocument()->GetDrawBroadcaster();
+ if (pDrawBC)
+ StartListening(*pDrawBC, TRUE);
+ }
+}
+
void ScChildrenShapes::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
if ( rHint.ISA( SdrHint ) )
@@ -468,7 +480,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint)
if (pWindow)
{
Point aPnt( rPoint.X, rPoint.Y );
- pWindow->PixelToLogic( aPnt );
+ aPnt = pWindow->PixelToLogic( aPnt );
SdrObject * pObj = GetDrawPage()->CheckHit(aPnt, 1, NULL, false);
if (pObj->GetLayer() != SC_LAYER_INTERN)
{
@@ -739,6 +751,7 @@ void ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
uno::Reference<container::XEnumeration> xEnum = xEnumAcc->createEnumeration();
if (xEnum.is())
{
+ sal_Int32 nSelectedShapesCount(0);
SortedShapesList aShapesList;
while (xEnum->hasMoreElements())
{
@@ -749,6 +762,7 @@ void ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
ScAccessibleShapeData aShapeData;
aShapeData.xShape = xShape;
aShapesList.insert(aShapeData);
+ ++nSelectedShapesCount;
}
}
@@ -757,6 +771,7 @@ void ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
SortedShapesList::const_iterator aXShapesEndItr(aShapesList.end());
SortedShapesList::iterator aDataItr(maSortedShapes.begin());
SortedShapesList::const_iterator aDataEndItr(maSortedShapes.end());
+ SortedShapesList::const_iterator aFocusedItr = aDataEndItr;
while((aDataItr != aDataEndItr))
{
sal_Int8 nComp(0);
@@ -770,7 +785,11 @@ void ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
{
aDataItr->bSelected = sal_True;
if (aDataItr->pAccShape)
+ {
aDataItr->pAccShape->SetState(AccessibleStateType::SELECTED);
+ aDataItr->pAccShape->ResetState(AccessibleStateType::FOCUSED);
+ }
+ aFocusedItr = aDataItr;
}
++aDataItr;
++aXShapesItr;
@@ -781,7 +800,10 @@ void ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
{
aDataItr->bSelected = sal_False;
if (aDataItr->pAccShape)
+ {
aDataItr->pAccShape->ResetState(AccessibleStateType::SELECTED);
+ aDataItr->pAccShape->ResetState(AccessibleStateType::FOCUSED);
+ }
}
++aDataItr;
}
@@ -791,6 +813,8 @@ void ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
++aXShapesItr;
}
}
+ if ((aFocusedItr != aDataEndItr) && aFocusedItr->pAccShape && (nSelectedShapesCount == 1))
+ aFocusedItr->pAccShape->SetState(AccessibleStateType::FOCUSED);
}
}
}
@@ -1112,6 +1136,11 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
CommitChange(aEvent); // there is a new child - event
}
+ else if (rRef.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ {
+ if (mpChildrenShapes)
+ mpChildrenShapes->SetDrawBroadcaster();
+ }
}
ScAccessibleDocumentBase::Notify(rBC, rHint);
@@ -1173,6 +1202,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAt(
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xAccessible = NULL;
if (mpChildrenShapes)
xAccessible = mpChildrenShapes->GetAt(rPoint);
@@ -1185,6 +1215,7 @@ void SAL_CALL ScAccessibleDocument::grabFocus( )
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (getAccessibleParent().is())
{
uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
@@ -1210,6 +1241,7 @@ sal_Int32 SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nShapesCount(0);
if (mpChildrenShapes)
nShapesCount = mpChildrenShapes->GetCount();
@@ -1223,6 +1255,7 @@ uno::Reference<XAccessible> SAL_CALL
lang::IndexOutOfBoundsException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xAccessible;// = GetChild(nIndex);
if (!xAccessible.is())
{
@@ -1249,14 +1282,17 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
if (IsDefunc(xParentStates))
pStateSet->AddState(AccessibleStateType::DEFUNC);
- if (IsEditable(xParentStates))
- pStateSet->AddState(AccessibleStateType::EDITABLE);
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::OPAQUE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ else
+ {
+ if (IsEditable(xParentStates))
+ pStateSet->AddState(AccessibleStateType::EDITABLE);
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
@@ -1267,6 +1303,7 @@ void SAL_CALL
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (nChildIndex == 0)
{
if (mpViewShell)
@@ -1292,6 +1329,7 @@ sal_Bool SAL_CALL
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Bool bResult(sal_False);
if (nChildIndex == 0)
@@ -1312,6 +1350,7 @@ void SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (mpChildrenShapes)
mpChildrenShapes->DeselectAll(); //deselects all (also the table)
@@ -1322,6 +1361,7 @@ void SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (mpChildrenShapes)
mpChildrenShapes->SelectAll();
@@ -1338,6 +1378,7 @@ sal_Int32 SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nCount(0);
if (mpChildrenShapes)
@@ -1354,6 +1395,7 @@ uno::Reference<XAccessible > SAL_CALL
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xAccessible;
sal_Bool bTabMarked(IsTableSelected());
@@ -1376,6 +1418,7 @@ void SAL_CALL
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Bool bTabMarked(IsTableSelected());
@@ -1432,6 +1475,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
@@ -1446,12 +1490,14 @@ uno::Sequence<sal_Int8> SAL_CALL
sal_Bool ScAccessibleDocument::IsValid (void) const
{
ScUnoGuard aGuard;
+ IsObjectValid();
return (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose);
}
Rectangle ScAccessibleDocument::GetVisibleArea() const
{
ScUnoGuard aGuard;
+ IsObjectValid();
Rectangle aVisRect(GetBoundingBox());
aVisRect.SetPos(Point(0, 0));
@@ -1466,6 +1512,7 @@ Rectangle ScAccessibleDocument::GetVisibleArea() const
Point ScAccessibleDocument::LogicToPixel (const Point& rPoint) const
{
ScUnoGuard aGuard;
+ IsObjectValid();
Point aPoint;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
if (pWin)
@@ -1476,6 +1523,7 @@ Point ScAccessibleDocument::LogicToPixel (const Point& rPoint) const
Size ScAccessibleDocument::LogicToPixel (const Size& rSize) const
{
ScUnoGuard aGuard;
+ IsObjectValid();
Size aSize;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
if (pWin)
@@ -1486,6 +1534,7 @@ Size ScAccessibleDocument::LogicToPixel (const Size& rSize) const
Point ScAccessibleDocument::PixelToLogic (const Point& rPoint) const
{
ScUnoGuard aGuard;
+ IsObjectValid();
Point aPoint;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
if (pWin)
@@ -1496,6 +1545,7 @@ Point ScAccessibleDocument::PixelToLogic (const Point& rPoint) const
Size ScAccessibleDocument::PixelToLogic (const Size& rSize) const
{
ScUnoGuard aGuard;
+ IsObjectValid();
Size aSize;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
if (pWin)
@@ -1525,6 +1575,7 @@ utl::AccessibleRelationSetHelper* ScAccessibleDocument::GetRelationSet(const ScA
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM ("Spreadsheet Document View "));
sal_Int32 nNumber(sal_Int32(meSplitPos) + 1);
sName += rtl::OUString::valueOf(nNumber);
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index fb53a2d7ae3f..03cce4e32c8d 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleDocumentPagePreview.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: sab $ $Date: 2002-05-28 14:25:37 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -662,6 +662,8 @@ public:
uno::Reference<XAccessible> GetForeShape(sal_Int32 nIndex) const;
sal_Int32 GetControlCount() const;
uno::Reference<XAccessible> GetControl(sal_Int32 nIndex) const;
+
+ void SetDrawBroadcaster();
private:
ScAccessibleDocumentPagePreview* mpAccDoc;
ScPreviewShell* mpViewShell;
@@ -704,6 +706,16 @@ ScShapeChilds::~ScShapeChilds()
}
}
+void ScShapeChilds::SetDrawBroadcaster()
+{
+ if (mpViewShell)
+ {
+ SfxBroadcaster* pDrawBC = mpViewShell->GetDocument()->GetDrawBroadcaster();
+ if (pDrawBC)
+ StartListening(*pDrawBC, TRUE);
+ }
+}
+
void ScShapeChilds::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
if ( rHint.ISA( SdrHint ) )
@@ -1403,6 +1415,10 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
Rectangle aVisRect( aPoint, aOutputSize );
GetNotesChilds()->DataChanged(aVisRect);
}
+ else if (rRef.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ {
+ GetShapeChilds()->SetDrawBroadcaster();
+ }
}
ScAccessibleDocumentBase::Notify(rBC, rHint);
}
@@ -1413,6 +1429,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xAccessible;
if ( mpViewShell )
@@ -1449,6 +1466,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
void SAL_CALL ScAccessibleDocumentPagePreview::grabFocus() throw (uno::RuntimeException)
{
ScUnoGuard aGuard();
+ IsObjectValid();
if (getAccessibleParent().is())
{
uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
@@ -1465,6 +1483,7 @@ void SAL_CALL ScAccessibleDocumentPagePreview::grabFocus() throw (uno::RuntimeEx
long SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleChildCount(void) throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
long nRet = 0;
if ( mpViewShell )
@@ -1480,6 +1499,7 @@ uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessi
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xAccessible;
if ( mpViewShell )
@@ -1548,13 +1568,16 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDocumentPagePreview::ge
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
if (IsDefunc(xParentStates))
pStateSet->AddState(AccessibleStateType::DEFUNC);
- // never editable
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::OPAQUE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ else
+ {
+ // never editable
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
@@ -1586,6 +1609,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
@@ -1607,6 +1631,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("Spreadsheet Document Page Preview"));
return sName;
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 7af810abb51c..5a7902d342a0 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessiblePageHeader.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: vg $ $Date: 2002-05-28 15:00:24 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -215,6 +215,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeader::getAccessibleAt(
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xRet;
@@ -234,6 +235,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeader::getAccessibleAt(
void SAL_CALL ScAccessiblePageHeader::grabFocus() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (getAccessibleParent().is())
{
uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
@@ -247,6 +249,7 @@ void SAL_CALL ScAccessiblePageHeader::grabFocus() throw (uno::RuntimeException)
sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if((mnChildCount < 0) && mpViewShell)
{
@@ -280,6 +283,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeader::getAccessibleChil
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
uno::Reference<XAccessible> xRet;
@@ -316,12 +320,15 @@ uno::Reference< XAccessibleStateSet > SAL_CALL ScAccessiblePageHeader::getAccess
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
if (IsDefunc(xParentStates))
pStateSet->AddState(AccessibleStateType::DEFUNC);
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::OPAQUE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ else
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 15fd11e4c365..08428bbc829d 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessiblePageHeaderArea.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: sab $ $Date: 2002-05-24 15:12:02 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -138,6 +138,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeaderArea::getAccessible
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if(!mpTextHelper)
CreateTextHelper();
@@ -151,6 +152,7 @@ sal_Int32 SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
return mpTextHelper->GetChildCount();
@@ -162,6 +164,7 @@ uno::Reference< XAccessible > SAL_CALL
lang::IndexOutOfBoundsException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
return mpTextHelper->GetChild(nIndex);
@@ -179,14 +182,17 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
xParentStates = xParentContext->getAccessibleStateSet();
}
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
-// if (IsDefunc(xParentStates))
-// pStateSet->AddState(AccessibleStateType::DEFUNC);
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::MULTILINE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ if (IsDefunc())
+ pStateSet->AddState(AccessibleStateType::DEFUNC);
+ else
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::MULTILINE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
@@ -197,6 +203,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 8d89ceaa337c..445e32b7ab18 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessiblePreviewCell.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: sab $ $Date: 2002-05-24 15:21:43 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,6 +136,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleAt(
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if(!mpTextHelper)
CreateTextHelper();
@@ -145,6 +146,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleAt(
void SAL_CALL ScAccessiblePreviewCell::grabFocus() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (getAccessibleParent().is())
{
uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
@@ -158,6 +160,7 @@ void SAL_CALL ScAccessiblePreviewCell::grabFocus() throw (uno::RuntimeException)
sal_Int32 SAL_CALL ScAccessiblePreviewCell::getAccessibleChildCount() throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
return mpTextHelper->GetChildCount();
@@ -167,6 +170,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleChi
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
return mpTextHelper->GetChild(nIndex);
@@ -186,15 +190,18 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessiblePreviewCell::getAccessi
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
if (IsDefunc(xParentStates))
pStateSet->AddState(AccessibleStateType::DEFUNC);
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::MULTILINE);
- if (IsOpaque(xParentStates))
- pStateSet->AddState(AccessibleStateType::OPAQUE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- pStateSet->AddState(AccessibleStateType::TRANSIENT);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ else
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::MULTILINE);
+ if (IsOpaque(xParentStates))
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ pStateSet->AddState(AccessibleStateType::TRANSIENT);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
@@ -225,6 +232,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index d34557146230..1d8b1384ee97 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessiblePreviewHeaderCell.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: sab $ $Date: 2002-05-24 15:21:43 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -193,6 +193,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessi
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if(!mpTextHelper)
CreateTextHelper();
@@ -202,6 +203,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessi
void SAL_CALL ScAccessiblePreviewHeaderCell::grabFocus() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (getAccessibleParent().is())
{
uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
@@ -215,6 +217,7 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::grabFocus() throw (uno::RuntimeExce
sal_Int32 SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleChildCount() throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
return mpTextHelper->GetChildCount();
@@ -224,6 +227,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessi
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
return mpTextHelper->GetChild(nIndex);
@@ -255,13 +259,16 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessiblePreviewHeaderCell::getA
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
if (IsDefunc(xParentStates))
pStateSet->AddState(AccessibleStateType::DEFUNC);
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::MULTILINE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- pStateSet->AddState(AccessibleStateType::TRANSIENT);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ else
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::MULTILINE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ pStateSet->AddState(AccessibleStateType::TRANSIENT);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
@@ -298,6 +305,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index eb46d7d5fc12..9d7beec8a062 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessiblePreviewTable.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: sab $ $Date: 2002-05-24 15:19:18 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -166,6 +166,7 @@ void SAL_CALL ScAccessiblePreviewTable::release()
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowCount() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -178,6 +179,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowCount() throw (uno:
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnCount() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -191,6 +193,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleRowDescription( sa
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -220,6 +223,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription(
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -249,6 +253,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowExtentAt( sal_Int32
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -282,6 +287,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnExtentAt( sal_In
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -353,6 +359,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCe
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -411,6 +418,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndex( sal_Int32 nRow,
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -430,6 +438,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRow( sal_Int32 nChildI
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -448,6 +457,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumn( sal_Int32 nChi
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -468,6 +478,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -506,6 +517,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt
void SAL_CALL ScAccessiblePreviewTable::grabFocus() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
if (getAccessibleParent().is())
{
uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
@@ -519,6 +531,7 @@ void SAL_CALL ScAccessiblePreviewTable::grabFocus() throw (uno::RuntimeException
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleChildCount() throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -532,6 +545,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCh
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
FillTableInfo();
@@ -580,12 +594,15 @@ uno::Reference< XAccessibleStateSet > SAL_CALL ScAccessiblePreviewTable::getAcce
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
if (IsDefunc(xParentStates))
pStateSet->AddState(AccessibleStateType::DEFUNC);
- pStateSet->AddState(AccessibleStateType::ENABLED);
- pStateSet->AddState(AccessibleStateType::OPAQUE);
- if (isShowing())
- pStateSet->AddState(AccessibleStateType::SHOWING);
- if (isVisible())
- pStateSet->AddState(AccessibleStateType::VISIBLE);
+ else
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ }
return pStateSet;
}
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 2cfdc4798b96..a2fbd2a10a0d 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleTableBase.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: sab $ $Date: 2002-03-21 07:13:40 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -146,6 +146,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowCount( )
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
return maRange.aEnd.Row() - maRange.aStart.Row() + 1;
}
@@ -153,6 +154,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumnCount( )
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
return maRange.aEnd.Col() - maRange.aStart.Col() + 1;
}
@@ -176,6 +178,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowExtentAt( sal_Int32 nR
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nCount(1); // the same cell
nRow += maRange.aStart.Row();
nColumn += maRange.aStart.Col();
@@ -196,6 +199,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumnExtentAt( sal_Int32
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nCount(1); // the same cell
nRow += maRange.aStart.Row();
nColumn += maRange.aStart.Col();
@@ -297,6 +301,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleIndex( sal_Int32 nRow, sa
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
nRow -= maRange.aStart.Row();
nColumn -= maRange.aStart.Col();
return (nRow * maRange.aEnd.Col() + 1) + nColumn;
@@ -306,6 +311,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRow( sal_Int32 nChildInde
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nRow(-1);
nRow = nChildIndex / (maRange.aEnd.Col() - maRange.aStart.Col() + 1);
return nRow;
@@ -315,6 +321,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumn( sal_Int32 nChildI
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nColumn(-1);
nColumn = nChildIndex % (maRange.aEnd.Col() - maRange.aStart.Col() + 1);
return nColumn;
@@ -327,8 +334,9 @@ sal_Int32 SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
-/* return (maRange.aEnd.Row() - maRange.aStart.Row() + 1)
- (maRange.aEnd.Col() - maRange.aStart.Col() + 1);*/
+ IsObjectValid();
+// return (maRange.aEnd.Row() - maRange.aStart.Row() + 1) *
+// (maRange.aEnd.Col() - maRange.aStart.Col() + 1);
return 1;
}
@@ -338,6 +346,7 @@ uno::Reference< XAccessible > SAL_CALL
lang::IndexOutOfBoundsException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
sal_Int32 nRow(0);
sal_Int32 nColumn(0);
sal_Int32 nTemp(maRange.aEnd.Col() - maRange.aStart.Col() + 1);
@@ -358,6 +367,7 @@ uno::Reference< XAccessible > SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
rtl::OUString sName;
String sCoreName;
if (mpDoc && mpDoc->GetName( maRange.aStart.Tab(), sCoreName ))
@@ -452,6 +462,7 @@ uno::Sequence<sal_Int8> SAL_CALL
throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
+ IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
{
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 2569aef3ea55..65bd83bb0eab 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleText.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: sab $ $Date: 2002-05-24 15:05:28 $
+ * last change: $Author: sab $ $Date: 2002-05-31 08:06:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -523,6 +523,8 @@ ScAccessibleCellTextData::ScAccessibleCellTextData(ScTabViewShell* pViewShell,
ScAccessibleCellTextData::~ScAccessibleCellTextData()
{
+ if (pEditEngine)
+ pEditEngine->SetNotifyHdl(Link());
if (mpViewForwarder)
delete mpViewForwarder;
if (mpEditViewForwarder)
@@ -568,7 +570,8 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
mpViewShell->GetViewData()->GetEditView( meSplitPos, pEditView, nCol, nRow );
if (pEditView)
{
- pForwarder = new SvxEditEngineForwarder(*(pEditView->GetEditEngine()));
+ pEditEngine = (ScFieldEditEngine*)pEditView->GetEditEngine();
+ pForwarder = new SvxEditEngineForwarder(*pEditEngine);
bHasForwarder = sal_True;
}
}
@@ -580,14 +583,16 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
// remove Forwarder created with EditEngine from EditView
if (pForwarder)
DELETEZ( pForwarder );
+ pEditEngine->SetNotifyHdl(Link());
// don't delete, because it is the EditEngine of the EditView
pEditEngine = NULL;
+ mbViewEditEngine = sal_False;
}
if (!bHasForwarder)
ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
- if (pEditEngine)
+ if (pEditEngine && mpViewShell)
{
sal_Int32 nSizeX, nSizeY;
mpViewShell->GetViewData()->GetMergeSizePixel(
@@ -597,7 +602,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
Window* pWin = mpViewShell->GetWindowByPos(meSplitPos);
if (pWin)
- pWin->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
+ aSize = pWin->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
pEditEngine->SetPaperSize(aSize);
@@ -659,6 +664,8 @@ ScAccessiblePreviewCellTextData::ScAccessiblePreviewCellTextData(ScPreviewShell*
ScAccessiblePreviewCellTextData::~ScAccessiblePreviewCellTextData()
{
+ if (pEditEngine)
+ pEditEngine->SetNotifyHdl(Link());
if (mpViewForwarder)
delete mpViewForwarder;
}
@@ -692,7 +699,7 @@ SvxTextForwarder* ScAccessiblePreviewCellTextData::GetTextForwarder()
Size aSize(mpViewShell->GetLocationData().GetCellOutputRect(aCellPos).GetSize());
Window* pWin = mpViewShell->GetWindow();
if (pWin)
- pWin->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
+ aSize = pWin->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
pEditEngine->SetPaperSize(aSize);
}
@@ -745,6 +752,8 @@ ScAccessiblePreviewHeaderCellTextData::ScAccessiblePreviewHeaderCellTextData(ScP
ScAccessiblePreviewHeaderCellTextData::~ScAccessiblePreviewHeaderCellTextData()
{
+ if (pEditEngine)
+ pEditEngine->SetNotifyHdl(Link());
if (mpViewForwarder)
delete mpViewForwarder;
}
@@ -811,7 +820,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
Rectangle aVisRect( aPoint, aOutputSize );
Size aSize(mpViewShell->GetLocationData().GetHeaderCellOutputRect(aVisRect, aCellPos, mbColHeader).GetSize());
if (pWindow)
- pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
+ aSize = pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
pEditEngine->SetPaperSize(aSize);
}
pEditEngine->SetText( maText );
@@ -878,6 +887,8 @@ ScAccessibleHeaderTextData::~ScAccessibleHeaderTextData()
if (mpDocSh)
mpDocSh->GetDocument()->RemoveUnoObject(*this);
+ if (mpEditEngine)
+ mpEditEngine->SetNotifyHdl(Link());
delete mpEditEngine;
delete mpForwarder;
}
@@ -946,7 +957,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder()
Size aSize(aVisRect.GetSize());
Window* pWin = mpViewShell->GetWindow();
if (pWin)
- pWin->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
+ aSize = pWin->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
mpEditEngine->SetPaperSize(aSize);
}
if (mpEditObj)
@@ -988,6 +999,8 @@ ScAccessibleNoteTextData::~ScAccessibleNoteTextData()
if (mpDocSh)
mpDocSh->GetDocument()->RemoveUnoObject(*this);
+ if (mpEditEngine)
+ mpEditEngine->SetNotifyHdl(Link());
delete mpEditEngine;
delete mpForwarder;
}
@@ -1054,7 +1067,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
Rectangle aVisRect( aPoint, aOutputSize );
Size aSize(mpViewShell->GetLocationData().GetNoteInRangeOutputRect(aVisRect, mbMarkNote, maCellPos).GetSize());
if (pWindow)
- pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
+ aSize = pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
mpEditEngine->SetPaperSize(aSize);
}
mpEditEngine->SetText( msText );