summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-07-11 16:08:58 +0000
committerjp <jp@openoffice.org>2001-07-11 16:08:58 +0000
commita29465cc27ec053418b7b8a46dd5f248e84b620d (patch)
treeb2a011dbeb10a8e95d079f83d3ab9394e61c009a /sw/source/ui
parent6b1e9c68a0a8dc267866a6d306c2587eb6ce58b9 (diff)
#89582#: look for the dropped content flag at ConditionEdit controls
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx34
-rw-r--r--sw/source/ui/fldui/fldvar.cxx38
2 files changed, 46 insertions, 26 deletions
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index a257de094cb2..4d1ad4311674 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.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jp $ $Date: 2001-07-05 18:41:36 $
+ * last change: $Author: jp $ $Date: 2001-07-11 17:08:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -164,7 +164,7 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
Beschreibung:
--------------------------------------------------------------------*/
-__EXPORT SwFldFuncPage::~SwFldFuncPage()
+SwFldFuncPage::~SwFldFuncPage()
{
}
@@ -172,7 +172,7 @@ __EXPORT SwFldFuncPage::~SwFldFuncPage()
Beschreibung:
--------------------------------------------------------------------*/
-void __EXPORT SwFldFuncPage::Reset(const SfxItemSet& rSet)
+void SwFldFuncPage::Reset(const SfxItemSet& rSet)
{
SavePos(&aTypeLB);
Init(); // Allgemeine initialisierung
@@ -365,16 +365,18 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox )
if (IsFldEdit())
{
- aNameED.SetText(GetCurField()->GetPar1());
+ if( !aNameED.HasDroppedData() )
+ aNameED.SetText(GetCurField()->GetPar1());
aValueED.SetText(GetCurField()->GetPar2());
}
else
{
- aNameED.SetText(aEmptyStr);
+ if( !aNameED.HasDroppedData() )
+ aNameED.SetText(aEmptyStr);
aValueED.SetText(aEmptyStr);
}
- if (aNameFT.GetText() != sOldNameFT)
+ if( aNameFT.GetText() != sOldNameFT )
aNameFT.SetText(sOldNameFT);
if (aValueFT.GetText() != sOldValueFT)
aValueFT.SetText(sOldValueFT);
@@ -404,7 +406,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox )
aNameFT.SetText(SW_RESSTR(STR_COND));
aNameED.SetDropEnable(TRUE);
aValueFT.SetText(SW_RESSTR(STR_INSTEXT));
- if (!IsFldEdit())
+ if (!IsFldEdit() )
aValueED.SetText(::GetActiveView()->GetWrtShell().GetSelTxt());
bName = bValue = TRUE;
break;
@@ -414,8 +416,10 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox )
aNameED.SetDropEnable(TRUE);
if (IsFldEdit())
{
- aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|'));
- aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|'));
+ if( !aCond1ED.HasDroppedData() )
+ aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|'));
+ if( !aCond2ED.HasDroppedData() )
+ aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|'));
}
bName = bValue = TRUE;
@@ -455,6 +459,9 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, pBox )
default:
break;
}
+ aNameED.ResetDroppedDataFlag();
+ aCond1ED.ResetDroppedDataFlag();
+ aCond2ED.ResetDroppedDataFlag();
if (bShowSelection)
{
@@ -583,7 +590,7 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldFuncPage::FillItemSet(SfxItemSet& rSet)
+BOOL SwFldFuncPage::FillItemSet(SfxItemSet& rSet)
{
BOOL bPage = FALSE;
USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
@@ -668,7 +675,7 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
Beschreibung:
--------------------------------------------------------------------*/
-SfxTabPage* __EXPORT SwFldFuncPage::Create( Window* pParent,
+SfxTabPage* SwFldFuncPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldFuncPage( pParent, rAttrSet ) );
@@ -721,6 +728,9 @@ IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG )
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.3 2001/07/05 18:41:36 jp
+ changes for TF_DATA
+
Revision 1.2 2001/01/18 14:01:38 jp
new Field/-Type: combined character
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index af34bafbeccf..9c139642e0bd 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.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jp $ $Date: 2001-07-05 18:41:36 $
+ * last change: $Author: jp $ $Date: 2001-07-11 17:08:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -171,7 +171,7 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
Beschreibung:
--------------------------------------------------------------------*/
-__EXPORT SwFldVarPage::~SwFldVarPage()
+SwFldVarPage::~SwFldVarPage()
{
}
@@ -179,7 +179,7 @@ __EXPORT SwFldVarPage::~SwFldVarPage()
Beschreibung:
--------------------------------------------------------------------*/
-void __EXPORT SwFldVarPage::Reset(const SfxItemSet& rSet)
+void SwFldVarPage::Reset(const SfxItemSet& rSet)
{
SavePos(&aTypeLB);
@@ -291,11 +291,13 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, pBox )
if (nOld != LISTBOX_ENTRY_NOTFOUND)
{
aNameED.SetText(aEmptyStr);
- aValueED.SetText(aEmptyStr);
+ if( !aValueED.HasDroppedData() )
+ aValueED.SetText(aEmptyStr);
}
aValueED.SetDropEnable(FALSE);
UpdateSubType(); // Auswahl-Listboxen initialisieren
+ aValueED.ResetDroppedDataFlag();
}
bInit = FALSE;
@@ -320,7 +322,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nTypeId != TYP_FORMELFLD)
aNameED.SetText(GetFldMgr().GetCurFldPar1());
- aValueED.SetText(GetFldMgr().GetCurFldPar2());
+ if( !aValueED.HasDroppedData() )
+ aValueED.SetText(GetFldMgr().GetCurFldPar2());
}
if (aNameFT.GetText() != sOldNameFT)
@@ -356,15 +359,16 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (pType->GetType() == UF_STRING)
{
- aValueED.SetText(pType->GetContent());
+ if( !aValueED.HasDroppedData() )
+ aValueED.SetText(pType->GetContent());
aNumFormatLB.SelectEntryPos(0);
}
- else
+ else if( !aValueED.HasDroppedData() )
aValueED.SetText(pType->GetContent());
// aValueED.SetText(pType->GetContent(aNumFormatLB.GetFormat()));
}
}
- else
+ else if( !aValueED.HasDroppedData() )
aValueED.SetText(pType->GetContent());
}
else
@@ -372,7 +376,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (pBox) // Nur bei Interaktion mit Maus
{
aNameED.SetText(aEmptyStr);
- aValueED.SetText(aEmptyStr);
+ if( !aValueED.HasDroppedData() )
+ aValueED.SetText(aEmptyStr);
}
}
bValue = bName = bNumFmt = bInvisible = TRUE;
@@ -421,7 +426,8 @@ 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)
- aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula());
+ if( !aValueED.HasDroppedData() )
+ aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula());
}
aValueED.SetDropEnable(TRUE);
break;
@@ -502,7 +508,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aNumFormatLB.SelectEntryPos(0);
}
}
- if (IsFldEdit() && (!pBox || bInit))
+ if (IsFldEdit() && (!pBox || bInit) )
aValueED.SetText(((SwSetExpField*)GetCurField())->GetPromptText());
}
else // USERFLD
@@ -602,6 +608,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
break;
}
+ aValueED.ResetDroppedDataFlag();
aNumFormatLB.Show(bNumFmt);
aFormatLB.Show(!bNumFmt);
@@ -1190,7 +1197,7 @@ IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, pED )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldVarPage::FillItemSet(SfxItemSet& rSet)
+BOOL SwFldVarPage::FillItemSet(SfxItemSet& rSet)
{
USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
@@ -1322,7 +1329,7 @@ BOOL __EXPORT SwFldVarPage::FillItemSet(SfxItemSet& rSet)
Beschreibung:
--------------------------------------------------------------------*/
-SfxTabPage* __EXPORT SwFldVarPage::Create( Window* pParent,
+SfxTabPage* SwFldVarPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldVarPage( pParent, rAttrSet ) );
@@ -1397,6 +1404,9 @@ void SwFldVarPage::FillUserData()
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.4 2001/07/05 18:41:36 jp
+ changes for TF_DATA
+
Revision 1.3 2001/02/13 20:30:37 jp
Bug #83829#: validate fieldname