diff options
-rw-r--r-- | sw/source/ui/fldui/fldfunc.cxx | 22 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldpage.cxx | 99 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldpage.hxx | 52 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldtdlg.cxx | 157 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 28 | ||||
-rw-r--r-- | sw/source/ui/inc/condedit.hxx | 9 | ||||
-rw-r--r-- | sw/source/ui/utlui/condedit.cxx | 7 |
7 files changed, 125 insertions, 249 deletions
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 2a43d0d2b619..3173ab6cefdf 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fldfunc.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: tbe $ $Date: 2001-07-17 08:48:51 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -361,14 +361,12 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox ) if (IsFldEdit()) { - if( !aNameED.HasDroppedData() ) - aNameED.SetText(GetCurField()->GetPar1()); + aNameED.SetText(GetCurField()->GetPar1()); aValueED.SetText(GetCurField()->GetPar2()); } else { - if( !aNameED.HasDroppedData() ) - aNameED.SetText(aEmptyStr); + aNameED.SetText(aEmptyStr); aValueED.SetText(aEmptyStr); } @@ -412,10 +410,8 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox ) aNameED.SetDropEnable(TRUE); if (IsFldEdit()) { - if( !aCond1ED.HasDroppedData() ) - aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|')); - if( !aCond2ED.HasDroppedData() ) - aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|')); + aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|')); + aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|')); } bName = bValue = TRUE; @@ -455,9 +451,6 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox ) default: break; } - aNameED.ResetDroppedDataFlag(); - aCond1ED.ResetDroppedDataFlag(); - aCond2ED.ResetDroppedDataFlag(); if (bShowSelection) { @@ -724,6 +717,9 @@ IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG ) /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.5 2001/07/17 08:48:51 tbe + #87307# remove external basctl dependencies + Revision 1.4 2001/07/11 17:08:58 jp #89582#: look for the dropped content flag at ConditionEdit controls diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 0c112a205055..ca58aba75440 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fldpage.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: os $ $Date: 2001-07-18 13:24:40 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -126,17 +126,19 @@ Beschreibung: --------------------------------------------------------------------*/ -SwFldPage::SwFldPage(Window *pParent, const ResId &rId, const SfxItemSet &rAttrSet ) : - SfxTabPage (pParent, rId, rAttrSet), +SwFldPage::SwFldPage( Window *pParent, const ResId &rId, + const SfxItemSet &rAttrSet ) + :SfxTabPage (pParent, rId, rAttrSet), + pCurFld (0), nPageId (rId.GetId()), - bFldDlgHtmlMode (FALSE), nFldDlgAktGrpSel(0), nTypeSel (LISTBOX_ENTRY_NOTFOUND), nSelectionSel (LISTBOX_ENTRY_NOTFOUND), + bFldDlgHtmlMode (FALSE), bFldEdit (FALSE), - pCurFld (0), bInsert (TRUE), - bRefresh (FALSE) + bRefresh (FALSE), + bFirstHTMLInit (TRUE) { // FreeResource(); } @@ -150,47 +152,38 @@ SwFldPage::~SwFldPage() } /*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -USHORT SwFldPage::GetGroup() -{ - ASSERT (0, "GetGroup not implemented!"); - return 0; -} - -/*-------------------------------------------------------------------- Beschreibung: TabPage initialisieren --------------------------------------------------------------------*/ void SwFldPage::Init() { SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current(); - BOOL bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0; + BOOL bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON); - bFldEdit = GetTabDialog() == 0; + bFldEdit = 0 == GetTabDialog(); + + // FieldManager neu initialisieren wichtig fuer + // Dok-Wechsel (fldtdlg:ReInitTabPage) pCurFld = aMgr.GetCurFld(); nFldDlgAktGrpSel = GetGroup(); - if (bNewMode != bFldDlgHtmlMode) + if( bNewMode != bFldDlgHtmlMode ) { bFldDlgHtmlMode = bNewMode; // Bereichslistbox initialisieren - if (bFldDlgHtmlMode) + if( bFldDlgHtmlMode && bFirstHTMLInit ) { + bFirstHTMLInit = FALSE; SwWrtShell *pSh = ::GetActiveView()->GetWrtShellPtr(); - - (SwSetExpFieldType*)pSh->InsertFldType(SwSetExpFieldType(pDocSh->GetDoc(), - String::CreateFromAscii("HTML_ON"), 1)); - (SwSetExpFieldType*)pSh->InsertFldType(SwSetExpFieldType(pDocSh->GetDoc(), - String::CreateFromAscii("HTML_OFF"), 1)); + SwDoc* pDoc = pSh->GetDoc(); + pSh->InsertFldType( SwSetExpFieldType( pDoc, + String::CreateFromAscii("HTML_ON"), 1)); + pSh->InsertFldType( SwSetExpFieldType(pDoc, + String::CreateFromAscii("HTML_OFF"), 1)); } } - - aMgr.GetCurFld(); // FieldManager neu initialisieren - // wichtig fuer Dok-Wechsel (fldtdlg:ReInitTabPage) } /*-------------------------------------------------------------------- @@ -206,10 +199,13 @@ void SwFldPage::ActivatePage() Beschreibung: Kompletter Reset; neues Feld editieren --------------------------------------------------------------------*/ -void SwFldPage::EditNewField() +void SwFldPage::EditNewField( BOOL bOnlyActivate ) { - nFldDlgAktGrpSel = 0; - nTypeSel = LISTBOX_ENTRY_NOTFOUND; + if( !bOnlyActivate ) + { + nFldDlgAktGrpSel = 0; + nTypeSel = LISTBOX_ENTRY_NOTFOUND; + } nSelectionSel = LISTBOX_ENTRY_NOTFOUND; bRefresh = TRUE; Reset(*(SfxItemSet*)0); @@ -367,22 +363,17 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, Beschreibung: --------------------------------------------------------------------*/ -void SwFldPage::SavePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) +void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, + const ListBox* pLst3 ) { - if (pLst1 && pLst1->GetEntryCount()) - sLst1 = pLst1->GetSelectEntry(); - else - sLst1.Erase(); - - if (pLst2 && pLst2->GetEntryCount()) - sLst2 = pLst2->GetSelectEntry(); - else - sLst2.Erase(); - - if (pLst3 && pLst3->GetEntryCount()) - sLst3 = pLst3->GetSelectEntry(); - else - sLst3.Erase(); + const ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 }; + + const ListBox** ppLB = aLBArr; + for( int i = 0; i < coLBCount; ++i, ++ppLB ) + if( (*ppLB) && (*ppLB)->GetEntryCount() ) + aLstStrArr[ i ] = (*ppLB)->GetSelectEntry(); + else + aLstStrArr[ i ].Erase(); } /*-------------------------------------------------------------------- @@ -392,13 +383,13 @@ void SwFldPage::SavePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) { USHORT nPos = 0; - - if (pLst1 && pLst1->GetEntryCount() && sLst1.Len() && (nPos = pLst1->GetEntryPos(sLst1)) != LISTBOX_ENTRY_NOTFOUND) - pLst1->SelectEntryPos(nPos); - if (pLst2 && pLst2->GetEntryCount() && sLst1.Len() && (nPos = pLst2->GetEntryPos(sLst1)) != LISTBOX_ENTRY_NOTFOUND) - pLst2->SelectEntryPos(nPos); - if (pLst3 && pLst3->GetEntryCount() && sLst1.Len() && (nPos = pLst3->GetEntryPos(sLst1)) != LISTBOX_ENTRY_NOTFOUND) - pLst3->SelectEntryPos(nPos); + ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 }; + ListBox** ppLB = aLBArr; + for( int i = 0; i < coLBCount; ++i, ++ppLB ) + if( (*ppLB) && (*ppLB)->GetEntryCount() && aLstStrArr[ i ].Len() && + LISTBOX_ENTRY_NOTFOUND != + ( nPos = (*ppLB)->GetEntryPos(aLstStrArr[ i ] ) ) ) + (*ppLB)->SelectEntryPos( nPos ); } /*-------------------------------------------------------------------- diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index a2cfc89e6c6d..d259241716c4 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -2,9 +2,9 @@ * * $RCSfile: fldpage.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:36 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,45 +65,51 @@ #include <sfx2/tabdlg.hxx> #endif -#include "fldmgr.hxx" +#ifndef _FLDMGR_HXX +#include <fldmgr.hxx> +#endif + /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ +const int coLBCount = 3; + class SwFldPage : public SfxTabPage { + String aLstStrArr[ coLBCount ]; + SwFldMgr aMgr; + SwField *pCurFld; USHORT nFldDlgAktGrpSel; - String sLst1; - String sLst2; - String sLst3; USHORT nPageId; - BOOL bFldEdit; - BOOL bInsert; - - SwFldMgr aMgr; USHORT nTypeSel; USHORT nSelectionSel; + BOOL bFldEdit; + BOOL bInsert; BOOL bFldDlgHtmlMode; BOOL bRefresh; - SwField *pCurFld; + BOOL bFirstHTMLInit; protected: - USHORT GetTypeSel() {return nTypeSel;} - void SetTypeSel(USHORT nSet) {nTypeSel = nSet;} - USHORT GetSelectionSel() {return nSelectionSel;} - void SetSelectionSel(USHORT nSet) {nSelectionSel = nSet;} - BOOL IsFldDlgHtmlMode() {return bFldDlgHtmlMode;} - BOOL IsRefresh() { return bRefresh;} - SwField* GetCurField() {return pCurFld;} + USHORT GetTypeSel() const { return nTypeSel;} + void SetTypeSel(USHORT nSet) { nTypeSel = nSet;} + USHORT GetSelectionSel() const { return nSelectionSel;} + void SetSelectionSel(USHORT nSet){ nSelectionSel = nSet;} + BOOL IsFldDlgHtmlMode() const { return bFldDlgHtmlMode;} + BOOL IsRefresh() const { return bRefresh;} + SwField* GetCurField() { return pCurFld;} DECL_LINK( InsertHdl, Button *pBtn = 0 ); DECL_LINK( NumFormatHdl, ListBox *pBtn = 0 ); void Init(); - void SavePos(ListBox* pLst1, ListBox* pLst2 = 0, ListBox* pLst3 = 0); - void RestorePos(ListBox* pLst1, ListBox* pLst2 = 0, ListBox* pLst3 = 0); + void SavePos( const ListBox* pLst1, + const ListBox* pLst2 = 0, + const ListBox* pLst3 = 0); + void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0, + ListBox* pLst3 = 0 ); void EnableInsert(BOOL bEnable = TRUE); inline BOOL IsFldEdit() const { return bFldEdit; } @@ -120,12 +126,12 @@ public: const ResId &rId, const SfxItemSet &rAttrSet ); - ~SwFldPage(); + virtual ~SwFldPage(); virtual void ActivatePage(); - inline SwFldMgr& GetFldMgr() { return aMgr; } - void EditNewField(); + inline SwFldMgr& GetFldMgr() { return aMgr; } + void EditNewField( BOOL bOnlyActivate = FALSE ); virtual USHORT GetGroup() = 0; }; diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 70e53837851f..c171b6bb51cd 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fldtdlg.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2001-01-30 14:17:19 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -188,29 +188,26 @@ BOOL SwChildWinWrapper::ReInitDlg(SwDocShell *pDocSh) Beschreibung: --------------------------------------------------------------------*/ -SwFldDlgWrapper::SwFldDlgWrapper( Window* pParent, USHORT nId, - SfxBindings* pB, - SfxChildWinInfo* pInfo) : - SwChildWinWrapper( pParent, nId ) - +SfxChildWinInfo SwFldDlgWrapper::GetInfo() const { - pWindow = new SwFldDlg( pB, this, pParent ); - SwFldDlg *pWin = (SwFldDlg*)pWindow; - pWin->Start(); - - ((SwFldDlg*)pWindow)->Initialize(pInfo); - eChildAlignment = SFX_ALIGN_NOALIGNMENT; + return SfxChildWindow::GetInfo(); } + /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -SfxChildWinInfo SwFldDlgWrapper::GetInfo() const +SwFldDlgWrapper::SwFldDlgWrapper( Window* pParent, USHORT nId, + SfxBindings* pB, + SfxChildWinInfo* pInfo ) + : SwChildWinWrapper( pParent, nId ) { - SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); - // ((SfxFloatingWindow*)GetWindow())->FillInfo( aInfo ); - return aInfo; + SwFldDlg *pDlg = new SwFldDlg( pB, this, pParent ); + pWindow = pDlg; + pDlg->Start(); + pDlg->Initialize( pInfo ); + eChildAlignment = SFX_ALIGN_NOALIGNMENT; } /*-------------------------------------------------------------------- @@ -241,8 +238,8 @@ void SwFldDlgWrapper::ShowPage(USHORT nPage) --------------------------------------------------------------------*/ -SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) : - SfxTabDialog(pParent, SW_RES(DLG_FLD_INSERT)), +SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) + : SfxTabDialog( pParent, SW_RES( DLG_FLD_INSERT )), pChildWin(pCW) { SetStyle(GetStyle()|WB_STDMODELESS); @@ -284,7 +281,6 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) : Beschreibung: --------------------------------------------------------------------*/ - SwFldDlg::~SwFldDlg() { } @@ -354,20 +350,6 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo) Beschreibung: --------------------------------------------------------------------*/ -void SwFldDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) -{ -/* switch( nId ) - { - case TP_CHAR_DB: -// ((SvxCharExtPage&)rPage).DisableControls(DISABLE_CASEMAP); - break; - }*/ -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SfxItemSet* SwFldDlg::CreateInputItemSet( USHORT nId ) { return 0; @@ -428,12 +410,12 @@ void SwFldDlg::ReInitDlg() Beschreibung: Nach Dok-Wechsel TabPage neu initialisieren --------------------------------------------------------------------*/ -void SwFldDlg::ReInitTabPage(USHORT nPageId) +void SwFldDlg::ReInitTabPage( USHORT nPageId, BOOL bOnlyActivate ) { SwFldPage* pPage = (SwFldPage* )GetTabPage(nPageId); - if (pPage) - pPage->EditNewField(); // TabPage neu initialisieren + if ( pPage ) + pPage->EditNewField( bOnlyActivate ); // TabPage neu initialisieren } /*-------------------------------------------------------------------- @@ -443,19 +425,19 @@ void SwFldDlg::ReInitTabPage(USHORT nPageId) void SwFldDlg::Activate() { SwView* pView = ::GetActiveView(); - if(pView) + if( pView ) { BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0; const SwWrtShell& rSh = pView->GetWrtShell(); GetOKButton().Enable( !rSh.IsReadOnlyAvailable() || !rSh.HasReadonlySel() ); - ReInitTabPage(TP_FLD_VAR); + ReInitTabPage( TP_FLD_VAR, TRUE ); - if (!bHtmlMode) + if( !bHtmlMode ) { - ReInitTabPage(TP_FLD_REF); - ReInitTabPage(TP_FLD_FUNC); + ReInitTabPage( TP_FLD_REF, TRUE ); + ReInitTabPage( TP_FLD_FUNC, TRUE ); } } } @@ -484,95 +466,4 @@ void SwFldDlg::InsertHdl() GetOKButton().Click(); } -/*------------------------------------------------------------------------ - - $Log: not supported by cvs2svn $ - Revision 1.2 2001/01/18 14:01:38 jp - new Field/-Type: combined character - - Revision 1.1.1.1 2000/09/18 17:14:36 hr - initial import - - Revision 1.26 2000/09/18 16:05:29 willem.vandorp - OpenOffice header added. - - Revision 1.25 2000/09/07 15:59:24 os - change: SFX_DISPATCHER/SFX_BINDINGS removed - - Revision 1.24 2000/02/11 14:45:56 hr - #70473# changes for unicode ( patched by automated patchtool ) - - Revision 1.23 1999/01/20 13:16:52 JP - Task #58677#: Crsr in Readonly Bereichen zulassen - - - Rev 1.22 20 Jan 1999 14:16:52 JP - Task #58677#: Crsr in Readonly Bereichen zulassen - - Rev 1.21 22 Oct 1998 12:20:42 OM - #58157# Querverweis einfuegen - - Rev 1.20 21 Oct 1998 16:16:04 OM - #58157# Querverweise einfuegen - - Rev 1.19 09 Jul 1998 09:52:58 JP - EmptyStr benutzen - - Rev 1.18 31 Mar 1998 13:31:38 OM - Korrekt abgleichen - - Rev 1.17 27 Mar 1998 14:14:16 OM - ChildWindows im Modified-Hdl updaten - - Rev 1.16 18 Mar 1998 10:33:56 OM - #48197# Focus restaurieren nach InputDlg - - Rev 1.15 10 Mar 1998 17:27:12 OM - Korrekte Windowbits setzen - - Rev 1.14 03 Mar 1998 13:31:02 OM - Im Html-Mode nicht alle TabPages anzeigen - - Rev 1.13 09 Jan 1998 16:57:18 OM - Bei Dok-Wechsel updaten - - Rev 1.12 06 Jan 1998 18:13:36 OM - Felbefehl-Dlg - - Rev 1.11 19 Dec 1997 18:25:00 OM - Feldbefehl-bearbeiten Dlg - - Rev 1.10 16 Dec 1997 17:02:46 OM - Feldbefehle bearbeiten - - Rev 1.9 12 Dec 1997 16:11:12 OM - AutoUpdate bei FocusWechsel u.a. - - Rev 1.8 12 Dec 1997 10:49:38 OM - ExchangeSupport implementiert - - Rev 1.7 09 Dec 1997 17:16:46 OM - Kein alter Feldbefehl-Dialog mehr - - Rev 1.6 21 Nov 1997 17:19:42 OM - Feldbefehl-Umstellung: DocInfo - - Rev 1.5 18 Nov 1997 10:33:10 OM - Neuer Feldbefehldialog - - Rev 1.4 11 Nov 1997 10:03:40 OM - Neuer Feldbefehl-Dialog - - Rev 1.3 04 Nov 1997 10:05:42 OM - Neuer Felddialog - - Rev 1.2 30 Oct 1997 16:29:42 OM - Feldbefehl-Umstellung - - Rev 1.1 30 Oct 1997 14:30:48 OM - Feldbefehl-Umstellung - - Rev 1.0 28 Oct 1997 15:05:38 OM - Initial revision. -------------------------------------------------------------------------*/ diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 86099589c360..8375912edd94 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fldvar.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: os $ $Date: 2001-08-03 14:37:05 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -291,13 +291,11 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, pBox ) if (nOld != LISTBOX_ENTRY_NOTFOUND) { aNameED.SetText(aEmptyStr); - if( !aValueED.HasDroppedData() ) - aValueED.SetText(aEmptyStr); + aValueED.SetText(aEmptyStr); } aValueED.SetDropEnable(FALSE); UpdateSubType(); // Auswahl-Listboxen initialisieren - aValueED.ResetDroppedDataFlag(); } bInit = FALSE; @@ -322,8 +320,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nTypeId != TYP_FORMELFLD) aNameED.SetText(GetFldMgr().GetCurFldPar1()); - if( !aValueED.HasDroppedData() ) - aValueED.SetText(GetFldMgr().GetCurFldPar2()); + aValueED.SetText(GetFldMgr().GetCurFldPar2()); } if (aNameFT.GetText() != sOldNameFT) @@ -359,16 +356,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (pType->GetType() == UF_STRING) { - if( !aValueED.HasDroppedData() ) - aValueED.SetText(pType->GetContent()); + aValueED.SetText(pType->GetContent()); aNumFormatLB.SelectEntryPos(0); } - else if( !aValueED.HasDroppedData() ) + else aValueED.SetText(pType->GetContent()); // aValueED.SetText(pType->GetContent(aNumFormatLB.GetFormat())); } } - else if( !aValueED.HasDroppedData() ) + else aValueED.SetText(pType->GetContent()); } else @@ -376,8 +372,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (pBox) // Nur bei Interaktion mit Maus { aNameED.SetText(aEmptyStr); - if( !aValueED.HasDroppedData() ) - aValueED.SetText(aEmptyStr); + aValueED.SetText(aEmptyStr); } } bValue = bName = bNumFmt = bInvisible = TRUE; @@ -426,8 +421,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) // Muss aber verwendet werden, da sonst bei GetPar2 nur der vom // Kalkulator errechnete Wert angezeigt werden wuerde // (statt test2 = test + 1) - if( !aValueED.HasDroppedData() ) - aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula()); + aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula()); } aValueED.SetDropEnable(TRUE); break; @@ -608,7 +602,6 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) aValueED.SetText(aEmptyStr); break; } - aValueED.ResetDroppedDataFlag(); aNumFormatLB.Show(bNumFmt); aFormatLB.Show(!bNumFmt); @@ -1404,6 +1397,9 @@ void SwFldVarPage::FillUserData() /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.6 2001/08/03 14:37:05 os + #90496# zero is a valid number format + Revision 1.5 2001/07/11 17:08:58 jp #89582#: look for the dropped content flag at ConditionEdit controls diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx index fb7cf5d30199..d7706616a03d 100644 --- a/sw/source/ui/inc/condedit.hxx +++ b/sw/source/ui/inc/condedit.hxx @@ -2,9 +2,9 @@ * * $RCSfile: condedit.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jp $ $Date: 2001-07-11 17:04:36 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:46:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,7 +75,7 @@ class ConditionEdit : public Edit, public DropTargetHelper { - BOOL bBrackets, bEnableDrop, bHasDroppedData; + BOOL bBrackets, bEnableDrop; virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); @@ -87,9 +87,6 @@ public: inline void SetDropEnable( BOOL bFlag ) { bEnableDrop = bFlag; } inline BOOL IsDropEnable() const { return bEnableDrop; } - - inline void ResetDroppedDataFlag() { bHasDroppedData = FALSE; } - inline BOOL HasDroppedData() const { return bHasDroppedData; } }; #endif diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx index 18a2a8cdcd97..cc830a545370 100644 --- a/sw/source/ui/utlui/condedit.cxx +++ b/sw/source/ui/utlui/condedit.cxx @@ -2,9 +2,9 @@ * * $RCSfile: condedit.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: os $ $Date: 2001-07-30 14:00:10 $ + * last change: $Author: jp $ $Date: 2001-09-20 12:48:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,7 +90,7 @@ using namespace ::com::sun::star::uno; ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId ) : Edit( pParent, rResId ), DropTargetHelper( this ), - bBrackets( TRUE ), bEnableDrop( TRUE ), bHasDroppedData( FALSE ) + bBrackets( TRUE ), bEnableDrop( TRUE ) { } @@ -138,7 +138,6 @@ sal_Int8 ConditionEdit::ExecuteDrop( const ExecuteDropEvent& rEvt ) sDBName += ']'; SetText( sDBName ); - bHasDroppedData = TRUE; nRet = DND_ACTION_COPY; } } |