diff options
author | Oliver Specht <os@openoffice.org> | 2001-12-19 10:08:57 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-12-19 10:08:57 +0000 |
commit | a0681769a869a19968646a132043bf18d473434f (patch) | |
tree | e8beda126d0dbf4fa8165ec058b45a292fa6be37 /sw/source/ui/envelp | |
parent | a46f2bb5f2858b3f2309482362a0983296d27e4c (diff) |
#96118# catch another exception
Diffstat (limited to 'sw/source/ui/envelp')
-rw-r--r-- | sw/source/ui/envelp/labelexp.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index b34fa49da7ff..549590710c79 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: labelexp.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jp $ $Date: 2001-11-14 16:32:50 $ + * last change: $Author: os $ $Date: 2001-12-19 11:08:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,15 +137,21 @@ void SwVisitingCardPage::InitFrameControl() uno::Reference< text::XAutoTextGroup > xGroup; aGroup >>= xGroup; uno::Reference< container::XIndexAccess > xIdxAcc(xGroup, uno::UNO_QUERY); - if(!xIdxAcc.is() || xIdxAcc->getCount()) + try + { + if(!xIdxAcc.is() || xIdxAcc->getCount()) + { + uno::Reference< beans::XPropertySet > xPrSet(xGroup, uno::UNO_QUERY); + uno::Any aTitle = xPrSet->getPropertyValue( uTitleName ); + OUString uTitle; + aTitle >>= uTitle; + String sGroup(pGroups[i]); + sal_uInt16 nEntry = aAutoTextGroupLB.InsertEntry(uTitle); + aAutoTextGroupLB.SetEntryData(nEntry, new String(sGroup)); + } + } + catch(Exception&) { - uno::Reference< beans::XPropertySet > xPrSet(xGroup, uno::UNO_QUERY); - uno::Any aTitle = xPrSet->getPropertyValue( uTitleName ); - OUString uTitle; - aTitle >>= uTitle; - String sGroup(pGroups[i]); - sal_uInt16 nEntry = aAutoTextGroupLB.InsertEntry(uTitle); - aAutoTextGroupLB.SetEntryData(nEntry, new String(sGroup)); } } if(aAutoTextGroupLB.GetEntryCount()) |