summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-14 12:28:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-14 14:20:26 +0100
commit6ba9daac763baf37c833911be5e5fb97e068bea1 (patch)
tree12ba4c5402747074f5a4b69a10fc60ab1c3d6603 /sfx2
parenta342ac91e21dd45640b7dea063bc04b80f0feb6e (diff)
add TypedWhichId version of QueryState
Change-Id: I95b86fc081847da01e06f50a1b2c7e7f5456c638 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/securitypage.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 7441e47c1746..43ef5115908b 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -44,18 +44,18 @@ namespace
{
enum RedliningMode { RL_NONE, RL_WRITER, RL_CALC };
- bool QueryState( sal_uInt16 _nSlot, bool& _rValue )
+ bool QueryState( TypedWhichId<SfxBoolItem> _nSlot, bool& _rValue )
{
bool bRet = false;
SfxViewShell* pViewSh = SfxViewShell::Current();
if (pViewSh)
{
- const SfxPoolItem* pItem;
+ const SfxBoolItem* pItem;
SfxDispatcher* pDisp = pViewSh->GetDispatcher();
SfxItemState nState = pDisp->QueryState( _nSlot, pItem );
bRet = SfxItemState::DEFAULT <= nState;
if (bRet)
- _rValue = static_cast< const SfxBoolItem* >( pItem )->GetValue();
+ _rValue = pItem->GetValue();
}
return bRet;
}
@@ -66,7 +66,7 @@ namespace
bool bRet = false;
if (_eMode != RL_NONE)
{
- sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
+ TypedWhichId<SfxBoolItem> nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
bRet = QueryState( nSlot, _rValue );
}
return bRet;
@@ -78,7 +78,7 @@ namespace
bool bRet = false;
if (_eMode != RL_NONE)
{
- sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
+ TypedWhichId<SfxBoolItem> nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
bRet = QueryState( nSlot, _rValue );
}
return bRet;
@@ -246,11 +246,11 @@ void SfxSecurityPage_Impl::Reset_Impl()
SfxViewShell* pViewSh = SfxViewShell::Current();
if (pViewSh)
{
- const SfxPoolItem* pItem;
+ const SfxUInt16Item* pItem;
SfxDispatcher* pDisp = pViewSh->GetDispatcher();
if (SfxItemState::DEFAULT <= pDisp->QueryState( SID_HTML_MODE, pItem ))
{
- sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
+ sal_uInt16 nMode = pItem->GetValue();
bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 );
}
}