[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/source
Henry Castro
hcastro at collabora.com
Wed Jul 4 19:55:23 UTC 2018
sc/source/ui/docshell/docsh.cxx | 542 +++++++++++++++++++--------------------
sc/source/ui/docshell/docsh2.cxx | 42 +--
sc/source/ui/docshell/docsh3.cxx | 152 +++++-----
sc/source/ui/docshell/docsh4.cxx | 342 ++++++++++++------------
sc/source/ui/docshell/docsh5.cxx | 228 ++++++++--------
sc/source/ui/docshell/docsh6.cxx | 66 ++--
sc/source/ui/docshell/docsh8.cxx | 40 +-
sc/source/ui/inc/docsh.hxx | 70 ++---
8 files changed, 741 insertions(+), 741 deletions(-)
New commits:
commit 6d7d6d2474e7c37da25cfb6ec88bfb84eb08b62b
Author: Henry Castro <hcastro at collabora.com>
Date: Thu May 31 17:39:26 2018 -0400
sc: prefix members of ScDocShell
Change-Id: I7c2a4e5e850b26da515719f7df869f12c49b0ad3
Reviewed-on: https://gerrit.libreoffice.org/55148
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Henry Castro <hcastro at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/56650
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index d2ae9a945c18..6fb0b4dc2a52 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -209,7 +209,7 @@ void ScDocShell::FillClass( SvGlobalName* pClassName,
std::set<Color> ScDocShell::GetDocColors()
{
- return aDocument.GetDocColors();
+ return m_aDocument.GetDocColors();
}
void ScDocShell::DoEnterHandler()
@@ -239,16 +239,16 @@ HiddenInformation ScDocShell::GetHiddenInformationState( HiddenInformation nStat
if ( nStates & HiddenInformation::RECORDEDCHANGES )
{
- if ( aDocument.GetChangeTrack() && aDocument.GetChangeTrack()->GetFirst() )
+ if ( m_aDocument.GetChangeTrack() && m_aDocument.GetChangeTrack()->GetFirst() )
nState |= HiddenInformation::RECORDEDCHANGES;
}
if ( nStates & HiddenInformation::NOTES )
{
- SCTAB nTableCount = aDocument.GetTableCount();
+ SCTAB nTableCount = m_aDocument.GetTableCount();
bool bFound = false;
for (SCTAB nTab = 0; nTab < nTableCount && !bFound; ++nTab)
{
- if (aDocument.HasTabNotes(nTab)) //TODO:
+ if (m_aDocument.HasTabNotes(nTab)) //TODO:
bFound = true;
}
@@ -261,17 +261,17 @@ HiddenInformation ScDocShell::GetHiddenInformationState( HiddenInformation nStat
void ScDocShell::BeforeXMLLoading()
{
- aDocument.EnableIdle(false);
+ m_aDocument.EnableIdle(false);
// prevent unnecessary broadcasts and updates
- OSL_ENSURE(pModificator == nullptr, "The Modificator should not exist");
- pModificator = new ScDocShellModificator( *this );
+ OSL_ENSURE(m_pModificator == nullptr, "The Modificator should not exist");
+ m_pModificator = new ScDocShellModificator( *this );
- aDocument.SetImportingXML( true );
- aDocument.EnableExecuteLink( false ); // #i101304# to be safe, prevent nested loading from external references
- aDocument.EnableUndo( false );
+ m_aDocument.SetImportingXML( true );
+ m_aDocument.EnableExecuteLink( false ); // #i101304# to be safe, prevent nested loading from external references
+ m_aDocument.EnableUndo( false );
// prevent unnecessary broadcasts and "half way listeners"
- aDocument.SetInsertingFromOtherDoc( true );
+ m_aDocument.SetInsertingFromOtherDoc( true );
}
void ScDocShell::AfterXMLLoading(bool bRet)
@@ -280,22 +280,22 @@ void ScDocShell::AfterXMLLoading(bool bRet)
{
UpdateLinks();
// don't prevent establishing of listeners anymore
- aDocument.SetInsertingFromOtherDoc( false );
+ m_aDocument.SetInsertingFromOtherDoc( false );
if ( bRet )
{
- ScChartListenerCollection* pChartListener = aDocument.GetChartListenerCollection();
+ ScChartListenerCollection* pChartListener = m_aDocument.GetChartListenerCollection();
if (pChartListener)
pChartListener->UpdateDirtyCharts();
// #95582#; set the table names of linked tables to the new path
- SCTAB nTabCount = aDocument.GetTableCount();
+ SCTAB nTabCount = m_aDocument.GetTableCount();
for (SCTAB i = 0; i < nTabCount; ++i)
{
- if (aDocument.IsLinked( i ))
+ if (m_aDocument.IsLinked( i ))
{
OUString aName;
- aDocument.GetName(i, aName);
- OUString aLinkTabName = aDocument.GetLinkTab(i);
+ m_aDocument.GetName(i, aName);
+ OUString aLinkTabName = m_aDocument.GetLinkTab(i);
sal_Int32 nLinkTabNameLength = aLinkTabName.getLength();
sal_Int32 nNameLength = aName.getLength();
if (nLinkTabNameLength < nNameLength)
@@ -326,8 +326,8 @@ void ScDocShell::AfterXMLLoading(bool bRet)
(aName[nIndex - 1] == '#') && // before the table name should be the # char
!aINetURLObject.HasError()) // the docname should be a valid URL
{
- aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) );
- aDocument.RenameTab(i, aName, true/*bExternalDocument*/);
+ aName = ScGlobal::GetDocTabName( m_aDocument.GetLinkDoc( i ), m_aDocument.GetLinkTab( i ) );
+ m_aDocument.RenameTab(i, aName, true/*bExternalDocument*/);
}
// else; nothing has to happen, because it is a user given name
}
@@ -341,7 +341,7 @@ void ScDocShell::AfterXMLLoading(bool bRet)
// #i94570# DataPilot table names have to be unique, or the tables can't be accessed by API.
// If no name (or an invalid name, skipped in ScXMLDataPilotTableContext::EndElement) was set, create a new name.
- ScDPCollection* pDPCollection = aDocument.GetDPCollection();
+ ScDPCollection* pDPCollection = m_aDocument.GetDPCollection();
if ( pDPCollection )
{
size_t nDPCount = pDPCollection->GetCount();
@@ -355,31 +355,31 @@ void ScDocShell::AfterXMLLoading(bool bRet)
}
}
else
- aDocument.SetInsertingFromOtherDoc( false );
+ m_aDocument.SetInsertingFromOtherDoc( false );
- aDocument.SetImportingXML( false );
- aDocument.EnableExecuteLink( true );
- aDocument.EnableUndo( true );
- bIsEmpty = false;
+ m_aDocument.SetImportingXML( false );
+ m_aDocument.EnableExecuteLink( true );
+ m_aDocument.EnableUndo( true );
+ m_bIsEmpty = false;
- if (pModificator)
+ if (m_pModificator)
{
- ScDocument::HardRecalcState eRecalcState = aDocument.GetHardRecalcState();
+ ScDocument::HardRecalcState eRecalcState = m_aDocument.GetHardRecalcState();
// Temporarily set hard-recalc to prevent calling
// ScFormulaCell::Notify() during destruction of the Modificator which
// will set the cells dirty.
if (eRecalcState == ScDocument::HardRecalcState::OFF)
- aDocument.SetHardRecalcState(ScDocument::HardRecalcState::TEMPORARY);
- delete pModificator;
- pModificator = nullptr;
- aDocument.SetHardRecalcState(eRecalcState);
+ m_aDocument.SetHardRecalcState(ScDocument::HardRecalcState::TEMPORARY);
+ delete m_pModificator;
+ m_pModificator = nullptr;
+ m_aDocument.SetHardRecalcState(eRecalcState);
}
else
{
OSL_FAIL("The Modificator should exist");
}
- aDocument.EnableIdle(true);
+ m_aDocument.EnableIdle(true);
}
namespace {
@@ -474,7 +474,7 @@ public:
bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css::embed::XStorage >& xStor )
{
- LoadMediumGuard aLoadGuard(&aDocument);
+ LoadMediumGuard aLoadGuard(&m_aDocument);
// MacroCallMode is no longer needed, state is kept in SfxObjectShell now
@@ -486,7 +486,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css
bool bRet = false;
ErrCode nError = ERRCODE_NONE;
- aDocument.LockAdjustHeight();
+ m_aDocument.LockAdjustHeight();
if (GetCreateMode() == SfxObjectCreateMode::ORGANIZER)
bRet = aImport.Import(ImportFlags::Styles, nError);
else
@@ -511,7 +511,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css
if (nRecalcMode == RECALC_ASK)
{
OUString sProductName(utl::ConfigManager::getProductName());
- if (aDocument.IsUserInteractionEnabled() && xDocProps->getGenerator().indexOf(sProductName) == -1)
+ if (m_aDocument.IsUserInteractionEnabled() && xDocProps->getGenerator().indexOf(sProductName) == -1)
{
// Generator is not LibreOffice. Ask if the user wants to perform
// full re-calculation.
@@ -547,18 +547,18 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css
else
{
// still need to recalc volatile formula cells.
- aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
+ m_aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
}
AfterXMLLoading(bRet);
- aDocument.UnlockAdjustHeight();
+ m_aDocument.UnlockAdjustHeight();
return bRet;
}
bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const css::uno::Reference< css::embed::XStorage >& xStor )
{
- aDocument.EnableIdle(false);
+ m_aDocument.EnableIdle(false);
ScXMLImportWrapper aImport(*this, pSaveMedium, xStor);
bool bRet(false);
@@ -567,7 +567,7 @@ bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const css::uno::Reference< css
else
bRet = aImport.Export(true);
- aDocument.EnableIdle(true);
+ m_aDocument.EnableIdle(true);
return bRet;
}
@@ -597,8 +597,8 @@ bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium )
bool ScDocShell::Load( SfxMedium& rMedium )
{
- LoadMediumGuard aLoadGuard(&aDocument);
- ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() );
+ LoadMediumGuard aLoadGuard(&m_aDocument);
+ ScRefreshTimerProtector aProt( m_aDocument.GetRefreshTimerControlAddress() );
// only the latin script language is loaded
// -> initialize the others from options (before loading)
@@ -608,8 +608,8 @@ bool ScDocShell::Load( SfxMedium& rMedium )
// for tdf#99729 (if required, it will be overridden in *::ReadUserDataSequence())
if (IsOwnStorageFormat(rMedium))
{
- if (aDocument.GetDrawLayer())
- aDocument.GetDrawLayer()->SetAnchoredTextOverflowLegacy(true);
+ if (m_aDocument.GetDrawLayer())
+ m_aDocument.GetDrawLayer()->SetAnchoredTextOverflowLegacy(true);
}
GetUndoManager()->Clear();
@@ -623,17 +623,17 @@ bool ScDocShell::Load( SfxMedium& rMedium )
if (GetMedium())
{
const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
- nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
+ m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
}
{
// prepare a valid document for XML filter
// (for ConvertFrom, InitNew is called before)
- aDocument.MakeTable(0);
- aDocument.GetStyleSheetPool()->CreateStandardStyles();
- aDocument.UpdStlShtPtrsFrmNms();
+ m_aDocument.MakeTable(0);
+ m_aDocument.GetStyleSheetPool()->CreateStandardStyles();
+ m_aDocument.UpdStlShtPtrsFrmNms();
- if (!mbUcalcTest)
+ if (!m_bUcalcTest)
{
/* Create styles that are imported through Orcus */
@@ -647,8 +647,8 @@ bool ScDocShell::Load( SfxMedium& rMedium )
if (pOrcus)
{
- pOrcus->importODS_Styles(aDocument, aPath);
- aDocument.GetStyleSheetPool()->setAllStandard();
+ pOrcus->importODS_Styles(m_aDocument, aPath);
+ m_aDocument.GetStyleSheetPool()->setAllStandard();
}
}
@@ -667,9 +667,9 @@ bool ScDocShell::Load( SfxMedium& rMedium )
// invalidate eventually temporary table areas
if ( bRet )
- aDocument.InvalidateTableArea();
+ m_aDocument.InvalidateTableArea();
- bIsEmpty = false;
+ m_bIsEmpty = false;
FinishedLoading();
return bRet;
}
@@ -681,7 +681,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if (pScHint->GetTablesHintId() == SC_TAB_INSERTED)
{
- uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = aDocument.GetVbaEventProcessor();
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = m_aDocument.GetVbaEventProcessor();
if ( xVbaEvents.is() ) try
{
uno::Sequence< uno::Any > aArgs( 1 );
@@ -710,9 +710,9 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
const OUString& aName2 = rStlHint.GetStyle2();
sal_uInt32 nTimeout = rStlHint.GetTimeout();
- if (!pAutoStyleList)
- pAutoStyleList = new ScAutoStyleList(this);
- pAutoStyleList->AddInitial( aRange, aName1, nTimeout, aName2 );
+ if (!m_pAutoStyleList)
+ m_pAutoStyleList = new ScAutoStyleList(this);
+ m_pAutoStyleList->AddInitial( aRange, aName1, nTimeout, aName2 );
}
else if ( dynamic_cast<const SfxEventHint*>(&rHint) )
{
@@ -922,12 +922,12 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( bSaveToShared )
{
bool bChangedViewSettings = false;
- ScChangeViewSettings* pChangeViewSet = aDocument.GetChangeViewSettings();
+ ScChangeViewSettings* pChangeViewSet = m_aDocument.GetChangeViewSettings();
if ( pChangeViewSet && pChangeViewSet->ShowChanges() )
{
pChangeViewSet->SetShowChanges( false );
pChangeViewSet->SetShowAccepted( false );
- aDocument.SetChangeViewSettings( *pChangeViewSet );
+ m_aDocument.SetChangeViewSettings( *pChangeViewSet );
bChangedViewSettings = true;
}
@@ -953,7 +953,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
pChangeViewSet->SetShowChanges( true );
pChangeViewSet->SetShowAccepted( true );
- aDocument.SetChangeViewSettings( *pChangeViewSet );
+ m_aDocument.SetChangeViewSettings( *pChangeViewSet );
}
}
@@ -1007,8 +1007,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
#endif
- if (pSheetSaveData)
- pSheetSaveData->SetInSupportedSave(true);
+ if (m_pSheetSaveData)
+ m_pSheetSaveData->SetInSupportedSave(true);
}
break;
case SfxEventHintId::SaveAsDoc:
@@ -1030,8 +1030,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// #i108978# If no event is sent before saving, there will also be no "...DONE" event,
// and SAVE/SAVEAS can't be distinguished from SAVETO. So stream copying is only enabled
// if there is a SAVE/SAVEAS/SAVETO event first.
- if (pSheetSaveData)
- pSheetSaveData->SetInSupportedSave(true);
+ if (m_pSheetSaveData)
+ m_pSheetSaveData->SetInSupportedSave(true);
break;
case SfxEventHintId::SaveDocDone:
case SfxEventHintId::SaveAsDocDone:
@@ -1042,8 +1042,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
case SfxEventHintId::SaveToDocDone:
// only reset the flag, don't use the new positions
- if (pSheetSaveData)
- pSheetSaveData->SetInSupportedSave(false);
+ if (m_pSheetSaveData)
+ m_pSheetSaveData->SetInSupportedSave(false);
break;
default:
{
@@ -1053,7 +1053,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if (rHint.GetId() == SfxHintId::TitleChanged) // Without parameter
{
- aDocument.SetName( SfxShell::GetName() );
+ m_aDocument.SetName( SfxShell::GetName() );
// RegisterNewTargetNames doesn't exist any longer
SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDocNameChanged )); // Navigator
}
@@ -1068,7 +1068,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
#endif
- if (aDocument.IsClipboardSource())
+ if (m_aDocument.IsClipboardSource())
{
// Notes copied to the clipboard have a raw SdrCaptionObj pointer
// copied from this document, forget it as it references this
@@ -1085,8 +1085,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// Load contents for organizer
bool ScDocShell::LoadFrom( SfxMedium& rMedium )
{
- LoadMediumGuard aLoadGuard(&aDocument);
- ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() );
+ LoadMediumGuard aLoadGuard(&m_aDocument);
+ ScRefreshTimerProtector aProt( m_aDocument.GetRefreshTimerControlAddress() );
WaitObject aWait( GetActiveDialogParent() );
@@ -1095,7 +1095,7 @@ bool ScDocShell::LoadFrom( SfxMedium& rMedium )
if (GetMedium())
{
const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
- nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
+ m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
}
// until loading/saving only the styles in XML is implemented,
@@ -1140,12 +1140,12 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa
bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
- LoadMediumGuard aLoadGuard(&aDocument);
+ LoadMediumGuard aLoadGuard(&m_aDocument);
bool bRet = false; // sal_False means user quit!
// On error: Set error at stream
- ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() );
+ ScRefreshTimerProtector aProt( m_aDocument.GetRefreshTimerControlAddress() );
GetUndoManager()->Clear();
@@ -1164,7 +1164,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
rMedium.GetPhysicalName(); //! Call CreateFileStream directly, if available
const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
- nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
+ m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
std::shared_ptr<const SfxFilter> pFilter = rMedium.GetFilter();
if (pFilter)
@@ -1174,7 +1174,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bool bCalc3 = aFltName == "StarCalc 3.0";
bool bCalc4 = aFltName == "StarCalc 4.0";
if (!bCalc3 && !bCalc4)
- aDocument.SetInsertingFromOtherDoc( true );
+ m_aDocument.SetInsertingFromOtherDoc( true );
if (aFltName == pFilterXML)
bRet = LoadXML( &rMedium, nullptr );
@@ -1196,7 +1196,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_437 );
}
- ErrCode eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &aDocument,
+ ErrCode eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &m_aDocument,
ScGlobal::GetCharsetValue(sItStr));
if (eError != ERRCODE_NONE)
{
@@ -1227,13 +1227,13 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
MakeDrawLayer(); //! In the filter
CalcOutputFactor(); // prepare update of row height
- ErrCode eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat );
- aDocument.UpdateFontCharSet();
- if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
- aDocument.UpdateChartListenerCollection(); //! For all imports?
+ ErrCode eError = ScFormatFilter::Get().ScImportExcel( rMedium, &m_aDocument, eFormat );
+ m_aDocument.UpdateFontCharSet();
+ if ( m_aDocument.IsChartListenerCollectionNeedsUpdate() )
+ m_aDocument.UpdateChartListenerCollection(); //! For all imports?
// all graphics objects must have names
- aDocument.EnsureGraphicNames();
+ m_aDocument.EnsureGraphicNames();
if (eError == SCWARN_IMPORT_RANGE_OVERFLOW)
{
@@ -1255,7 +1255,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!pOrcus)
return false;
- bRet = pOrcus->importGnumeric(aDocument, rMedium);
+ bRet = pOrcus->importGnumeric(m_aDocument, rMedium);
}
else if (aFltName == "MS Excel 2003 XML Orcus")
{
@@ -1263,7 +1263,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!pOrcus)
return false;
- bRet = pOrcus->importExcel2003XML(aDocument, rMedium);
+ bRet = pOrcus->importExcel2003XML(m_aDocument, rMedium);
}
else if (aFltName == pFilterAscii)
{
@@ -1295,7 +1295,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if( ! rMedium.IsStorage() )
{
- ScImportExport aImpEx( &aDocument );
+ ScImportExport aImpEx( &m_aDocument );
aImpEx.SetExtOptions( aOptions );
SvStream* pInStream = rMedium.GetInStream();
@@ -1305,9 +1305,9 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
pInStream->Seek( 0 );
bRet = aImpEx.ImportStream( *pInStream, rMedium.GetBaseURL(), SotClipboardFormatId::STRING );
eError = bRet ? ERRCODE_NONE : SCERR_IMPORT_CONNECT;
- aDocument.StartAllListeners();
+ m_aDocument.StartAllListeners();
sc::SetFormulaDirtyContext aCxt;
- aDocument.SetAllFormulasDirty(aCxt);
+ m_aDocument.SetAllFormulasDirty(aCxt);
// The same resulting name has to be handled in
// ScExternalRefCache::initializeDoc() and related, hence
@@ -1319,7 +1319,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
// corresponding places of the external references
// manager/cache. Likely then we'd also need a method to
// compose a name excluding such characters.
- aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+ m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
bOverflowRow = aImpEx.IsOverflowRow();
bOverflowCol = aImpEx.IsOverflowCol();
@@ -1407,7 +1407,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_MS_1252 );
}
- eError = ScFormatFilter::Get().ScImportDif( *pStream, &aDocument, ScAddress(0,0,0),
+ eError = ScFormatFilter::Get().ScImportDif( *pStream, &m_aDocument, ScAddress(0,0,0),
ScGlobal::GetCharsetValue(sItStr));
if (eError != ERRCODE_NONE)
{
@@ -1431,7 +1431,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bOverflowRow = bOverflowCol = bOverflowCell = false;
if( !rMedium.IsStorage() )
{
- ScImportExport aImpEx( &aDocument );
+ ScImportExport aImpEx( &m_aDocument );
SvStream* pInStream = rMedium.GetInStream();
if (pInStream)
@@ -1439,9 +1439,9 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
pInStream->Seek( 0 );
bRet = aImpEx.ImportStream( *pInStream, rMedium.GetBaseURL(), SotClipboardFormatId::SYLK );
eError = bRet ? ERRCODE_NONE : SCERR_IMPORT_UNKNOWN;
- aDocument.StartAllListeners();
+ m_aDocument.StartAllListeners();
sc::SetFormulaDirtyContext aCxt;
- aDocument.SetAllFormulasDirty(aCxt);
+ m_aDocument.SetAllFormulasDirty(aCxt);
bOverflowRow = aImpEx.IsOverflowRow();
bOverflowCol = aImpEx.IsOverflowCol();
@@ -1469,7 +1469,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else if (aFltName == pFilterQPro6)
{
- ErrCode eError = ScFormatFilter::Get().ScImportQuattroPro(rMedium.GetInStream(), &aDocument);
+ ErrCode eError = ScFormatFilter::Get().ScImportQuattroPro(rMedium.GetInStream(), &m_aDocument);
if (eError != ERRCODE_NONE)
{
if (!GetError())
@@ -1495,7 +1495,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
pInStream->Seek( 0 );
ScRange aRange;
- eError = ScFormatFilter::Get().ScImportRTF( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange );
+ eError = ScFormatFilter::Get().ScImportRTF( *pInStream, rMedium.GetBaseURL(), &m_aDocument, aRange );
if (eError != ERRCODE_NONE)
{
if (!GetError())
@@ -1506,9 +1506,9 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
bRet = true;
- aDocument.StartAllListeners();
+ m_aDocument.StartAllListeners();
sc::SetFormulaDirtyContext aCxt;
- aDocument.SetAllFormulasDirty(aCxt);
+ m_aDocument.SetAllFormulasDirty(aCxt);
bSetColWidths = true;
bSetRowHeights = true;
}
@@ -1546,7 +1546,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
// HTML does its own ColWidth/RowHeight
CalcOutputFactor();
SvNumberFormatter aNumFormatter( comphelper::getProcessComponentContext(), eLang);
- eError = ScFormatFilter::Get().ScImportHTML( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange,
+ eError = ScFormatFilter::Get().ScImportHTML( *pInStream, rMedium.GetBaseURL(), &m_aDocument, aRange,
GetOutputFactor(), !bWebQuery, &aNumFormatter, bDateConvert );
if (eError != ERRCODE_NONE)
{
@@ -1558,10 +1558,10 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
bRet = true;
- aDocument.StartAllListeners();
+ m_aDocument.StartAllListeners();
sc::SetFormulaDirtyContext aCxt;
- aDocument.SetAllFormulasDirty(aCxt);
+ m_aDocument.SetAllFormulasDirty(aCxt);
}
else
{
@@ -1582,7 +1582,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
if (!bCalc3)
- aDocument.SetInsertingFromOtherDoc( false );
+ m_aDocument.SetInsertingFromOtherDoc( false );
}
else
{
@@ -1598,12 +1598,12 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
double nPPTY = ScGlobal::nScreenPPTY * static_cast<double>(aZoom);
ScopedVclPtrInstance< VirtualDevice > pVirtDev;
// all sheets (for Excel import)
- SCTAB nTabCount = aDocument.GetTableCount();
+ SCTAB nTabCount = m_aDocument.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
SCCOL nEndCol;
SCROW nEndRow;
- aDocument.GetCellArea( nTab, nEndCol, nEndRow );
+ m_aDocument.GetCellArea( nTab, nEndCol, nEndRow );
aColWidthRange.aEnd.SetCol( nEndCol );
aColWidthRange.aEnd.SetRow( nEndRow );
ScMarkData aMark;
@@ -1618,10 +1618,10 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!bSetSimpleTextColWidths)
aColWidthParam[nCol].mbSimpleText = false;
- sal_uInt16 nWidth = aDocument.GetOptimalColWidth(
+ sal_uInt16 nWidth = m_aDocument.GetOptimalColWidth(
nCol, nTab, pVirtDev, nPPTX, nPPTY, aZoom, aZoom, false, &aMark,
&aColWidthParam[nCol] );
- aDocument.SetColWidth( nCol, nTab,
+ m_aDocument.SetColWidth( nCol, nTab,
nWidth + static_cast<sal_uInt16>(ScGlobal::nLastColWidthExtra) );
}
}
@@ -1631,14 +1631,14 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
// Update all rows in all tables.
ScSizeDeviceProvider aProv(this);
- ScDocRowHeightUpdater aUpdater(aDocument, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), nullptr);
+ ScDocRowHeightUpdater aUpdater(m_aDocument, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), nullptr);
aUpdater.update();
}
else if (!aRecalcRowRangesArray.empty())
{
// Update only specified row ranges for better performance.
ScSizeDeviceProvider aProv(this);
- ScDocRowHeightUpdater aUpdater(aDocument, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), &aRecalcRowRangesArray);
+ ScDocRowHeightUpdater aUpdater(m_aDocument, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), &aRecalcRowRangesArray);
aUpdater.update();
}
}
@@ -1646,9 +1646,9 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
// invalidate eventually temporary table areas
if ( bRet )
- aDocument.InvalidateTableArea();
+ m_aDocument.InvalidateTableArea();
- bIsEmpty = false;
+ m_bIsEmpty = false;
return bRet;
}
@@ -1668,22 +1668,22 @@ bool ScDocShell::LoadExternal( SfxMedium& rMed )
const OUString& rFilterName = pFilter->GetName();
if (rFilterName == "gnumeric")
{
- if (!pOrcus->importGnumeric(aDocument, rMed))
+ if (!pOrcus->importGnumeric(m_aDocument, rMed))
return false;
}
else if (rFilterName == "csv")
{
- if (!pOrcus->importCSV(aDocument, rMed))
+ if (!pOrcus->importCSV(m_aDocument, rMed))
return false;
}
else if (rFilterName == "xlsx")
{
- if (!pOrcus->importXLSX(aDocument, rMed))
+ if (!pOrcus->importXLSX(m_aDocument, rMed))
return false;
}
else if (rFilterName == "ods")
{
- if (!pOrcus->importODS(aDocument, rMed))
+ if (!pOrcus->importODS(m_aDocument, rMed))
return false;
}
@@ -1699,19 +1699,19 @@ ScDocShell::PrepareSaveGuard::PrepareSaveGuard( ScDocShell& rDocShell )
{
// DoEnterHandler not here (because of AutoSave), is in ExecuteSave.
- ScChartListenerCollection* pCharts = mrDocShell.aDocument.GetChartListenerCollection();
+ ScChartListenerCollection* pCharts = mrDocShell.m_aDocument.GetChartListenerCollection();
if (pCharts)
pCharts->UpdateDirtyCharts(); // Charts to be updated.
- mrDocShell.aDocument.StopTemporaryChartLock();
- if (mrDocShell.pAutoStyleList)
- mrDocShell.pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now.
- if (mrDocShell.aDocument.HasExternalRefManager())
+ mrDocShell.m_aDocument.StopTemporaryChartLock();
+ if (mrDocShell.m_pAutoStyleList)
+ mrDocShell.m_pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now.
+ if (mrDocShell.m_aDocument.HasExternalRefManager())
{
- ScExternalRefManager* pRefMgr = mrDocShell.aDocument.GetExternalRefManager();
+ ScExternalRefManager* pRefMgr = mrDocShell.m_aDocument.GetExternalRefManager();
if (pRefMgr && pRefMgr->hasExternalData())
{
pRefMgr->setAllCacheTableReferencedStati( false);
- mrDocShell.aDocument.MarkUsedExternalReferences(); // Mark tables of external references to be written.
+ mrDocShell.m_aDocument.MarkUsedExternalReferences(); // Mark tables of external references to be written.
}
}
if (mrDocShell.GetCreateMode()== SfxObjectCreateMode::STANDARD)
@@ -1720,9 +1720,9 @@ ScDocShell::PrepareSaveGuard::PrepareSaveGuard( ScDocShell& rDocShell )
ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()
{
- if (mrDocShell.aDocument.HasExternalRefManager())
+ if (mrDocShell.m_aDocument.HasExternalRefManager())
{
- ScExternalRefManager* pRefMgr = mrDocShell.aDocument.GetExternalRefManager();
+ ScExternalRefManager* pRefMgr = mrDocShell.m_aDocument.GetExternalRefManager();
if (pRefMgr && pRefMgr->hasExternalData())
{
// Prevent accidental data loss due to lack of knowledge.
@@ -1733,7 +1733,7 @@ ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()
bool ScDocShell::Save()
{
- ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() );
+ ScRefreshTimerProtector aProt( m_aDocument.GetRefreshTimerControlAddress() );
PrepareSaveGuard aPrepareGuard( *this);
@@ -1793,18 +1793,18 @@ bool ScDocShell::SaveAs( SfxMedium& rMedium )
if (!aRel.isEmpty())
{
// Directory path will change before and after the save.
- aDocument.InvalidateStreamOnSave();
+ m_aDocument.InvalidateStreamOnSave();
}
}
ScTabViewShell* pViewShell = GetBestViewShell();
- bool bNeedsRehash = ScPassHashHelper::needsPassHashRegen(aDocument, PASSHASH_SHA1);
+ bool bNeedsRehash = ScPassHashHelper::needsPassHashRegen(m_aDocument, PASSHASH_SHA1);
if (bNeedsRehash)
// legacy xls hash double-hashed by SHA1 is also supported.
- bNeedsRehash = ScPassHashHelper::needsPassHashRegen(aDocument, PASSHASH_XL, PASSHASH_SHA1);
+ bNeedsRehash = ScPassHashHelper::needsPassHashRegen(m_aDocument, PASSHASH_XL, PASSHASH_SHA1);
if (bNeedsRehash)
{ // SHA256 explicitly supported in ODF 1.2, implicitly in ODF 1.1
- bNeedsRehash = ScPassHashHelper::needsPassHashRegen(aDocument, PASSHASH_SHA256);
+ bNeedsRehash = ScPassHashHelper::needsPassHashRegen(m_aDocument, PASSHASH_SHA256);
}
if (pViewShell && bNeedsRehash)
@@ -1814,7 +1814,7 @@ bool ScDocShell::SaveAs( SfxMedium& rMedium )
return false;
}
- ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() );
+ ScRefreshTimerProtector aProt( m_aDocument.GetRefreshTimerControlAddress() );
PrepareSaveGuard aPrepareGuard( *this);
@@ -1989,13 +1989,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
SCTAB nTab = GetSaveTab();
SCCOL nEndCol;
SCROW nEndRow;
- aDocument.GetCellArea( nTab, nEndCol, nEndRow );
+ m_aDocument.GetCellArea( nTab, nEndCol, nEndRow );
ScProgress aProgress( this, ScResId( STR_SAVE_DOC ), nEndRow, true );
OUString aString;
- bool bTabProtect = aDocument.IsTabProtected( nTab );
+ bool bTabProtect = m_aDocument.IsTabProtected( nTab );
SCCOL nCol;
SCROW nRow;
@@ -2003,9 +2003,9 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
SCROW nNextRow = nStartRow;
SCCOL nEmptyCol;
SCROW nEmptyRow;
- SvNumberFormatter& rFormatter = *aDocument.GetFormatTable();
+ SvNumberFormatter& rFormatter = *m_aDocument.GetFormatTable();
- ScHorizontalCellIterator aIter( &aDocument, nTab, nStartCol, nStartRow,
+ ScHorizontalCellIterator aIter( &m_aDocument, nTab, nStartCol, nStartRow,
nEndCol, nEndRow );
ScRefCellValue* pCell;
while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != nullptr )
@@ -2018,7 +2018,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{ // remaining columns of last row
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
- aDocument, nTab, nEmptyCol );
+ m_aDocument, nTab, nEmptyCol );
else if ( cDelim != 0 )
rStream.WriteUniOrByteChar( cDelim );
}
@@ -2030,7 +2030,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
- aDocument, nTab, nEmptyCol );
+ m_aDocument, nTab, nEmptyCol );
else if ( cDelim != 0 )
rStream.WriteUniOrByteChar( cDelim );
}
@@ -2040,7 +2040,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{ // empty columns at beginning of row
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
- aDocument, nTab, nEmptyCol );
+ m_aDocument, nTab, nEmptyCol );
else if ( cDelim != 0 )
rStream.WriteUniOrByteChar( cDelim );
}
@@ -2052,7 +2052,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{ // columns in between
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
- aDocument, nTab, nEmptyCol );
+ m_aDocument, nTab, nEmptyCol );
else if ( cDelim != 0 )
rStream.WriteUniOrByteChar( cDelim );
}
@@ -2071,7 +2071,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( bTabProtect )
{
const ScProtectionAttr* pProtAttr =
- aDocument.GetAttr( nCol, nRow, nTab, ATTR_PROTECTION );
+ m_aDocument.GetAttr( nCol, nRow, nTab, ATTR_PROTECTION );
if ( pProtAttr->GetHideCell() ||
( eType == CELLTYPE_FORMULA && bShowFormulas &&
pProtAttr->GetHideFormula() ) )
@@ -2099,16 +2099,16 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else if (pCell->mpFormula->IsValue())
{
- sal_uInt32 nFormat = aDocument.GetNumberFormat(aPos);
+ sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
if ( bFixedWidth || bSaveAsShown )
{
Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &aDocument);
+ ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
bString = bSaveAsShown && rFormatter.IsTextFormat( nFormat);
}
else
{
- ScCellFormat::GetInputString(*pCell, nFormat, aString, rFormatter, &aDocument);
+ ScCellFormat::GetInputString(*pCell, nFormat, aString, rFormatter, &m_aDocument);
bString = false;
}
}
@@ -2116,9 +2116,9 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{
if ( bSaveAsShown )
{
- sal_uInt32 nFormat = aDocument.GetNumberFormat(aPos);
+ sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &aDocument);
+ ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
}
else
aString = pCell->mpFormula->GetString().getString();
@@ -2129,9 +2129,9 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
case CELLTYPE_STRING :
if ( bSaveAsShown )
{
- sal_uInt32 nFormat = aDocument.GetNumberFormat(aPos);
+ sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &aDocument);
+ ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
}
else
aString = pCell->mpString->getString();
@@ -2140,7 +2140,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
case CELLTYPE_EDIT :
{
const EditTextObject* pObj = pCell->mpEditText;
- EditEngine& rEngine = aDocument.GetEditEngine();
+ EditEngine& rEngine = m_aDocument.GetEditEngine();
rEngine.SetText( *pObj);
aString = rEngine.GetText(); // including LF
bString = true;
@@ -2149,16 +2149,16 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
case CELLTYPE_VALUE :
{
sal_uInt32 nFormat;
- aDocument.GetNumberFormat( nCol, nRow, nTab, nFormat );
+ m_aDocument.GetNumberFormat( nCol, nRow, nTab, nFormat );
if ( bFixedWidth || bSaveAsShown )
{
Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &aDocument);
+ ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
bString = bSaveAsShown && rFormatter.IsTextFormat( nFormat);
}
else
{
- ScCellFormat::GetInputString(*pCell, nFormat, aString, rFormatter, &aDocument);
+ ScCellFormat::GetInputString(*pCell, nFormat, aString, rFormatter, &m_aDocument);
bString = false;
}
}
@@ -2172,8 +2172,8 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( bFixedWidth )
{
SvxCellHorJustify eHorJust =
- aDocument.GetAttr( nCol, nRow, nTab, ATTR_HOR_JUSTIFY )->GetValue();
- lcl_ScDocShell_GetFixedWidthString( aString, aDocument, nTab, nCol,
+ m_aDocument.GetAttr( nCol, nRow, nTab, ATTR_HOR_JUSTIFY )->GetValue();
+ lcl_ScDocShell_GetFixedWidthString( aString, m_aDocument, nTab, nCol,
!bString, eHorJust );
rStream.WriteUnicodeOrByteText( aString );
}
@@ -2295,7 +2295,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{ // remaining empty columns of last row
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
- aDocument, nTab, nEmptyCol );
+ m_aDocument, nTab, nEmptyCol );
else if ( cDelim != 0 )
rStream.WriteUniOrByteChar( cDelim );
}
@@ -2308,7 +2308,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
- aDocument, nTab, nEmptyCol );
+ m_aDocument, nTab, nEmptyCol );
else if ( cDelim != 0 )
rStream.WriteUniOrByteChar( cDelim );
}
@@ -2321,13 +2321,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
bool ScDocShell::ConvertTo( SfxMedium &rMed )
{
- ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() );
+ ScRefreshTimerProtector aProt( m_aDocument.GetRefreshTimerControlAddress() );
// #i6500# don't call DoEnterHandler here (doesn't work with AutoSave),
// it's already in ExecuteSave (as for Save and SaveAs)
- if (pAutoStyleList)
- pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now
+ if (m_pAutoStyleList)
+ m_pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now
if (GetCreateMode()== SfxObjectCreateMode::STANDARD)
SfxObjectShell::SetVisArea( tools::Rectangle() ); // Edited normally -> no VisArea
@@ -2351,9 +2351,9 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
bool bDoSave = true;
if( ScTabViewShell* pViewShell = GetBestViewShell() )
{
- ScExtDocOptions* pExtDocOpt = aDocument.GetExtDocOptions();
+ ScExtDocOptions* pExtDocOpt = m_aDocument.GetExtDocOptions();
if( !pExtDocOpt )
- aDocument.SetExtDocOptions( pExtDocOpt = new ScExtDocOptions );
+ m_aDocument.SetExtDocOptions( pExtDocOpt = new ScExtDocOptions );
pViewShell->GetViewData().WriteExtOptions( *pExtDocOpt );
/* #i104990# If the imported document contains a medium
@@ -2374,7 +2374,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
if( bDoSave )
{
- bool bNeedRetypePassDlg = ScPassHashHelper::needsPassHashRegen( aDocument, PASSHASH_XL );
+ bool bNeedRetypePassDlg = ScPassHashHelper::needsPassHashRegen( m_aDocument, PASSHASH_XL );
bDoSave = !bNeedRetypePassDlg || pViewShell->ExecuteRetypePassDlg( PASSHASH_XL );
}
}
@@ -2384,7 +2384,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
ExportFormatExcel eFormat = ExpBiff5;
if( aFltName == pFilterExcel97 || aFltName == pFilterEx97Temp )
eFormat = ExpBiff8;
- ErrCode eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 );
+ ErrCode eError = ScFormatFilter::Get().ScExportExcel5( rMed, &m_aDocument, eFormat, RTL_TEXTENCODING_MS_1252 );
if( eError && !GetError() )
SetError(eError);
@@ -2426,7 +2426,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
AsciiSave( *pStream, aOptions );
bRet = true;
- if (aDocument.GetTableCount() > 1)
+ if (m_aDocument.GetTableCount() > 1)
if (!rMed.GetError())
rMed.SetError(SCWARN_EXPORT_ASCII);
}
@@ -2523,11 +2523,11 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
}
WaitObject aWait( GetActiveDialogParent() );
- ScFormatFilter::Get().ScExportDif( *pStream, &aDocument, ScAddress(0,0,0),
+ ScFormatFilter::Get().ScExportDif( *pStream, &m_aDocument, ScAddress(0,0,0),
ScGlobal::GetCharsetValue(sItStr) );
bRet = true;
- if (aDocument.GetTableCount() > 1)
+ if (m_aDocument.GetTableCount() > 1)
if (!rMed.GetError())
rMed.SetError(SCWARN_EXPORT_ASCII);
}
@@ -2541,10 +2541,10 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
SCCOL nEndCol;
SCROW nEndRow;
- aDocument.GetCellArea( 0, nEndCol, nEndRow );
+ m_aDocument.GetCellArea( 0, nEndCol, nEndRow );
ScRange aRange( 0,0,0, nEndCol,nEndRow,0 );
- ScImportExport aImExport( &aDocument, aRange );
+ ScImportExport aImExport( &m_aDocument, aRange );
aImExport.SetFormulas( true );
bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SotClipboardFormatId::SYLK );
}
@@ -2562,7 +2562,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
sFilterOptions = static_cast<const SfxStringItem*>(pItem)->GetValue();
WaitObject aWait(GetActiveDialogParent());
- ScImportExport aImExport(&aDocument);
+ ScImportExport aImExport(&m_aDocument);
aImExport.SetStreamPath(rMed.GetName());
aImExport.SetFilterOptions(sFilterOptions);
bRet = aImExport.ExportStream(*pStream, rMed.GetBaseURL(true), SotClipboardFormatId::HTML);
@@ -2617,7 +2617,7 @@ bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId )
bool bSlotExecutable = true;
if( nVbaEventId != VBAEventId::NO_EVENT ) try
{
- uno::Reference< XVBAEventProcessor > xEventProcessor( aDocument.GetVbaEventProcessor(), uno::UNO_QUERY_THROW );
+ uno::Reference< XVBAEventProcessor > xEventProcessor( m_aDocument.GetVbaEventProcessor(), uno::UNO_QUERY_THROW );
xEventProcessor->processVbaEvent( nVbaEventId, aArgs );
}
catch( util::VetoException& )
@@ -2648,7 +2648,7 @@ bool ScDocShell::PrepareClose( bool bUI )
return false;
}
- if ( aDocument.IsInLinkUpdate() || aDocument.IsInInterpreter() )
+ if ( m_aDocument.IsInLinkUpdate() || m_aDocument.IsInInterpreter() )
{
ErrorMessage(STR_CLOSE_ERROR_LINK);
return false;
@@ -2661,7 +2661,7 @@ bool ScDocShell::PrepareClose( bool bUI )
{
try
{
- uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( aDocument.GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( m_aDocument.GetVbaEventProcessor(), uno::UNO_SET_THROW );
uno::Sequence< uno::Any > aArgs;
xVbaEvents->processVbaEvent( script::vba::VBAEventId::WORKBOOK_BEFORECLOSE, aArgs );
}
@@ -2678,7 +2678,7 @@ bool ScDocShell::PrepareClose( bool bUI )
bool bRet = SfxObjectShell::PrepareClose( bUI );
if (bRet) // true == close
- aDocument.EnableIdle(false); // Do not mess around with it anymore!
+ m_aDocument.EnableIdle(false); // Do not mess around with it anymore!
return bRet;
}
@@ -2693,7 +2693,7 @@ void ScDocShell::PrepareReload()
// This causes a hang.
//
// Thus: Disconnect the DDE Links of the old Document before Reload
- aDocument.GetDocLinkManager().disconnectDdeLinks();
+ m_aDocument.GetDocLinkManager().disconnectDdeLinks();
}
OUString ScDocShell::GetOwnFilterName()
@@ -2757,85 +2757,85 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) :
SotObject(),
SfxObjectShell( rShell.GetCreateMode() ),
SfxListener(),
- aDocument ( SCDOCMODE_DOCUMENT, this ),
- aDdeTextFmt(OUString("TEXT")),
- nPrtToScreenFactor( 1.0 ),
- pImpl ( new DocShell_Impl ),
- bHeaderOn ( true ),
- bFooterOn ( true ),
- bIsEmpty ( true ),
- bIsInUndo ( false ),
- bDocumentModifiedPending( false ),
- bUpdateEnabled ( true ),
- mbUcalcTest(rShell.mbUcalcTest),
- nDocumentLock ( 0 ),
- nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG),
- pOldAutoDBRange ( nullptr ),
- pAutoStyleList ( nullptr ),
- pPaintLockData ( nullptr ),
- pSolverSaveData ( nullptr ),
- pSheetSaveData ( nullptr ),
- mpFormatSaveData( nullptr ),
- pModificator ( nullptr )
+ m_aDocument ( SCDOCMODE_DOCUMENT, this ),
+ m_aDdeTextFmt(OUString("TEXT")),
+ m_nPrtToScreenFactor( 1.0 ),
+ m_pImpl ( new DocShell_Impl ),
+ m_bHeaderOn ( true ),
+ m_bFooterOn ( true ),
+ m_bIsEmpty ( true ),
+ m_bIsInUndo ( false ),
+ m_bDocumentModifiedPending( false ),
+ m_bUpdateEnabled ( true ),
+ m_bUcalcTest(rShell.m_bUcalcTest),
+ m_nDocumentLock ( 0 ),
+ m_nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG),
+ m_pOldAutoDBRange ( nullptr ),
+ m_pAutoStyleList ( nullptr ),
+ m_pPaintLockData ( nullptr ),
+ m_pSolverSaveData ( nullptr ),
+ m_pSheetSaveData ( nullptr ),
+ m_pFormatSaveData( nullptr ),
+ m_pModificator ( nullptr )
{
SetPool( &SC_MOD()->GetPool() );
- bIsInplace = rShell.bIsInplace;
+ m_bIsInplace = rShell.m_bIsInplace;
- pDocFunc = CreateDocFunc();
+ m_pDocFunc = CreateDocFunc();
// SetBaseModel needs exception handling
ScModelObj::CreateAndSet( this );
StartListening(*this);
- SfxStyleSheetPool* pStlPool = aDocument.GetStyleSheetPool();
+ SfxStyleSheetPool* pStlPool = m_aDocument.GetStyleSheetPool();
if (pStlPool)
StartListening(*pStlPool);
- GetPageOnFromPageStyleSet( nullptr, 0, bHeaderOn, bFooterOn );
+ GetPageOnFromPageStyleSet( nullptr, 0, m_bHeaderOn, m_bFooterOn );
// InitItems and CalcOutputFactor are called now in Load/ConvertFrom/InitNew
}
ScDocShell::ScDocShell( const SfxModelFlags i_nSfxCreationFlags ) :
SfxObjectShell( i_nSfxCreationFlags ),
- aDocument ( SCDOCMODE_DOCUMENT, this ),
- aDdeTextFmt(OUString("TEXT")),
- nPrtToScreenFactor( 1.0 ),
- pImpl ( new DocShell_Impl ),
- bHeaderOn ( true ),
- bFooterOn ( true ),
- bIsEmpty ( true ),
- bIsInUndo ( false ),
- bDocumentModifiedPending( false ),
- bUpdateEnabled ( true ),
- mbUcalcTest ( false ),
- nDocumentLock ( 0 ),
- nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG),
- pOldAutoDBRange ( nullptr ),
- pAutoStyleList ( nullptr ),
- pPaintLockData ( nullptr ),
- pSolverSaveData ( nullptr ),
- pSheetSaveData ( nullptr ),
- mpFormatSaveData( nullptr ),
- pModificator ( nullptr )
+ m_aDocument ( SCDOCMODE_DOCUMENT, this ),
+ m_aDdeTextFmt(OUString("TEXT")),
+ m_nPrtToScreenFactor( 1.0 ),
+ m_pImpl ( new DocShell_Impl ),
+ m_bHeaderOn ( true ),
+ m_bFooterOn ( true ),
+ m_bIsEmpty ( true ),
+ m_bIsInUndo ( false ),
+ m_bDocumentModifiedPending( false ),
+ m_bUpdateEnabled ( true ),
+ m_bUcalcTest ( false ),
+ m_nDocumentLock ( 0 ),
+ m_nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG),
+ m_pOldAutoDBRange ( nullptr ),
+ m_pAutoStyleList ( nullptr ),
+ m_pPaintLockData ( nullptr ),
+ m_pSolverSaveData ( nullptr ),
+ m_pSheetSaveData ( nullptr ),
+ m_pFormatSaveData( nullptr ),
+ m_pModificator ( nullptr )
{
SetPool( &SC_MOD()->GetPool() );
- bIsInplace = (GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
+ m_bIsInplace = (GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
// Will be reset if not in place
- pDocFunc = CreateDocFunc();
+ m_pDocFunc = CreateDocFunc();
// SetBaseModel needs exception handling
ScModelObj::CreateAndSet( this );
StartListening(*this);
- SfxStyleSheetPool* pStlPool = aDocument.GetStyleSheetPool();
+ SfxStyleSheetPool* pStlPool = m_aDocument.GetStyleSheetPool();
if (pStlPool)
StartListening(*pStlPool);
- aDocument.GetDBCollection()->SetRefreshHandler(
+ m_aDocument.GetDBCollection()->SetRefreshHandler(
LINK( this, ScDocShell, RefreshDBDataHdl ) );
// InitItems and CalcOutputFactor are called now in Load/ConvertFrom/InitNew
@@ -2845,39 +2845,39 @@ ScDocShell::~ScDocShell()
{
ResetDrawObjectShell(); // If the Drawing Layer still tries to access it, access it
- SfxStyleSheetPool* pStlPool = aDocument.GetStyleSheetPool();
+ SfxStyleSheetPool* pStlPool = m_aDocument.GetStyleSheetPool();
if (pStlPool)
EndListening(*pStlPool);
EndListening(*this);
- delete pAutoStyleList;
+ delete m_pAutoStyleList;
SfxApplication *pSfxApp = SfxGetpApp();
if ( pSfxApp->GetDdeService() ) // Delete DDE for Document
pSfxApp->RemoveDdeTopic( this );
- delete pDocFunc;
- delete aDocument.mpUndoManager;
- aDocument.mpUndoManager = nullptr;
- delete pImpl;
+ delete m_pDocFunc;
+ delete m_aDocument.mpUndoManager;
+ m_aDocument.mpUndoManager = nullptr;
+ delete m_pImpl;
- delete pPaintLockData;
+ delete m_pPaintLockData;
- delete pSolverSaveData;
- delete pSheetSaveData;
- delete mpFormatSaveData;
- delete pOldAutoDBRange;
+ delete m_pSolverSaveData;
+ delete m_pSheetSaveData;
+ delete m_pFormatSaveData;
+ delete m_pOldAutoDBRange;
- if (pModificator)
+ if (m_pModificator)
{
OSL_FAIL("The Modificator should not exist");
- delete pModificator;
+ delete m_pModificator;
}
}
::svl::IUndoManager* ScDocShell::GetUndoManager()
{
- return aDocument.GetUndoManager();
+ return m_aDocument.GetUndoManager();
}
void ScDocShell::SetModified( bool bModified )
@@ -2895,32 +2895,32 @@ void ScDocShell::SetDocumentModified()
// FIXME: Also for SetDrawModified, if Drawing is connected
// FIXME: Then own Hint?
- if ( pPaintLockData )
+ if ( m_pPaintLockData )
{
// #i115009# broadcast BCA_BRDCST_ALWAYS, so a component can read recalculated results
// of RecalcModeAlways formulas (like OFFSET) after modifying cells
- aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
- aDocument.InvalidateTableArea(); // #i105279# needed here
- aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
+ m_aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
+ m_aDocument.InvalidateTableArea(); // #i105279# needed here
+ m_aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
- pPaintLockData->SetModified(); // Later on ...
+ m_pPaintLockData->SetModified(); // Later on ...
return;
}
SetDrawModified();
- if ( aDocument.IsAutoCalcShellDisabled() )
+ if ( m_aDocument.IsAutoCalcShellDisabled() )
SetDocumentModifiedPending( true );
else
{
SetDocumentModifiedPending( false );
- aDocument.InvalidateStyleSheetUsage();
- aDocument.InvalidateTableArea();
- aDocument.InvalidateLastTableOpParams();
- aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
- if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() )
- aDocument.CalcFormulaTree( true );
- aDocument.RefreshDirtyTableColumnNames();
+ m_aDocument.InvalidateStyleSheetUsage();
+ m_aDocument.InvalidateTableArea();
+ m_aDocument.InvalidateLastTableOpParams();
+ m_aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
+ if ( m_aDocument.IsForcedFormulaPending() && m_aDocument.GetAutoCalc() )
+ m_aDocument.CalcFormulaTree( true );
+ m_aDocument.RefreshDirtyTableColumnNames();
PostDataChanged();
// Detective AutoUpdate:
@@ -2928,17 +2928,17 @@ void ScDocShell::SetDocumentModified()
// "Trace Error" entries (Trace Error can look completely different
// after changes to non-formula cells).
- ScDetOpList* pList = aDocument.GetDetOpList();
- if ( pList && ( aDocument.IsDetectiveDirty() || pList->HasAddError() ) &&
+ ScDetOpList* pList = m_aDocument.GetDetOpList();
+ if ( pList && ( m_aDocument.IsDetectiveDirty() || pList->HasAddError() ) &&
pList->Count() && !IsInUndo() && SC_MOD()->GetAppOptions().GetDetectiveAuto() )
{
GetDocFunc().DetectiveRefresh(true); // sal_True = caused by automatic update
}
- aDocument.SetDetectiveDirty(false); // always reset, also if not refreshed
+ m_aDocument.SetDetectiveDirty(false); // always reset, also if not refreshed
}
// notify UNO objects after BCA_BRDCST_ALWAYS etc.
- aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
+ m_aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
}
/**
@@ -2973,9 +2973,9 @@ void ScDocShell::SetDrawModified()
pBindings->Invalidate( SID_REPEAT );
}
- if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
+ if ( m_aDocument.IsChartListenerCollectionNeedsUpdate() )
{
- aDocument.UpdateChartListenerCollection();
+ m_aDocument.UpdateChartListenerCollection();
SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDrawChanged )); // Navigator
}
SC_MOD()->AnythingChanged();
@@ -2983,14 +2983,14 @@ void ScDocShell::SetDrawModified()
void ScDocShell::SetInUndo(bool bSet)
{
- bIsInUndo = bSet;
+ m_bIsInUndo = bSet;
}
void ScDocShell::GetDocStat( ScDocStat& rDocStat )
{
SfxPrinter* pPrinter = GetPrinter();
- aDocument.GetDocStat( rDocStat );
+ m_aDocument.GetDocStat( rDocStat );
rDocStat.nPageCount = 0;
if ( pPrinter )
@@ -3031,24 +3031,24 @@ vcl::Window* ScDocShell::GetActiveDialogParent()
void ScDocShell::SetSolverSaveData( const ScOptSolverSave& rData )
{
- delete pSolverSaveData;
- pSolverSaveData = new ScOptSolverSave( rData );
+ delete m_pSolverSaveData;
+ m_pSolverSaveData = new ScOptSolverSave( rData );
}
ScSheetSaveData* ScDocShell::GetSheetSaveData()
{
- if (!pSheetSaveData)
- pSheetSaveData = new ScSheetSaveData;
+ if (!m_pSheetSaveData)
+ m_pSheetSaveData = new ScSheetSaveData;
- return pSheetSaveData;
+ return m_pSheetSaveData;
}
ScFormatSaveData* ScDocShell::GetFormatSaveData()
{
- if (!mpFormatSaveData)
- mpFormatSaveData = new ScFormatSaveData;
+ if (!m_pFormatSaveData)
+ m_pFormatSaveData = new ScFormatSaveData;
- return mpFormatSaveData;
+ return m_pFormatSaveData;
}
namespace {
@@ -3188,15 +3188,15 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
void ScDocShell::UseSheetSaveEntries()
{
- if (pSheetSaveData)
+ if (m_pSheetSaveData)
{
- pSheetSaveData->UseSaveEntries(); // use positions from saved file for next saving
+ m_pSheetSaveData->UseSaveEntries(); // use positions from saved file for next saving
bool bHasEntries = false;
- SCTAB nTabCount = aDocument.GetTableCount();
+ SCTAB nTabCount = m_aDocument.GetTableCount();
SCTAB nTab;
for (nTab = 0; nTab < nTabCount; ++nTab)
- if (pSheetSaveData->HasStreamPos(nTab))
+ if (m_pSheetSaveData->HasStreamPos(nTab))
bHasEntries = true;
if (!bHasEntries)
@@ -3204,7 +3204,7 @@ void ScDocShell::UseSheetSaveEntries()
// if no positions were set (for example, export to other format),
// reset all "valid" flags
for (nTab = 0; nTab < nTabCount; ++nTab)
- aDocument.SetStreamValid(nTab, false);
+ m_aDocument.SetStreamValid(nTab, false);
}
}
}
@@ -3254,14 +3254,14 @@ void ScDocShellModificator::SetDocumentModified()
bool ScDocShell::IsChangeRecording() const
{
- ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pChangeTrack = m_aDocument.GetChangeTrack();
return pChangeTrack != nullptr;
}
bool ScDocShell::HasChangeRecordProtection() const
{
bool bRes = false;
- ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pChangeTrack = m_aDocument.GetChangeTrack();
if (pChangeTrack)
bRes = pChangeTrack->IsProtected();
return bRes;
@@ -3273,14 +3273,14 @@ void ScDocShell::SetChangeRecording( bool bActivate )
if (bActivate)
{
- aDocument.StartChangeTracking();
+ m_aDocument.StartChangeTracking();
ScChangeViewSettings aChangeViewSet;
aChangeViewSet.SetShowChanges(true);
- aDocument.SetChangeViewSettings(aChangeViewSet);
+ m_aDocument.SetChangeViewSettings(aChangeViewSet);
}
else
{
- aDocument.EndChangeTracking();
+ m_aDocument.EndChangeTracking();
PostPaintGridAll();
}
@@ -3296,7 +3296,7 @@ void ScDocShell::SetChangeRecording( bool bActivate )
void ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
- ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pChangeTrack = m_aDocument.GetChangeTrack();
if (pChangeTrack)
{
bool bProtected = pChangeTrack->IsProtected();
@@ -3326,7 +3326,7 @@ void ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
bool ScDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash )
{
bool bRes = false;
- ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pChangeTrack = m_aDocument.GetChangeTrack();
if (pChangeTrack && pChangeTrack->IsProtected())
{
rPasswordHash = pChangeTrack->GetProtection();
@@ -3337,7 +3337,7 @@ bool ScDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPas
void ScDocShell::SetIsInUcalc()
{
- mbUcalcTest = true;
+ m_bUcalcTest = true;
}
extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportSLK(SvStream &rStream)
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 568e80078c35..e4f4eaaf3c76 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -43,7 +43,7 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
{
bool bRet = SfxObjectShell::InitNew( xStor );
- aDocument.MakeTable(0);
+ m_aDocument.MakeTable(0);
// Additional tables are created by the first View, if bIsEmpty is still sal_True
if( bRet )
@@ -57,10 +57,10 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
// InitOptions sets the document languages, must be called before CreateStandardStyles
InitOptions(false);
- aDocument.GetStyleSheetPool()->CreateStandardStyles();
- aDocument.UpdStlShtPtrsFrmNms();
+ m_aDocument.GetStyleSheetPool()->CreateStandardStyles();
+ m_aDocument.UpdStlShtPtrsFrmNms();
- if (!mbUcalcTest)
+ if (!m_bUcalcTest)
{
/* Create styles that are imported through Orcus */
@@ -73,8 +73,8 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
if (pOrcus)
{
- pOrcus->importODS_Styles(aDocument, aPath);
- aDocument.GetStyleSheetPool()->setAllStandard();
+ pOrcus->importODS_Styles(m_aDocument, aPath);
+ m_aDocument.GetStyleSheetPool()->setAllStandard();
}
}
@@ -87,7 +87,7 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
void ScDocShell::SetEmpty(bool bSet)
{
- bIsEmpty = bSet;
+ m_bIsEmpty = bSet;
}
void ScDocShell::InitItems()
@@ -96,7 +96,7 @@ void ScDocShell::InitItems()
// Printer Options are set in GetPrinter when printing
UpdateFontList();
- ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
+ ScDrawLayer* pDrawLayer = m_aDocument.GetDrawLayer();
if (pDrawLayer)
{
PutItem( SvxColorListItem ( pDrawLayer->GetColorList(), SID_COLOR_TABLE ) );
@@ -108,7 +108,7 @@ void ScDocShell::InitItems()
PutItem( SvxLineEndListItem ( pDrawLayer->GetLineEndList(), SID_LINEEND_LIST ) );
// Other modifications after creation of the DrawLayer
- pDrawLayer->SetNotifyUndoActionHdl( LINK( pDocFunc, ScDocFunc, NotifyDrawUndo ) );
+ pDrawLayer->SetNotifyUndoActionHdl( LINK( m_pDocFunc, ScDocFunc, NotifyDrawUndo ) );
}
else if (!utl::ConfigManager::IsFuzzing())
{
@@ -117,12 +117,12 @@ void ScDocShell::InitItems()
}
if (!utl::ConfigManager::IsFuzzing() &&
- (!aDocument.GetForbiddenCharacters() || !aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning()))
+ (!m_aDocument.GetForbiddenCharacters() || !m_aDocument.IsValidAsianCompression() || !m_aDocument.IsValidAsianKerning()))
{
// get settings from SvxAsianConfig
SvxAsianConfig aAsian;
- if (!aDocument.GetForbiddenCharacters())
+ if (!m_aDocument.GetForbiddenCharacters())
{
// set forbidden characters if necessary
uno::Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
@@ -141,41 +141,41 @@ void ScDocShell::InitItems()
xForbiddenTable->SetForbiddenCharacters( eLang, aForbidden );
}
- aDocument.SetForbiddenCharacters( xForbiddenTable );
+ m_aDocument.SetForbiddenCharacters( xForbiddenTable );
}
}
- if ( !aDocument.IsValidAsianCompression() )
+ if ( !m_aDocument.IsValidAsianCompression() )
{
// set compression mode from configuration if not already set (e.g. XML import)
- aDocument.SetAsianCompression( aAsian.GetCharDistanceCompression() );
+ m_aDocument.SetAsianCompression( aAsian.GetCharDistanceCompression() );
}
- if ( !aDocument.IsValidAsianKerning() )
+ if ( !m_aDocument.IsValidAsianKerning() )
{
// set asian punctuation kerning from configuration if not already set (e.g. XML import)
- aDocument.SetAsianKerning( !aAsian.IsKerningWesternTextOnly() ); // reversed
+ m_aDocument.SetAsianKerning( !aAsian.IsKerningWesternTextOnly() ); // reversed
}
}
}
void ScDocShell::ResetDrawObjectShell()
{
- ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
+ ScDrawLayer* pDrawLayer = m_aDocument.GetDrawLayer();
if (pDrawLayer)
pDrawLayer->SetObjectShell( nullptr );
}
ScDrawLayer* ScDocShell::MakeDrawLayer()
{
- ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
+ ScDrawLayer* pDrawLayer = m_aDocument.GetDrawLayer();
if (!pDrawLayer)
{
- aDocument.InitDrawLayer(this);
- pDrawLayer = aDocument.GetDrawLayer();
+ m_aDocument.InitDrawLayer(this);
+ pDrawLayer = m_aDocument.GetDrawLayer();
InitItems(); // including Undo and Basic
Broadcast( SfxHint( SfxHintId::ScDrawLayerNew ) );
- if (nDocumentLock)
+ if (m_nDocumentLock)
pDrawLayer->setLock(true);
}
return pDrawLayer;
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 37c28e0bed7c..028e24dc9bf8 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -87,7 +87,7 @@ void ScDocShell::PostDataChanged()
{
Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScAnyDataChanged )); // Navigator
- aDocument.PrepareFormulaCalc();
+ m_aDocument.PrepareFormulaCalc();
//! notify navigator directly!
}
@@ -114,7 +114,7 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa
if (!ValidCol(nCol2)) nCol2 = MAXCOL;
if (!ValidRow(nRow2)) nRow2 = MAXROW;
- if ( pPaintLockData )
+ if ( m_pPaintLockData )
{
// #i54081# PaintPartFlags::Extras still has to be broadcast because it changes the
// current sheet if it's invalid. All other flags added to pPaintLockData.
@@ -122,7 +122,7 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa
if ( nLockPart != PaintPartFlags::NONE )
{
//! nExtFlags ???
- pPaintLockData->AddRange( ScRange( nCol1, nRow1, nTab1,
+ m_pPaintLockData->AddRange( ScRange( nCol1, nRow1, nTab1,
nCol2, nRow2, nTab2 ), nLockPart );
}
@@ -142,7 +142,7 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa
// expand for the merged ones
if (nExtFlags & SC_PF_TESTMERGE)
- aDocument.ExtendMerge( nCol1, nRow1, nCol2, nRow2, nTab1 );
+ m_aDocument.ExtendMerge( nCol1, nRow1, nCol2, nRow2, nTab1 );
if ( nCol1 != 0 || nCol2 != MAXCOL )
{
@@ -152,7 +152,7 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa
// support of right-aligned text.
if ( ( nExtFlags & SC_PF_WHOLEROWS ) ||
- aDocument.HasAttrib( nCol1,nRow1,nTab1,
+ m_aDocument.HasAttrib( nCol1,nRow1,nTab1,
MAXCOL,nRow2,nTab2, HasAttrFlags::Rotate | HasAttrFlags::RightOrCenter ) )
{
nCol1 = 0;
@@ -200,7 +200,7 @@ void ScDocShell::PostPaintExtras()
void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange )
{
if ( ( rExtFlags & SC_PF_LINES ) == 0 &&
- aDocument.HasAttrib( rRange, HasAttrFlags::Lines | HasAttrFlags::Shadow | HasAttrFlags::Conditional ) )
+ m_aDocument.HasAttrib( rRange, HasAttrFlags::Lines | HasAttrFlags::Shadow | HasAttrFlags::Conditional ) )
{
// If the range contains lines, shadow or conditional formats,
// set SC_PF_LINES to include one extra cell in all directions.
@@ -210,7 +210,7 @@ void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange )
if ( ( rExtFlags & SC_PF_WHOLEROWS ) == 0 &&
( rRange.aStart.Col() != 0 || rRange.aEnd.Col() != MAXCOL ) &&
- aDocument.HasAttrib( rRange, HasAttrFlags::Rotate | HasAttrFlags::RightOrCenter ) )
+ m_aDocument.HasAttrib( rRange, HasAttrFlags::Rotate | HasAttrFlags::RightOrCenter ) )
{
// If the range contains (logically) right- or center-aligned cells,
// or rotated cells, set SC_PF_WHOLEROWS to paint the whole rows.
@@ -230,23 +230,23 @@ void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW n
void ScDocShell::LockPaint_Impl(bool bDoc)
{
- if ( !pPaintLockData )
- pPaintLockData = new ScPaintLockData;
- pPaintLockData->IncLevel(bDoc);
+ if ( !m_pPaintLockData )
+ m_pPaintLockData = new ScPaintLockData;
+ m_pPaintLockData->IncLevel(bDoc);
}
void ScDocShell::UnlockPaint_Impl(bool bDoc)
{
- if ( pPaintLockData )
+ if ( m_pPaintLockData )
{
- if ( pPaintLockData->GetLevel(bDoc) )
- pPaintLockData->DecLevel(bDoc);
- if (!pPaintLockData->GetLevel(!bDoc) && !pPaintLockData->GetLevel(bDoc))
+ if ( m_pPaintLockData->GetLevel(bDoc) )
+ m_pPaintLockData->DecLevel(bDoc);
+ if (!m_pPaintLockData->GetLevel(!bDoc) && !m_pPaintLockData->GetLevel(bDoc))
{
// Execute Paint now
- ScPaintLockData* pPaint = pPaintLockData;
- pPaintLockData = nullptr; // don't continue collecting
+ ScPaintLockData* pPaint = m_pPaintLockData;
+ m_pPaintLockData = nullptr; // don't continue collecting
ScRangeListRef xRangeList = pPaint->GetRangeList();
if ( xRangeList.is() )
@@ -276,21 +276,21 @@ void ScDocShell::UnlockPaint_Impl(bool bDoc)
void ScDocShell::LockDocument_Impl(sal_uInt16 nNew)
{
- if (!nDocumentLock)
+ if (!m_nDocumentLock)
{
- ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
+ ScDrawLayer* pDrawLayer = m_aDocument.GetDrawLayer();
if (pDrawLayer)
pDrawLayer->setLock(true);
}
- nDocumentLock = nNew;
+ m_nDocumentLock = nNew;
}
void ScDocShell::UnlockDocument_Impl(sal_uInt16 nNew)
{
- nDocumentLock = nNew;
- if (!nDocumentLock)
+ m_nDocumentLock = nNew;
+ if (!m_nDocumentLock)
{
- ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
+ ScDrawLayer* pDrawLayer = m_aDocument.GetDrawLayer();
if (pDrawLayer)
pDrawLayer->setLock(false);
}
@@ -300,14 +300,14 @@ void ScDocShell::SetLockCount(sal_uInt16 nNew)
{
if (nNew) // set
{
- if ( !pPaintLockData )
- pPaintLockData = new ScPaintLockData;
- pPaintLockData->SetDocLevel(nNew-1);
+ if ( !m_pPaintLockData )
+ m_pPaintLockData = new ScPaintLockData;
+ m_pPaintLockData->SetDocLevel(nNew-1);
LockDocument_Impl(nNew);
}
- else if (pPaintLockData) // delete
+ else if (m_pPaintLockData) // delete
{
- pPaintLockData->SetDocLevel(0); // at unlock, execute immediately
+ m_pPaintLockData->SetDocLevel(0); // at unlock, execute immediately
UnlockPaint_Impl(true); // now
UnlockDocument_Impl(0);
}
@@ -326,15 +326,15 @@ void ScDocShell::UnlockPaint()
void ScDocShell::LockDocument()
{
LockPaint_Impl(true);
- LockDocument_Impl(nDocumentLock + 1);
+ LockDocument_Impl(m_nDocumentLock + 1);
}
void ScDocShell::UnlockDocument()
{
- if (nDocumentLock)
+ if (m_nDocumentLock)
{
UnlockPaint_Impl(true);
- UnlockDocument_Impl(nDocumentLock - 1);
+ UnlockDocument_Impl(m_nDocumentLock - 1);
}
else
{
@@ -344,25 +344,25 @@ void ScDocShell::UnlockDocument()
void ScDocShell::SetInplace( bool bInplace )
{
- if (bIsInplace != bInplace)
+ if (m_bIsInplace != bInplace)
{
- bIsInplace = bInplace;
+ m_bIsInplace = bInplace;
CalcOutputFactor();
}
}
void ScDocShell::CalcOutputFactor()
{
- if (bIsInplace)
+ if (m_bIsInplace)
{
- nPrtToScreenFactor = 1.0; // otherwise it does not match the inactive display
+ m_nPrtToScreenFactor = 1.0; // otherwise it does not match the inactive display
return;
}
bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if (bTextWysiwyg)
{
- nPrtToScreenFactor = 1.0;
+ m_nPrtToScreenFactor = 1.0;
return;
}
@@ -370,7 +370,7 @@ void ScDocShell::CalcOutputFactor()
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789");
long nPrinterWidth = 0;
long nWindowWidth = 0;
- const ScPatternAttr* pPattern = &aDocument.GetPool()->GetDefaultItem(ATTR_PATTERN);
+ const ScPatternAttr* pPattern = &m_aDocument.GetPool()->GetDefaultItem(ATTR_PATTERN);
vcl::Font aDefFont;
OutputDevice* pRefDev = GetRefDevice();
@@ -392,11 +392,11 @@ void ScDocShell::CalcOutputFactor()
nWindowWidth = static_cast<long>( nWindowWidth / ScGlobal::nScreenPPTX * HMM_PER_TWIPS );
if (nPrinterWidth && nWindowWidth)
- nPrtToScreenFactor = nPrinterWidth / static_cast<double>(nWindowWidth);
+ m_nPrtToScreenFactor = nPrinterWidth / static_cast<double>(nWindowWidth);
else
{
OSL_FAIL("GetTextSize returns 0 ??");
- nPrtToScreenFactor = 1.0;
+ m_nPrtToScreenFactor = 1.0;
}
}
@@ -431,30 +431,30 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
aDocOpt.SetDate( 30, 12, 1899);
}
- aDocument.SetDocOptions( aDocOpt );
- aDocument.SetViewOptions( aViewOpt );
+ m_aDocument.SetDocOptions( aDocOpt );
+ m_aDocument.SetViewOptions( aViewOpt );
SetFormulaOptions( aFormulaOpt, bForLoading );
// print options are now set directly before the printing
- aDocument.SetLanguage( nDefLang, nCjkLang, nCtlLang );
+ m_aDocument.SetLanguage( nDefLang, nCjkLang, nCtlLang );
}
Printer* ScDocShell::GetDocumentPrinter() // for OLE
{
- return aDocument.GetPrinter();
+ return m_aDocument.GetPrinter();
}
SfxPrinter* ScDocShell::GetPrinter(bool bCreateIfNotExist)
{
- return aDocument.GetPrinter(bCreateIfNotExist);
+ return m_aDocument.GetPrinter(bCreateIfNotExist);
}
void ScDocShell::UpdateFontList()
{
// pImpl->pFontList = new FontList( GetPrinter(), Application::GetDefaultDevice() );
- pImpl->pFontList.reset(new FontList(GetRefDevice(), nullptr));
- SvxFontListItem aFontListItem( pImpl->pFontList.get(), SID_ATTR_CHAR_FONTLIST );
+ m_pImpl->pFontList.reset(new FontList(GetRefDevice(), nullptr));
+ SvxFontListItem aFontListItem( m_pImpl->pFontList.get(), SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
CalcOutputFactor();
@@ -462,21 +462,21 @@ void ScDocShell::UpdateFontList()
OutputDevice* ScDocShell::GetRefDevice()
{
- return aDocument.GetRefDevice();
+ return m_aDocument.GetRefDevice();
}
sal_uInt16 ScDocShell::SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter, SfxPrinterChangeFlags nDiffFlags )
{
- SfxPrinter *pOld = aDocument.GetPrinter( false );
+ SfxPrinter *pOld = m_aDocument.GetPrinter( false );
if ( pOld && pOld->IsPrinting() )
return SFX_PRINTERROR_BUSY;
if (nDiffFlags & SfxPrinterChangeFlags::PRINTER)
{
- if ( aDocument.GetPrinter() != pNewPrinter )
+ if ( m_aDocument.GetPrinter() != pNewPrinter )
{
- aDocument.SetPrinter( pNewPrinter );
- aDocument.SetPrintOptions();
+ m_aDocument.SetPrinter( pNewPrinter );
+ m_aDocument.SetPrintOptions();
// MT: Use UpdateFontList: Will use Printer fonts only if needed!
/*
@@ -507,7 +507,7 @@ sal_uInt16 ScDocShell::SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter, SfxPr
}
else if (nDiffFlags & SfxPrinterChangeFlags::JOBSETUP)
{
- SfxPrinter* pOldPrinter = aDocument.GetPrinter();
+ SfxPrinter* pOldPrinter = m_aDocument.GetPrinter();
if (pOldPrinter)
{
pOldPrinter->SetJobSetup( pNewPrinter->GetJobSetup() );
@@ -515,20 +515,20 @@ sal_uInt16 ScDocShell::SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter, SfxPr
// #i6706# Call SetPrinter with the old printer again, so the drawing layer
// RefDevice is set (calling ReformatAllTextObjects and rebuilding charts),
// because the JobSetup (printer device settings) may affect text layout.
- aDocument.SetPrinter( pOldPrinter );
+ m_aDocument.SetPrinter( pOldPrinter );
CalcOutputFactor(); // also with the new settings
}
}
if (nDiffFlags & SfxPrinterChangeFlags::OPTIONS)
{
- aDocument.SetPrintOptions(); //! from new printer ???
+ m_aDocument.SetPrintOptions(); //! from new printer ???
}
if (nDiffFlags & (SfxPrinterChangeFlags::CHG_ORIENTATION | SfxPrinterChangeFlags::CHG_SIZE))
{
- OUString aStyle = aDocument.GetPageStyle( GetCurTab() );
- ScStyleSheetPool* pStPl = aDocument.GetStyleSheetPool();
+ OUString aStyle = m_aDocument.GetPageStyle( GetCurTab() );
+ ScStyleSheetPool* pStPl = m_aDocument.GetStyleSheetPool();
SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(pStPl->Find(aStyle, SfxStyleFamily::Page));
if (pStyleSheet)
{
@@ -657,17 +657,17 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, weld::Wind
void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
{
- ScChangeTrack* pTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pTrack = m_aDocument.GetChangeTrack();
if ( pTrack && pTrack->GetFirst() )
{
//! there are changes -> inquiry if needs to be deleted
}
- aDocument.EndChangeTracking();
- aDocument.StartChangeTracking();
+ m_aDocument.EndChangeTracking();
+ m_aDocument.StartChangeTracking();
OUString aOldUser;
- pTrack = aDocument.GetChangeTrack();
+ pTrack = m_aDocument.GetChangeTrack();
if ( pTrack )
{
aOldUser = pTrack->GetUser();
@@ -706,9 +706,9 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
}
}
- aDocument.CompareDocument( rOtherDoc );
+ m_aDocument.CompareDocument( rOtherDoc );
- pTrack = aDocument.GetChangeTrack();
+ pTrack = m_aDocument.GetChangeTrack();
if ( pTrack )
pTrack->SetUser( aOldUser );
@@ -774,18 +774,18 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if (!pSourceTrack)
return; //! nothing to do - error notification?
- ScChangeTrack* pThisTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pThisTrack = m_aDocument.GetChangeTrack();
if ( !pThisTrack )
{ // turn on
- aDocument.StartChangeTracking();
- pThisTrack = aDocument.GetChangeTrack();
+ m_aDocument.StartChangeTracking();
+ pThisTrack = m_aDocument.GetChangeTrack();
OSL_ENSURE(pThisTrack,"ChangeTracking not enabled?");
if ( !bShared )
{
// turn on visual RedLining
ScChangeViewSettings aChangeViewSet;
aChangeViewSet.SetShowChanges(true);
- aDocument.SetChangeViewSettings(aChangeViewSet);
+ m_aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
@@ -892,7 +892,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
bool bMergeAction = false;
if ( bShared )
{
- if ( !bCheckDuplicates || !lcl_FindAction( &rOtherDoc, pSourceAction, &aDocument, pFirstSearchAction, pLastSearchAction, bIgnore100Sec ) )
+ if ( !bCheckDuplicates || !lcl_FindAction( &rOtherDoc, pSourceAction, &m_aDocument, pFirstSearchAction, pLastSearchAction, bIgnore100Sec ) )
{
bMergeAction = true;
}
@@ -920,7 +920,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
#if OSL_DEBUG_LEVEL > 0
OUString aValue;
if ( eSourceType == SC_CAT_CONTENT )
- static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &aDocument );
+ static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &m_aDocument );
SAL_WARN( "sc", aValue << " omitted");
#endif
}
@@ -982,7 +982,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
OSL_ENSURE( aSourceRange.aStart == aSourceRange.aEnd, "huch?" );
ScAddress aPos = aSourceRange.aStart;
OUString aValue;
- static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &aDocument );
+ static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &m_aDocument );
ScMatrixMode eMatrix = ScMatrixMode::NONE;
const ScCellValue& rCell = static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewCell();
if (rCell.meType == CELLTYPE_FORMULA)
@@ -1013,7 +1013,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
case SC_CAT_INSERT_TABS :
{
OUString aName;
- aDocument.CreateValidTabName( aName );
+ m_aDocument.CreateValidTabName( aName );
(void)GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, true, false );
}
break;
@@ -1141,7 +1141,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
return false;
}
- ScChangeTrack* pThisTrack = aDocument.GetChangeTrack();
+ ScChangeTrack* pThisTrack = m_aDocument.GetChangeTrack();
if ( !pThisTrack )
{
return false;
@@ -1157,7 +1157,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// reset show changes
ScChangeViewSettings aChangeViewSet;
aChangeViewSet.SetShowChanges( false );
- aDocument.SetChangeViewSettings( aChangeViewSet );
+ m_aDocument.SetChangeViewSettings( aChangeViewSet );
// find first merge action in this document
bool bIgnore100Sec = !pThisTrack->IsTimeNanoSeconds() || !pSharedTrack->IsTimeNanoSeconds();
@@ -1177,13 +1177,13 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
sal_uLong nActStartShared = pSharedAction->GetActionNumber();
sal_uLong nActEndShared = pSharedTrack->GetActionMax();
ScDocument* pTmpDoc = new ScDocument;
- for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex )
+ for ( sal_Int32 nIndex = 0; nIndex < m_aDocument.GetTableCount(); ++nIndex )
{
OUString sTabName;
pTmpDoc->CreateValidTabName( sTabName );
pTmpDoc->InsertTab( SC_TAB_APPEND, sTabName );
}
- aDocument.GetChangeTrack()->Clone( pTmpDoc );
+ m_aDocument.GetChangeTrack()->Clone( pTmpDoc );
ScChangeActionMergeMap aOwnInverseMergeMap;
pSharedDocShell->MergeDocument( *pTmpDoc, true, true, 0, &aOwnInverseMergeMap, true );
delete pTmpDoc;
@@ -1225,7 +1225,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// clone change track for merging into own document
pTmpDoc = new ScDocument;
- for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex )
+ for ( sal_Int32 nIndex = 0; nIndex < m_aDocument.GetTableCount(); ++nIndex )
{
OUString sTabName;
pTmpDoc->CreateValidTabName( sTabName );
@@ -1270,7 +1270,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
aChangeViewSet.SetShowAccepted( true );
aChangeViewSet.SetHasActionRange();
aChangeViewSet.SetTheActionRange( nStartShared, nEndShared );
- aDocument.SetChangeViewSettings( aChangeViewSet );
+ m_aDocument.SetChangeViewSettings( aChangeViewSet );
// merge own changes back into own document
sal_uLong nStartOwn = nEndShared + 1;
@@ -1313,7 +1313,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
aChangeViewSet.SetShowAccepted( true );
aChangeViewSet.SetHasActionRange();
aChangeViewSet.SetTheActionRange( nStartShared, nEndShared );
- aDocument.SetChangeViewSettings( aChangeViewSet );
+ m_aDocument.SetChangeViewSettings( aChangeViewSet );
}
// update view
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 5d341c664efd..47992f8ea28d 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -116,26 +116,26 @@ using namespace ::com::sun::star;
void ScDocShell::ReloadAllLinks()
{
- aDocument.SetLinkFormulaNeedingCheck(false);
+ m_aDocument.SetLinkFormulaNeedingCheck(false);
getEmbeddedObjectContainer().setUserAllowsLinkUpdate(true);
ReloadTabLinks();
vcl::Window *pDialogParent = GetActiveDialogParent();
- aDocument.UpdateExternalRefLinks(pDialogParent);
+ m_aDocument.UpdateExternalRefLinks(pDialogParent);
- bool bAnyDde = aDocument.GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(pDialogParent ? pDialogParent->GetFrameWeld() : nullptr);
+ bool bAnyDde = m_aDocument.GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(pDialogParent ? pDialogParent->GetFrameWeld() : nullptr);
if (bAnyDde)
{
// calculate formulas and paint like in the TrackTimeHdl
- aDocument.TrackFormulas();
+ m_aDocument.TrackFormulas();
Broadcast(SfxHint(SfxHintId::ScDataChanged));
// Should FID_DATACHANGED become asynchronous some time
// (e.g., with Invalidate at Window), an update needs to be forced here.
}
- aDocument.UpdateAreaLinks();
+ m_aDocument.UpdateAreaLinks();
}
IMPL_LINK_NOARG( ScDocShell, ReloadAllLinksHdl, Button*, void )
@@ -153,7 +153,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
SfxBindings* pBindings = GetViewBindings();
- bool bUndo (aDocument.IsUndoEnabled());
+ bool bUndo (m_aDocument.IsUndoEnabled());
sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
@@ -174,13 +174,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
SCROW nRow = static_cast<const SfxInt32Item*>(pRowItem)->GetValue() - 1;
SCTAB nTab = static_cast<const SfxInt16Item*>(pTabItem)->GetValue() - 1;
- SCTAB nTabCount = aDocument.GetTableCount();
+ SCTAB nTabCount = m_aDocument.GetTableCount();
if ( ValidCol(nCol) && ValidRow(nRow) && ValidTab(nTab,nTabCount) )
{
- if ( aDocument.IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) )
+ if ( m_aDocument.IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) )
{
OUString aVal = static_cast<const SfxStringItem*>(pTextItem)->GetValue();
- aDocument.SetString( nCol, nRow, nTab, aVal );
+ m_aDocument.SetString( nCol, nRow, nTab, aVal );
PostPaintCell( nCol, nRow, nTab );
SetDocumentModified();
@@ -229,11 +229,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
bool bMakeArea = false;
if (bIsNewArea)
{
- ScDBCollection* pDBColl = aDocument.GetDBCollection();
+ ScDBCollection* pDBColl = m_aDocument.GetDBCollection();
if ( !pDBColl || !pDBColl->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(sTarget)) )
{
ScAddress aPos;
- if ( aPos.Parse( sTarget, &aDocument, aDocument.GetAddressConvention() ) & ScRefFlags::VALID )
+ if ( aPos.Parse( sTarget, &m_aDocument, m_aDocument.GetAddressConvention() ) & ScRefFlags::VALID )
{
bMakeArea = true;
if (bUndo)
@@ -352,13 +352,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
//! limit always or not at all ???
if (!bMultiRange)
- aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
+ m_aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
// Dialog for column/row headers
bool bOk = true;
if ( !bAddRange && ( !bColInit || !bRowInit ) )
{
- ScChartPositioner aChartPositioner( &aDocument, nTab, nCol1,nRow1, nCol2,nRow2 );
+ ScChartPositioner aChartPositioner( &m_aDocument, nTab, nCol1,nRow1, nCol2,nRow2 );
if (!bColInit)
bColHeaders = aChartPositioner.HasColHeaders();
if (!bRowInit)
@@ -391,7 +391,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
new ScUndoChartData( this, aChartName, aRangeListRef,
bColHeaders, bRowHeaders, bAddRange ) );
}
- aDocument.UpdateChartArea( aChartName, aRangeListRef,
+ m_aDocument.UpdateChartArea( aChartName, aRangeListRef,
bColHeaders, bRowHeaders, bAddRange );
}
else
@@ -403,7 +403,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
new ScUndoChartData( this, aChartName, aNewRange,
bColHeaders, bRowHeaders, bAddRange ) );
}
- aDocument.UpdateChartArea( aChartName, aNewRange,
+ m_aDocument.UpdateChartArea( aChartName, aNewRange,
bColHeaders, bRowHeaders, bAddRange );
}
}
@@ -427,8 +427,8 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, &pItem ) )
bNewVal = static_cast<const SfxBoolItem*>(pItem)->GetValue();
else
- bNewVal = !aDocument.GetAutoCalc(); // Toggle for menu
- aDocument.SetAutoCalc( bNewVal );
+ bNewVal = !m_aDocument.GetAutoCalc(); // Toggle for menu
+ m_aDocument.SetAutoCalc( bNewVal );
SetDocumentModified();
if (pBindings)
{
@@ -458,9 +458,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
nSet=aAppOptions.GetLinkMode();
}
- if (nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
+ if (m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
nSet = LM_NEVER;
- else if (nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
+ else if (m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
nSet = LM_ALWAYS;
if (nSet == LM_ALWAYS
@@ -471,7 +471,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
nSet = LM_ON_DEMAND;
}
- if (nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
+ if (m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list