24 #include <officecfg/Office/Common.hxx>
40 #include <osl/diagnose.h>
53 #include <stlpool.hxx>
54 #include <stlsheet.hxx>
64 #include <progress.hxx>
65 #include <document.hxx>
72 #include <globstr.hrc>
73 #include <strings.hrc>
75 #include <charthelper.hxx>
83 #include <tokenarray.hxx>
109 pViewOptions.reset();
110 pExtDocOptions.reset();
115 if ( !mpPrinter && bCreateIfNotExist )
118 std::make_unique<SfxItemSet>( *mxPoolHelper->GetDocPool(),
119 svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
120 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
121 SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
122 SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>{} );
125 if (officecfg::Office::Common::Print::Warning::PaperOrientation::get())
126 nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION;
127 if (officecfg::Office::Common::Print::Warning::PaperSize::get())
128 nFlags |= SfxPrinterChangeFlags::CHG_SIZE;
129 pSet->Put(
SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) );
130 pSet->Put(
SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, officecfg::Office::Common::Print::Warning::NotFound::get() ) );
133 mpPrinter->SetMapMode(
MapMode(MapUnit::Map100thMM));
135 mpPrinter->SetDigitLanguage(
SC_MOD()->GetOptDigitLanguage() );
143 if ( pNewPrinter == mpPrinter.
get() )
153 mpPrinter = pNewPrinter;
155 mpPrinter->SetDigitLanguage(
SC_MOD()->GetOptDigitLanguage() );
157 InvalidateTextWidth(
nullptr,
nullptr,
false);
162 if ( !mpPrinter ) GetPrinter();
163 OSL_ENSURE( mpPrinter,
"Error in printer creation :-/" );
168 SfxItemSet aOptSet( mpPrinter->GetOptions() );
171 if (officecfg::Office::Common::Print::Warning::PaperOrientation::get())
172 nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION;
173 if (officecfg::Office::Common::Print::Warning::PaperSize::get())
174 nFlags |= SfxPrinterChangeFlags::CHG_SIZE;
175 aOptSet.Put(
SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) );
176 aOptSet.Put(
SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, officecfg::Office::Common::Print::Warning::NotFound::get() ) );
178 mpPrinter->SetOptions( aOptSet );
183 if (!mpVirtualDevice_100th_mm)
191 MapMode aMapMode( mpVirtualDevice_100th_mm->GetMapMode() );
192 aMapMode.SetMapUnit( MapUnit::Map100thMM );
193 mpVirtualDevice_100th_mm->SetMapMode( aMapMode );
195 return mpVirtualDevice_100th_mm;
202 if (
SC_MOD()->GetInputOptions().GetTextWysiwyg() )
203 pRefDevice = GetPrinter();
205 pRefDevice = GetVirtualDevice_100th_mm();
216 case SfxStyleFamily::Page:
218 const sal_uInt16 nOldScale = getScaleValue(rStyleSheet,
ATTR_PAGE_SCALE);
220 rSet.
Put( rChanges );
221 const sal_uInt16 nNewScale = getScaleValue(rStyleSheet,
ATTR_PAGE_SCALE);
224 if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) )
225 InvalidateTextWidth( rStyleSheet.
GetName() );
236 case SfxStyleFamily::Para:
238 bool bNumFormatChanged;
241 InvalidateTextWidth(
nullptr,
nullptr, bNumFormatChanged );
245 maTabs[nTab]->SetStreamValid(
false );
253 if ( nNewFormat != nOldFormat )
269 if ( eState == SfxItemState::SET )
271 else if ( eState == SfxItemState::DONTCARE )
276 if ( eNewLang != eOldLang )
292 mxPoolHelper->GetStylePool()->CopyStdStylesFrom( rSrcDoc.
mxPoolHelper->GetStylePool() );
298 for (
SCTAB i=0;
i<nCount && maTabs[
i];
i++ )
299 if ( maTabs[
i]->GetPageStyle() == rStyleName )
300 InvalidateTextWidth(
i );
306 ScAddress aAdrTo ( MaxCol(), MaxRow(), nTab );
307 InvalidateTextWidth( &aAdrFrom, &aAdrTo,
false );
316 for ( i = 0; !bInUse && i < nCount && maTabs[i]; i++ )
317 bInUse = ( maTabs[i]->GetPageStyle() == rStrPageStyle );
327 bool bWasInUse =
false;
330 for (
SCTAB i=0;
i<nCount && maTabs[
i];
i++ )
331 if ( maTabs[
i]->GetPageStyle() == rStyle )
334 maTabs[
i]->SetPageStyle(
ScResId(STR_STYLENAME_STANDARD) );
342 bool bWasInUse =
false;
345 for (
SCTAB i=0;
i<nCount && maTabs[
i];
i++ )
346 if ( maTabs[
i]->GetPageStyle() == rOld )
349 maTabs[
i]->SetPageStyle( rNew );
359 OUString aStyleName = GetPageStyle( nTab );
360 SfxStyleSheetBase* pStyle = mxPoolHelper->GetStylePool()->Find( aStyleName, SfxStyleFamily::Page );
367 if ( eDirection == SvxFrameDirection::Horizontal_LR_TB )
368 eRet = EEHorizontalTextDirection::L2R;
369 else if ( eDirection == SvxFrameDirection::Horizontal_RL_TB )
370 eRet = EEHorizontalTextDirection::R2L;
381 return mpMacroMgr.get();
387 const ScTable* pTab = FetchTable(nTab);
391 if (nCol1 > nCol2 || nRow1 > nRow2)
396 if (static_cast<SCROW>(nR) != nRow2 - nRow1 + 1 || static_cast<SCCOL>(nC) != nCol2 - nCol1 + 1)
399 pTab->
FillMatrix(rMat, nCol1, nRow1, nCol2, nRow2, pPool);
417 assert(IsThreadedGroupCalcInProgress());
419 maThreadSpecific.pContext = &rContext;
422 assert(IsThreadedGroupCalcInProgress());
423 maThreadSpecific.pContext =
nullptr;
427 if(maThreadSpecific.xRecursionHelper)
428 maThreadSpecific.xRecursionHelper->Clear();
433 assert(!IsThreadedGroupCalcInProgress());
436 GetNonThreadedContext().maDelayedSetNumberFormat.clear();
438 ScTable* pTab = FetchTable(nTab);
446 bool bNumFormatChanged )
448 bool bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard());
449 if ( pAdrFrom && !pAdrTo )
453 if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
454 maTabs[nTab]->InvalidateTextWidth( pAdrFrom,
nullptr, bNumFormatChanged, bBroadcast );
458 const SCTAB nTabStart = pAdrFrom ? pAdrFrom->
Tab() : 0;
461 for (
SCTAB nTab=nTabStart; nTab<=nTabEnd && nTab < static_cast<SCTAB>(maTabs.size()); nTab++ )
463 maTabs[nTab]->InvalidateTextWidth( pAdrFrom, pAdrTo, bNumFormatChanged, bBroadcast );
467 #define CALCMAX 1000 // Calculations
491 ~IdleCalcTextWidthScope() COVERITY_NOEXCEPT_FALSE
495 pDev->SetMapMode(maOldMapMode);
507 void setTab(
SCTAB nTab) { mrCalcPos.
SetTab(nTab); }
508 void setCol(
SCCOL nCol) { mrCalcPos.
SetCol(nCol); }
509 void setRow(
SCROW nRow) { mrCalcPos.
SetRow(nRow); }
511 void incTab() { mrCalcPos.
IncTab(); }
512 void incCol(
SCCOL nInc) { mrCalcPos.
IncCol(nInc); }
514 void setOldMapMode(
const MapMode& rOldMapMode) { maOldMapMode = rOldMapMode; }
516 void setNeedMore(
bool b) { mbNeedMore = b; }
517 bool getNeedMore()
const {
return mbNeedMore; }
519 void createProgressBar()
525 bool hasProgressBar()
const {
return mbProgress; }
535 if (!mbIdleEnabled || IsInLinkUpdate() || GetPrinter(
false) ==
nullptr)
538 IdleCalcTextWidthScope aScope(*
this, aCurTextWidthCalcPos);
546 if (aScope.Col() < 0)
548 aScope.setCol(MaxCol());
552 if (!
ValidTab(aScope.Tab()) || aScope.Tab() >=
static_cast<SCTAB>(maTabs.size()) || !maTabs[aScope.Tab()])
555 ScTable* pTab = maTabs[aScope.Tab()].get();
557 OSL_ENSURE( pStyle,
"Missing StyleSheet :-/" );
573 std::unique_ptr<ScColumnTextWidthIterator> pColIter(
new ScColumnTextWidthIterator(*
this, *pCol, aScope.Row(), MaxRow()));
576 sal_uInt16 nRestart = 0;
578 while ( (nZoom > 0) && (nCount <
CALCMAX) && (nRestart < 2) )
580 if (pColIter->hasCell())
583 SCROW nRow = pColIter->getPos();
598 nPPTX = aPix1000.X() / 1000.0;
599 nPPTY = aPix1000.Y() / 1000.0;
603 aScope.createProgressBar();
605 sal_uInt16 nNewWidth =
static_cast<sal_uInt16
>(GetNeededSize(
606 aScope.Col(), aScope.Row(), aScope.Tab(),
607 pDev,
nPPTX,
nPPTY, aZoomFract,aZoomFract,
true,
true));
609 pColIter->setValue(nNewWidth);
610 aScope.setNeedMore(
true);
618 bool bNewTab =
false;
623 if (aScope.Col() < 0)
626 aScope.setCol(MaxCol());
631 if (!
ValidTab(aScope.Tab()) || aScope.Tab() >=
static_cast<SCTAB>(maTabs.size()) || !maTabs[aScope.Tab()] )
643 pTab = maTabs[aScope.Tab()].get();
645 pStyle =
static_cast<ScStyleSheet*
>(aScope.getStylePool()->Find(
663 OSL_FAIL(
"Missing StyleSheet :-/" );
669 pCol = &pTab->
aCol[aScope.Col()];
682 if (!aScope.continueIter())
686 return aScope.getNeedMore();
691 if ( bIsVisible && mpShell )
693 ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>( mpShell->GetModel() );
701 if ( bIsVisible && mpShell )
703 ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>( mpShell->GetModel() );
714 const ::sfx2::SvBaseLinks& rLinks = GetLinkManager()->GetLinks();
715 sal_uInt16
nCount = rLinks.size();
719 sal_uInt16 nDdeCount = 0;
721 for (i=0; i<nCount; i++)
736 for (i=0; i<nCount; i++)
742 pLink->Store( rStream, aHdr );
759 const size_t nMinStringSize = eCharSet == RTL_TEXTENCODING_UNICODE ?
sizeof(sal_uInt32) :
sizeof(sal_uInt16);
760 const size_t nMinRecordSize = 1 + nMinStringSize*3;
761 const size_t nMaxRecords = rStream.
remainingSize() / nMinRecordSize;
762 if (nCount > nMaxRecords)
764 SAL_WARN(
"sc",
"Parsing error: " << nMaxRecords <<
765 " max possible entries, but " << nCount <<
" claimed, truncating");
766 nCount = nMaxRecords;
769 for (sal_uInt16
i=0;
i<nCount; ++
i)
780 OSL_ENSURE( bInLinkUpdate != bSet,
"SetInLinkUpdate twice" );
781 bInLinkUpdate = bSet;
786 return bInLinkUpdate || IsInDdeLinkUpdate();
791 if (!pExternalRefMgr)
798 const ::sfx2::SvBaseLinks& rLinks = pMgr->
GetLinks();
799 sal_uInt16
nCount = rLinks.size();
804 std::vector<ScExternalRefLink*> aRefLinks;
805 for (sal_uInt16
i = 0;
i < nCount; ++
i)
810 aRefLinks.push_back(pRefLink);
815 pExternalRefMgr->enableDocTimer(
false);
816 ScProgress aProgress(GetDocumentShell(),
ScResId(SCSTR_UPDATE_EXTDOCS), aRefLinks.size(),
true);
817 for (
size_t i = 0,
n = aRefLinks.size();
i <
n; ++
i)
840 VclMessageType::Warning, VclButtonsType::Ok,
845 pExternalRefMgr->enableDocTimer(
true);
851 mpShell->Broadcast(
SfxHint(SfxHintId::ScDataChanged) );
854 if (!mpShell->IsModified())
856 mpShell->SetModified();
888 for (
const auto & rLink : rLinks)
891 if (
const ScDdeLink*
p = dynamic_cast<const ScDdeLink*>(pBase))
908 std::u16string_view rAppl, std::u16string_view rTopic, std::u16string_view rItem,
sal_uInt8 nMode,
909 size_t* pnDdePos =
nullptr )
913 const ::sfx2::SvBaseLinks& rLinks = pLinkManager->
GetLinks();
914 size_t nCount = rLinks.size();
915 if( pnDdePos ) *pnDdePos = 0;
919 if(
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>( pLink ) )
921 if( (pDdeLink->GetAppl() == rAppl) &&
922 (pDdeLink->GetTopic() == rTopic) &&
923 (pDdeLink->GetItem() == rItem) &&
926 if( pnDdePos ) ++*pnDdePos;
940 const ::sfx2::SvBaseLinks& rLinks = pLinkManager->
GetLinks();
941 size_t nCount = rLinks.size();
942 size_t nDdeIndex = 0;
946 if(
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>( pLink ) )
948 if( nDdeIndex == nDdePos )
962 return lclGetDdeLink( GetLinkManager(), rAppl, rTopic, rItem, nMode, &rnDdePos ) !=
nullptr;
967 if(
const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
969 rAppl = pDdeLink->GetAppl();
970 rTopic = pDdeLink->GetTopic();
971 rItem = pDdeLink->GetItem();
979 if(
const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
981 rnMode = pDdeLink->GetMode();
989 const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos );
990 return pDdeLink ? pDdeLink->
GetResult() :
nullptr;
999 OSL_ENSURE( nMode !=
SC_DDE_IGNOREMODE,
"ScDocument::CreateDdeLink - SC_DDE_IGNOREMODE not allowed here" );
1007 ScDdeLink* pDdeLink = lclGetDdeLink(pMgr, rAppl, rTopic, rItem, nMode);
1011 pDdeLink =
new ScDdeLink( *
this, rAppl, rTopic, rItem, nMode );
1026 if(
ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
1028 pDdeLink->SetResult( pResults );
1040 const ::sfx2::SvBaseLinks& rLinks = pMgr->
GetLinks();
1041 sal_uInt16 nCount = rLinks.size();
1042 for (sal_uInt16
i=0;
i<nCount;
i++)
1043 if (
nullptr != dynamic_cast<const ScAreaLink* >(rLinks[
i].
get()))
1055 const ::sfx2::SvBaseLinks& rLinks = pMgr->
GetLinks();
1056 for (
const auto & rLink : rLinks)
1059 if (dynamic_cast<const ScAreaLink*>( pBase) !=
nullptr)
1070 const ::sfx2::SvBaseLinks& rLinks = pMgr->
GetLinks();
1071 sfx2::SvBaseLinks::size_type
nPos = 0;
1072 while ( nPos < rLinks.size() )
1074 const ::sfx2::SvBaseLink* pBase = rLinks[nPos].get();
1090 bool bAnyUpdate =
false;
1092 const ::sfx2::SvBaseLinks& rLinks = pMgr->
GetLinks();
1093 sal_uInt16 nCount = rLinks.size();
1094 for (sal_uInt16
i=0;
i<nCount;
i++)
1097 if (
ScAreaLink* pLink = dynamic_cast<ScAreaLink*>(pBase))
1099 ScRange aOutRange = pLink->GetDestArea();
1112 nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
1115 pLink->SetDestArea(
ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ) );
1128 sal_uInt16 nFirstIndex = 0;
1129 while ( nFirstIndex < nCount )
1131 bool bFound =
false;
1133 if (
ScAreaLink* pFirstLink = dynamic_cast<ScAreaLink*>(pFirst))
1135 ScAddress aFirstPos = pFirstLink->GetDestArea().aStart;
1136 for ( sal_uInt16 nSecondIndex = nFirstIndex + 1; nSecondIndex < nCount && !bFound; ++nSecondIndex )
1144 nCount = rLinks.size();
1156 if (HasLinkFormulaNeedingCheck())
1163 SetLinkFormulaNeedingCheck(
true);
1168 SetLinkFormulaNeedingCheck(
true);
1175 SAL_WARN(
"sc.core",
"ScDocument::CheckLinkFormulaNeedingCheck - called with empty ScTokenArray");
1182 if ( pChartListenerCollection->hasListeners() )
1183 pChartListenerCollection->StartTimer();
1184 if (apTemporaryChartLock)
1185 apTemporaryChartLock->StartOrContinueLocking();
1198 pViewFrame =
nullptr;
1212 OSL_ENSURE( rMultiMark.
IsMultiMarked(),
"TransliterateText: no selection" );
1215 bool bConsiderLanguage = aTransliterationWrapper.needLanguageForTheMode();
1218 std::unique_ptr<ScEditEngineDefaulter> pEngine;
1220 SCTAB nCount = GetTableCount();
1221 for (
const SCTAB& nTab : rMultiMark)
1231 bool bFound = rMultiMark.IsCellMarked( nCol, nRow );
1233 bFound = GetNextMarkedCell( nCol, nRow, nTab, rMultiMark );
1244 ( nType == TransliterationFlags::SENTENCE_CASE || nType == TransliterationFlags::TITLE_CASE)))
1250 const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
1251 std::unique_ptr<SfxItemSet> pDefaults(
new SfxItemSet( pEngine->GetEmptyItemSet() ));
1252 if (
ScStyleSheet* pPreviewStyle = GetPreviewCellStyle( nCol, nRow, nTab ) )
1254 std::unique_ptr<ScPatternAttr> pPreviewPattern(
new ScPatternAttr( *pPattern ));
1255 pPreviewPattern->SetStyleSheet(pPreviewStyle);
1256 pPreviewPattern->FillEditItemSet( pDefaults.get() );
1260 SfxItemSet* pFontSet = GetPreviewFont( nCol, nRow, nTab );
1263 pEngine->SetDefaults( std::move(pDefaults) );
1267 pEngine->SetTextCurrentDefaults(*aCell.
mpEditText);
1269 pEngine->ClearModifyFlag();
1271 sal_Int32 nLastPar = pEngine->GetParagraphCount();
1274 sal_Int32 nTxtLen = pEngine->GetTextLen(nLastPar);
1275 ESelection aSelAll( 0, 0, nLastPar, nTxtLen );
1277 pEngine->TransliterateText( aSelAll, nType );
1279 if ( pEngine->IsModified() )
1282 if ( aTester.NeedsObject() )
1285 pEngine->SetDefaults( std::make_unique<SfxItemSet>( pEngine->GetEmptyItemSet() ) );
1288 SetEditText(
ScAddress(nCol,nRow,nTab), pEngine->CreateTextObject());
1302 sal_Int32 nOldLen = aOldStr.getLength();
1304 if ( bConsiderLanguage )
1313 uno::Sequence<sal_Int32> aOffsets;
1314 OUString aNewStr = aTransliterationWrapper.transliterate( aOldStr, nLanguage, 0, nOldLen, &aOffsets );
1316 if ( aNewStr != aOldStr )
1323 bFound = GetNextMarkedCell( nCol, nRow, nTab, rMultiMark );
Matrix data type that can store values of mixed types.
void EnableIdle(bool bDo)
void CalculateInColumnInThread(ScInterpreterContext &rContext, const ScRange &rCalcRange, unsigned nThisThread, unsigned nThreadsTotal)
static ScRefUpdateRes Update(const ScDocument *pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz, SCCOL &theCol1, SCROW &theRow1, SCTAB &theTab1, SCCOL &theCol2, SCROW &theRow2, SCTAB &theTab2)
OUString getString() const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Store parameters used in the ScDocument::SetString() method.
constexpr TypedWhichId< SvxLanguageItem > ATTR_LANGUAGE_FORMAT(147)
void HandleStuffAfterParallelCalculation(SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter *pInterpreter)
void LoadDdeLinks(SvStream &rStream)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
void IncTab(SCTAB nDelta=1)
void SC_DLLPUBLIC SetFormulaResults(const ScAddress &rTopPos, const double *pResults, size_t nLen)
Set an array of numerical formula results to a group of contiguous formula cells. ...
void setTextInput()
Call this whenever you need to unconditionally set input as text, no matter what the input is...
constexpr TypedWhichId< SvxLanguageItem > ATTR_CJK_FONT_LANGUAGE(115)
constexpr sal_uInt16 ATTR_PATTERN_START(100)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_Int32 GetVersion() const
void SetInLinkUpdate(bool bSet)
SC_DLLPUBLIC void CopyStdStylesFrom(const ScDocument &rSrcDoc)
void FillMatrix(ScMatrix &rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool=nullptr) const
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(175)
bool IsPageStyleInUse(std::u16string_view rStrPageStyle, SCTAB *pInTab)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
const sal_uInt8 SC_DDE_DEFAULT
SC_DLLPUBLIC bool CreateDdeLink(const OUString &rAppl, const OUString &rTopic, const OUString &rItem, sal_uInt8 nMode, const ScMatrixRef &pResults)
Tries to find a DDE link or creates a new, if not extant.
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
void SetFormulaResults(SCCOL nCol, SCROW nRow, const double *pResults, size_t nLen)
const MapMode & GetMapMode() const
VirtualDevice * GetVirtualDevice_100th_mm()
virtual SfxItemSet & GetItemSet()
This is very similar to ScCellValue, except that it references the original value instead of copying ...
void RepaintRange(const ScRange &rRange)
void Invalidate(sal_uInt16 nId)
sc::DocumentLinkManager & GetDocLinkManager()
SfxStyleFamily GetFamily() const
virtual SfxObjectShell * GetObjectShell() override
void SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter)
sfx2::LinkManager * getLinkManager(bool bCreate=true)
void SetString(SwCursor &rCursor, const OUString &rString)
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
void CalculateInColumnInThread(ScInterpreterContext &rContext, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCROW nRowEnd, unsigned nThisThread, unsigned nThreadsTotal)
void RepaintRange(const ScRange &rRange)
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
const OUString & GetName() const
const EditTextObject * mpEditText
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void FillMatrix(ScMatrix &rMat, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool) const
bool IsMultiMarked() const
bool SetDdeLinkResultMatrix(size_t nDdePos, const ScMatrixRef &pResults)
Sets a result matrix for the specified DDE link.
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
void HandleStuffAfterParallelCalculation(SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, ScInterpreter *pInterpreter)
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
const sal_uInt8 SC_DDE_IGNOREMODE
sal_uInt64 remainingSize()
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SvBaseLinks & GetLinks() const
const OUString & GetItem() const
SC_DLLPUBLIC bool FindDdeLink(std::u16string_view rAppl, std::u16string_view rTopic, std::u16string_view rItem, sal_uInt8 nMode, size_t &rnDdePos)
Tries to find a DDE link with the specified connection data.
void Remove(SvBaseLink const *pLink)
void IncCol(SCCOL nDelta=1)
void GetDimensions(SCSIZE &rC, SCSIZE &rR) const
const svl::SharedString * mpString
SC_DLLPUBLIC const ScMatrix * GetDdeLinkResultMatrix(size_t nDdePos) const
Returns the result matrix of the specified DDE link.
bool GetDdeLinkData(size_t nDdePos, OUString &rAppl, OUString &rTopic, OUString &rItem) const
Returns the connection data of the specified DDE link.
bool HasAreaLinks() const
SfxBindings & GetBindings()
bool GetDdeLinkMode(size_t nDdePos, sal_uInt8 &rnMode) const
Returns the link mode of the specified DDE link.
const ScRange & GetDestArea() const
EEHorizontalTextDirection
bool RenamePageStyleInUse(std::u16string_view rOld, const OUString &rNew)
OUString ScResId(const char *pId)
#define LANGUAGE_DONTKNOW
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
static void DeleteInterpretProgress()
void SaveDdeLinks(SvStream &rStream) const
static void CreateInterpretProgress(ScDocument *pDoc, bool bWait=true)
Use this class as a locale variable to merge number formatter from another document, and set NULL pointer to pFormatExchangeList when done.
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Reference not affected, no change at all.
exports com.sun.star.chart2. data
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Point LogicToPixel(const Point &rLogicPt) const
void InvalidateTextWidth(std::u16string_view rStyleName)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
constexpr TypedWhichId< SvxLanguageItem > ATTR_CTL_FONT_LANGUAGE(120)
void SetState(sal_uLong nVal, sal_uLong nNewRange=0)
static bool GetDisplayNames(const SvBaseLink *, OUString *pType, OUString *pFile=nullptr, OUString *pLink=nullptr, OUString *pFilter=nullptr)
constexpr TypedWhichId< SvxFrameDirectionItem > ATTR_WRITINGDIR(138)
const ScMatrix * GetResult() const
void InsertDDELink(SvBaseLink *, const OUString &rServer, std::u16string_view rTopic, std::u16string_view rItem)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void UpdateExternalRefLinks(weld::Window *pWin)
EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const
SC_DLLPUBLIC OutputDevice * GetRefDevice()
void SetResult(const ScMatrixRef &pRes)
std::vector< tools::SvRef< SvBaseLink > > SvBaseLinks
static SfxViewFrame * Current()
const OUString & GetTopic() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool IsCTLFontEnabled() const
SfxBindings * GetViewBindings()
static VclPtr< reference_type > Create(Arg &&...arg)
static bool CheckWidthInvalidate(bool &bNumFormatChanged, const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs)
rtl_TextEncoding GetStreamCharSet() const
Reference< XComponentContext > getProcessComponentContext()
constexpr sal_uInt16 ATTR_PATTERN_END(155)
void DeleteAreaLinksOnTab(SCTAB nTab)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
bool IsInLinkUpdate() const
bool ValidRow(SCROW nRow, SCROW nMaxRow)
reference_type * get() const
rtl::Reference< ScPoolHelper > mxPoolHelper
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
#define SAL_WARN(area, stream)
SC_DLLPUBLIC void CopyDdeLinks(ScDocument &rDestDoc) const
SCCOL ClampToAllocatedColumns(SCCOL nCol) const
bool IsFormulaDirty(SCROW nRow) const
const OUString & GetAppl() const
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(174)
bool ValidTab(SCTAB nTab)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
static sal_uInt16 DoUpdateAllCharts(ScDocument &rDoc)
void FillEditItemSet(SfxItemSet *pEditSet, const SfxItemSet *pCondSet=nullptr) const
Converts all Calc items contained in the own item set to edit engine items and puts them into pEditSe...