[Libreoffice-commits] .: 2 commits - sc/inc sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Mon Jun 18 03:09:09 PDT 2012


 sc/inc/scabstdlg.hxx                      |    2 +-
 sc/source/filter/oox/formulaparser.cxx    |    2 +-
 sc/source/filter/xml/xmlexprt.cxx         |    2 --
 sc/source/ui/attrdlg/scdlgfact.cxx        |    4 ++--
 sc/source/ui/attrdlg/scdlgfact.hxx        |    2 +-
 sc/source/ui/condformat/colorformat.cxx   |   11 +++++++----
 sc/source/ui/condformat/condformatdlg.cxx |    2 +-
 sc/source/ui/inc/colorformat.hxx          |    4 ++--
 sc/source/ui/inc/condformatdlg.hxx        |    1 -
 sc/source/ui/view/cellsh1.cxx             |    8 +++++---
 10 files changed, 20 insertions(+), 18 deletions(-)

New commits:
commit e8d8e9eb7c82744c69d6c25fab9bf318caafa59a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Jun 17 11:15:49 2012 +0200

    fix the number detection in data bar dialog
    
    Change-Id: I6da7b2087114b7eb274f0a62dd531dd136ad507a

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 496ab89..921773a 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -362,7 +362,7 @@ public:
     virtual AbstractScCondFormatDlg* CreateScCondFormatDlg (Window* pParent, ScDocument* pDoc, const ScConditionalFormat* pFormat,
                                                                 const ScRangeList& rList, const ScAddress& rPos, int nId ) = 0; //add for ScCondFormatDlg
 
-    virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent ,int nId ) = 0; //add for ScDataBarSettingsDlg
+    virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent, ScDocument* pDoc, int nId ) = 0; //add for ScDataBarSettingsDlg
 
     virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ) = 0; //add for ScDataPilotDatabaseDlg
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index ee142d3..01c3b08 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -794,13 +794,13 @@ AbstractScCondFormatDlg* ScAbstractDialogFactory_Impl::CreateScCondFormatDlg(Win
     return NULL;
 }
 
-AbstractScDataBarSettingsDlg* ScAbstractDialogFactory_Impl::CreateScDataBarSetttingsDlg(Window* pParent, int nId)
+AbstractScDataBarSettingsDlg* ScAbstractDialogFactory_Impl::CreateScDataBarSetttingsDlg(Window* pParent, ScDocument* pDoc, int nId)
 {
     ScDataBarSettingsDlg* pDlg = NULL;
     switch( nId )
     {
         case RID_SCDLG_DATABAR:
-            pDlg = new ScDataBarSettingsDlg( pParent );
+            pDlg = new ScDataBarSettingsDlg( pParent, pDoc );
             break;
         default:
             break;
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 8667db4..5fb36e1 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -432,7 +432,7 @@ public:
     virtual AbstractScCondFormatDlg* CreateScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormat* pFormat,
                                                                 const ScRangeList& rRange, const ScAddress& rPos, int nId ); //add for ScDataBarSettingsDlg
 
-    virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent ,int nId ); //add for ScDataBarSettingsDlg
+    virtual AbstractScDataBarSettingsDlg* CreateScDataBarSetttingsDlg (Window* pParent, ScDocument* pDoc, int nId ); //add for ScDataBarSettingsDlg
 
     virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ); //add for ScDataPilotDatabaseDlg
 
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index d8d15a9..7093bb1 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -30,12 +30,13 @@
 #include "colorscale.hxx"
 
 #include "colorformat.hrc"
+#include "document.hxx"
 
 #include <svx/xtable.hxx>
 #include <svx/drawitem.hxx>
 #include <vcl/msgbox.hxx>
 
-ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow):
+ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, ScDocument* pDoc):
     ModalDialog( pWindow, ScResId( RID_SCDLG_DATABAR ) ),
     maBtnOk( this, ScResId( BTN_OK ) ),
     maBtnCancel( this, ScResId( BTN_CANCEL ) ),
@@ -55,7 +56,8 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow):
     maLbTypeMax( this, ScResId( LB_TYPE ) ),
     maLbAxisPos( this, ScResId( LB_AXIS_POSITION ) ),
     maEdMin( this, ScResId( ED_MIN ) ),
-    maEdMax( this, ScResId( ED_MAX ) )
+    maEdMax( this, ScResId( ED_MAX ) ),
+    mpNumberFormatter( pDoc->GetFormatTable() )
 {
     Init();
     FreeResource();
@@ -127,7 +129,7 @@ void SetValue( ScColorScaleEntry* pEntry, Edit& aEdit)
 
 }
 
-ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarFormatData& rData):
+ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarFormatData& rData, ScDocument* pDoc):
     ModalDialog( pWindow, ScResId( RID_SCDLG_DATABAR ) ),
     maBtnOk( this, ScResId( BTN_OK ) ),
     maBtnCancel( this, ScResId( BTN_CANCEL ) ),
@@ -148,7 +150,8 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarForma
     maLbAxisPos( this, ScResId( LB_AXIS_POSITION ) ),
     maEdMin( this, ScResId( ED_MIN ) ),
     maEdMax( this, ScResId( ED_MAX ) ),
-    maStrWarnSameValue( SC_RESSTR( STR_WARN_SAME_VALUE ) )
+    maStrWarnSameValue( SC_RESSTR( STR_WARN_SAME_VALUE ) ),
+    mpNumberFormatter( pDoc->GetFormatTable() )
 {
     Init();
     FreeResource();
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index aa834ae..75a955f 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -894,7 +894,7 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, OptionBtnHdl )
 {
     SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), maLbDataBarMinType, maEdDataBarMin, mpDoc, maPos);
     SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), maLbDataBarMaxType, maEdDataBarMax, mpDoc, maPos);
-    ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this, *mpDataBarData);
+    ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this, *mpDataBarData, mpDoc);
     if( pDlg->Execute() == RET_OK)
     {
         mpDataBarData.reset(pDlg->GetData());
diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx
index c78321f..0811c4c 100644
--- a/sc/source/ui/inc/colorformat.hxx
+++ b/sc/source/ui/inc/colorformat.hxx
@@ -72,8 +72,8 @@ private:
     void Init();
 
 public:
-    ScDataBarSettingsDlg(Window* pParent);
-    ScDataBarSettingsDlg(Window* pParent, const ScDataBarFormatData& rData);
+    ScDataBarSettingsDlg(Window* pParent, ScDocument* pDoc);
+    ScDataBarSettingsDlg(Window* pParent, const ScDataBarFormatData& rData, ScDocument* pDoc);
 
     ScDataBarFormatData* GetData();
 };
diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx
index d7fb699..d7b10e1 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -123,7 +123,6 @@ private:
 
     ScDocument* mpDoc;
     ScAddress maPos;
-    SvNumberFormatter* mpNumberFormatter;
 
     DECL_LINK( TypeListHdl, void*);
     DECL_LINK( ColFormatTypeHdl, void*);
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index c0a59a9..ca84b2b 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2058,7 +2058,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 ScRangeList aRangeList;
                 ScViewData* pData = GetViewData();
                 pData->GetMarkData().FillRangeListWithMarks(&aRangeList, false);
-                ScDocument* pDoc = GetViewData()->GetDocument();
+                ScDocument* pDoc = pData->GetDocument();
 
                 ScAddress aPos(pData->GetCurX(), pData->GetCurY(), pData->GetTabNo());
                 AbstractScCondFormatDlg* pDlg = NULL;
@@ -2089,7 +2089,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
                 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-                AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DATABAR );
+                ScDocument* pDoc = GetViewData()->GetDocument();
+                AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), pDoc, RID_SCDLG_DATABAR );
                 OSL_ENSURE(pDlg, "Dialog create fail!");
                 pDlg->Execute();
                 delete pDlg;
@@ -2101,7 +2102,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
                 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-                AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DATABAR );
+                ScDocument* pDoc = GetViewData()->GetDocument();
+                AbstractScDataBarSettingsDlg* pDlg = pFact->CreateScDataBarSetttingsDlg( pTabViewShell->GetDialogParent(), pDoc, RID_SCDLG_DATABAR );
                 OSL_ENSURE(pDlg, "Dialog create fail!");
                 if(pDlg->Execute() == RET_OK)
                 {
commit a87676e32e0dce6bcc8f3cbe0c50f75555f28f3c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Jun 16 13:35:48 2012 +0200

    remove two cppcheck warnings in sc
    
    Change-Id: Id22cfeab7c39c37a10d5508b7f0479f3fdc784a3

diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index a4e5f71..db95b1f 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -2608,7 +2608,7 @@ void BiffFormulaParserImpl::skipMemAreaAddData( BiffInputStream& rStrm )
 
 bool BiffFormulaParserImpl::readNlrSAddrAddData( BiffNlr& orNlr, BiffInputStream& rStrm, bool bRow )
 {
-    bool bIsRow;
+    bool bIsRow = false;
     return readNlrSRangeAddData( orNlr, bIsRow, rStrm ) && (bIsRow == bRow);
 }
 
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index bb4d6fc..56d3538 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -638,8 +638,6 @@ public:
 
 void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCount, const sal_Int32 nCellCount)
 {
-    ProgressBarUpdater(*GetProgressBarHelper(), nTableCount, nShapesCount, nCellCount);
-
     if (!GetModel().is())
         return;
 


More information about the Libreoffice-commits mailing list