summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx10
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/servuno.cxx4
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx66
4 files changed, 43 insertions, 43 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 1247ab21aa2c..213d83f5349f 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2066,7 +2066,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert
break;
case SC_WID_UNO_CELLSTYL:
aAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
- ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA ) );
+ ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ) );
break;
case SC_WID_UNO_TBLBORD:
case SC_WID_UNO_TBLBORD2:
@@ -2351,7 +2351,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
OUString aStrVal;
aValue >>= aStrVal;
OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName(
- aStrVal, SFX_STYLE_FAMILY_PARA ));
+ aStrVal, SfxStyleFamily::Para ));
pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, true );
}
break;
@@ -2539,7 +2539,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (pStyle)
aStyleName = pStyle->GetName();
rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
- aStyleName, SFX_STYLE_FAMILY_PARA ) );
+ aStyleName, SfxStyleFamily::Para ) );
}
break;
case SC_WID_UNO_TBLBORD:
@@ -8130,7 +8130,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
OUString aStrVal;
aValue >>= aStrVal;
OUString aNewStr(ScStyleNameConversion::ProgrammaticToDisplayName(
- aStrVal, SFX_STYLE_FAMILY_PAGE ));
+ aStrVal, SfxStyleFamily::Page ));
//! Undo? (auch bei SID_STYLE_APPLY an der View)
@@ -8455,7 +8455,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
else if ( pEntry->nWID == SC_WID_UNO_PAGESTL )
{
rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
- rDoc.GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ) );
+ rDoc.GetPageStyle( nTab ), SfxStyleFamily::Page ) );
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 2abcfb96fcf6..e4692ae1af9c 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -308,7 +308,7 @@ void SAL_CALL ScTableConditionalFormat::addNew(
OUString aStrVal;
if ( rProp.Value >>= aStrVal )
aEntry.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName(
- aStrVal, SFX_STYLE_FAMILY_PARA );
+ aStrVal, SfxStyleFamily::Para );
}
else if ( rProp.Name == SC_UNONAME_FORMULANMSP1 )
{
@@ -592,14 +592,14 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
OUString SAL_CALL ScTableConditionalEntry::getStyleName() throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SFX_STYLE_FAMILY_PARA );
+ return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SfxStyleFamily::Para );
}
void SAL_CALL ScTableConditionalEntry::setStyleName( const OUString& aStyleName )
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
+ aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SfxStyleFamily::Para );
}
ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0d242d73df34..ddfa113ebf51 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -412,10 +412,10 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
new ScEditFieldObj(xNullContent, nullptr, getFieldType(nType), ESelection())));
} break;
case Type::CELLSTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PARA, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SfxStyleFamily::Para, OUString() )));
break;
case Type::PAGESTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PAGE, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SfxStyleFamily::Page, OUString() )));
break;
case Type::AUTOFORMAT:
xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID )));
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index d5942b056c52..4a7b14ff8a8b 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -372,7 +372,7 @@ static const SfxItemPropertyMap* lcl_GetFooterStyleMap()
#define SC_FAMILYNAME_CELL "CellStyles"
#define SC_FAMILYNAME_PAGE "PageStyles"
-static const sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
+static const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SfxStyleFamily::Para, SfxStyleFamily::Page };
using sc::HMMToTwips;
using sc::TwipsToHMM;
@@ -422,14 +422,14 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XStyleFamilies
-ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const
+ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(SfxStyleFamily nType) const
{
if ( pDocShell )
{
- if ( nType == SFX_STYLE_FAMILY_PARA )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
- else if ( nType == SFX_STYLE_FAMILY_PAGE )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
+ if ( nType == SfxStyleFamily::Para )
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
+ else if ( nType == SfxStyleFamily::Page )
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
}
OSL_FAIL("getStyleFamilyByType: keine DocShell oder falscher Typ");
return nullptr;
@@ -448,9 +448,9 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName
if ( pDocShell )
{
if ( aName == SC_FAMILYNAME_CELL )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
else if ( aName == SC_FAMILYNAME_PAGE )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
}
// no assertion - called directly from getByName
return nullptr;
@@ -682,7 +682,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
!pStyleObj->IsInserted() ) // noch nicht eingefuegt?
{
- OUString aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -694,7 +694,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
{
(void)pStylePool->Make( aNameStr, eFamily, SFXSTYLEBIT_USERDEF );
- if ( eFamily == SFX_STYLE_FAMILY_PARA && !rDoc.IsImportingXML() )
+ if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
rDoc.GetPool()->CellStyleCreated( aNameStr, &rDoc );
pStyleObj->InitDoc( pDocShell, aNameStr ); // Objekt kann benutzt werden
@@ -735,7 +735,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
bool bFound = false;
if ( pDocShell )
{
- OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -747,7 +747,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
if (pStyle)
{
bFound = true;
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// wie ScViewFunc::RemoveStyleSheetInUse
ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -831,7 +831,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName )
{
SolarMutexGuard aGuard;
uno::Reference< style::XStyle > xObj(
- GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) ));
+ GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ) ));
if (xObj.is())
return uno::makeAny(xObj);
else
@@ -860,7 +860,7 @@ uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
OSL_ENSURE( nPos<nCount, "Anzahl durcheinandergekommen" );
if (nPos<nCount)
pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName(
- pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
+ pStyle->GetName(), eFamily );
pStyle = aIter.Next();
}
return aSeq;
@@ -874,7 +874,7 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName )
SolarMutexGuard aGuard;
if ( pDocShell )
{
- OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -907,9 +907,9 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN
sal_uInt32 nResId = 0;
switch ( eFamily )
{
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
nResId = STR_STYLE_FAMILY_CELL; break;
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
nResId = STR_STYLE_FAMILY_PAGE; break;
default:
OSL_FAIL( "ScStyleFamilyObj::getPropertyValue(): invalid family" );
@@ -951,7 +951,7 @@ void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, c
// Default-ctor wird fuer die Reflection gebraucht
ScStyleObj::ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, const OUString& rName) :
- pPropSet( (eFam == SFX_STYLE_FAMILY_PARA) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
+ pPropSet( (eFam == SfxStyleFamily::Para) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
pDocShell( pDocSh ),
eFamily( eFam ),
aStyleName( rName )
@@ -1060,7 +1060,7 @@ OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException, std:
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), eFamily );
return OUString();
}
@@ -1074,20 +1074,20 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
if (pStyle)
{
// cell styles cannot be modified if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
return; //! exception?
//! DocFunc-Funktion??
//! Undo ?????????????
- OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, eFamily ));
bool bOk = pStyle->SetParent( aString );
if (bOk)
{
// wie bei setPropertyValue
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// Zeilenhoehen anpassen...
@@ -1121,7 +1121,7 @@ OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException, std::except
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), eFamily );
return OUString();
}
@@ -1133,7 +1133,7 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
if (pStyle)
{
// cell styles cannot be renamed if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
return; //! exception?
//! DocFunc-Funktion??
@@ -1145,11 +1145,11 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
aStyleName = aNewName; //! notify other objects for this style?
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA && !rDoc.IsImportingXML() )
+ if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
rDoc.GetPool()->CellStyleCreated( aNewName, &rDoc );
// Zellvorlagen = 2, Seitenvorlagen = 4
- sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
+ sal_uInt16 nId = ( eFamily == SfxStyleFamily::Para ) ?
SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;
SfxBindings* pBindings = pDocShell->GetViewBindings();
if (pBindings)
@@ -1178,7 +1178,7 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
if (pStyle)
{
const SfxItemPropertySimpleEntry* pEntry = nullptr;
- if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+ if ( eFamily == SfxStyleFamily::Page )
{
pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
if ( pEntry ) // only item-wids in header/footer map
@@ -1444,7 +1444,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
if ( pStyle )
{
// cell styles cannot be modified if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet();
@@ -1453,7 +1453,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
//! merge with SetOneProperty
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// row heights
@@ -1558,12 +1558,12 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
if ( pStyle && pEntry )
{
// cell styles cannot be modified if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet(); // direkt im lebenden Style aendern...
bool bDone = false;
- if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+ if ( eFamily == SfxStyleFamily::Page )
{
if(pEntry->nWID == SC_WID_UNO_HEADERSET)
{
@@ -1835,7 +1835,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
//! Undo ?????????????
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// Zeilenhoehen anpassen...
@@ -2017,7 +2017,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
throw(uno::RuntimeException, std::exception)
{
- bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+ bool bPage = ( eFamily == SfxStyleFamily::Page );
uno::Sequence<OUString> aRet(2);
OUString* pArray = aRet.getArray();
pArray[0] = SCSTYLE_SERVICE;