diff options
Diffstat (limited to 'sc/source/ui/unoobj/textuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index d97cce02b426..0de4ab2b976f 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.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 @@ -73,15 +73,15 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties + SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties {0,0,0,0,0,0} }; static BOOL bTwipsSet = FALSE; if (!bTwipsSet) { - // modify PropertyMap to include CONVERT_TWIPS flag for font height - // (headers/footers are in twips) + // modify PropertyMap to include CONVERT_TWIPS flag for font height + // (headers/footers are in twips) SfxItemPropertyMapEntry* pEntry = aHdFtPropertyMap_Impl; while (pEntry->pName) @@ -98,7 +98,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() } bTwipsSet = TRUE; } - static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); + static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aHdFtPropertySet_Impl; } @@ -112,16 +112,16 @@ SC_SIMPLE_SERVICE_INFO( ScHeaderFooterTextObj, "ScHeaderFooterTextObj", "stardiv ScHeaderFooterContentObj::ScHeaderFooterContentObj( const EditTextObject* pLeft, const EditTextObject* pCenter, const EditTextObject* pRight ) : - pLeftText ( NULL ), - pCenterText ( NULL ), - pRightText ( NULL ) + pLeftText ( NULL ), + pCenterText ( NULL ), + pRightText ( NULL ) { if ( pLeft ) - pLeftText = pLeft->Clone(); + pLeftText = pLeft->Clone(); if ( pCenter ) - pCenterText = pCenter->Clone(); + pCenterText = pCenter->Clone(); if ( pRight ) - pRightText = pRight->Clone(); + pRightText = pRight->Clone(); } ScHeaderFooterContentObj::~ScHeaderFooterContentObj() @@ -154,7 +154,7 @@ void ScHeaderFooterContentObj::UpdateText( USHORT nPart, EditEngine& rSource ) delete pCenterText; pCenterText = pNew; break; - default: // SC_HDFT_RIGHT + default: // SC_HDFT_RIGHT delete pRightText; pRightText = pNew; break; @@ -240,13 +240,13 @@ ScHeaderFooterTextData::ScHeaderFooterTextData( ScHeaderFooterContentObj& rConte bDataValid( FALSE ), bInUpdate( FALSE ) { - rContentObj.acquire(); // must not go away + rContentObj.acquire(); // must not go away rContentObj.AddListener( *this ); } ScHeaderFooterTextData::~ScHeaderFooterTextData() { - SolarMutexGuard aGuard; // needed for EditEngine dtor + SolarMutexGuard aGuard; // needed for EditEngine dtor rContentObj.RemoveListener( *this ); @@ -262,8 +262,8 @@ void ScHeaderFooterTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( ((const ScHeaderFooterChangedHint&)rHint).GetPart() == nPart ) { - if (!bInUpdate) // not for own updates - bDataValid = FALSE; // text has to be fetched again + if (!bInUpdate) // not for own updates + bDataValid = FALSE; // text has to be fetched again } } } @@ -279,14 +279,14 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder() pHdrEngine->EnableUndo( FALSE ); pHdrEngine->SetRefMapMode( MAP_TWIP ); - // default font must be set, independently of document - // -> use global pool from module + // default font must be set, independently of document + // -> use global pool from module SfxItemSet aDefaults( pHdrEngine->GetEmptyItemSet() ); const ScPatternAttr& rPattern = (const ScPatternAttr&)SC_MOD()->GetPool().GetDefaultItem(ATTR_PATTERN); rPattern.FillEditItemSet( &aDefaults ); - // FillEditItemSet adjusts font height to 1/100th mm, - // but for header/footer twips is needed, as in the PatternAttr: + // FillEditItemSet adjusts font height to 1/100th mm, + // but for header/footer twips is needed, as in the PatternAttr: aDefaults.Put( rPattern.GetItem(ATTR_FONT_HEIGHT), EE_CHAR_FONTHEIGHT ); aDefaults.Put( rPattern.GetItem(ATTR_CJK_FONT_HEIGHT), EE_CHAR_FONTHEIGHT_CJK ); aDefaults.Put( rPattern.GetItem(ATTR_CTL_FONT_HEIGHT), EE_CHAR_FONTHEIGHT_CTL ); @@ -322,7 +322,7 @@ void ScHeaderFooterTextData::UpdateData() { if ( pEditEngine ) { - bInUpdate = TRUE; // don't reset bDataValid during UpdateText + bInUpdate = TRUE; // don't reset bDataValid during UpdateText rContentObj.UpdateText( nPart, *pEditEngine ); @@ -337,15 +337,15 @@ ScHeaderFooterTextObj::ScHeaderFooterTextObj( ScHeaderFooterContentObj& rContent aTextData( rContent, nP ), pUnoText( NULL ) { - // ScHeaderFooterTextData acquires rContent - // pUnoText is created on demand (getString/setString work without it) + // ScHeaderFooterTextData acquires rContent + // pUnoText is created on demand (getString/setString work without it) } void ScHeaderFooterTextObj::CreateUnoText_Impl() { if ( !pUnoText ) { - // can't be aggregated because getString/setString is handled here + // can't be aggregated because getString/setString is handled here ScSharedHeaderFooterEditSource aEditSource( &aTextData ); pUnoText = new SvxUnoText( &aEditSource, lcl_GetHdFtPropertySet(), uno::Reference<text::XText>() ); pUnoText->acquire(); @@ -382,18 +382,18 @@ uno::Reference<text::XTextCursor> SAL_CALL ScHeaderFooterTextObj::createTextCurs if (!pUnoText) CreateUnoText_Impl(); return pUnoText->createTextCursorByRange(aTextPosition); - //! wie ScCellObj::createTextCursorByRange, wenn SvxUnoTextRange_getReflection verfuegbar + //! wie ScCellObj::createTextCursorByRange, wenn SvxUnoTextRange_getReflection verfuegbar } -void ScHeaderFooterTextObj::FillDummyFieldData( ScHeaderFieldData& rData ) // static +void ScHeaderFooterTextObj::FillDummyFieldData( ScHeaderFieldData& rData ) // static { String aDummy(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "???" ))); - rData.aTitle = aDummy; - rData.aLongDocName = aDummy; - rData.aShortDocName = aDummy; - rData.aTabName = aDummy; - rData.nPageNo = 1; - rData.nTotalPages = 99; + rData.aTitle = aDummy; + rData.aLongDocName = aDummy; + rData.aShortDocName = aDummy; + rData.aTabName = aDummy; + rData.nPageNo = 1; + rData.nTotalPages = 99; } rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeException) @@ -480,7 +480,7 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent( if (!bAbsorb) { - // don't replace -> append at end + // don't replace -> append at end aSelection.Adjust(); aSelection.nStartPara = aSelection.nEndPara; aSelection.nStartPos = aSelection.nEndPos; @@ -492,14 +492,14 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent( pForwarder->QuickInsertField( aItem, aSelection ); pEditSource->UpdateData(); - // neue Selektion: ein Zeichen + // neue Selektion: ein Zeichen aSelection.Adjust(); aSelection.nEndPara = aSelection.nStartPara; aSelection.nEndPos = aSelection.nStartPos + 1; pHeaderField->InitDoc( &aTextData.GetContentObj(), aTextData.GetPart(), aSelection ); - // #91431# for bAbsorb=FALSE, the new selection must be behind the inserted content - // (the xml filter relies on this) + // #91431# for bAbsorb=FALSE, the new selection must be behind the inserted content + // (the xml filter relies on this) if (!bAbsorb) aSelection.nStartPos = aSelection.nEndPos; @@ -524,7 +524,7 @@ void SAL_CALL ScHeaderFooterTextObj::removeTextContent( ScHeaderFieldObj* pHeaderField = ScHeaderFieldObj::getImplementation( xContent ); if ( pHeaderField && pHeaderField->IsInserted() ) { - //! Testen, ob das Feld in dieser Zelle ist + //! Testen, ob das Feld in dieser Zelle ist pHeaderField->DeleteField(); return; } @@ -571,7 +571,7 @@ uno::Reference<container::XEnumerationAccess> SAL_CALL ScHeaderFooterTextObj::ge uno::Reference<container::XNameAccess> SAL_CALL ScHeaderFooterTextObj::getTextFieldMasters() throw(uno::RuntimeException) { - // sowas gibts nicht im Calc (?) + // sowas gibts nicht im Calc (?) return NULL; } @@ -650,7 +650,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScCellTextCursor::getStart() throw(uno { SolarMutexGuard aGuard; - //! use other object for range than cursor? + //! use other object for range than cursor? ScCellTextCursor* pNew = new ScCellTextCursor( *this ); uno::Reference<text::XTextRange> xRange( static_cast<SvxUnoTextRangeBase*>(pNew) ); @@ -667,7 +667,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScCellTextCursor::getEnd() throw(uno:: { SolarMutexGuard aGuard; - //! use other object for range than cursor? + //! use other object for range than cursor? ScCellTextCursor* pNew = new ScCellTextCursor( *this ); uno::Reference<text::XTextRange> xRange( static_cast<SvxUnoTextRangeBase*>(pNew) ); @@ -754,7 +754,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextCursor::getStart() t { SolarMutexGuard aGuard; - //! use other object for range than cursor? + //! use other object for range than cursor? ScHeaderFooterTextCursor* pNew = new ScHeaderFooterTextCursor( *this ); uno::Reference<text::XTextRange> xRange( static_cast<SvxUnoTextRangeBase*>(pNew) ); @@ -771,7 +771,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextCursor::getEnd() thr { SolarMutexGuard aGuard; - //! use other object for range than cursor? + //! use other object for range than cursor? ScHeaderFooterTextCursor* pNew = new ScHeaderFooterTextCursor( *this ); uno::Reference<text::XTextRange> xRange( static_cast<SvxUnoTextRangeBase*>(pNew) ); @@ -858,7 +858,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getStart() throw(uno { SolarMutexGuard aGuard; - //! use other object for range than cursor? + //! use other object for range than cursor? ScDrawTextCursor* pNew = new ScDrawTextCursor( *this ); uno::Reference<text::XTextRange> xRange( static_cast<SvxUnoTextRangeBase*>(pNew) ); @@ -875,7 +875,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getEnd() throw(uno:: { SolarMutexGuard aGuard; - //! use other object for range than cursor? + //! use other object for range than cursor? ScDrawTextCursor* pNew = new ScDrawTextCursor( *this ); uno::Reference<text::XTextRange> xRange( static_cast<SvxUnoTextRangeBase*>(pNew) ); @@ -937,14 +937,14 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper() pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); // TRUE: become owner of pool + pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); // TRUE: become owner of pool pForwarder = new SvxEditEngineForwarder( *pEditEngine ); pOriginalSource = new ScSimpleEditSource( pForwarder ); } ScSimpleEditSourceHelper::~ScSimpleEditSourceHelper() { - SolarMutexGuard aGuard; // needed for EditEngine dtor + SolarMutexGuard aGuard; // needed for EditEngine dtor delete pOriginalSource; delete pForwarder; @@ -993,7 +993,7 @@ ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) : ScCellTextData::~ScCellTextData() { - SolarMutexGuard aGuard; // needed for EditEngine dtor + SolarMutexGuard aGuard; // needed for EditEngine dtor if (pDocShell) { @@ -1039,9 +1039,9 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() pEnginePool->FreezeIdRanges(); pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); } - // currently, GetPortions doesn't work if UpdateMode is FALSE, - // this will be fixed (in EditEngine) by src600 -// pEditEngine->SetUpdateMode( FALSE ); + // currently, GetPortions doesn't work if UpdateMode is FALSE, + // this will be fixed (in EditEngine) by src600 +// pEditEngine->SetUpdateMode( FALSE ); pEditEngine->EnableUndo( FALSE ); if (pDocShell) pEditEngine->SetRefDevice(pDocShell->GetRefDevice()); @@ -1091,14 +1091,14 @@ void ScCellTextData::UpdateData() DBG_ASSERT(pEditEngine != NULL, "no EditEngine for UpdateData()"); if ( pDocShell && pEditEngine ) { - // during the own UpdateData call, bDataValid must not be reset, - // or things like attributes after the text would be lost - // (are not stored in the cell) + // during the own UpdateData call, bDataValid must not be reset, + // or things like attributes after the text would be lost + // (are not stored in the cell) - bInUpdate = TRUE; // prevents bDataValid from being reset + bInUpdate = TRUE; // prevents bDataValid from being reset ScDocFunc aFunc(*pDocShell); - aFunc.PutData( aCellPos, *pEditEngine, FALSE, TRUE ); // always as text + aFunc.PutData( aCellPos, *pEditEngine, FALSE, TRUE ); // always as text bInUpdate = FALSE; bDirty = FALSE; @@ -1114,22 +1114,22 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) { // const ScUpdateRefHint& rRef = (const ScUpdateRefHint&)rHint; - //! Ref-Update + //! Ref-Update } else if ( rHint.ISA( SfxSimpleHint ) ) { ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { - pDocShell = NULL; // invalid now + pDocShell = NULL; // invalid now DELETEZ( pForwarder ); - DELETEZ( pEditEngine ); // EditEngine uses document's pool + DELETEZ( pEditEngine ); // EditEngine uses document's pool } else if ( nId == SFX_HINT_DATACHANGED ) { - if (!bInUpdate) // not for own UpdateData calls - bDataValid = FALSE; // text has to be read from the cell again + if (!bInUpdate) // not for own UpdateData calls + bDataValid = FALSE; // text has to be read from the cell again } } } |