Kaydet (Commit) 90b99a26 authored tarafından Oliver Specht's avatar Oliver Specht

::Activate(): check active view prior to access

üst d8b3b119
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: fldtdlg.cxx,v $ * $RCSfile: fldtdlg.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: jp $ $Date: 2001-01-18 14:01:38 $ * last change: $Author: os $ $Date: 2001-01-30 14:17:19 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -442,18 +442,21 @@ void SwFldDlg::ReInitTabPage(USHORT nPageId) ...@@ -442,18 +442,21 @@ void SwFldDlg::ReInitTabPage(USHORT nPageId)
void SwFldDlg::Activate() void SwFldDlg::Activate()
{ {
BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0; SwView* pView = ::GetActiveView();
if(pView)
const SwWrtShell& rSh = ::GetActiveView()->GetWrtShell();
GetOKButton().Enable( !rSh.IsReadOnlyAvailable() ||
!rSh.HasReadonlySel() );
ReInitTabPage(TP_FLD_VAR);
if (!bHtmlMode)
{ {
ReInitTabPage(TP_FLD_REF); BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
ReInitTabPage(TP_FLD_FUNC); const SwWrtShell& rSh = pView->GetWrtShell();
GetOKButton().Enable( !rSh.IsReadOnlyAvailable() ||
!rSh.HasReadonlySel() );
ReInitTabPage(TP_FLD_VAR);
if (!bHtmlMode)
{
ReInitTabPage(TP_FLD_REF);
ReInitTabPage(TP_FLD_FUNC);
}
} }
} }
...@@ -484,6 +487,9 @@ void SwFldDlg::InsertHdl() ...@@ -484,6 +487,9 @@ void SwFldDlg::InsertHdl()
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
$Log: not supported by cvs2svn $ $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 Revision 1.1.1.1 2000/09/18 17:14:36 hr
initial import initial import
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment