summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-08-04 02:17:59 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-08-04 02:17:59 +0200
commite19909eaec928386690d5c9c6bed92e86a721b01 (patch)
tree66d5d6af3658ca4410f55b56816a0f43c357a6da /sc
parent148463fac3092de7eb22635c76740715f7ca3d3b (diff)
some clean-up
you need boost::nullable if you want to insert a null pointer in a boost::ptr_vector and it seems that ptr_vector::c_array isn't supported then
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/datafdlg.hxx4
-rw-r--r--sc/source/ui/inc/viewfunc.hxx3
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx3
-rw-r--r--sc/source/ui/view/viewfun3.cxx6
4 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index 3511261e5..6fda3212c 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -75,8 +75,8 @@ private:
SCTAB nTab;
bool bNoSelection;
- boost::ptr_vector<FixedText> maFixedTexts;
- boost::ptr_vector<Edit> maEdits;
+ boost::ptr_vector<boost::nullable<FixedText> > maFixedTexts;
+ boost::ptr_vector<boost::nullable<Edit> > maEdits;
public:
ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShell);
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 40147db40..50c9fd96d 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -41,6 +41,7 @@
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <vector>
+#include <boost/ptr_container/ptr_vector.hpp>
class ScPatternAttr;
class ScAutoFormatData;
@@ -342,7 +343,7 @@ public:
SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow ,
SCROW nStartRow , SCCOL nStartCol ,
SCROW nEndRow , SCCOL nEndCol ,
- Edit** pEdits ,
+ boost::ptr_vector<boost::nullable<Edit> >& aEdits,
sal_uInt16 aColLength );
// interne Hilfsfunktionen
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index ed8f7c3de..6e4f288af 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -119,7 +119,6 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
//skip leading hide column
for (int i=1;i<=MAX_DATAFORM_COLS;i++)
{
- String aColName;
int nColWidth = pDoc->GetColWidth( nStartCol, nTab );
if (nColWidth)
break;
@@ -298,7 +297,7 @@ IMPL_LINK( ScDataFormDlg, Impl_NewHdl, PushButton*, EMPTYARG )
if ( bHasData )
{
- pTabViewShell->DataFormPutData( aCurrentRow , nStartRow , nStartCol , nEndRow , nEndCol , maEdits.c_array() , aColLength );
+ pTabViewShell->DataFormPutData( aCurrentRow , nStartRow , nStartCol , nEndRow , nEndCol , maEdits , aColLength );
aCurrentRow++;
if (aCurrentRow >= nEndRow + 2)
{
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index d96ba1154..c0fdb2dcf 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1839,7 +1839,7 @@ sal_Bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPo
void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
SCROW nStartRow , SCCOL nStartCol ,
SCROW nEndRow , SCCOL nEndCol ,
- Edit** pEdits ,
+ boost::ptr_vector<boost::nullable<Edit> >& aEdits,
sal_uInt16 aColLength )
{
ScDocument* pDoc = GetViewData()->GetDocument();
@@ -1881,9 +1881,9 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
for(sal_uInt16 i = 0; i < aColLength; i++)
{
- if (pEdits[i])
+ if (!aEdits.is_null(i))
{
- String aFieldName=pEdits[i]->GetText();
+ String aFieldName=aEdits[i].GetText();
pDoc->SetString( nStartCol + i, nCurrentRow, nTab, aFieldName );
}
}