summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/textsh.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-13 11:19:56 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-13 11:19:56 +0000
commit19203faa44439b953d670ca169d1f1900e937463 (patch)
tree654eb3a05babce29b8a4b060e270d7f865da40c9 /sw/source/ui/shells/textsh.cxx
parent1524aa18b9ddf7a4181e3f278155c48655084452 (diff)
CWS-TOOLING: integrate CWS sw31bf02
2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
Diffstat (limited to 'sw/source/ui/shells/textsh.cxx')
-rw-r--r--sw/source/ui/shells/textsh.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index d86f9dbcc974..415011de4d89 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -833,6 +833,11 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SvtModuleOptions aMOpt;
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
+
+ rSh.Push();
+ const BOOL bCrsrInHidden = rSh.SelectHiddenRange();
+ rSh.Pop(FALSE);
+
while ( nWhich )
{
switch ( nWhich )
@@ -841,21 +846,21 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_VIDEO:
if ( GetShell().IsSelFrmMode() ||
!SvxPluginFileDlg::IsAvailable( nWhich ) ||
- SFX_CREATE_MODE_EMBEDDED == eCreateMode )
+ SFX_CREATE_MODE_EMBEDDED == eCreateMode || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
break;
case SID_INSERT_DIAGRAM:
- if( !aMOpt.IsChart() || eCreateMode == SFX_CREATE_MODE_EMBEDDED)
+ if( !aMOpt.IsChart() || eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
break;
case FN_INSERT_SMA:
- if( !aMOpt.IsMath() || eCreateMode == SFX_CREATE_MODE_EMBEDDED)
+ if( !aMOpt.IsMath() || eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
@@ -870,7 +875,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
#ifndef SOLAR_JAVA
nWhich == SID_INSERT_APPLET ||
#endif
- eCreateMode == SFX_CREATE_MODE_EMBEDDED)
+ eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
@@ -889,7 +894,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case FN_INSERT_FRAME_INTERACT:
{
if ( GetShell().IsSelFrmMode() ||
- (0 != (nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))
+ (0 != (nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)) || bCrsrInHidden )
rSet.DisableItem(nWhich);
}
break;
@@ -949,12 +954,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
if(rSh.IsSelFrmMode())
{
const int nSel = rSh.GetSelectionType();
- if( (nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel )
+ if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden )
rSet.DisableItem(nWhich);
}
break;
case FN_INSERT_HRULER :
- if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() )
+ if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() || bCrsrInHidden )
rSet.DisableItem(nWhich);
break;
case FN_FORMAT_COLUMN :