summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-09 15:24:21 +0200
committerNoel Grandin <noel@peralex.com>2015-04-10 09:48:06 +0200
commit89dd3f80685c66883b6ed4efbf369f5aa2dc292e (patch)
tree6edf1a741d079c88799df9219270798affd2ffa5 /starmath
parent84482f5193ff0738563b6e91f66fc95fbc145de3 (diff)
convert SfxObjectCreateMode to scoped enum
and fix some dodgy usage in /sc in the process Change-Id: Ia2bee267df31aba431fc8cb81195bb83e5b64deb
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/cursor.cxx4
-rw-r--r--starmath/source/document.cxx18
-rw-r--r--starmath/source/mathmlexport.cxx2
-rw-r--r--starmath/source/mathmlimport.cxx2
-rw-r--r--starmath/source/unomodel.cxx2
5 files changed, 14 insertions, 14 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index cd5bbc01da5d..de483e5d196a 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1455,7 +1455,7 @@ void SmCursor::EndEdit(){
//TODO: Consider copying the update accessability code from SmDocShell::SetText in here...
//This somehow updates the size of SmGraphicView if it is running in embedded mode
- if( pDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if( pDocShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
pDocShell->OnDocumentPrinterChanged(0);
//Request a replaint...
@@ -1473,7 +1473,7 @@ void SmCursor::EndEdit(){
void SmCursor::RequestRepaint(){
SmViewShell *pViewSh = SmGetActiveView();
if( pViewSh ) {
- if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode() )
pDocShell->Repaint();
else
pViewSh->GetGraphicWindow().Invalidate();
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index f6a0bdee9a4b..2f1c91b384c7 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -166,7 +166,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
if( pViewSh )
{
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
- if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
// have SwOleClient::FormatChanged() to align the modified formula properly
// even if the vis area does not change (e.g. when formula text changes from
@@ -195,7 +195,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
}
}
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
OnDocumentPrinterChanged(0);
}
}
@@ -509,7 +509,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
if ( 0 != (pPrinter = rDocShell.GetPrt()) )
{
pPrinter->Push( PushFlags::MAPMODE );
- if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == rDocShell.GetCreateMode() )
{
// if it is an embedded object (without it's own printer)
// we change the MapMode temporarily.
@@ -534,7 +534,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
if ( 0 != (pRefDev = rDocShell.GetRefDev()) && pPrinter != pRefDev )
{
pRefDev->Push( PushFlags::MAPMODE );
- if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == rDocShell.GetCreateMode() )
{
// if it is an embedded object (without it's own printer)
// we change the MapMode temporarily.
@@ -570,7 +570,7 @@ SmPrinterAccess::~SmPrinterAccess()
Printer* SmDocShell::GetPrt()
{
- if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
// Normally the server provides the printer. But if it doesn't provide one (e.g. because
// there is no connection) it still can be the case that we know the printer because it
@@ -603,7 +603,7 @@ Printer* SmDocShell::GetPrt()
OutputDevice* SmDocShell::GetRefDev()
{
- if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
OutputDevice* pOutDev = GetDocumentRefDev();
if ( pOutDev )
@@ -734,7 +734,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
}
}
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
SetFormulaArranged( false );
Repaint();
@@ -784,7 +784,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
}
}
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
SetFormulaArranged( false );
Repaint();
@@ -1289,7 +1289,7 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
// If outplace editing, then dont resize the OutplaceWindow. But the
// ObjectShell has to resize. Bug 56470
bool bUnLockFrame;
- if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() && GetFrame() )
+ if( GetCreateMode() == SfxObjectCreateMode::EMBEDDED && !IsInPlaceActive() && GetFrame() )
{
GetFrame()->LockAdjustPosSizePixel();
bUnLockFrame = true;
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 3466e51149f2..98bbbe4a8651 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -111,7 +111,7 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
SmDocShell *pDocShell = pModel ?
static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
if ( pDocShell &&
- SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode() )
bEmbedded = true;
uno::Reference<task::XStatusIndicator> xStatusIndicator;
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 8ef3bfeb2d4f..71df78c4cccf 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -116,7 +116,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
pItem->GetValue() >>= xStatusIndicator;
}
- if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode() )
bEmbedded = true;
}
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 4ade3f82cef9..597afed3fb3e 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -597,7 +597,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
case HANDLE_PRINTER_NAME:
{
// embedded documents just ignore this property for now
- if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
SfxPrinter *pPrinter = pDocSh->GetPrinter ( );
if (pPrinter)