summaryrefslogtreecommitdiff
path: root/sc
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 /sc
parentfba2d764d88582951f00af8184d481a6647a8564 (diff)
convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen8.cxx16
-rw-r--r--sc/source/ui/docshell/docsh3.cxx14
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/inc/prevwsh.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
8 files changed, 21 insertions, 21 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 0a0e03d7d296..74756f598f79 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -130,12 +130,12 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist)
NULL );
::utl::MiscCfg aMisc;
- sal_uInt16 nFlags = 0;
+ SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE;
if ( aMisc.IsPaperOrientationWarning() )
- nFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION;
if ( aMisc.IsPaperSizeWarning() )
- nFlags |= SFX_PRINTER_CHG_SIZE;
- pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) );
+ nFlags |= SfxPrinterChangeFlags::CHG_SIZE;
+ pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) );
pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) );
pPrinter = new SfxPrinter( pSet );
@@ -177,12 +177,12 @@ void ScDocument::SetPrintOptions()
::utl::MiscCfg aMisc;
SfxItemSet aOptSet( pPrinter->GetOptions() );
- sal_uInt16 nFlags = 0;
+ SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE;
if ( aMisc.IsPaperOrientationWarning() )
- nFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION;
if ( aMisc.IsPaperSizeWarning() )
- nFlags |= SFX_PRINTER_CHG_SIZE;
- aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) );
+ nFlags |= SfxPrinterChangeFlags::CHG_SIZE;
+ aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) );
aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) );
pPrinter->SetOptions( aOptSet );
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 950664ac7f18..568556acbf82 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -450,13 +450,13 @@ OutputDevice* ScDocShell::GetRefDevice()
return aDocument.GetRefDevice();
}
-sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags )
+sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags )
{
SfxPrinter *pOld = aDocument.GetPrinter( false );
if ( pOld && pOld->IsPrinting() )
return SFX_PRINTERROR_BUSY;
- if (nDiffFlags & SFX_PRINTER_PRINTER)
+ if (nDiffFlags & SfxPrinterChangeFlags::PRINTER)
{
if ( aDocument.GetPrinter() != pNewPrinter )
{
@@ -491,7 +491,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag
}
}
}
- else if (nDiffFlags & SFX_PRINTER_JOBSETUP)
+ else if (nDiffFlags & SfxPrinterChangeFlags::JOBSETUP)
{
SfxPrinter* pOldPrinter = aDocument.GetPrinter();
if (pOldPrinter)
@@ -506,12 +506,12 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag
}
}
- if (nDiffFlags & SFX_PRINTER_OPTIONS)
+ if (nDiffFlags & SfxPrinterChangeFlags::OPTIONS)
{
aDocument.SetPrintOptions(); //! aus neuem Printer ???
}
- if (nDiffFlags & (SFX_PRINTER_CHG_ORIENTATION | SFX_PRINTER_CHG_SIZE))
+ if (nDiffFlags & (SfxPrinterChangeFlags::CHG_ORIENTATION | SfxPrinterChangeFlags::CHG_SIZE))
{
OUString aStyle = aDocument.GetPageStyle( GetCurTab() );
ScStyleSheetPool* pStPl = aDocument.GetStyleSheetPool();
@@ -520,7 +520,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag
{
SfxItemSet& rSet = pStyleSheet->GetItemSet();
- if (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION)
+ if (nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION)
{
const SvxPageItem& rOldItem = static_cast<const SvxPageItem&>(rSet.Get(ATTR_PAGE));
bool bWasLand = rOldItem.IsLandscape();
@@ -538,7 +538,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag
rSet.Put( aNewSItem );
}
}
- if (nDiffFlags & SFX_PRINTER_CHG_SIZE)
+ if (nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE)
{
SvxSizeItem aPaperSizeItem( ATTR_PAGE_SIZE, SvxPaperInfo::GetPaperSize(pNewPrinter) );
rSet.Put( aPaperSizeItem );
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 423e13e7337e..990ecce1790e 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -234,7 +234,7 @@ public:
void SetDocFunc( ScDocFunc *pDF ) { pDocFunc = pDF; }
SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
- sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL );
+ sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL );
void UpdateFontList();
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 7c578765db53..d8bec53db738 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -107,7 +107,7 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE;
- virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE;
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE;
virtual bool HasPrintOptionsPage() const SAL_OVERRIDE;
virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 7f1fd8498706..81e800450180 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -345,7 +345,7 @@ public:
// Drucken:
virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter,
- sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ) SAL_OVERRIDE;
+ SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ) SAL_OVERRIDE;
virtual bool HasPrintOptionsPage() const SAL_OVERRIDE;
virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE;
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 6cd3204f2ad5..68ca1df7bcbe 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -193,7 +193,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
{
SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
if (pNewPrinter->IsKnown())
- pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
+ pDocShell->SetPrinter( pNewPrinter, SfxPrinterChangeFlags::PRINTER );
else
delete pNewPrinter;
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index e79dd92921bb..29398d4fdc13 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -521,7 +521,7 @@ SfxPrinter* ScPreviewShell::GetPrinter( bool bCreate )
return pDocShell->GetPrinter(bCreate);
}
-sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
+sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool )
{
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index a943245a69c4..7076f815ae70 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1053,7 +1053,7 @@ SfxPrinter* ScTabViewShell::GetPrinter( bool bCreate )
return GetViewData().GetDocShell()->GetPrinter(bCreate);
}
-sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
+sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool )
{
return GetViewData().GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}