summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-24 09:36:29 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 09:36:59 +0200
commit799a7878fd5b3a5a01b59d0a4139a2b0908ccc43 (patch)
tree0354bc5656be965467e7e082ca5316168fc74c2d /cui
parentfba2d764d88582951f00af8184d481a6647a8564 (diff)
convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/treeopt.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 31c4ee59aad8..a8b005d3cf6e 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1201,9 +1201,9 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
// miscellaneous - Tabulator
pRet->Put(SfxBoolItem(SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning()));
- sal_uInt16 nFlag = aMisc.IsPaperSizeWarning() ? SFX_PRINTER_CHG_SIZE : 0;
- nFlag |= aMisc.IsPaperOrientationWarning() ? SFX_PRINTER_CHG_ORIENTATION : 0;
- pRet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlag ));
+ SfxPrinterChangeFlags nFlag = aMisc.IsPaperSizeWarning() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE;
+ nFlag |= aMisc.IsPaperOrientationWarning() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE;
+ pRet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlag) ));
}
break;
@@ -1346,8 +1346,8 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet
if(SfxItemState::SET == rSet.GetItemState(SID_PRINTER_CHANGESTODOC, false, &pItem))
{
const SfxFlagItem* pFlag = static_cast<const SfxFlagItem*>(pItem);
- aMisc.SetPaperSizeWarning(0 != (pFlag->GetValue() & SFX_PRINTER_CHG_SIZE ));
- aMisc.SetPaperOrientationWarning(0 != (pFlag->GetValue() & SFX_PRINTER_CHG_ORIENTATION ));
+ aMisc.SetPaperSizeWarning(bool(static_cast<SfxPrinterChangeFlags>(pFlag->GetValue()) & SfxPrinterChangeFlags::CHG_SIZE ));
+ aMisc.SetPaperOrientationWarning(bool(static_cast<SfxPrinterChangeFlags>(pFlag->GetValue()) & SfxPrinterChangeFlags::CHG_ORIENTATION ));
}
// evaluate help options