[Libreoffice-commits] .: sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Dec 12 12:39:58 PST 2010


 sc/source/ui/Accessibility/AccessibleContextBase.cxx         |    1 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx          |    7 
 sc/source/ui/Accessibility/AccessibleDocument.cxx            |    1 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |  168 -----------
 sc/source/ui/Accessibility/AccessiblePreviewTable.cxx        |   62 ----
 sc/source/ui/Accessibility/AccessibleTableBase.cxx           |    7 
 sc/source/ui/Accessibility/AccessibleText.cxx                |   44 --
 7 files changed, 2 insertions(+), 288 deletions(-)

New commits:
commit 8564ab1e78e4adbbc5121ba78edb369f40d6555b
Author: Anders Jonsson <anders.jonsson at norsjonet.se>
Date:   Sat Dec 11 20:26:42 2010 +0100

    Remove commented code

diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index da20759..13236f5 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -336,7 +336,6 @@ sal_Int16 SAL_CALL
     if (!msDescription.getLength())
     {
         OUString sDescription(createAccessibleDescription());
-//		DBG_ASSERT(sDescription.getLength(), "We should give always a descripition.");
 
         if (msDescription != sDescription)
         {
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index b682924..cb80e3a 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -489,13 +489,6 @@ Sequence< PropertyValue > SAL_CALL ScAccessibleCsvRuler::getCharacterAttributes(
     ensureValidIndexWithEnd( nIndex );
     Sequence< PropertyValue > aSeq;
     lcl_FillFontAttributes( aSeq, implGetRuler().GetFont() );
-//! TODO split attribute: waiting for #102221#
-//    if( implHasSplit( nIndex ) )
-//    {
-//        sal_Int32 nIndex = lcl_ExpandSequence( aSeq, 1 );
-//        aSeq[ nIndex ].Name = CREATE_OUSTRING( "..." );
-//        aSeq[ nIndex ].Value <<= ...;
-//    }
     return aSeq;
 }
 
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index debe93c..722f41a 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -82,7 +82,6 @@ struct ScAccessibleShapeData
     ~ScAccessibleShapeData();
     mutable ::accessibility::AccessibleShape* pAccShape;
     mutable ScAddress*          pRelationCell; // if it is NULL this shape is anchored on the table
-//    SdrObject*                  pShape;
     com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape;
     mutable sal_Bool			bSelected;
     sal_Bool                    bSelectable;
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index cc2fc0f..f338c83 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -792,21 +792,6 @@ void ScShapeChilds::Notify(SfxBroadcaster&, const SfxHint& rHint)
                     {
                     }
                     break;
-                    // no longer necessary
-/*                    case HINT_OBJINSERTED :    // Neues Zeichenobjekt eingefuegt
-                    {
-                        uno::Reference<drawing::XShape> xShape (pObj->getUnoShape(), uno::UNO_QUERY);
-                        if (xShape.is())
-                            AddShape(xShape, pObj->GetLayer());
-                    }
-                    break;
-                    case HINT_OBJREMOVED :     // Zeichenobjekt aus Liste entfernt
-                    {
-                        uno::Reference<drawing::XShape> xShape (pObj->getUnoShape(), uno::UNO_QUERY);
-                        if (xShape.is())
-                            RemoveShape(xShape, pObj->GetLayer());
-                    }
-                    break;*/
                     default :
                     {
                         // other events are not interesting
@@ -1201,144 +1186,6 @@ void ScShapeChilds::FillShapes(const Rectangle& aPixelPaintRect, const MapMode&
     }
 }
 
-
-/*void ScShapeChilds::AddShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID)
-{
-    uno::Reference < XAccessible > xNew;
-    Window* pWin = mpViewShell->GetWindow();
-    if (pWin)
-    {
-        ScShapeRangeVec::iterator aEndItr = maShapeRanges.end();
-        ScShapeRangeVec::iterator aItr = maShapeRanges.begin();
-        sal_Bool bNotify(sal_False);
-        uno::Reference <XAccessible> xAcc;
-        while (aItr != aEndItr)
-        {
-            Rectangle aLogicPaintRect(pWin->PixelToLogic(aItr->maPixelRect, aItr->maMapMode));
-            Rectangle aRect(VCLPoint(xShape->getPosition()), VCLSize(xShape->getSize()));
-            if(!aRect.GetIntersection(aLogicPaintRect).IsEmpty())
-            {
-                ScShapeChild aShape;
-                aShape.mxShape = xShape;
-                switch (aLayerID)
-                {
-                    case SC_LAYER_INTERN:
-                    case SC_LAYER_FRONT:
-                    {
-                        SetAnchor(aShape);
-                        aItr->maForeShapes.push_back(aShape);
-                        std::sort(aItr->maForeShapes.begin(), aItr->maForeShapes.end(),ScShapeChildLess());
-
-                    }
-                    break;
-                    case SC_LAYER_BACK:
-                    {
-                        aItr->maBackShapes.push_back(aShape);
-                        std::sort(aItr->maBackShapes.begin(), aItr->maBackShapes.end(),ScShapeChildLess());
-                    }
-                    break;
-                    case SC_LAYER_CONTROLS:
-                    {
-                        SetAnchor(aShape);
-                        aItr->maControls.push_back(aShape);
-                        std::sort(aItr->maControls.begin(), aItr->maControls.end(),ScShapeChildLess());
-                    }
-                    break;
-                    default:
-                    {
-                        DBG_ERRORFILE("I don't know this layer.");
-                    }
-                    break;
-                }
-                if (bNotify)
-                {
-                    xAcc = GetAccShape(aShape);
-                    AccessibleEventObject aEvent;
-                    aEvent.Source = uno::Reference<XAccessibleContext> (mpAccDoc);
-                    aEvent.EventId = AccessibleEventId::CHILD;
-                    aEvent.NewValue <<= xAcc;
-                    mpAccDoc->CommitChange(aEvent);
-                    bNotify = sal_False;
-                }
-                xAcc = NULL;
-            }
-            ++aItr;
-        }
-    }
-}*/
-
-/*sal_Bool HaveToNotify(uno::Reference<XAccessible>& xAcc, ScShapeChildVec::iterator aItr)
-{
-    sal_Bool bResult(sal_False);
-    if (aItr->mpAccShape)
-    {
-        bResult = sal_True;
-        xAcc = aItr->mpAccShape;
-    }
-    else
-        DBG_ERRORFILE("No Accessible object found. Don't know how to notify.");
-    return bResult;
-}*/
-
-/*void ScShapeChilds::RemoveShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID)
-{
-    ScShapeRangeVec::iterator aEndItr = maShapeRanges.end();
-    ScShapeRangeVec::iterator aItr = maShapeRanges.begin();
-    ScShapeChildVec::iterator aEraseItr;
-    sal_Bool bNotify(sal_False);
-    uno::Reference <XAccessible> xAcc;
-    while (aItr != aEndItr)
-    {
-        switch (aLayerID)
-        {
-            case SC_LAYER_INTERN:
-            case SC_LAYER_FRONT:
-            {
-                if (FindShape(aItr->maForeShapes, xShape, aEraseItr))
-                {
-                    bNotify = HaveToNotify(xAcc, aEraseItr);
-                    aItr->maForeShapes.erase(aEraseItr);
-                }
-            }
-            break;
-            case SC_LAYER_BACK:
-            {
-                if (FindShape(aItr->maBackShapes, xShape, aEraseItr))
-                {
-                    bNotify = HaveToNotify(xAcc, aEraseItr);
-                    aItr->maBackShapes.erase(aEraseItr);
-                }
-            }
-            break;
-            case SC_LAYER_CONTROLS:
-            {
-                if (FindShape(aItr->maControls, xShape, aEraseItr))
-                {
-                    bNotify = HaveToNotify(xAcc, aEraseItr);
-                    aItr->maControls.erase(aEraseItr);
-                }
-            }
-            break;
-            default:
-            {
-                DBG_ERRORFILE("I don't know this layer.");
-            }
-            break;
-        }
-        if (bNotify)
-        {
-            AccessibleEventObject aEvent;
-            aEvent.Source = uno::Reference<XAccessibleContext> (mpAccDoc);
-            aEvent.EventId = AccessibleEventId::CHILD;
-            aEvent.OldValue <<= xAcc;
-            mpAccDoc->CommitChange(aEvent);
-            bNotify = sal_False;
-        }
-        xAcc = NULL;
-        ++aItr;
-    }
-}*/
-
 SdrPage* ScShapeChilds::GetDrawPage() const
 {
     SCTAB nTab( mpViewShell->GetLocationData().GetPrintTab() );
@@ -1431,8 +1278,6 @@ ScAccessibleDocumentPagePreview::ScAccessibleDocumentPagePreview(
     if (pViewShell)
         pViewShell->AddAccessibilityObject(*this);
 
-//    GetNotesChilds(); not neccessary and reduces the creation performance
-//    GetShapeChilds();
 }
 
 ScAccessibleDocumentPagePreview::~ScAccessibleDocumentPagePreview(void)
@@ -1592,19 +1437,6 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
                 const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
                 ScPagePreviewCountData aCount( rData, mpViewShell->GetWindow(), GetNotesChilds(), GetShapeChilds() );
 
-/*		        if ( rData.HasCellsInRange( Rectangle( rPoint, rPoint ) ) )
-                {
-                    if ( !mpTable && (aCount.nTables > 0) )
-                    {
-                        //!	order is background shapes, header, table or notes, footer, foreground shapes, controls
-                        sal_Int32 nIndex (aCount.nBackShapes + aCount.nHeaders);
-
-                        mpTable = new ScAccessiblePreviewTable( this, mpViewShell, nIndex );
-                        mpTable->acquire();
-                        mpTable->Init();
-                    }
-                    xAccessible = mpTable;
-                }*/
                 if ( !mpTable && (aCount.nTables > 0) )
                 {
                     //!	order is background shapes, header, table or notes, footer, foreground shapes, controls
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index d0fb20d..706b965 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -172,31 +172,6 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnCount() throw (u
 rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleRowDescription( sal_Int32 nRow )
                                 throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
 {
-    // is not supported or specified so not implemented
-/*	SolarMutexGuard aGuard;
-    IsObjectValid();
-
-    FillTableInfo();
-
-    rtl::OUString sName;
-    if ( mpTableInfo && nRow >= 0 && nRow < mpTableInfo->GetRows() )
-    {
-        const ScPreviewColRowInfo& rInfo = mpTableInfo->GetRowInfo()[nRow];
-        if ( rInfo.bIsHeader )
-        {
-            //!	name of column headers row?
-
-            sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Column Headers"));
-        }
-        else
-        {
-            // normal row name
-            sName = rtl::OUString::valueOf( (sal_Int32) ( rInfo.nDocIndex + 1 ) );
-        }
-    }
-    else
-        throw lang::IndexOutOfBoundsException();*/
-
     SolarMutexGuard aGuard;
     FillTableInfo();
     if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
@@ -208,31 +183,6 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleRowDescription( sa
 rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription( sal_Int32 nColumn )
                                 throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
 {
-    // is not supported or specified so not implemented
-/*	SolarMutexGuard aGuard;
-    IsObjectValid();
-
-    FillTableInfo();
-
-    rtl::OUString sName;
-    if ( mpTableInfo && nColumn >= 0 && nColumn < mpTableInfo->GetCols() )
-    {
-        const ScPreviewColRowInfo& rInfo = mpTableInfo->GetColInfo()[nColumn];
-        if ( rInfo.bIsHeader )
-        {
-            //!	name of row headers column?
-
-            sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Row Headers"));
-        }
-        else
-        {
-            // normal column name
-            sName = ScColToAlpha( rInfo.nDocIndex );
-        }
-    }
-    else
-        throw lang::IndexOutOfBoundsException();*/
-
     SolarMutexGuard aGuard;
     FillTableInfo();
     if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
@@ -670,18 +620,6 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessiblePreviewTable::getImplementationId()
                     throw (uno::RuntimeException)
 {
     String sDesc(ScResId(STR_ACC_TABLE_DESCR));
-/*    if (mpViewShell && mpViewShell->GetDocument())
-    {
-        FillTableInfo();
-
-        if ( mpTableInfo )
-        {
-            String sCoreName;
-            if (mpViewShell->GetDocument()->GetName( mpTableInfo->GetTab(), sCoreName ))
-                sDesc.SearchAndReplaceAscii("%1", sCoreName);
-        }
-    }
-    sDesc.SearchAndReplaceAscii("%2", String(ScResId(SCSTR_UNKNOWN)));*/
     return rtl::OUString(sDesc);
 }
 
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index bf0ef10..21e206a 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -355,10 +355,6 @@ uno::Reference< XAccessible > SAL_CALL
     throw (uno::RuntimeException)
 {
     String sDesc(ScResId(STR_ACC_TABLE_DESCR));
-/*	String sCoreName;
-    if (mpDoc && mpDoc->GetName( maRange.aStart.Tab(), sCoreName ))
-        sDesc.SearchAndReplaceAscii("%1", sCoreName);
-    sDesc.SearchAndReplaceAscii("%2", String(ScResId(SCSTR_UNKNOWN)));*/
     return rtl::OUString(sDesc);
 }
 
@@ -402,8 +398,7 @@ sal_Bool SAL_CALL
         ScAccessibleTableBase::isAccessibleChildSelected( sal_Int32 nChildIndex )
         throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
 {
-    // I don't need to guard, because the called funtions have a guard
-//    SolarMutexGuard aGuard;
+    // I don't need to guard, because the called functions have a guard
     if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount())
         throw lang::IndexOutOfBoundsException();
     return isAccessibleSelected(getAccessibleRow(nChildIndex), getAccessibleColumn(nChildIndex));
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 0ff9186..d6f7970 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -804,47 +804,7 @@ void ScAccessibleCellTextData::GetCellText(const ScAddress& rCellPos, String& rT
 
 SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
 {
-/*	sal_Bool bHasForwarder(sal_False);
-    if (mpViewShell && mpViewShell->GetViewData() &&
-        (mpViewShell->GetViewData()->GetCurPos() == aCellPos) &&
-        (mpViewShell->GetViewData()->HasEditView(meSplitPos)) &&
-        (mpViewShell->GetViewData()->GetEditViewCol() == aCellPos.Col()) &&
-        (mpViewShell->GetViewData()->GetEditViewRow() == aCellPos.Row()))
-    {
-        if (!mbViewEditEngine)
-        {
-            if (pForwarder)
-                DELETEZ( pForwarder );
-            if (pEditEngine)
-                DELETEZ( pEditEngine );
-
-                SCCOL nCol;
-                SCROW nRow;
-                EditView* pEditView;
-            mpViewShell->GetViewData()->GetEditView( meSplitPos, pEditView, nCol, nRow );
-            if (pEditView)
-            {
-                pEditEngine = (ScFieldEditEngine*)pEditView->GetEditEngine();
-                pForwarder = new SvxEditEngineForwarder(*pEditEngine);
-                bHasForwarder = sal_True;
-            }
-        }
-        else
-            bHasForwarder = sal_True;
-    }
-    else if (mbViewEditEngine)
-    {
-        // remove Forwarder created with EditEngine from EditView
-        if (pForwarder)
-            DELETEZ( pForwarder );
-        pEditEngine->SetNotifyHdl(Link());
-        // don't delete, because it is the EditEngine of the EditView
-        pEditEngine = NULL;
-        mbViewEditEngine = sal_False;
-    }
-
-    if (!bHasForwarder)*/
-        ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
+    ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
 
     ScDocument* pDoc = ( pDocShell ? pDocShell->GetDocument() : NULL );
     if ( pDoc && pEditEngine && mpViewShell )
@@ -1254,8 +1214,6 @@ SvxEditViewForwarder* ScAccessibleEditLineTextData::GetEditViewForwarder( sal_Bo
             {
                 pTxtWnd->StartEditEngine();
                 pTxtWnd->GrabFocus();
-//		        pTxtWnd->SetTextString( rText );
-//		        pTxtWnd->GetEditView()->SetSelection( rSel );
 
                 mpEditView = pTxtWnd->GetEditView();
             }


More information about the Libreoffice-commits mailing list