diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-08-27 14:33:44 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-08-28 22:47:37 +0200 |
commit | 6222d47081ff28ad253265dfd138095c991c867a (patch) | |
tree | 3645968d837807661de473790d59e0ba74c04e13 /sc/source/filter/xml/xmlcelli.cxx | |
parent | 3ea37ac7005c64f378756a5dbc3fbfbc3bf8b053 (diff) |
some initial refactoring in xmlcelli.cxx
Diffstat (limited to 'sc/source/filter/xml/xmlcelli.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 74cc5b8d6e8d..c7ab4391b577 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -769,16 +769,17 @@ void ScXMLTableRowCellContext::EndElement() { if (bHasTextImport && rXMLImport.GetRemoveLastChar()) { - if (rXMLImport.GetTextImport()->GetCursor().is()) + UniReference< XMLTextImportHelper > aTextImport = rXMLImport.GetTextImport(); + if (aTextImport->GetCursor().is()) { - //GetImport().GetTextImport()->GetCursor()->gotoEnd(sal_False); - if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, sal_True ) ) + //aTextImport->GetCursor()->gotoEnd(sal_False); + if( aTextImport->GetCursor()->goLeft( 1, sal_True ) ) { - GetImport().GetTextImport()->GetText()->insertString( - GetImport().GetTextImport()->GetCursorAsRange(), rtl::OUString(), + aTextImport->GetText()->insertString( + aTextImport->GetCursorAsRange(), rtl::OUString(), sal_True ); } - rXMLImport.GetTextImport()->ResetCursor(); + aTextImport->ResetCursor(); } } ScMyTables& rTables = rXMLImport.GetTables(); @@ -821,13 +822,10 @@ void ScXMLTableRowCellContext::EndElement() pOUText.reset(xTempText->getString()); } } - if ( (!pOUTextContent && !pOUText && !pOUTextValue) - && ( (pOUTextContent && !pOUTextContent->getLength()) || !pOUTextContent ) - && ( (pOUText && !pOUText->getLength()) || !pOUText ) - && ( (pOUTextValue && !pOUTextValue->getLength()) || !pOUTextValue )) + if (!pOUTextContent && !pOUText && !pOUTextValue) bIsEmpty = sal_True; } - sal_Bool bWasEmpty = bIsEmpty; + bool bWasEmpty = bIsEmpty; // uno::Reference <table::XCell> xCell; table::CellAddress aCurrentPos( aCellPos ); if ((pContentValidationName && pContentValidationName->getLength()) || |