[Libreoffice-commits] .: sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jan 11 13:40:46 PST 2011


 sc/source/filter/xml/xmlexprt.cxx |   99 --------------------------------------
 sc/source/ui/drawfunc/futext.cxx  |   67 -------------------------
 sc/source/ui/optdlg/opredlin.cxx  |   48 ------------------
 3 files changed, 214 deletions(-)

New commits:
commit 67cb48eb9c9dbfcac7614ac51ccf48a6a024c83e
Author: Anders Jonsson <anders.jonsson at norsjonet.se>
Date:   Tue Jan 11 22:17:44 2011 +0100

    Remove commented code

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 1c62691..9799058 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1967,10 +1967,6 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed )
             if (pSharedData->HasShapes())
             {
                 GetShapeExport()->ExportGraphicDefaults();
-/*				xInterface = xMultiServiceFactory->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults")));
-                uno::Reference <beans::XPropertySet> xDrawProperties(xInterface, uno::UNO_QUERY);
-                if (xDrawProperties.is())
-                    aStylesExp.exportDefaultStyle(xDrawProperties, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), GetShapeExport()->CreateShapePropMapper(*this));*/
             }
         }
         uno::Reference <style::XStyleFamiliesSupplier> xStyleFamiliesSupplier (GetModel(), uno::UNO_QUERY);
@@ -2849,44 +2845,6 @@ sal_Bool ScXMLExport::IsMatrix (const ScAddress& aCell,
     }
 
     return sal_False;
-
-/*	uno::Reference <sheet::XArrayFormulaRange> xArrayFormulaRange (xCell, uno::UNO_QUERY);
-    if (xArrayFormulaRange.is())
-    {
-        rtl::OUString sArrayFormula(xArrayFormulaRange->getArrayFormula());
-        if (sArrayFormula.getLength())
-        {
-            uno::Reference<sheet::XSheetCellRange> xMatrixSheetCellRange (xCell, uno::UNO_QUERY);
-            if (xMatrixSheetCellRange.is())
-            {
-                uno::Reference<sheet::XSheetCellCursor> xMatrixSheetCursor(xTable->createCursorByRange(xMatrixSheetCellRange));
-                if (xMatrixSheetCursor.is())
-                {
-                    xMatrixSheetCursor->collapseToCurrentArray();
-                    uno::Reference<sheet::XCellRangeAddressable> xMatrixCellAddress (xMatrixSheetCursor, uno::UNO_QUERY);
-                    if (xMatrixCellAddress.is())
-                    {
-                        aCellAddress = xMatrixCellAddress->getRangeAddress();
-                        if ((aCellAddress.StartColumn == nCol && aCellAddress.StartRow == nRow) &&
-                            (aCellAddress.EndColumn > nCol || aCellAddress.EndRow > nRow))
-                        {
-                            bIsFirst = sal_True;
-                            return sal_True;
-                        }
-                        else if (aCellAddress.StartColumn != nCol || aCellAddress.StartRow != nRow ||
-                            aCellAddress.EndColumn != nCol || aCellAddress.EndRow != nRow)
-                            return sal_True;
-                        else
-                        {
-                            bIsFirst = sal_True;
-                            return sal_True;
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return sal_False;*/
 }
 
 sal_Bool ScXMLExport::GetCellText (ScMyCell& rMyCell, const ScAddress& aPos) const
@@ -2895,17 +2853,9 @@ sal_Bool ScXMLExport::GetCellText (ScMyCell& rMyCell, const ScAddress& aPos) con
         return sal_True;
     else
     {
-/*		if (!rMyCell.bHasXText)
-        {
-            rMyCell.xText.set(xCurrentTableCellRange->getCellByPosition(rMyCell.aCellAddress.Column, rMyCell.aCellAddress.Row), uno::UNO_QUERY);
-            rMyCell.bHasXText = sal_True;
-        }*/
-//		if (rMyCell.xText.is())
-//		{
             rMyCell.sStringValue = ScCellObj::GetOutputString_Impl(pDoc, aPos);
             rMyCell.bHasStringValue = sal_True;
             return sal_True;
-//		}
     }
 }
 
