sc/inc/document.hxx | 10 +-- sc/source/core/data/documen2.cxx | 26 ++++---- sc/source/core/data/documen5.cxx | 42 ++++++------- sc/source/core/data/documen8.cxx | 42 ++++++------- sc/source/core/data/documen9.cxx | 122 +++++++++++++++++++-------------------- sc/source/core/data/document.cxx | 26 ++++---- 6 files changed, 134 insertions(+), 134 deletions(-)
New commits: commit 3ce229678a338b06f6d826a4c79cb80d79b51956 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Sep 12 12:35:04 2017 +0300 Prefix one more member of ScDocument: pDrawLayer Change-Id: I8b2fdca8a58db6c6633d7708ed42ca218799c53b diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index c9a68c40a74e..d9c7a42970ae 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -323,7 +323,7 @@ private: SfxObjectShell* mpShell; VclPtr<SfxPrinter> mpPrinter; VclPtr<VirtualDevice> mpVirtualDevice_100th_mm; - ScDrawLayer* pDrawLayer; // SdrModel + ScDrawLayer* mpDrawLayer; // SdrModel rtl::Reference<XColorList> pColorList; ScValidationDataList* pValidationList; // validity SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats @@ -933,8 +933,8 @@ public: SfxBindings* GetViewBindings(); SfxObjectShell* GetDocumentShell() const { return mpShell; } - SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return pDrawLayer; } - SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return pDrawLayer; } + SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return mpDrawLayer; } + SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer; } SfxBroadcaster* GetDrawBroadcaster(); // to avoid header void BeginDrawUndo(); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 8f2200d24df7..d6b7a03d14c0 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -141,7 +141,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : mpShell( pDocShell ), mpPrinter( nullptr ), mpVirtualDevice_100th_mm( nullptr ), - pDrawLayer( nullptr ), + mpDrawLayer( nullptr ), pValidationList( nullptr ), pFormatExchangeList( nullptr ), pRangeName(nullptr), @@ -628,7 +628,7 @@ bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { bool bAny = maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes ); - if (pDrawLayer) + if (mpDrawLayer) { ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab); if (DrawGetPrintArea( aDrawRange, true, true )) @@ -652,7 +652,7 @@ bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol ); - if (pDrawLayer) + if (mpDrawLayer) { ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab); if (DrawGetPrintArea( aDrawRange, true, false )) @@ -674,7 +674,7 @@ bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { bool bAny = maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes ); - if (pDrawLayer) + if (mpDrawLayer) { ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab); if (DrawGetPrintArea( aDrawRange, false, true )) @@ -695,7 +695,7 @@ bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { bool bAny = maTabs[nTab]->GetDataStart( rStartCol, rStartRow ); - if (pDrawLayer) + if (mpDrawLayer) { ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab); if (DrawGetPrintArea( aDrawRange, true, true )) @@ -810,8 +810,8 @@ bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress ) sc::SetFormulaDirtyContext aFormulaDirtyCxt; SetAllFormulasDirty(aFormulaDirtyCxt); - if (pDrawLayer) - pDrawLayer->ScMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) ); + if (mpDrawLayer) + mpDrawLayer->ScMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) ); bValid = true; } @@ -940,9 +940,9 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM sc::SetFormulaDirtyContext aFormulaDirtyCxt; SetAllFormulasDirty(aFormulaDirtyCxt); - if (pDrawLayer) // Skip cloning Note caption object + if (mpDrawLayer) // Skip cloning Note caption object // page is already created in ScTable ctor - pDrawLayer->ScCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) ); + mpDrawLayer->ScCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) ); if (pDPCollection) pDPCollection->CopyToTab(nOldPos, nNewPos); diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index d355241de1c9..4e11c3108c2f 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -107,7 +107,7 @@ static void lcl_SetChartParameters( const uno::Reference< chart2::data::XDataRec void ScDocument::UpdateAllCharts() { - if ( !pDrawLayer || !mpShell ) + if ( !mpDrawLayer || !mpShell ) return; if (pChartCollection->empty()) @@ -120,7 +120,7 @@ void ScDocument::UpdateAllCharts() { if (maTabs[nTab]) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -184,9 +184,9 @@ void ScDocument::UpdateAllCharts() bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName ) { - if (pDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) + if (mpDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -225,13 +225,13 @@ uno::Reference< chart2::XChartDocument > ScDocument::GetChartByName( const OUStr { uno::Reference< chart2::XChartDocument > xReturn; - if (pDrawLayer) + if (mpDrawLayer) { - sal_uInt16 nCount = pDrawLayer->GetPageCount(); + sal_uInt16 nCount = mpDrawLayer->GetPageCount(); SCTAB nSize = static_cast<SCTAB>(maTabs.size()); for (sal_uInt16 nTab=0; nTab<nCount && nTab < nSize; nTab++) { - SdrPage* pPage = pDrawLayer->GetPage(nTab); + SdrPage* pPage = mpDrawLayer->GetPage(nTab); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -290,13 +290,13 @@ void ScDocument::GetOldChartParameters( const OUString& rName, { // used for undo of changing chart source area - if (!pDrawLayer) + if (!mpDrawLayer) return; - sal_uInt16 nCount = pDrawLayer->GetPageCount(); + sal_uInt16 nCount = mpDrawLayer->GetPageCount(); for (sal_uInt16 nTab=0; nTab<nCount && nTab < static_cast<SCTAB>(maTabs.size()); nTab++) { - SdrPage* pPage = pDrawLayer->GetPage(nTab); + SdrPage* pPage = mpDrawLayer->GetPage(nTab); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -338,12 +338,12 @@ void ScDocument::UpdateChartArea( const OUString& rChartName, const ScRangeListRef& rNewList, bool bColHeaders, bool bRowHeaders, bool bAdd ) { - if (!pDrawLayer) + if (!mpDrawLayer) return; for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]; nTab++) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -420,7 +420,7 @@ void ScDocument::UpdateChartArea( const OUString& rChartName, void ScDocument::UpdateChart( const OUString& rChartName ) { - if (!pDrawLayer || bInDtorClear) + if (!mpDrawLayer || bInDtorClear) return; uno::Reference< chart2::XChartDocument > xChartDoc( GetChartByName( rChartName ) ); if( xChartDoc.is() ) @@ -480,7 +480,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz ) { - if (!pDrawLayer) + if (!mpDrawLayer) return; ScChartListenerCollection::ListenersType& rListeners = pChartListenerCollection->getListeners(); @@ -573,12 +573,12 @@ void ScDocument::SetChartRangeList( const OUString& rChartName, { // called from ChartListener - if (!pDrawLayer) + if (!mpDrawLayer) return; for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]; nTab++) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -624,16 +624,16 @@ bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ) uno::Reference< embed::XEmbeddedObject > ScDocument::FindOleObjectByName( const OUString& rName ) { - if (!pDrawLayer) + if (!mpDrawLayer) return uno::Reference< embed::XEmbeddedObject >(); // take the pages here from Draw-Layer, as they might not match with the tables // (e.g. delete Redo of table; Draw-Redo happens before DeleteTab) - sal_uInt16 nCount = pDrawLayer->GetPageCount(); + sal_uInt16 nCount = mpDrawLayer->GetPageCount(); for (sal_uInt16 nTab=0; nTab<nCount; nTab++) { - SdrPage* pPage = pDrawLayer->GetPage(nTab); + SdrPage* pPage = mpDrawLayer->GetPage(nTab); OSL_ENSURE(pPage,"Page ?"); SdrObjListIter aIter( *pPage, SdrIterMode::DeepNoGroups ); @@ -661,7 +661,7 @@ void ScDocument::UpdateChartListenerCollection() assert(pChartListenerCollection); bChartListenerCollectionNeedsUpdate = false; - if (!pDrawLayer) + if (!mpDrawLayer) return; for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++) @@ -669,7 +669,7 @@ void ScDocument::UpdateChartListenerCollection() if (!maTabs[nTab]) continue; - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (!pPage) diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 51be5a47fa1c..ba71a58fb4e1 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -62,21 +62,21 @@ using namespace ::com::sun::star; SfxBroadcaster* ScDocument::GetDrawBroadcaster() { - return pDrawLayer; + return mpDrawLayer; } void ScDocument::BeginDrawUndo() { - if (pDrawLayer) - pDrawLayer->BeginCalcUndo(false); + if (mpDrawLayer) + mpDrawLayer->BeginCalcUndo(false); } void ScDocument::TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos) { - if (pDrawLayer && pSrcDoc->pDrawLayer) + if (mpDrawLayer && pSrcDoc->mpDrawLayer) { - SdrPage* pOldPage = pSrcDoc->pDrawLayer->GetPage(static_cast<sal_uInt16>(nSrcPos)); - SdrPage* pNewPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nDestPos)); + SdrPage* pOldPage = pSrcDoc->mpDrawLayer->GetPage(static_cast<sal_uInt16>(nSrcPos)); + SdrPage* pNewPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nDestPos)); if (pOldPage && pNewPage) { @@ -85,15 +85,15 @@ void ScDocument::TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDes while (pOldObject) { SdrObject* pNewObject = pOldObject->Clone(); - // SdrObject* pNewObject = pOldObject->Clone( pNewPage, pDrawLayer ); - pNewObject->SetModel(pDrawLayer); + // SdrObject* pNewObject = pOldObject->Clone( pNewPage, mpDrawLayer ); + pNewObject->SetModel(mpDrawLayer); pNewObject->SetPage(pNewPage); pNewObject->NbcMove(Size(0,0)); pNewPage->InsertObject( pNewObject ); - if (pDrawLayer->IsRecording()) - pDrawLayer->AddCalcUndo( new SdrUndoInsertObj( *pNewObject ) ); + if (mpDrawLayer->IsRecording()) + mpDrawLayer->AddCalcUndo( new SdrUndoInsertObj( *pNewObject ) ); pOldObject = aIter.Next(); } @@ -111,16 +111,16 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) if (pDocShell && !mpShell) mpShell = pDocShell; - if (!pDrawLayer) + if (!mpDrawLayer) { OUString aName; if ( mpShell && !mpShell->IsLoading() ) // don't call GetTitle while loading aName = mpShell->GetTitle(); - pDrawLayer = new ScDrawLayer( this, aName ); + mpDrawLayer = new ScDrawLayer( this, aName ); sfx2::LinkManager* pMgr = GetDocLinkManager().getLinkManager(bAutoCalc); if (pMgr) - pDrawLayer->SetLinkManager(pMgr); + mpDrawLayer->SetLinkManager(pMgr); // set DrawingLayer's SfxItemPool at Calc's SfxItemPool as // secondary pool to support DrawingLayer FillStyle ranges (and similar) @@ -134,7 +134,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) if (pLocalPool) { OSL_ENSURE(!pLocalPool->GetSecondaryPool(), "OOps, already a secondary pool set where the DrawingLayer ItemPool is to be placed (!)"); - pLocalPool->SetSecondaryPool(&pDrawLayer->GetItemPool()); + pLocalPool->SetSecondaryPool(&mpDrawLayer->GetItemPool()); } } @@ -150,40 +150,40 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) for (nTab=0; nTab<nDrawPages && nTab < static_cast<SCTAB>(maTabs.size()); nTab++) { - pDrawLayer->ScAddPage( nTab ); // always add page, with or without the table + mpDrawLayer->ScAddPage( nTab ); // always add page, with or without the table if (maTabs[nTab]) { OUString aTabName; maTabs[nTab]->GetName(aTabName); - pDrawLayer->ScRenamePage( nTab, aTabName ); + mpDrawLayer->ScRenamePage( nTab, aTabName ); maTabs[nTab]->SetDrawPageSize(false,false); // set the right size immediately } } - pDrawLayer->SetDefaultTabulator( GetDocOptions().GetTabDistance() ); + mpDrawLayer->SetDefaultTabulator( GetDocOptions().GetTabDistance() ); UpdateDrawPrinter(); // set draw defaults directly - SfxItemPool& rDrawPool = pDrawLayer->GetItemPool(); + SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool(); rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); UpdateDrawLanguages(); if (bImportingXML) - pDrawLayer->EnableAdjust(false); + mpDrawLayer->EnableAdjust(false); - pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); - pDrawLayer->SetCharCompressType( GetAsianCompression() ); - pDrawLayer->SetKernAsianPunctuation( GetAsianKerning() ); + mpDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); + mpDrawLayer->SetCharCompressType( GetAsianCompression() ); + mpDrawLayer->SetKernAsianPunctuation( GetAsianKerning() ); } } void ScDocument::UpdateDrawLanguages() { - if (pDrawLayer) + if (mpDrawLayer) { - SfxItemPool& rDrawPool = pDrawLayer->GetItemPool(); + SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool(); rDrawPool.SetPoolDefaultItem( SvxLanguageItem( eLanguage, EE_CHAR_LANGUAGE ) ); rDrawPool.SetPoolDefaultItem( SvxLanguageItem( eCjkLanguage, EE_CHAR_LANGUAGE_CJK ) ); rDrawPool.SetPoolDefaultItem( SvxLanguageItem( eCtlLanguage, EE_CHAR_LANGUAGE_CTL ) ); @@ -192,11 +192,11 @@ void ScDocument::UpdateDrawLanguages() void ScDocument::UpdateDrawPrinter() { - if (pDrawLayer) + if (mpDrawLayer) { // use the printer even if IsValid is false // Application::GetDefaultDevice causes trouble with changing MapModes - pDrawLayer->SetRefDevice(GetRefDevice()); + mpDrawLayer->SetRefDevice(GetRefDevice()); } } @@ -222,8 +222,8 @@ bool ScDocument::IsChart( const SdrObject* pObject ) IMPL_LINK( ScDocument, GetUserDefinedColor, sal_uInt16, nColorIndex, Color* ) { rtl::Reference<XColorList> xColorList; - if (pDrawLayer) - xColorList = pDrawLayer->GetColorList(); + if (mpDrawLayer) + xColorList = mpDrawLayer->GetColorList(); else { if (!pColorList.is()) @@ -246,41 +246,41 @@ void ScDocument::DeleteDrawLayer() pLocalPool->SetSecondaryPool(nullptr); } } - delete pDrawLayer; - pDrawLayer = nullptr; + delete mpDrawLayer; + mpDrawLayer = nullptr; } bool ScDocument::DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const { - return pDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer ); + return mpDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer ); } void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark ) { - if (!pDrawLayer) + if (!mpDrawLayer) return; SCTAB nTabCount = GetTableCount(); ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); for (; itr != itrEnd && *itr < nTabCount; ++itr) if (maTabs[*itr]) - pDrawLayer->DeleteObjectsInArea( *itr, nCol1, nRow1, nCol2, nRow2 ); + mpDrawLayer->DeleteObjectsInArea( *itr, nCol1, nRow1, nCol2, nRow2 ); } void ScDocument::DeleteObjectsInSelection( const ScMarkData& rMark ) { - if (!pDrawLayer) + if (!mpDrawLayer) return; - pDrawLayer->DeleteObjectsInSelection( rMark ); + mpDrawLayer->DeleteObjectsInSelection( rMark ); } bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark ) { // pTabMark is used only for selected tables. If pTabMark is 0, all tables of rRange are used. - if (!pDrawLayer) + if (!mpDrawLayer) return false; SCTAB nStartTab = 0; @@ -298,7 +298,7 @@ bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p tools::Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), nTab ); - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (pPage) { @@ -321,9 +321,9 @@ bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p void ScDocument::StartAnimations( SCTAB nTab ) { - if (!pDrawLayer) + if (!mpDrawLayer) return; - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (!pPage) return; @@ -347,9 +347,9 @@ bool ScDocument::HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect { // Are there objects in the background layer who are (partly) affected by rMMRect // (for Drawing optimization, no deletion in front of the background - if (!pDrawLayer) + if (!mpDrawLayer) return false; - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (!pPage) return false; @@ -372,9 +372,9 @@ bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const { // Are there any objects at all who are (partly) affected by rMMRect? // (To detect blank pages when printing) - if (!pDrawLayer) + if (!mpDrawLayer) return false; - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (!pPage) return false; @@ -395,17 +395,17 @@ bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const void ScDocument::EnsureGraphicNames() { - if (pDrawLayer) - pDrawLayer->EnsureGraphicNames(); + if (mpDrawLayer) + mpDrawLayer->EnsureGraphicNames(); } SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos ) { // for Drag&Drop on draw object SdrObject* pFound = nullptr; - if (pDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) + if (mpDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (pPage) { @@ -515,9 +515,9 @@ void ScDocument::Clear( bool bFromDestructor ) delete pSelectionAttr; pSelectionAttr = nullptr; - if (pDrawLayer) + if (mpDrawLayer) { - pDrawLayer->ClearModel( bFromDestructor ); + mpDrawLayer->ClearModel( bFromDestructor ); } } @@ -528,9 +528,9 @@ bool ScDocument::HasDetectiveObjects(SCTAB nTab) const bool bFound = false; - if (pDrawLayer) + if (mpDrawLayer) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (pPage) { @@ -576,9 +576,9 @@ void ScDocument::UpdateFontCharSet() pItem->SetCharSet(eSysSet); } - if ( pDrawLayer ) + if ( mpDrawLayer ) { - SfxItemPool& rDrawPool = pDrawLayer->GetItemPool(); + SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool(); nCount = rDrawPool.GetItemCount2(EE_CHAR_FONTINFO); for (i=0; i<nCount; i++) { @@ -607,8 +607,8 @@ void ScDocument::SetLoadingMedium( bool bVal ) void ScDocument::SetImportingXML( bool bVal ) { bImportingXML = bVal; - if (pDrawLayer) - pDrawLayer->EnableAdjust(!bImportingXML); + if (mpDrawLayer) + mpDrawLayer->EnableAdjust(!bImportingXML); if ( !bVal ) { @@ -635,8 +635,8 @@ void ScDocument::SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharac xForbiddenCharacters = rNew; if ( mpEditEngine ) EditEngine::SetForbiddenCharsTable( xForbiddenCharacters ); - if ( pDrawLayer ) - pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); + if ( mpDrawLayer ) + mpDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); } bool ScDocument::IsValidAsianCompression() const @@ -657,8 +657,8 @@ void ScDocument::SetAsianCompression(CharCompressType nNew) nAsianCompression = nNew; if ( mpEditEngine ) mpEditEngine->SetAsianCompressionMode( nAsianCompression ); - if ( pDrawLayer ) - pDrawLayer->SetCharCompressType( nAsianCompression ); + if ( mpDrawLayer ) + mpDrawLayer->SetCharCompressType( nAsianCompression ); } bool ScDocument::IsValidAsianKerning() const @@ -679,8 +679,8 @@ void ScDocument::SetAsianKerning(bool bNew) nAsianKerning = (sal_uInt8)bNew; if ( mpEditEngine ) mpEditEngine->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) ); - if ( pDrawLayer ) - pDrawLayer->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) ); + if ( mpDrawLayer ) + mpDrawLayer->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) ); } void ScDocument::ApplyAsianEditSettings( ScEditEngineDefaulter& rEngine ) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 46a01927eafb..c59cc614b7bc 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -997,9 +997,9 @@ void ScDocument::SetLayoutRTL( SCTAB nTab, bool bRTL ) // mirror existing objects: - if (pDrawLayer) + if (mpDrawLayer) { - SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); + SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); if (pPage) { @@ -1011,7 +1011,7 @@ void ScDocument::SetLayoutRTL( SCTAB nTab, bool bRTL ) // don't mirror again ScDrawObjData* pData = ScDrawLayer::GetObjData( pObject ); if ( !pData ) - pDrawLayer->MirrorRTL( pObject ); + mpDrawLayer->MirrorRTL( pObject ); pObject->SetContextWritingMode( bRTL ? WritingMode2::RL_TB : WritingMode2::LR_TB ); @@ -2227,12 +2227,12 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam, maTabs[i]->CopyToClip(aCxt, rClipParam.maRanges, pClipDoc->maTabs[i]); - if (pDrawLayer && bIncludeObjects) + if (mpDrawLayer && bIncludeObjects) { // also copy drawing objects tools::Rectangle aObjRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), i); - pDrawLayer->CopyToClip(pClipDoc, i, aObjRect); + mpDrawLayer->CopyToClip(pClipDoc, i, aObjRect); } } @@ -2363,12 +2363,12 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), pTransClip->maTabs[i], nFlags, bAsLink ); - if ( pDrawLayer && ( nFlags & InsertDeleteFlags::OBJECTS ) ) + if ( mpDrawLayer && ( nFlags & InsertDeleteFlags::OBJECTS ) ) { // Drawing objects are copied to the new area without transposing. // CopyFromClip is used to adjust the objects to the transposed block's // cell range area. - // (pDrawLayer in the original clipboard document is set only if there + // (mpDrawLayer in the original clipboard document is set only if there // are drawing objects to copy) pTransClip->InitDrawLayer(); @@ -2377,7 +2377,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags tools::Rectangle aDestRect = pTransClip->GetMMRect( 0, 0, static_cast<SCCOL>(aClipRange.aEnd.Row() - aClipRange.aStart.Row()), static_cast<SCROW>(aClipRange.aEnd.Col() - aClipRange.aStart.Col()), i ); - pTransClip->pDrawLayer->CopyFromClip( pDrawLayer, i, aSourceRect, ScAddress(0,0,i), aDestRect ); + pTransClip->mpDrawLayer->CopyFromClip( mpDrawLayer, i, aSourceRect, ScAddress(0,0,i), aDestRect ); } } @@ -2624,14 +2624,14 @@ void ScDocument::CopyBlockFromClip( maTabs[i]->CopyFromClip( rCxt, nCol1, nRow1, nCol2, nRow2, nDx, nDy, rClipTabs[nClipTab]); - if (rCxt.getClipDoc()->pDrawLayer && (rCxt.getInsertFlag() & InsertDeleteFlags::OBJECTS)) + if (rCxt.getClipDoc()->mpDrawLayer && (rCxt.getInsertFlag() & InsertDeleteFlags::OBJECTS)) { // also copy drawing objects // drawing layer must be created before calling CopyFromClip // (ScDocShell::MakeDrawLayer also does InitItems etc.) - OSL_ENSURE( pDrawLayer, "CopyBlockFromClip: No drawing layer" ); - if ( pDrawLayer ) + OSL_ENSURE( mpDrawLayer, "CopyBlockFromClip: No drawing layer" ); + if ( mpDrawLayer ) { // For GetMMRect, the row heights in the target document must already be valid // (copied in an extra step before pasting, or updated after pasting cells, but @@ -2640,7 +2640,7 @@ void ScDocument::CopyBlockFromClip( tools::Rectangle aSourceRect = rCxt.getClipDoc()->GetMMRect( nCol1-nDx, nRow1-nDy, nCol2-nDx, nRow2-nDy, nClipTab ); tools::Rectangle aDestRect = GetMMRect( nCol1, nRow1, nCol2, nRow2, i ); - pDrawLayer->CopyFromClip(rCxt.getClipDoc()->pDrawLayer, nClipTab, aSourceRect, + mpDrawLayer->CopyFromClip(rCxt.getClipDoc()->mpDrawLayer, nClipTab, aSourceRect, ScAddress( nCol1, nRow1, i ), aDestRect ); } } @@ -6388,7 +6388,7 @@ void ScDocument::EnableUndo( bool bVal ) if (bVal != GetUndoManager()->IsUndoEnabled()) { GetUndoManager()->EnableUndo(bVal); - if( pDrawLayer ) pDrawLayer->EnableUndo(bVal); + if( mpDrawLayer ) mpDrawLayer->EnableUndo(bVal); } mbUndoEnabled = bVal; commit 768b97691b0b2575af788ed86399f2a034c9eb1f Author: Tor Lillqvist <t...@collabora.com> Date: Tue Sep 12 12:13:06 2017 +0300 Prefix one more member of ScDocument: pVirtualDevice_100th_mm Change-Id: Idf82b514eac385ff3e9f9dc373d0e7fd41d00819 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 524e68aaccf2..c9a68c40a74e 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -322,7 +322,7 @@ private: ScNoteEditEngine* mpNoteEngine; // uses pEditPool from xPoolHelper SfxObjectShell* mpShell; VclPtr<SfxPrinter> mpPrinter; - VclPtr<VirtualDevice> pVirtualDevice_100th_mm; + VclPtr<VirtualDevice> mpVirtualDevice_100th_mm; ScDrawLayer* pDrawLayer; // SdrModel rtl::Reference<XColorList> pColorList; ScValidationDataList* pValidationList; // validity diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 6650ab65ea15..8f2200d24df7 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -140,7 +140,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : mpNoteEngine( nullptr ), mpShell( pDocShell ), mpPrinter( nullptr ), - pVirtualDevice_100th_mm( nullptr ), + mpVirtualDevice_100th_mm( nullptr ), pDrawLayer( nullptr ), pValidationList( nullptr ), pFormatExchangeList( nullptr ), @@ -436,7 +436,7 @@ ScDocument::~ScDocument() delete mpEditEngine; delete mpNoteEngine; delete pChangeViewSettings; // and delete - pVirtualDevice_100th_mm.disposeAndClear(); + mpVirtualDevice_100th_mm.disposeAndClear(); delete pDPCollection; delete mpAnonymousDBData; diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 3ce7e594a317..961f6456235d 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -187,19 +187,19 @@ void ScDocument::SetPrintOptions() VirtualDevice* ScDocument::GetVirtualDevice_100th_mm() { - if (!pVirtualDevice_100th_mm) + if (!mpVirtualDevice_100th_mm) { #ifdef IOS - pVirtualDevice_100th_mm = VclPtr<VirtualDevice>::Create(DeviceFormat::GRAYSCALE); + mpVirtualDevice_100th_mm = VclPtr<VirtualDevice>::Create(DeviceFormat::GRAYSCALE); #else - pVirtualDevice_100th_mm = VclPtr<VirtualDevice>::Create(DeviceFormat::BITMASK); + mpVirtualDevice_100th_mm = VclPtr<VirtualDevice>::Create(DeviceFormat::BITMASK); #endif - pVirtualDevice_100th_mm->SetReferenceDevice(VirtualDevice::RefDevMode::MSO1); - MapMode aMapMode( pVirtualDevice_100th_mm->GetMapMode() ); + mpVirtualDevice_100th_mm->SetReferenceDevice(VirtualDevice::RefDevMode::MSO1); + MapMode aMapMode( mpVirtualDevice_100th_mm->GetMapMode() ); aMapMode.SetMapUnit( MapUnit::Map100thMM ); - pVirtualDevice_100th_mm->SetMapMode( aMapMode ); + mpVirtualDevice_100th_mm->SetMapMode( aMapMode ); } - return pVirtualDevice_100th_mm; + return mpVirtualDevice_100th_mm; } OutputDevice* ScDocument::GetRefDevice() commit efefb50e7407b733b49dc1d05a89506a25198da3 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Sep 12 11:29:23 2017 +0300 Prefix one more member of ScDocument: pPrinter Change-Id: I9a67be61661f90633398a303ee467cafa7bdd548 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index a7b9fcdc4d17..524e68aaccf2 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -321,7 +321,7 @@ private: ScFieldEditEngine* mpEditEngine; // uses pEditPool from xPoolHelper ScNoteEditEngine* mpNoteEngine; // uses pEditPool from xPoolHelper SfxObjectShell* mpShell; - VclPtr<SfxPrinter> pPrinter; + VclPtr<SfxPrinter> mpPrinter; VclPtr<VirtualDevice> pVirtualDevice_100th_mm; ScDrawLayer* pDrawLayer; // SdrModel rtl::Reference<XColorList> pColorList; diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 7aeed4215411..6650ab65ea15 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -139,7 +139,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : mpEditEngine( nullptr ), mpNoteEngine( nullptr ), mpShell( pDocShell ), - pPrinter( nullptr ), + mpPrinter( nullptr ), pVirtualDevice_100th_mm( nullptr ), pDrawLayer( nullptr ), pValidationList( nullptr ), @@ -427,7 +427,7 @@ ScDocument::~ScDocument() delete pChartCollection; DeleteDrawLayer(); delete pFormatExchangeList; - pPrinter.disposeAndClear(); + mpPrinter.disposeAndClear(); ImplDeleteOptions(); delete pConsolidateDlgData; delete pClipData; diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 437f2c17dae0..3ce7e594a317 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -117,7 +117,7 @@ void ScDocument::ImplDeleteOptions() SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist) { - if ( !pPrinter && bCreateIfNotExist ) + if ( !mpPrinter && bCreateIfNotExist ) { auto pSet = o3tl::make_unique<SfxItemSet>( *mxPoolHelper->GetDocPool(), @@ -135,18 +135,18 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist) pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) ); pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) ); - pPrinter = VclPtr<SfxPrinter>::Create( std::move(pSet) ); - pPrinter->SetMapMode( MapUnit::Map100thMM ); + mpPrinter = VclPtr<SfxPrinter>::Create( std::move(pSet) ); + mpPrinter->SetMapMode( MapUnit::Map100thMM ); UpdateDrawPrinter(); - pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); + mpPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); } - return pPrinter; + return mpPrinter; } void ScDocument::SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter ) { - if ( pNewPrinter == pPrinter.get() ) + if ( pNewPrinter == mpPrinter.get() ) { // #i6706# SetPrinter is called with the same printer again if // the JobSetup has changed. In that case just call UpdateDrawPrinter @@ -155,23 +155,23 @@ void ScDocument::SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter ) } else { - ScopedVclPtr<SfxPrinter> pOld( pPrinter ); - pPrinter = pNewPrinter; + ScopedVclPtr<SfxPrinter> pOld( mpPrinter ); + mpPrinter = pNewPrinter; UpdateDrawPrinter(); - pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); + mpPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); } InvalidateTextWidth(nullptr, nullptr, false); // in both cases } void ScDocument::SetPrintOptions() { - if ( !pPrinter ) GetPrinter(); // this sets pPrinter - OSL_ENSURE( pPrinter, "Error in printer creation :-/" ); + if ( !mpPrinter ) GetPrinter(); // this sets mpPrinter + OSL_ENSURE( mpPrinter, "Error in printer creation :-/" ); - if ( pPrinter ) + if ( mpPrinter ) { ::utl::MiscCfg aMisc; - SfxItemSet aOptSet( pPrinter->GetOptions() ); + SfxItemSet aOptSet( mpPrinter->GetOptions() ); SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE; if ( aMisc.IsPaperOrientationWarning() ) @@ -181,7 +181,7 @@ void ScDocument::SetPrintOptions() aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) ); aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) ); - pPrinter->SetOptions( aOptSet ); + mpPrinter->SetOptions( aOptSet ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits