From 10461da782ae403563d5b47e3853ddb819f72dde Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 7 Feb 2013 22:36:07 -0500 Subject: Removal of more obsolete stuff... Change-Id: Idad9121270ae89c504577f4e8d70ca4c4ed2e64b --- sc/source/filter/xml/xmlcelli.cxx | 57 +-------------------------------------- sc/source/filter/xml/xmlcelli.hxx | 2 -- 2 files changed, 1 insertion(+), 58 deletions(-) diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 4659c2aa0780..179c992d18a0 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -120,7 +120,6 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, bIsMatrix(false), bIsCovered(bTempIsCovered), bIsEmpty(true), - bHasTextImport(false), bIsFirstTextImport(false), bSolarMutexLocked(false), bFormulaTextResult(false), @@ -306,42 +305,6 @@ void ScXMLTableRowCellContext::PushParagraph(const OUString& rPara) maParagraphs.push_back(rPara); } -void ScXMLTableRowCellContext::SetCursorOnTextImport(const rtl::OUString& rOUTempText) -{ - ScAddress aCellPos = rXMLImport.GetTables().GetCurrentCellPos(); - if (cellExists(aCellPos)) - { - sal_Int32 nCol = static_cast( aCellPos.Col() ); - sal_Int32 nRow = static_cast( aCellPos.Row() ); - uno::Reference xCellRange(rXMLImport.GetTables().GetCurrentXCellRange()); - if (xCellRange.is()) - { - com::sun::star::uno::Reference xBaseCell( xCellRange->getCellByPosition(nCol, nRow) ); - if (xBaseCell.is()) - { - com::sun::star::uno::Reference xLockable(xBaseCell, uno::UNO_QUERY); - if (xLockable.is()) - xLockable->addActionLock(); - uno::Reference xText(xBaseCell, uno::UNO_QUERY); - if (xText.is()) - { - uno::Reference xTextCursor(xText->createTextCursor()); - if (xTextCursor.is()) - { - xTextCursor->setString(rOUTempText); - xTextCursor->gotoEnd(false); - rXMLImport.GetTextImport()->SetCursor(xTextCursor); - } - } - } - } - } - else - { - OSL_FAIL("this method should only be called for a existing cell"); - } -} - SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< @@ -777,7 +740,7 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos, // so ProgressBarIncrement must be called with bEditCell = FALSE. // Formatted text that is put into the cell by the child context // is handled in AddCellsToTable() (bIsEmpty is true then). - if (bDoIncrement || bHasTextImport) + if (bDoIncrement) rXMLImport.ProgressBarIncrement(false); } @@ -901,11 +864,6 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos, } else { - // #i56027# If the child context put formatted text into the cell, - // bIsEmpty is true and ProgressBarIncrement has to be called - // with bEditCell = TRUE. - if (bHasTextImport) - rXMLImport.ProgressBarIncrement(true); if ((i == 0) && (rCellPos.Col() == 0)) { for (sal_Int32 j = 1; j < nRepeatedRows; ++j) @@ -1144,19 +1102,6 @@ bool ScXMLTableRowCellContext::IsPossibleErrorString() const void ScXMLTableRowCellContext::EndElement() { - if( bHasTextImport && rXMLImport.GetRemoveLastChar() ) - { - UniReference< XMLTextImportHelper > aTextImport = rXMLImport.GetTextImport(); - if( aTextImport->GetCursor().is() ) - { - if( aTextImport->GetCursor()->goLeft(1, true) ) - { - aTextImport->GetText()->insertString( - aTextImport->GetCursorAsRange(), rtl::OUString(), true ); - } - aTextImport->ResetCursor(); - } - } HasSpecialCaseFormulaText(); if( bFormulaTextResult && (mbPossibleErrorCell || mbCheckWithCompilerForError) ) { diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index cd0ce080f6d2..b71537ec3fcf 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -55,7 +55,6 @@ class ScXMLTableRowCellContext : public SvXMLImportContext bool bIsMatrix; bool bIsCovered; bool bIsEmpty; - bool bHasTextImport; bool bIsFirstTextImport; bool bSolarMutexLocked; bool bFormulaTextResult; @@ -108,7 +107,6 @@ public: ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); void PushParagraph(const OUString& rPara); - void SetCursorOnTextImport(const rtl::OUString& rOUTempText); void SetAnnotation( const ScAddress& rPosition ); void SetDetectiveObj( const ScAddress& rPosition ); -- cgit