diff options
author | Christian Lippka <cl@openoffice.org> | 2002-11-19 13:49:56 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2002-11-19 13:49:56 +0000 |
commit | 4256d702ed8a5a6fb82a0eb6e823c037053c85e6 (patch) | |
tree | 63c45fe78568b0d9394e48d15d08c435a12018f0 | |
parent | 54821ec02bfe8cf385149527f79f1b3e204c528a (diff) |
#105049# getSelection returns empty any without selection
-rwxr-xr-x | svx/source/accessibility/AccessibleShape.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 3526106375d0..5acf0a005e6c 100755 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleShape.cxx,v $ * - * $Revision: 1.35 $ + * $Revision: 1.36 $ * - * last change: $Author: af $ $Date: 2002-10-23 09:45:47 $ + * last change: $Author: cl $ $Date: 2002-11-19 14:49:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -271,11 +271,14 @@ void AccessibleShape::UpdateStates (void) { Reference<container::XIndexAccess> xSelectedShapes ( xSelectionSupplier->getSelection(), uno::UNO_QUERY); - for (sal_Int32 i=0,nCount=xSelectedShapes->getCount(); - i<nCount && !bShapeIsSelected; i++) + if( xSelectedShapes.is() ) { - if (xSelectedShapes->getByIndex(i) == mxShape) - bShapeIsSelected = true; + for (sal_Int32 i=0,nCount=xSelectedShapes->getCount(); + i<nCount && !bShapeIsSelected; i++) + { + if (xSelectedShapes->getByIndex(i) == mxShape) + bShapeIsSelected = true; + } } } } |