summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/stlpool.hxx2
-rw-r--r--sc/sdi/drawsh.sdi1
-rw-r--r--sc/sdi/drtxtob.sdi1
-rw-r--r--sc/sdi/formatsh.sdi1
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx29
6 files changed, 34 insertions, 2 deletions
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index 5cbca39e8fee..f2a025536835 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -54,7 +54,7 @@ public:
const String* GetForceStdName() const { return pForceStdName; }
virtual SfxStyleSheetBase& Make( const String&, SfxStyleFamily eFam,
- sal_uInt16 nMask = 0xffff, sal_uInt16 nPos = 0xffff );
+ sal_uInt16 nMask = SFXSTYLEBIT_ALL, sal_uInt16 nPos = 0xffff );
protected:
virtual ~ScStyleSheetPool();
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 98fe422cc7b5..d7e3c1a34aba 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -57,6 +57,7 @@ interface TableDraw
SID_STYLE_NEW [ StateMethod = StateDisableItems; Export = FALSE; ]
SID_STYLE_EDIT [ StateMethod = StateDisableItems; Export = FALSE; ]
SID_STYLE_DELETE [ StateMethod = StateDisableItems; Export = FALSE; ]
+ SID_STYLE_HIDE [ StateMethod = StateDisableItems; Export = FALSE; ]
//----------------------------------------------------------------------------
SID_TEXT_STANDARD [ ExecMethod = ExecDrawAttr; StateMethod = NoState; Export = FALSE; ]
diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi
index dce59dc2588f..d17d285ec927 100644
--- a/sc/sdi/drtxtob.sdi
+++ b/sc/sdi/drtxtob.sdi
@@ -54,6 +54,7 @@ interface TableDrawText
SID_STYLE_NEW [ StateMethod = StateDisableItems; Export = FALSE; ]
SID_STYLE_EDIT [ StateMethod = StateDisableItems; Export = FALSE; ]
SID_STYLE_DELETE [ StateMethod = StateDisableItems; Export = FALSE; ]
+ SID_STYLE_HIDE [ StateMethod = StateDisableItems; Export = FALSE; ]
//----------------------------------------------------------------------------
SID_CUT [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
diff --git a/sc/sdi/formatsh.sdi b/sc/sdi/formatsh.sdi
index 8b84a7b730c6..0304f61e2283 100644
--- a/sc/sdi/formatsh.sdi
+++ b/sc/sdi/formatsh.sdi
@@ -67,6 +67,7 @@ interface FormatForSelection
SID_STYLE_FAMILY4 [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
SID_STYLE_EDIT [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
SID_STYLE_DELETE [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
+ SID_STYLE_HIDE [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
// } Slot's die in der DrawShell disabled werden.
SID_ATTR_ALIGN_HOR_JUSTIFY [ ExecMethod = ExecuteAlignment; StateMethod = GetAttrState; ]
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 47315b3aed52..b9268ddf4fa8 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -241,7 +241,7 @@ SfxStyleSheetBasePool* ScDocShell::GetStyleSheetPool()
static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
{
- pStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, 0xffff);
+ pStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL);
SfxStyleSheetBase *pStyle = pStylePool->First();
while ( pStyle )
{
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 7d98e4514f3e..305e44b7e9da 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -233,6 +233,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_EDIT:
case SID_STYLE_DELETE:
+ case SID_STYLE_HIDE:
{
ISfxTemplateCommon* pDesigner = SFX_APP()->
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
@@ -278,6 +279,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( (nSlotId == SID_STYLE_NEW)
|| (nSlotId == SID_STYLE_EDIT)
|| (nSlotId == SID_STYLE_DELETE)
+ || (nSlotId == SID_STYLE_HIDE)
|| (nSlotId == SID_STYLE_APPLY)
|| (nSlotId == SID_STYLE_WATERCAN)
|| (nSlotId == SID_STYLE_FAMILY)
@@ -362,6 +364,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
case SID_STYLE_EDIT:
case SID_STYLE_DELETE:
+ case SID_STYLE_HIDE:
case SID_STYLE_NEW_BY_EXAMPLE:
{
const SfxPoolItem* pNameItem;
@@ -445,6 +448,19 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
break;
+ case SID_STYLE_HIDE:
+ {
+ if ( pStyleSheet )
+ {
+ pStyleSheet->SetHidden( true );
+ pTabViewShell->InvalidateAttribs();
+ rReq.Done();
+ }
+ else
+ nRetMask = false;
+ }
+ break;
+
case SID_STYLE_APPLY:
{
if ( pStyleSheet && !pScMod->GetIsWaterCan() )
@@ -602,6 +618,19 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
break;
+ case SID_STYLE_HIDE:
+ {
+ nRetMask = ( NULL != pStyleSheet );
+ if ( pStyleSheet )
+ {
+ pStyleSheet->SetHidden( true );
+ rBindings.Invalidate( SID_STYLE_FAMILY4 );
+ pDocSh->SetDocumentModified();
+ rReq.Done();
+ }
+ }
+ break;
+
case SID_STYLE_APPLY:
{
nRetMask = ( NULL != pStyleSheet );