diff options
-rw-r--r-- | sc/source/core/data/markarr.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/data/patattr.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.hxx | 24 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk2.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh3.cxx | 10 |
7 files changed, 23 insertions, 39 deletions
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx index ba7c0ce77454..c9a7182d8fd6 100644 --- a/sc/source/core/data/markarr.cxx +++ b/sc/source/core/data/markarr.cxx @@ -77,14 +77,13 @@ void ScMarkArray::Reset( BOOL bMarked ) BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const { - long nLo = 0; long nHi = static_cast<long>(nCount) - 1; - long nStartRow = 0; - long nEndRow = 0; long i = 0; BOOL bFound = (nCount == 1); if (pData) { + long nLo = 0; + long nStartRow = 0; while ( !bFound && nLo <= nHi ) { i = (nLo + nHi) / 2; @@ -92,7 +91,7 @@ BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const nStartRow = (long) pData[i - 1].nRow; else nStartRow = -1; - nEndRow = (long) pData[i].nRow; + long nEndRow = (long) pData[i].nRow; if (nEndRow < (long) nRow) nLo = ++i; else diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index de590cd41d1c..301e1e792fab 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -168,12 +168,12 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersion */ ) c { String* pStr; BOOL bHasStyle; - short eFamDummy; rStream >> bHasStyle; if ( bHasStyle ) { + short eFamDummy; pStr = new String; rStream.ReadByteString( *pStr, rStream.GetStreamCharSet() ); rStream >> eFamDummy; // wg. altem Dateiformat diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 5a1c744074be..d9a01798a4c3 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2920,8 +2920,11 @@ void ScXMLExport::WriteCell (ScMyCell& aCell) pDoc->GetValue( aCellPos )); } else - GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes( + { + if (pDoc) + GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes( aCell.nNumberFormat, pDoc->GetValue( aCellPos )); + } } else { diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index 7f26f9b656ec..fc970bb705fb 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -684,17 +684,12 @@ class ScXMLImport: public SvXMLImport rtl::OUString sStandardFormat; rtl::OUString sType; -// SvXMLAutoStylePoolP *pScAutoStylePool; UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory; UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper; UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper; UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper; UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper; -// SvXMLImportContextRef xStyles; -// SvXMLImportContextRef xAutoStyles; -// SvXMLImportItemMapper *pParaItemMapper;// paragraph item import -// SvI18NMap *pI18NMap; // name mapping for I18N SvXMLTokenMap *pDocElemTokenMap; SvXMLTokenMap *pStylesElemTokenMap; SvXMLTokenMap *pStylesAttrTokenMap; @@ -823,8 +818,6 @@ public: const ::rtl::OUString& rLocalName ); SvXMLImportContext *CreateStylesContext(const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList, sal_Bool bAutoStyles ); -// SvXMLImportContext *CreateUseStylesContext(const ::rtl::OUString& rLocalName , -// const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); SvXMLImportContext *CreateBodyContext( const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -844,21 +837,10 @@ public: sal_Int16 GetCellType(const ::rtl::OUString& rStrValue) const; -// SvI18NMap& GetI18NMap() { return *pI18NMap; } - -// inline const SvXMLImportItemMapper& GetParaItemMapper() const; -// SvXMLImportContext *CreateParaItemImportContext( USHORT nPrefix, -// const ::rtl::OUString& rLocalName, -// const ::com::sun::star::uno::Reference< -// ::com::sun::star::xml::sax::XAttributeList& xAttrList, -// SfxItemSet& rItemSet ); - UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; } UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; } UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; } UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; } -// SvXMLImportContextRef GetAutoStyles() const { return xAutoStyles; } -// SvXMLImportContextRef GetStyles() const { return xStyles; } const SvXMLTokenMap& GetDocElemTokenMap(); const SvXMLTokenMap& GetBodyElemTokenMap(); @@ -924,11 +906,6 @@ public: const SvXMLTokenMap& GetDataPilotMembersElemTokenMap(); const SvXMLTokenMap& GetDataPilotMemberAttrTokenMap(); const SvXMLTokenMap& GetConsolidationAttrTokenMap(); -// const SvXMLTokenMap& GetTextPElemTokenMap(); -// const SvXMLTokenMap& GetTextPAttrTokenMap(); -// const SvXMLTokenMap& GetStyleStylesElemTokenMap(); -// const SvXMLTokenMap& GetTextListBlockAttrTokenMap(); -// const SvXMLTokenMap& GetTextListBlockElemTokenMap(); void AddNamedExpression(const ScMyNamedExpression* pMyNamedExpression) { if (!pMyNamedExpressions) @@ -996,7 +973,6 @@ public: // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::xml::sax::XDocumentHandler virtual void SAL_CALL startDocument(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL endDocument(void) diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 60f37ca18602..afa0916ba0d1 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -885,12 +885,14 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, nCol, nAttrRow, nDestTab ); DBG_ASSERT(pSrcPattern,"Pattern ist 0"); if (pSrcPattern) + { pDoc->ApplyPatternAreaTab( nCol, nAttrRow, nCol, aLocalParam.nRow2, nDestTab, *pSrcPattern ); - const ScStyleSheet* pStyle = pSrcPattern->GetStyleSheet(); - if (pStyle) - pDoc->ApplyStyleAreaTab( nCol, nAttrRow, nCol, aLocalParam.nRow2, + const ScStyleSheet* pStyle = pSrcPattern->GetStyleSheet(); + if (pStyle) + pDoc->ApplyStyleAreaTab( nCol, nAttrRow, nCol, aLocalParam.nRow2, nDestTab, *pStyle ); + } } delete pAttribDoc; diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 2909f77ac9d1..fd5965acda0d 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -190,10 +190,10 @@ void ScUndoWidthOrHeight::Redo() SCTAB nTab = pViewShell->GetViewData()->GetTabNo(); if ( nTab < nStartTab || nTab > nEndTab ) pViewShell->SetTabNo( nStartTab ); - } - // SetWidthOrHeight aendert aktuelle Tabelle ! - pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData ); + // SetWidthOrHeight aendert aktuelle Tabelle ! + pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData ); + } // paint grid if selection was changed directly at the MarkData if (bPaintAll) diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 8bfb7b6bf9e5..ee89b3b74915 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -694,10 +694,14 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) pDlg = pFact->CreateSvxZoomDialog(GetDialogParent(), aSet ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); } - pDlg->SetLimits( MINZOOM, MAXZOOM ); - - bCancel = ( RET_CANCEL == pDlg->Execute() ); + if (pDlg) + { + pDlg->SetLimits( MINZOOM, MAXZOOM ); + bCancel = ( RET_CANCEL == pDlg->Execute() ); + } + // bCancel is True only if we were in the previous if block, + // so no need to check again pDlg if ( !bCancel ) { const SvxZoomItem& rZoomItem = (const SvxZoomItem&) |