@@ -3199,15 +3149,6 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
 //BM 						}
 //BM 					}
 
-/*					SchMemChart* pMemChart = pDoc->FindChartData(sName);
-                    if (pMemChart && pMemChart->GetSeriesAddresses().getLength())
-                    {
-                        bMemChart = sal_True;
-                        rtl::OUString sRanges(pMemChart->getXMLStringForChartRange());
-                        if (sRanges.getLength())
-                            AddAttribute(XML_NAMESPACE_DRAW, XML_NOTIFY_ON_UPDATE_OF_RANGES, sRanges);
-                        GetShapeExport()->exportShape(xShape, SEF_EXPORT_NO_CHART_DATA | SEF_DEFAULT, pPoint);
-                    }*/
                 }
             }
         }
@@ -3403,46 +3344,6 @@ void ScXMLExport::WriteAnnotation(ScMyCell& rMyCell)
 {
     if( rMyCell.bHasAnnotation && rMyCell.xAnnotation.is())
     {
-/*		rtl::OUString sAuthor(rMyCell.xAnnotation->getAuthor());
-        if (sAuthor.getLength())
-        {
-            SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC,
-                                                XML_CREATOR, sal_True,
-                                                sal_False );
-            rtl::OUString sAuthor(sAuthor);
-            Characters(sAuthor);
-        }
-
-        String aDate(rMyCell.xAnnotation->getDate());
-        if (pDoc)
-        {
-            SvNumberFormatter* pNumForm(pDoc->GetFormatTable());
-            double fDate;
-            sal_uInt32 nfIndex = pNumForm->GetFormatIndex(NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM);
-            if (pNumForm->IsNumberFormat(aDate, nfIndex, fDate))
-            {
-                rtl::OUStringBuffer sBuf;
-                GetMM100UnitConverter().convertDateTime(sBuf, fDate);
-                SvXMLElementExport aDateElem( *this, XML_NAMESPACE_DC,
-                                                XML_DATE, sal_True,
-                                                sal_False );
-                Characters(sBuf.makeStringAndClear());
-            }
-            else
-            {
-                SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META,
-                                                XML_DATE_STRING, sal_True,
-                                                sal_False );
-                Characters(rtl::OUString(aDate));
-            }
-        }
-        else
-        {
-            SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META,
-                                            XML_DATE_STRING, sal_True,
-                                            sal_False );
-            Characters(rtl::OUString(aDate));
-        }*/
 
         if (rMyCell.xAnnotation->getIsVisible())
             AddAttribute(XML_NAMESPACE_OFFICE, XML_DISPLAY, XML_TRUE);
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index e73c428..60cabce 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -366,9 +366,6 @@ BOOL FuText::MouseMove(const MouseEvent& rMEvt)
 
     if ( pView->IsAction() )
     {
-/*		aNewPointer = Pointer(POINTER_TEXT);
-        pViewShell->SetActivePointer(aNewPointer);
-*/
         Point aPix(rMEvt.GetPosPixel());
         Point aPnt(pWindow->PixelToLogic(aPix));
 
@@ -524,49 +521,6 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
 void FuText::ForcePointer(const MouseEvent* /* pMEvt */)
 {
     pViewShell->SetActivePointer( aNewPointer );
-
-/*
-    if ( !pView->IsAction() )
-    {
-        Point aPnt(pWindow->PixelToLogic( pWindow->ScreenToOutputPixel(
-                   Pointer::GetPosPixel() ) ) );
-        SdrHdl* pHdl=pView->HitHandle(aPnt, *pWindow);
-
-        if (pHdl!=NULL)
-        {
-            pViewShell->SetActivePointer(pHdl->GetPointer() );
-        }
-        else
-        {
-            SdrObject* pObj;
-            SdrPageView* pPV;
-
-            if ( pView->IsMarkedHit(aPnt) )
-            {
-                if ( pView->TakeTextEditObject(aPnt, pObj, pPV) )
-                {
-                    pViewShell->SetActivePointer(Pointer(POINTER_TEXT));
-                }
-                else
-                {
-                    pViewShell->SetActivePointer(Pointer(POINTER_MOVE));
-                }
-            }
-            else
-            {
-//				if ( pView->TakeMacroObject(aPnt, pObj, pPV) )
-                if ( pView->PickObj(aPnt, pObj, pPV, SDRSEARCH_PICKMACRO) )
-                {
-                    pViewShell->SetActivePointer( pObj->GetMacroPointer() );
-                }
-                else
-                {
-                    pViewShell->SetActivePointer( aNewPointer );
-                }
-            }
-        }
-    }
-*/
 }
 
 
@@ -622,17 +576,12 @@ void FuText::Activate()
         **********************************************************************/
         USHORT nObj = OBJ_TEXT;
 
-/*		UINT16 nIdent;
-        UINT32 nInvent;
-        pView->TakeCurrentObj(nIdent, nInvent);
-*/
         pView->SetCurrentObj(nObj);
 
         pView->SetCreateMode();
     }
 
     aNewPointer = Pointer(POINTER_TEXT);
-//	aNewPointer = Pointer(POINTER_CROSS);				//! ???
 
     aOldPointer = pWindow->GetPointer();
     pViewShell->SetActivePointer( aNewPointer );
@@ -701,22 +650,6 @@ void FuText::SelectionHasChanged()
         UINT32 nInvent;
         pView->TakeCurrentObj(nIdent, nInvent);
 
-//		  if (! pView->IsEditMode() )
-//		  {
-//			  if (nIdent == OBJ_TEXT)
-//			  {
-//				  nObj = OBJ_TEXT;
-//			  }
-//			  else if (nIdent == OBJ_OUTLINETEXT)
-//			  {
-//				  nObj = OBJ_OUTLINETEXT;
-//			  }
-//			  else if (nIdent == OBJ_TITLETEXT)
-//			  {
-//				  nObj = OBJ_TITLETEXT;
-//			  }
-//		  }
-
         pView->SetCurrentObj(nObj);
 
         pView->SetCreateMode();
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 3199c47..d69108f 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -221,54 +221,6 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
 
 IMPL_LINK( ScRedlineOptionsTabPage, ColorHdl, ColorListBox *, EMPTYARG )
 {
-/*
-    SvxFontPrevWindow *pPrev;
-    ListBox *pLB;
-
-    if (pColorLB == &aInsertColorLB)
-    {
-        pPrev = &aInsertPreviewWN;
-        pLB = &aInsertLB;
-    }
-    else
-    {
-        pPrev = &aDeletedPreviewWN;
-        pLB = &aDeletedLB;
-    }
-
-    SvxFont& rFont = pPrev->GetFont();
-    USHORT nPos = pLB->GetSelectEntryPos();
-    if (nPos == LISTBOX_ENTRY_NOTFOUND)
-        nPos = 0;
-
-    CharAttr *pAttr = (CharAttr *)pLB->GetEntryData(nPos);
-
-    if (pAttr->nItemId == SID_ATTR_BRUSH)
-    {
-        rFont.SetColor(Color(COL_BLACK));
-        nPos = pColorLB->GetSelectEntryPos();
-        if (nPos && nPos != LISTBOX_ENTRY_NOTFOUND)
-        {
-            Brush aBrush(Color(pColorLB->GetSelectEntryColor()));
-            pPrev->SetBrush(aBrush);
-        }
-        else
-        {
-            Brush aBrush(Color(COL_LIGHTGRAY));
-            pPrev->SetBrush(aBrush);
-        }
-    }
-    else
-    {
-        nPos = pColorLB->GetSelectEntryPos();
-        if (nPos && nPos != LISTBOX_ENTRY_NOTFOUND)
-            rFont.SetColor(pColorLB->GetEntryColor(nPos));
-        else
-            rFont.SetColor(Color(COL_RED));
-    }
-
-    pPrev->Invalidate();
-*/
     return 0;
 }
 


More information about the Libreoffice-commits mailing list