diff options
Diffstat (limited to 'sc/source/core/data/attrib.cxx')
-rw-r--r-- | sc/source/core/data/attrib.cxx | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 7924b4e2612f..6e11a8dfdfc7 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,30 +54,30 @@ #include "sc.hrc" #include "globstr.hrc" -#include "textuno.hxx" // ScHeaderFooterContentObj +#include "textuno.hxx" // ScHeaderFooterContentObj using namespace com::sun::star; //------------------------------------------------------------------------ -TYPEINIT1(ScMergeAttr, SfxPoolItem); +TYPEINIT1(ScMergeAttr, SfxPoolItem); TYPEINIT1_AUTOFACTORY(ScProtectionAttr, SfxPoolItem); -TYPEINIT1(ScRangeItem, SfxPoolItem); -TYPEINIT1(ScTableListItem, SfxPoolItem); -TYPEINIT1(ScPageHFItem, SfxPoolItem); +TYPEINIT1(ScRangeItem, SfxPoolItem); +TYPEINIT1(ScTableListItem, SfxPoolItem); +TYPEINIT1(ScPageHFItem, SfxPoolItem); TYPEINIT1(ScViewObjectModeItem, SfxEnumItem); -TYPEINIT1(ScDoubleItem, SfxPoolItem); +TYPEINIT1(ScDoubleItem, SfxPoolItem); TYPEINIT1(ScPageScaleToItem, SfxPoolItem); //------------------------------------------------------------------------ // -// allgemeine Hilfsfunktionen +// allgemeine Hilfsfunktionen // BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther ) { -// DBG_ASSERT( pThis || pOther, "LineAttr == 0" ); +// DBG_ASSERT( pThis || pOther, "LineAttr == 0" ); if (!pThis) return FALSE; @@ -99,14 +99,14 @@ BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther ) return FALSE; else { - return TRUE; //! ??? + return TRUE; //! ??? } } } // -// Item - Implementierungen +// Item - Implementierungen // //------------------------------------------------------------------------ @@ -173,8 +173,8 @@ SfxPoolItem* ScMergeAttr::Clone( SfxItemPool * ) const SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, USHORT /* nVer */ ) const { - INT16 nCol; - INT16 nRow; + INT16 nCol; + INT16 nRow; rStream >> nCol; rStream >> nRow; return new ScMergeAttr(static_cast<SCCOL>(nCol),static_cast<SCROW>(nRow)); @@ -232,8 +232,8 @@ ScProtectionAttr::ScProtectionAttr(const ScProtectionAttr& rItem): { bProtection = rItem.bProtection; bHideFormula = rItem.bHideFormula; - bHideCell = rItem.bHideCell; - bHidePrint = rItem.bHidePrint; + bHideCell = rItem.bHideCell; + bHidePrint = rItem.bHidePrint; } ScProtectionAttr::~ScProtectionAttr() @@ -321,11 +321,11 @@ String ScProtectionAttr::GetValueText() const String aStrNo ( ScGlobal::GetRscString(STR_NO) ); sal_Unicode cDelim = ','; - aValue = '('; - aValue += (bProtection ? aStrYes : aStrNo); aValue += cDelim; - aValue += (bHideFormula ? aStrYes : aStrNo); aValue += cDelim; - aValue += (bHideCell ? aStrYes : aStrNo); aValue += cDelim; - aValue += (bHidePrint ? aStrYes : aStrNo); + aValue = '('; + aValue += (bProtection ? aStrYes : aStrNo); aValue += cDelim; + aValue += (bHideFormula ? aStrYes : aStrNo); aValue += cDelim; + aValue += (bHideCell ? aStrYes : aStrNo); aValue += cDelim; + aValue += (bHidePrint ? aStrYes : aStrNo); aValue += ')'; return aValue; @@ -342,9 +342,9 @@ SfxItemPresentation ScProtectionAttr::GetPresentation const IntlWrapper* /* pIntl */ ) const { - String aStrYes ( ScGlobal::GetRscString(STR_YES) ); - String aStrNo ( ScGlobal::GetRscString(STR_NO) ); - String aStrSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( ": " )); + String aStrYes ( ScGlobal::GetRscString(STR_YES) ); + String aStrNo ( ScGlobal::GetRscString(STR_NO) ); + String aStrSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( ": " )); String aStrDelim = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( ", " )); switch ( ePres ) @@ -359,12 +359,12 @@ SfxItemPresentation ScProtectionAttr::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: rText = ScGlobal::GetRscString(STR_PROTECTION); rText += aStrSep; - rText += (bProtection ? aStrYes : aStrNo); rText += aStrDelim; - rText += ScGlobal::GetRscString(STR_FORMULAS); rText += aStrSep; - rText += (!bHideFormula ? aStrYes : aStrNo); rText += aStrDelim; - rText += ScGlobal::GetRscString(STR_HIDE); rText += aStrSep; - rText += (bHideCell ? aStrYes : aStrNo); rText += aStrDelim; - rText += ScGlobal::GetRscString(STR_PRINT); rText += aStrSep; + rText += (bProtection ? aStrYes : aStrNo); rText += aStrDelim; + rText += ScGlobal::GetRscString(STR_FORMULAS); rText += aStrSep; + rText += (!bHideFormula ? aStrYes : aStrNo); rText += aStrDelim; + rText += ScGlobal::GetRscString(STR_HIDE); rText += aStrSep; + rText += (bHideCell ? aStrYes : aStrNo); rText += aStrDelim; + rText += ScGlobal::GetRscString(STR_PRINT); rText += aStrSep; rText += (!bHidePrint ? aStrYes : aStrNo); break; @@ -444,7 +444,7 @@ BOOL ScProtectionAttr::SetHidePrint( BOOL bHPrint) } // ----------------------------------------------------------------------- -// ScRangeItem - Tabellenbereich +// ScRangeItem - Tabellenbereich // ----------------------------------------------------------------------- int ScRangeItem::operator==( const SfxPoolItem& rAttr ) const @@ -468,7 +468,7 @@ SfxItemPresentation ScRangeItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /* eCoreUnit */, SfxMapUnit /* ePresUnit */, - String& rText, + String& rText, const IntlWrapper* /* pIntl */ ) const { @@ -479,7 +479,7 @@ SfxItemPresentation ScRangeItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: rText = ScGlobal::GetRscString(STR_AREA); rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " )); -// break;// Durchfallen !!! +// break;// Durchfallen !!! case SFX_ITEM_PRESENTATION_NAMELESS: { @@ -500,12 +500,12 @@ SfxItemPresentation ScRangeItem::GetPresentation } // ----------------------------------------------------------------------- -// ScTableListItem - Liste von Tabellen(-nummern) +// ScTableListItem - Liste von Tabellen(-nummern) // ----------------------------------------------------------------------- ScTableListItem::ScTableListItem( const ScTableListItem& rCpy ) - : SfxPoolItem ( rCpy.Which() ), - nCount ( rCpy.nCount ) + : SfxPoolItem ( rCpy.Which() ), + nCount ( rCpy.nCount ) { if ( nCount > 0 ) { @@ -552,12 +552,12 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const { DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" ); - ScTableListItem& rCmp = (ScTableListItem&)rAttr; - BOOL bEqual = (nCount == rCmp.nCount); + ScTableListItem& rCmp = (ScTableListItem&)rAttr; + BOOL bEqual = (nCount == rCmp.nCount); if ( nCount > 0 ) { - USHORT i=0; + USHORT i=0; bEqual = ( pTabArr && rCmp.pTabArr ); @@ -582,9 +582,9 @@ SfxPoolItem* ScTableListItem::Clone( SfxItemPool* ) const SfxItemPresentation ScTableListItem::GetPresentation ( SfxItemPresentation ePres, - SfxMapUnit /* eCoreUnit */, - SfxMapUnit /* ePresUnit */, - String& rText, + SfxMapUnit /* eCoreUnit */, + SfxMapUnit /* ePresUnit */, + String& rText, const IntlWrapper* /* pIntl */ ) const { @@ -630,19 +630,19 @@ SfxItemPresentation ScTableListItem::GetPresentation ScPageHFItem::ScPageHFItem( USHORT nWhichP ) : SfxPoolItem ( nWhichP ), - pLeftArea ( NULL ), + pLeftArea ( NULL ), pCenterArea ( NULL ), - pRightArea ( NULL ) + pRightArea ( NULL ) { } //------------------------------------------------------------------------ ScPageHFItem::ScPageHFItem( const ScPageHFItem& rItem ) - : SfxPoolItem ( rItem ), - pLeftArea ( NULL ), + : SfxPoolItem ( rItem ), + pLeftArea ( NULL ), pCenterArea ( NULL ), - pRightArea ( NULL ) + pRightArea ( NULL ) { if ( rItem.pLeftArea ) pLeftArea = rItem.pLeftArea->Clone(); @@ -734,7 +734,7 @@ int ScPageHFItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); - const ScPageHFItem& r = (const ScPageHFItem&)rItem; + const ScPageHFItem& r = (const ScPageHFItem&)rItem; return ScGlobal::EETextObjEqual(pLeftArea, r.pLeftArea) && ScGlobal::EETextObjEqual(pCenterArea, r.pCenterArea) @@ -808,13 +808,13 @@ BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands) return bChange; } -#define SC_FIELD_COUNT 6 +#define SC_FIELD_COUNT 6 SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const { - EditTextObject* pLeft = EditTextObject::Create(rStream); + EditTextObject* pLeft = EditTextObject::Create(rStream); EditTextObject* pCenter = EditTextObject::Create(rStream); - EditTextObject* pRight = EditTextObject::Create(rStream); + EditTextObject* pRight = EditTextObject::Create(rStream); DBG_ASSERT( pLeft && pCenter && pRight, "Error reading ScPageHFItem" ); @@ -822,9 +822,9 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const pCenter == NULL || pCenter->GetParagraphCount() == 0 || pRight == NULL || pRight->GetParagraphCount() == 0 ) { - // If successfully loaded, each object contains at least one paragraph. - // Excel import in 5.1 created broken TextObjects (#67442#) that are - // corrected here to avoid saving wrong files again (#90487#). + // If successfully loaded, each object contains at least one paragraph. + // Excel import in 5.1 created broken TextObjects (#67442#) that are + // corrected here to avoid saving wrong files again (#90487#). ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), TRUE ); if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 ) @@ -844,7 +844,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const } } - if ( nVer < 1 ) // alte Feldbefehle umsetzen + if ( nVer < 1 ) // alte Feldbefehle umsetzen { USHORT i; const String& rDel = ScGlobal::GetRscString( STR_HFCMD_DELIMITER ); @@ -881,11 +881,11 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const } } else if ( nVer < 2 ) - { // nichts tun, SvxFileField nicht gegen SvxExtFileField austauschen + { // nichts tun, SvxFileField nicht gegen SvxExtFileField austauschen } ScPageHFItem* pItem = new ScPageHFItem( Which() ); - pItem->SetArea( pLeft, SC_HF_LEFTAREA ); + pItem->SetArea( pLeft, SC_HF_LEFTAREA ); pItem->SetArea( pCenter, SC_HF_CENTERAREA ); pItem->SetArea( pRight, SC_HF_RIGHTAREA ); @@ -921,16 +921,16 @@ void ScPageHFItem::SetArea( EditTextObject *pNew, int nArea ) { switch ( nArea ) { - case SC_HF_LEFTAREA: delete pLeftArea; pLeftArea = pNew; break; + case SC_HF_LEFTAREA: delete pLeftArea; pLeftArea = pNew; break; case SC_HF_CENTERAREA: delete pCenterArea; pCenterArea = pNew; break; - case SC_HF_RIGHTAREA: delete pRightArea; pRightArea = pNew; break; + case SC_HF_RIGHTAREA: delete pRightArea; pRightArea = pNew; break; default: DBG_ERROR( "New Area?" ); } } //----------------------------------------------------------------------- -// ScViewObjectModeItem - Darstellungsmodus von ViewObjekten +// ScViewObjectModeItem - Darstellungsmodus von ViewObjekten //----------------------------------------------------------------------- ScViewObjectModeItem::ScViewObjectModeItem( USHORT nWhichP ) @@ -958,11 +958,11 @@ SfxItemPresentation ScViewObjectModeItem::GetPresentation SfxItemPresentation ePres, SfxMapUnit /* eCoreUnit */, SfxMapUnit /* ePresUnit */, - String& rText, + String& rText, const IntlWrapper* /* pIntl */ -) const +) const { - String aDel = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(": ")); + String aDel = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(": ")); rText.Erase(); switch ( ePres ) @@ -989,7 +989,7 @@ SfxItemPresentation ScViewObjectModeItem::GetPresentation ePres = SFX_ITEM_PRESENTATION_NAMELESS;//das geht immer! break; } -// break; // DURCHFALLEN!!! +// break; // DURCHFALLEN!!! case SFX_ITEM_PRESENTATION_NAMELESS: rText += ScGlobal::GetRscString(STR_VOBJ_MODE_SHOW+GetValue()); @@ -1037,8 +1037,8 @@ USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const //------------------------------------------------------------------------ SfxPoolItem* ScViewObjectModeItem::Create( - SvStream& rStream, - USHORT nVersion ) const + SvStream& rStream, + USHORT nVersion ) const { if ( nVersion == 0 ) { @@ -1058,19 +1058,19 @@ SfxPoolItem* ScViewObjectModeItem::Create( } // ----------------------------------------------------------------------- -// double +// double // ----------------------------------------------------------------------- ScDoubleItem::ScDoubleItem( USHORT nWhichP, double nVal ) : SfxPoolItem ( nWhichP ), - nValue ( nVal ) + nValue ( nVal ) { } //------------------------------------------------------------------------ ScDoubleItem::ScDoubleItem( const ScDoubleItem& rItem ) - : SfxPoolItem ( rItem ) + : SfxPoolItem ( rItem ) { nValue = rItem.nValue; } |