diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-01-31 17:34:19 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-01-31 17:34:19 +0000 |
commit | c3d0c2b0a3f24c7beb84f225bf6b7051d43c077e (patch) | |
tree | 3f8ce6b422a31f58bfbb3fdcba58a9332beb9871 /sw/source/ui/fldui/flddb.cxx | |
parent | 2e57a73bad6a97aea8c92d57a18c2394e35a5901 (diff) |
INTEGRATION: CWS os73 (1.16.162); FILE MERGED
2005/12/19 14:46:14 os 1.16.162.1: #126473# field edit dialog must not rely on the 'active view'
Diffstat (limited to 'sw/source/ui/fldui/flddb.cxx')
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 3d38101ac150..e2266447bf1d 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -4,9 +4,9 @@ * * $RCSfile: flddb.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: rt $ $Date: 2005-09-09 07:35:01 $ + * last change: $Author: kz $ $Date: 2006-01-31 18:34:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -191,10 +191,14 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet& rSet) } else { - SwWrtShell *pSh = ::GetActiveView()->GetWrtShellPtr(); - SwDBData aTmp(pSh->GetDBData()); - - aDatabaseTLB.Select(aTmp.sDataSource, aTmp.sCommand, aEmptyStr); + SwWrtShell *pSh = GetWrtShell(); + if(!pSh) + pSh = ::GetActiveWrtShell(); + if(pSh) + { + SwDBData aTmp(pSh->GetDBData()); + aDatabaseTLB.Select(aTmp.sDataSource, aTmp.sCommand, aEmptyStr); + } } } @@ -244,7 +248,9 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& rSet) aData.sDataSource = aDatabaseTLB.GetDBName(sTableName, sColumnName, &bIsTable); aData.sCommand = sTableName; aData.nCommandType = bIsTable ? 0 : 1; - SwWrtShell *pSh = ::GetActiveView()->GetWrtShellPtr(); + SwWrtShell *pSh = GetWrtShell(); + if(!pSh) + pSh = ::GetActiveWrtShell(); if (!aData.sDataSource.getLength()) aData = pSh->GetDBData(); @@ -342,7 +348,9 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) if (nOld != GetTypeSel()) { - SwWrtShell *pSh = ::GetActiveView()->GetWrtShellPtr(); + SwWrtShell *pSh = GetWrtShell(); + if(!pSh) + pSh = ::GetActiveWrtShell(); BOOL bCond = FALSE, bSetNo = FALSE, bFormat = FALSE, bDBFormat = FALSE; USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); |