[Libreoffice-commits] core.git: 3 commits - cui/source include/svx reportdesign/source sc/source sd/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 5 07:11:44 UTC 2019
cui/source/tabpages/page.cxx | 6 +++---
include/svx/svxids.hrc | 4 ++--
reportdesign/source/ui/report/ReportController.cxx | 6 +++---
sc/source/ui/dbgui/validate.cxx | 12 ++++++------
sc/source/ui/view/cellsh2.cxx | 12 ++++++------
sd/source/ui/dlg/dlgpage.cxx | 4 ++--
6 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit b0b8851021cee26412182b51ed28fe574632a4d6
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Oct 4 18:26:53 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Oct 5 09:10:58 2019 +0200
Convert various FID_VALID_* to SfxUInt16Item
Change-Id: Ic21ec69513ee520cedc026b8c2d657464beed19b
Reviewed-on: https://gerrit.libreoffice.org/80250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index b6d880b92bd1..2ee9cf39f446 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -416,13 +416,13 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
if( rArgSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SfxItemState::SET )
nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >(
- static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
+ static_cast< const SfxUInt16Item* >( pItem )->GetValue() ) );
m_xLbAllow->set_active( nLbPos );
nLbPos = SC_VALIDDLG_DATA_EQUAL;
if( rArgSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SfxItemState::SET )
nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >(
- static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
+ static_cast< const SfxUInt16Item* >( pItem )->GetValue() ) );
m_xLbValue->set_active( nLbPos );
// *** check boxes ***
@@ -463,9 +463,9 @@ bool ScTPValidationValue::FillItemSet( SfxItemSet* rArgSet )
ScConditionMode eCondMode = bCustom ?
ScConditionMode::Direct : lclGetCondModeFromPos( m_xLbValue->get_active() );
- rArgSet->Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
+ rArgSet->Put( SfxUInt16Item( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
lclGetValModeFromPos( nLbPos ) ) ) );
- rArgSet->Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( eCondMode ) ) );
+ rArgSet->Put( SfxUInt16Item( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( eCondMode ) ) );
rArgSet->Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) );
rArgSet->Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) );
rArgSet->Put( SfxBoolItem( FID_VALID_BLANK, m_xCbAllow->get_active() ) );
@@ -775,7 +775,7 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
m_xTsbShow->set_state( TRISTATE_TRUE ); // check by default
if ( rArgSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SfxItemState::SET )
- m_xLbAction->set_active( static_cast<const SfxAllEnumItem*>(pItem)->GetValue() );
+ m_xLbAction->set_active( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
else
m_xLbAction->set_active( 0 );
@@ -795,7 +795,7 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
bool ScTPValidationError::FillItemSet( SfxItemSet* rArgSet )
{
rArgSet->Put( SfxBoolItem( FID_VALID_SHOWERR, m_xTsbShow->get_state() == TRISTATE_TRUE ) );
- rArgSet->Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, m_xLbAction->get_active() ) );
+ rArgSet->Put( SfxUInt16Item( FID_VALID_ERRSTYLE, m_xLbAction->get_active() ) );
rArgSet->Put( SfxStringItem( FID_VALID_ERRTITLE, m_xEdtTitle->get_text() ) );
rArgSet->Put( SfxStringItem( FID_VALID_ERRTEXT, m_xEdError->get_text() ) );
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index d7f88f710513..ef5c0086b7cd 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -869,8 +869,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
bShowHelp = pOldData->GetInput( aHelpTitle, aHelpText );
bShowError = pOldData->GetErrMsg( aErrTitle, aErrText, eErrStyle );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) );
+ aArgSet.Put( SfxUInt16Item( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) );
+ aArgSet.Put( SfxUInt16Item( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE1, aExpr1 ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE2, aExpr2 ) );
aArgSet.Put( SfxBoolItem( FID_VALID_BLANK, bBlank ) );
@@ -879,7 +879,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aHelpTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aHelpText ) );
aArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, bShowError ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) );
+ aArgSet.Put( SfxUInt16Item( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aErrTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aErrText ) );
}
@@ -897,9 +897,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
const SfxItemSet* pOutSet = static_cast<ScValidationDlg*>(xDlg.get())->GetOutputItemSet();
if ( pOutSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SfxItemState::SET )
- eMode = static_cast<ScValidationMode>(static_cast<const SfxAllEnumItem*>(pItem)->GetValue());
+ eMode = static_cast<ScValidationMode>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if ( pOutSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SfxItemState::SET )
- eOper = static_cast<ScConditionMode>(static_cast<const SfxAllEnumItem*>(pItem)->GetValue());
+ eOper = static_cast<ScConditionMode>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if ( pOutSet->GetItemState( FID_VALID_VALUE1, true, &pItem ) == SfxItemState::SET )
{
OUString aTemp1 = static_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -966,7 +966,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if ( pOutSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SfxItemState::SET )
bShowError = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SfxItemState::SET )
- eErrStyle = static_cast<ScValidErrorStyle>(static_cast<const SfxAllEnumItem*>(pItem)->GetValue());
+ eErrStyle = static_cast<ScValidErrorStyle>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SfxItemState::SET )
aErrTitle = static_cast<const SfxStringItem*>(pItem)->GetValue();
if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SfxItemState::SET )
commit 9ba86e80ec77c02e4b759a08264c035fba6f2b7c
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Oct 4 18:21:17 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Oct 5 09:10:41 2019 +0200
Convert various RPTUI_ID_* to SfxUInt16Item
Change-Id: I261c30c35d3967ece7078b8529a42e646c00a90f
Reviewed-on: https://gerrit.libreoffice.org/80249
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 1c7d05fd1f12..cf89c567fbd2 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2363,9 +2363,9 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SvxULSpaceItem(RPTUI_ID_ULSPACE),
new SvxPageItem(RPTUI_ID_PAGE),
new SvxSizeItem(RPTUI_ID_SIZE),
- new SfxAllEnumItem(RPTUI_ID_PAGE_MODE,SVX_PAGE_MODE_STANDARD),
- new SfxAllEnumItem(RPTUI_ID_START,PAPER_A4),
- new SfxAllEnumItem(RPTUI_ID_END,PAPER_E),
+ new SfxUInt16Item(RPTUI_ID_PAGE_MODE,SVX_PAGE_MODE_STANDARD),
+ new SfxUInt16Item(RPTUI_ID_START,PAPER_A4),
+ new SfxUInt16Item(RPTUI_ID_END,PAPER_E),
new SvxBrushItem(RPTUI_ID_BRUSH),
new XFillStyleItem,
new XFillColorItem("", aNullFillCol),
commit faec1a870e671e79d1cdc532a509c345e3731c16
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Oct 4 18:12:04 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Oct 5 09:10:21 2019 +0200
Convert SID_PAPER_START/END to SfxUInt16Item
Change-Id: I62067075853b1d5c893c14d72a247b07a3cc5585
Reviewed-on: https://gerrit.libreoffice.org/80248
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 41e65c3c2b59..9ba650f5ffea 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1520,8 +1520,8 @@ bool SvxPageDescPage::IsMarginOutOfRange() const
void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet)
{
const SfxUInt16Item* pModeItem = aSet.GetItem(SID_ENUM_PAGE_MODE, false);
- const SfxAllEnumItem* pPaperStartItem = aSet.GetItem<SfxAllEnumItem>(SID_PAPER_START, false);
- const SfxAllEnumItem* pPaperEndItem = aSet.GetItem<SfxAllEnumItem>(SID_PAPER_END, false);
+ const SfxUInt16Item* pPaperStartItem = aSet.GetItem(SID_PAPER_START, false);
+ const SfxUInt16Item* pPaperEndItem = aSet.GetItem(SID_PAPER_END, false);
const SfxStringListItem* pCollectListItem = aSet.GetItem<SfxStringListItem>(SID_COLLECT_LIST, false);
const SfxBoolItem* pSupportDrawingLayerFillStyleItem = aSet.GetItem<SfxBoolItem>(SID_DRAWINGLAYER_FILLSTYLES, false);
@@ -1532,7 +1532,7 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet)
if(pPaperStartItem && pPaperEndItem)
{
- SetPaperFormatRanges(static_cast<Paper>(pPaperStartItem->GetEnumValue()));
+ SetPaperFormatRanges(static_cast<Paper>(pPaperStartItem->GetValue()));
}
if(pCollectListItem)
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index cbcbc7461438..1045ec364044 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -824,8 +824,8 @@ class SvxSetItem;
#define SID_DISABLE_CTL ( SID_SVX_START + 1036 )
#define SID_INSERT_HYPERLINKCONTROL ( SID_SVX_START + 1037 )
#define SID_ENUM_PAGE_MODE TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1038 )
-#define SID_PAPER_START ( SID_SVX_START + 1039 )
-#define SID_PAPER_END ( SID_SVX_START + 1040 )
+#define SID_PAPER_START TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1039 )
+#define SID_PAPER_END TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1040 )
#define SID_COLLECT_LIST ( SID_SVX_START + 1041 )
#define SID_GROW_FONT_SIZE ( SID_SVX_START + 1042 )
#define SID_SHRINK_FONT_SIZE ( SID_SVX_START + 1043 )
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index f9fa0db66778..77dbd01af706 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -68,8 +68,8 @@ void SdPageDlg::PageCreated(const OString& rId, SfxTabPage& rPage)
if (rId == "RID_SVXPAGE_PAGE")
{
aSet.Put (SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), SVX_PAGE_MODE_PRESENTATION));
- aSet.Put (SfxAllEnumItem(sal_uInt16(SID_PAPER_START), PAPER_A0));
- aSet.Put (SfxAllEnumItem(sal_uInt16(SID_PAPER_END), PAPER_E));
+ aSet.Put (SfxUInt16Item(SID_PAPER_START, PAPER_A0));
+ aSet.Put (SfxUInt16Item(SID_PAPER_END, PAPER_E));
rPage.PageCreated(aSet);
}
else if (rId == "RID_SVXPAGE_AREA")
More information about the Libreoffice-commits
mailing list