summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/gridwin.hxx5
-rw-r--r--sc/source/ui/inc/tabview.hxx5
-rw-r--r--sc/source/ui/view/gridwin.cxx17
-rw-r--r--sc/source/ui/view/tabview3.cxx12
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx6
6 files changed, 41 insertions, 12 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 5e9f74911567..53905950d009 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gridwin.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: nn $ $Date: 2001-02-26 18:56:59 $
+ * last change: $Author: nn $ $Date: 2001-03-20 16:50:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -359,6 +359,7 @@ public:
void ContinueDrag();
void StopMarking();
+ void UpdateInputContext();
void CheckInverted() { if (nPaintCount) bNeedsRepaint = TRUE; }
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 7939cc05dbc1..d5baf1c8b6e8 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabview.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:45:01 $
+ * last change: $Author: nn $ $Date: 2001-03-20 16:50:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -336,6 +336,7 @@ public:
void CellContentChanged();
void SelectionChanged();
void CursorPosChanged();
+ void UpdateInputContext();
void InvertHorizontal( ScVSplitPos eWhich, long nDragPos );
void InvertVertical( ScHSplitPos eWhich, long nDragPos );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a23c96fbea9d..f5a59c7cf807 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gridwin.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: nn $ $Date: 2001-02-26 18:57:35 $
+ * last change: $Author: nn $ $Date: 2001-03-20 16:51:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2314,6 +2314,19 @@ void ScGridWindow::StopMarking()
}
}
+void ScGridWindow::UpdateInputContext()
+{
+ BOOL bReadOnly = pViewData->GetDocShell()->IsReadOnly();
+ ULONG nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
+
+ // when font from InputContext is used,
+ // it must be taken from the cursor position's cell attributes
+
+ InputContext aContext;
+ aContext.SetOptions( nOptions );
+ SetInputContext( aContext );
+}
+
//--------------------------------------------------------
BOOL ScGridWindow::QueryDropPrivate( DropEvent& rEvt )
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 8e9c830f4efc..69c26dde1617 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabview3.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: nn $ $Date: 2000-12-19 19:00:53 $
+ * last change: $Author: nn $ $Date: 2001-03-20 16:51:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2322,6 +2322,8 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
// hier nicht mehr selber GrabFocus rufen!
// Wenn das Doc bearbeitet wird, ruft der Sfx selber GrabFocus am Fenster der Shell.
// Wenn es z.B. ein Mailbody ist, darf es den Focus nicht bekommen (Bug #43638#)
+
+ UpdateInputContext();
}
else
pGridWin[aViewData.GetActivePart()]->ClickExtern();
@@ -2415,6 +2417,12 @@ void ScTabView::HideListBox()
pGridWin[i]->ClickExtern();
}
+void ScTabView::UpdateInputContext()
+{
+ ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
+ if (pWin)
+ pWin->UpdateInputContext();
+}
// GetGridWidth - Breite eines Ausgabebereichs (fuer ViewData)
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index a3439b03a33f..859bbdfc7a1b 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabvwsh2.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: nn $ $Date: 2001-03-08 18:07:03 $
+ * last change: $Author: nn $ $Date: 2001-03-20 16:51:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -305,6 +305,10 @@ void ScTabViewShell::WindowChanged()
FuPoor* pFunc = GetDrawFuncPtr();
if (pFunc)
pFunc->SetWindow(pWin);
+
+ // when font from InputContext is used,
+ // this must be moved to change of cursor position:
+ UpdateInputContext();
}
void ScTabViewShell::ExecDraw(SfxRequest& rReq)
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index cfe48c2c7828..ef80e58df485 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabvwsh5.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: nn $ $Date: 2000-09-22 18:31:22 $
+ * last change: $Author: nn $ $Date: 2001-03-20 16:51:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -165,6 +165,8 @@ void __EXPORT ScTabViewShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBC
SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadOnly);
GetViewData()->GetDispatcher().Execute( SID_FM_DESIGN_MODE, SFX_CALLMODE_ASYNCHRON,
&aItem, 0L );
+
+ UpdateInputContext();
}
break;