20 #include <config_features.h>
22 #include <boost/property_tree/json_parser.hpp>
24 #include <com/sun/star/frame/Desktop.hpp>
56 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
67 #include <docfunc.hxx>
69 #include <strings.hrc>
70 #include <stlsheet.hxx>
71 #include <stlpool.hxx>
73 #include <globstr.hrc>
97 #include <com/sun/star/document/UpdateDocMode.hpp>
133 Broadcast(
SfxHint(SfxHintId::ScDataChanged));
150 SAL_WARN_IF(!pViewFrame,
"sc",
"expected there to be a ViewFrame");
165 if (
m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
167 else if (
m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
179 if (
m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
194 sal_uInt16 nSlot = rReq.
GetSlot();
203 if( pReqArgs && pReqArgs->
HasItem( FN_PARAM_1, &pColItem ) &&
204 pReqArgs->
HasItem( FN_PARAM_2, &pRowItem ) &&
205 pReqArgs->
HasItem( FN_PARAM_3, &pTabItem ) &&
206 pReqArgs->
HasItem( SID_SC_SETTEXT, &pTextItem ) )
229 #if HAVE_FEATURE_SCRIPTING
236 #if HAVE_FEATURE_SCRIPTING
248 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
252 if ( aAny >>= aProperties )
257 if ( pReqArgs->
GetItemState( FN_PARAM_1,
true, &pItem ) == SfxItemState::SET )
258 sTarget = static_cast<const SfxStringItem*>(pItem)->GetValue();
260 bool bIsNewArea =
true;
261 if ( pReqArgs->
GetItemState( FN_PARAM_2,
true, &pItem ) == SfxItemState::SET )
262 bIsNewArea = static_cast<const SfxBoolItem*>(pItem)->GetValue();
265 bool bMakeArea =
false;
277 OUString aStrImport =
ScResId( STR_UNDO_IMPORTDATA );
280 nViewShellId = pViewSh->GetViewShellId();
285 OSL_ENSURE(pDBData,
"Cannot create DB data");
295 OUString aTemplate =
ScResId( STR_IMPORT_REPLACE );
296 OUString aMessage = aTemplate.getToken( 0,
'#' )
298 + aTemplate.getToken( 1,
'#' );
301 VclMessageType::Question, VclButtonsType::YesNo,
303 xQueryBox->set_default_response(
RET_YES);
304 bDo = xQueryBox->run() ==
RET_YES;
317 if ( bMakeArea && bUndo)
322 OSL_FAIL(
"arguments expected" );
327 case SID_CHART_SOURCE:
328 case SID_CHART_ADDSOURCE:
333 OUString aChartName, aRangeName;
337 bool bMultiRange =
false;
339 bool bColHeaders =
true;
340 bool bRowHeaders =
true;
341 bool bColInit =
false;
342 bool bRowInit =
false;
343 bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
345 if( pReqArgs->
HasItem( SID_CHART_NAME, &pItem ) )
346 aChartName = static_cast<const SfxStringItem*>(pItem)->GetValue();
348 if( pReqArgs->
HasItem( SID_CHART_SOURCE, &pItem ) )
349 aRangeName = static_cast<const SfxStringItem*>(pItem)->GetValue();
351 if( pReqArgs->
HasItem( FN_PARAM_1, &pItem ) )
356 if( pReqArgs->
HasItem( FN_PARAM_2, &pItem ) )
367 aRangeListRef->
Parse( aRangeName, rDoc );
368 if ( !aRangeListRef->
empty() )
371 aSingleRange = aRangeListRef->
front();
375 aRangeListRef.
clear();
379 if (pViewSh && bValid && !aChartName.isEmpty() )
395 if ( !bAddRange && ( !bColInit || !bRowInit ) )
406 if ( pDlg->Execute() ==
RET_OK )
408 bColHeaders = pDlg->IsRow();
409 bRowHeaders = pDlg->IsCol();
425 std::make_unique<ScUndoChartData>(
this, aChartName, aRangeListRef,
426 bColHeaders, bRowHeaders, bAddRange ) );
429 bColHeaders, bRowHeaders, bAddRange );
433 ScRange aNewRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
437 std::make_unique<ScUndoChartData>(
this, aChartName, aNewRange,
438 bColHeaders, bRowHeaders, bAddRange ) );
441 bColHeaders, bRowHeaders, bAddRange );
447 OSL_FAIL(
"UpdateChartArea: no ViewShell or wrong data");
453 OSL_FAIL(
"SID_CHART_SOURCE without arguments");
461 if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
462 bNewVal = static_cast<const SfxBoolItem*>(pItem)->GetValue();
479 case FID_HARD_RECALC:
483 case SID_UPDATETABLINKS:
504 auto pInfoBar = pViewFrame->
AppendInfoBar(
"enablecontent",
"",
ScResId(STR_RELOAD_TABLES), InfobarType::WARNING);
517 case SID_REIMPORT_AFTER_LOAD:
524 if ((
m_nCanUpdate != css::document::UpdateDocMode::NO_UPDATE) &&
525 (
m_nCanUpdate != css::document::UpdateDocMode::QUIET_UPDATE))
529 OSL_ENSURE(pViewSh,
"SID_REIMPORT_AFTER_LOAD: no View");
530 if (pViewSh && pDBColl)
533 VclMessageType::Question, VclButtonsType::YesNo,
534 ScResId(STR_REIMPORT_AFTER_LOAD)));
535 xQueryBox->set_default_response(
RET_YES);
536 if (xQueryBox->run() ==
RET_YES)
539 for (
const auto& rxDB : rDBs)
553 bool bContinue = pViewSh->
ImportData( aImportParam );
579 if ( !bDone && pDBColl )
596 OSL_FAIL(
"use ScAutoStyleHint instead of SID_AUTO_STYLE");
599 case SID_GET_COLORLIST:
616 bool bActivateTracking = (pChangeTrack ==
nullptr);
618 bActivateTracking = pItem->
GetValue();
620 if ( !bActivateTracking )
626 VclMessageType::Warning, VclButtonsType::YesNo,
628 xWarn->set_default_response(
RET_NO);
629 bDo = (xWarn->run() ==
RET_YES );
670 case SID_CHG_PROTECT :
682 case SID_DOCUMENT_MERGE:
683 case SID_DOCUMENT_COMPARE:
687 if ( pChangeTrack && !
m_pImpl->bIgnoreLostRedliningWarning )
689 if ( nSlot == SID_DOCUMENT_COMPARE )
692 VclMessageType::Warning, VclButtonsType::YesNo,
694 xWarn->set_default_response(
RET_NO);
712 if (pReqArgs && pReqArgs->
GetItemState(SID_FILE_NAME,
true, &pItem) == SfxItemState::SET)
718 OUString aFileName = pStringItem->
GetValue();
720 OUString aFilterName;
721 pStringItem =
nullptr;
722 if (pReqArgs->
GetItemState(SID_FILTER_NAME,
true, &pItem) == SfxItemState::SET)
723 pStringItem = dynamic_cast<const SfxStringItem*>(pItem);
726 aFilterName = pStringItem->
GetValue();
729 pStringItem =
nullptr;
730 if (pReqArgs->
GetItemState(SID_FILE_FILTEROPTIONS,
true, &pItem) == SfxItemState::SET)
731 pStringItem = dynamic_cast<const SfxStringItem*>(pItem);
738 if (pReqArgs->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
739 pInt16Item = dynamic_cast<const SfxInt16Item*>(pItem);
746 if (aFilterName.isEmpty())
753 std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
754 auto pSet = std::make_shared<SfxAllItemSet>( pApp->
GetPool() );
755 if (!aOptions.isEmpty())
756 pSet->Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
759 pMed =
new SfxMedium( aFileName, StreamMode::STD_READ, pFilter, std::move(pSet) );
767 m_pImpl->bIgnoreLostRedliningWarning =
true;
773 m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent,
774 ScDocShell::Factory().GetFactoryName(),
mode ) );
785 pOtherDocSh->
DoLoad( pMed );
786 ErrCode nErr = pOtherDocSh->GetErrorCode();
790 if ( !pOtherDocSh->GetError() )
793 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
795 if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
800 if ( nSlot == SID_DOCUMENT_COMPARE )
812 pViewFrm->
ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId() );
833 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
834 else if ( nSlot == SID_DOCUMENT_MERGE &&
IsDocShared() && pChangeTrack )
837 if ( nEnd >= nStart )
854 pOtherDocSh->DoClose();
858 case SID_DELETE_SCENARIO:
862 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
864 if (
const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>(pItem))
866 const OUString&
aName = pStringItem->GetValue();
887 case SID_EDIT_SCENARIO:
890 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
892 if (
const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>(pItem))
894 OUString
aName = pStringItem->GetValue();
908 SCTAB nActualTab = nTab;
919 pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags );
920 if ( pNewDlg->Execute() ==
RET_OK )
922 pNewDlg->GetScenarioData( aName, aComment, aColor, nFlags );
933 case SID_ATTR_YEAR2000 :
936 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
938 if (
const SfxUInt16Item* pInt16Item = dynamic_cast<const SfxUInt16Item*>(pItem))
940 sal_uInt16 nY2k = pInt16Item->GetValue();
960 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
979 bool bContinue =
true;
983 VclMessageType::Question, VclButtonsType::YesNo,
984 ScResId(STR_DOC_WILLBESAVED)));
985 xQueryBox->set_default_response(
RET_YES);
986 if (xQueryBox->run() ==
RET_NO)
995 SC_MOD()->SetInSharedDocSaving(
true );
1002 SC_MOD()->SetInSharedDocSaving(
false );
1016 uno::Reference< frame::XModel >
xModel;
1021 uno::Reference< util::XCloseable > xCloseable( xModel, uno::UNO_QUERY_THROW );
1024 bool bShared =
false;
1025 ScModelObj* pDocObj = comphelper::getUnoTunnelImplementation<ScModelObj>( xModel );
1036 bool bOwnEntry =
false;
1042 catch ( uno::Exception& )
1046 if ( bShared && bOwnEntry )
1048 uno::Reference< frame::XStorable > xStorable( xModel, uno::UNO_QUERY_THROW );
1049 if ( xStorable->isReadonly() )
1051 xCloseable->close(
true );
1053 OUString aUserName(
ScResId( STR_UNKNOWN_USER ) );
1058 if ( !aData[LockFileComponent::OOOUSERNAME].isEmpty() )
1060 aUserName = aData[LockFileComponent::OOOUSERNAME];
1062 else if ( !aData[LockFileComponent::SYSUSERNAME].isEmpty() )
1064 aUserName = aData[LockFileComponent::SYSUSERNAME];
1067 catch ( uno::Exception& )
1070 OUString aMessage(
ScResId( STR_FILE_LOCKED_TRY_LATER ) );
1071 aMessage = aMessage.replaceFirst(
"%1", aUserName );
1074 VclMessageType::Warning, VclButtonsType::Ok,
1081 VclMessageType::Warning, VclButtonsType::YesNo,
1082 ScResId(STR_DOC_DISABLESHARED)));
1083 xWarn->set_default_response(
RET_YES);
1087 xCloseable->close(
true );
1110 xCloseable->close(
true );
1116 xCloseable->close(
true );
1118 VclMessageType::Warning, VclButtonsType::Ok,
1119 ScResId(STR_DOC_NOLONGERSHARED)));
1123 catch ( uno::Exception& )
1126 SC_MOD()->SetInSharedDocSaving(
false );
1130 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
1131 xClose->close(
true );
1133 catch ( uno::Exception& )
1146 SfxStringItem aApp(SID_DOC_SERVICE,
"com.sun.star.sheet.SpreadsheetDocument");
1149 SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON,
1150 { &aApp, &aTarget });
1153 case SID_NOTEBOOKBAR:
1159 else if ( pBindings )
1163 case SID_LANGUAGE_STATUS:
1170 if ( !aLangText.isEmpty() )
1173 const OUString aSelectionLangPrefix(
"Current_");
1174 const OUString aParagraphLangPrefix(
"Paragraph_");
1175 const OUString aDocLangPrefix(
"Default_");
1177 bool bSelection =
false;
1178 bool bParagraph =
false;
1184 if ( aLangText ==
"*" )
1193 else if ( (nPos = aLangText.indexOf(aDocLangPrefix)) != -1 )
1195 aLangText = aLangText.replaceAt(nPos, aDocLangPrefix.getLength(),
"");
1197 if ( aLangText ==
"LANGUAGE_NONE" )
1202 else if ( aLangText ==
"RESET_LANGUAGES" )
1222 else if (-1 != (nPos = aLangText.indexOf( aSelectionLangPrefix )))
1225 aLangText = aLangText.replaceAt( nPos, aSelectionLangPrefix.getLength(),
"" );
1227 else if (-1 != (nPos = aLangText.indexOf( aParagraphLangPrefix )))
1230 aLangText = aLangText.replaceAt( nPos, aParagraphLangPrefix.getLength(),
"" );
1233 if (bSelection || bParagraph)
1247 if (nScriptType == SvtScriptType::LATIN)
1249 if (nScriptType == SvtScriptType::COMPLEX)
1251 if (nScriptType == SvtScriptType::ASIAN)
1267 else if ( eLang != eLatin )
1272 if ( pInputHandler )
1275 pViewSh->UpdateDrawTextOutliner();
1279 Broadcast(
SfxHint(SfxHintId::LanguageChanged));
1285 case SID_SPELLCHECK_IGNORE_ALL:
1295 OUString sIgnoreText;
1300 if(sIgnoreText ==
"Spelling")
1308 case SID_SPELLCHECK_APPLY_SUGGESTION:
1318 OUString sApplyText;
1323 const OUString sSpellingRule(
"Spelling_");
1325 if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
1327 sApplyText = sApplyText.replaceAt(nPos, sSpellingRule.getLength(),
"");
1338 #if HAVE_FEATURE_SCRIPTING
1366 if ( bJustQueryIfProtected && !bProtected )
1369 OUString aTitle(
ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
1370 OUString aText(
ScResId( SCSTR_PASSWORD ) );
1375 aDlg.set_title(aTitle);
1384 if (!aPassword.isEmpty())
1390 if ( bJustQueryIfProtected )
1394 css::uno::Sequence< sal_Int8 > (0) );
1399 VclMessageType::Info, VclButtonsType::Ok,
1400 ScResId(SCSTR_WRONGPASSWORD)));
1406 css::uno::Sequence< sal_Int8 > aPass;
1417 else if ( bJustQueryIfProtected )
1470 auto start = std::chrono::steady_clock::now();
1488 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1498 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1502 auto end = std::chrono::steady_clock::now();
1503 SAL_INFO(
"sc.timing",
"ScDocShell::DoHardRecalc(): took " << std::chrono::duration_cast<std::chrono::milliseconds>(
end - start).
count() <<
"ms");
1510 pStylePool->
FindCaseIns( rStyle, SfxStyleFamily::Para );
1513 pStylePool->
Find(
ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ));
1518 "DoAutoStyle with several tables");
1536 if ( pStyle->
GetFamily() == SfxStyleFamily::Page )
1538 if ( nId == SfxHintId::StyleSheetModified )
1542 const OUString& aNewName = pStyle->
GetName();
1543 OUString aOldName = aNewName;
1544 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1546 aOldName = pExtendedHint->GetOldName();
1548 if ( aNewName != aOldName )
1552 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1567 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1569 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1570 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1571 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1576 else if ( pStyle->
GetFamily() == SfxStyleFamily::Para )
1578 if ( nId == SfxHintId::StyleSheetModified)
1580 const OUString& aNewName = pStyle->
GetName();
1581 OUString aOldName = aNewName;
1582 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1584 aOldName = pExtendedHint->GetOldName();
1585 if ( aNewName != aOldName )
1608 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1621 this, nTab, nOldScale, nOldPages, nScale, nPages ) );
1633 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1638 bool bChange =
false;
1644 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1656 sal_uInt16 nNewScale = nOldScale;
1663 if ( pRepeatCol && nStartCol >= pRepeatCol->
aStart.
Col() )
1667 if ( nStartCol <= pRepeatCol->aEnd.Col() )
1668 nStartCol = pRepeatCol->
aEnd.
Col() + 1;
1672 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++ )
1681 if ( pRepeatRow && nStartRow >= pRepeatRow->
aStart.
Row() )
1684 pRepeatRow->
aEnd.
Row(), nTab );
1685 if ( nStartRow <= pRepeatRow->aEnd.Row() )
1686 nStartRow = pRepeatRow->
aEnd.
Row() + 1;
1694 nBlkTwipsY += nHdr + nFtr;
1696 if ( nBlkTwipsX == 0 )
1698 if ( nBlkTwipsY == 0 )
1702 aPhysPage.
Height() * 100 / nBlkTwipsY );
1705 if ( nNeeded < static_cast<tools::Long>(nNewScale) )
1706 nNewScale = static_cast<sal_uInt16>(nNeeded);
1708 bChange = ( nNewScale != nOldScale || nOldPages != 0 );
1721 for (
SCTAB nTab=0; nTab<nTabCount && nUseTab>
MAXTAB; nTab++)
1740 VclMessageType::Info, VclButtonsType::Ok,
1741 ScResId(STR_PRINT_INVALID_AREA)));
1751 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1752 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1753 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1765 case SID_STATUS_PAGESTYLE:
1766 case SID_FORMATPAGE:
1768 if ( pReqArgs ==
nullptr )
1773 = pStylePool->
Find( aOldName, SfxStyleFamily::Page );
1775 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1791 auto pRequest = std::make_shared<SfxRequest>(rReq);
1793 pDlg->StartExecuteAsync([
this, pDlg, pRequest, pStyleSheet, aOldData, aOldName, &rStyleSet, nCurTab, &rCaller, bUndo](sal_Int32 nResult){
1796 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1800 OUString aNewName = pStyleSheet->
GetName();
1801 if ( aNewName != aOldName &&
1807 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1808 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1824 std::make_unique<ScUndoModifyStyle>(
this, SfxStyleFamily::Page,
1825 aOldData, aNewData ) );
1831 pDlg->disposeOnce();
1840 if ( pReqArgs ==
nullptr )
1848 = pStylePool->Find(
aStr, SfxStyleFamily::Page );
1850 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1857 bool bShareHeader = rStyleSet
1862 bool bShareFooter = rStyleSet
1867 sal_uInt16 nResId = 0;
1871 case SvxPageUsage::Left:
1872 case SvxPageUsage::Right:
1875 nResId = RID_SCDLG_HFEDIT;
1876 else if ( SvxPageUsage::Right == eUsage )
1879 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1881 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1887 nResId = bShareFooter ?
1888 RID_SCDLG_HFEDIT_RIGHTFOOTER :
1889 RID_SCDLG_HFEDIT_LEFTFOOTER;
1891 nResId = bShareHeader ?
1892 RID_SCDLG_HFEDIT_RIGHTHEADER :
1893 RID_SCDLG_HFEDIT_LEFTHEADER;
1898 case SvxPageUsage::Mirror:
1899 case SvxPageUsage::All:
1902 if ( !bShareHeader && !bShareFooter )
1905 nResId = RID_SCDLG_HFEDIT_ALL;
1907 nResId = RID_SCDLG_HFEDIT_FOOTER;
1909 nResId = RID_SCDLG_HFEDIT_HEADER;
1911 else if ( bShareHeader && bShareFooter )
1914 nResId = RID_SCDLG_HFEDIT;
1918 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1920 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1923 else if ( !bShareHeader && bShareFooter )
1926 nResId = RID_SCDLG_HFEDIT_SFTR;
1928 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1930 nResId = RID_SCDLG_HFEDIT_HEADER;
1932 else if ( bShareHeader && !bShareFooter )
1935 nResId = RID_SCDLG_HFEDIT_SHDR;
1937 nResId = RID_SCDLG_HFEDIT_FOOTER;
1939 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1951 auto xRequest = std::make_shared<SfxRequest>(rReq);
1953 pDlg->StartExecuteAsync([
this, pDlg, pStyleSheet, xRequest](sal_Int32 nResult){
1956 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1964 pDlg->disposeOnce();
1985 case SID_STATUS_PAGESTYLE:
1995 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2035 case FID_CHG_RECORD:
2043 case SID_CHG_PROTECT:
2054 case SID_DOCUMENT_COMPARE:
2067 case SID_TABLES_COUNT:
2071 case SID_ATTR_YEAR2000 :
2085 case SID_ATTR_CHAR_FONTLIST:
2089 case SID_NOTEBOOKBAR:
2094 u"modules/scalc/ui/");
2100 case SID_LANGUAGE_STATUS:
2162 if ( eShellMode == SfxObjectCreateMode::ORGANIZER )
2183 aArea.
SetRight( SC_PREVIEW_SIZE_Y );
2188 if ( bNegativePage )
2193 else if( nAspect ==
ASPECT_CONTENT && eShellMode != SfxObjectCreateMode::EMBEDDED )
2209 if (nStartCol>nEndCol)
2210 nStartCol = nEndCol;
2211 if (nStartRow>nEndRow)
2212 nStartRow = nEndRow;
2214 .
GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab );
2229 while ( nCol<rDoc.
MaxCol() )
2232 if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
2252 bool bFound =
false;
2256 if (rDoc.
RowHidden(i, nTab,
nullptr, &nLastRow))
2264 if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
2291 if ( bNegativePage )
2298 tools::Long nCorrectionLeft = (nOrigLeft == 0 && nCol > 0) ? nSetLeft : 0;
2305 tools::Long nCorrectionTop = (nOrigTop == 0 && nRow > 0) ? nSetTop : 0;
2308 if ( bNegativePage )
2322 SfxStyleFamily::Page );
2324 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2329 rbHeader = rbFooter =
false;
2332 OSL_ENSURE( pStyleSet,
"PageStyle-Set not found! :-(" );
2340 pSet = &pSetItem->GetItemSet();
2344 pSet = &pSetItem->GetItemSet();
2349 bool ScDocShell::DdeGetData(
const OUString& rItem,
2350 const OUString& rMimeType,
2351 css::uno::Any & rValue )
2354 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2356 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2359 osl_getThreadTextEncoding()));
2360 rValue <<= css::uno::Sequence< sal_Int8 >(
2361 reinterpret_cast<const sal_Int8*
>(aFmtByte.getStr()),
2362 aFmtByte.getLength() + 1 );
2366 if ( !aObj.IsRef() )
2370 aObj.SetFormulas(
true );
2375 if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(),
2376 SotClipboardFormatId::SYLK ) )
2378 rValue <<= css::uno::Sequence< sal_Int8 >(
2379 reinterpret_cast<const sal_Int8*
>(aData.getStr()),
2380 aData.getLength() + 1 );
2388 aObj.SetSeparator(
',' );
2390 return aObj.ExportData( rMimeType, rValue );
2395 return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
2398 bool ScDocShell::DdeSetData(
const OUString& rItem,
2399 const OUString& rMimeType,
2400 const css::uno::Any & rValue )
2403 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2405 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2416 aObj.SetFormulas(
true );
2423 return aObj.ImportString( aData, SotClipboardFormatId::SYLK );
2429 aObj.SetSeparator(
',' );
2430 OSL_ENSURE(
false,
"Implementation is missing" );
2435 OSL_ENSURE(
false,
"Implementation is missing" );
2445 OUString aPos = rItem;
2483 boost::property_tree::ptree aAnnotation;
2489 aAnnotation.put(
"id", pNote->
GetId());
2490 aAnnotation.put(
"tab", rPos.
Tab());
2494 aAnnotation.put(
"author", pNote->
GetAuthor());
2495 aAnnotation.put(
"dateTime", pNote->
GetDate());
2496 aAnnotation.put(
"text", pNote->
GetText());
2503 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
2504 OString aRectString;
2518 const double fPPTX = pViewData->
GetPPTX();
2519 const double fPPTY = pViewData->
GetPPTY();
2521 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)).
toString();
2523 aAnnotation.put(
"cellPos", aRectString);
2527 boost::property_tree::ptree aTree;
2528 aTree.add_child(
"comment", aAnnotation);
2529 std::stringstream aStream;
2530 boost::property_tree::write_json(aStream, aTree);
2531 std::string aPayload = aStream.str();
2538 if (pThisViewShell ==
nullptr || pViewShell->
GetDocId() == pThisViewShell->
GetDocId())
2548 return pViewSh ? &pViewSh->
GetViewData() :
nullptr;
2557 return pViewData ? pViewData->
GetTabNo() :
static_cast<SCTAB>(0);
2594 sal_uInt16 nShellCnt = 0;
2596 while ( pShell && !pFound )
2598 if (
auto pDocSh = dynamic_cast<ScDocShell*>(pShell) )
2600 if ( nShellCnt == nDocNo )
2613 OSL_ENSURE( _pFileDlg,
"ScDocShell::DialogClosedHdl(): no file dialog" );
2614 OSL_ENSURE(
m_pImpl->pDocInserter,
"ScDocShell::DialogClosedHdl(): no document inserter" );
2618 sal_uInt16 nSlot =
m_pImpl->pRequest->GetSlot();
2619 std::unique_ptr<SfxMedium> pMed =
m_pImpl->pDocInserter->CreateMedium();
2624 if ( SID_DOCUMENT_COMPARE == nSlot )
2626 if ( pMed->GetFilter() )
2627 m_pImpl->pRequest->AppendItem(
2628 SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetFilterName() ) );
2630 if ( !sOptions.isEmpty() )
2636 if (pSet && pSet->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
2642 m_pImpl->pRequest->AppendItem( *pItem );
2649 m_pImpl->bIgnoreLostRedliningWarning =
false;
2652 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
2664 sal_uInt16
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
2688 uno::Reference< frame::XModel >
xModel;
2691 SC_MOD()->SetInSharedDocLoading(
true );
2693 uno::Sequence < beans::PropertyValue > aArgs( 1 );
2694 aArgs[0].Name =
"Hidden";
2695 aArgs[0].Value <<=
true;
2700 if ( pPasswordItem && !pPasswordItem->
GetValue().isEmpty() )
2703 aArgs[1].Name =
"Password";
2704 aArgs[1].Value <<= pPasswordItem->
GetValue();
2707 if (pEncryptionItem)
2709 aArgs.realloc(aArgs.getLength() + 1);
2710 aArgs[aArgs.getLength() - 1].Name =
"EncryptionData";
2711 aArgs[aArgs.getLength() - 1].Value = pEncryptionItem->
GetValue();
2717 uno::UNO_QUERY_THROW );
2718 SC_MOD()->SetInSharedDocLoading(
false );
2720 catch ( uno::Exception& )
2722 OSL_FAIL(
"ScDocShell::LoadSharedDocument(): caught exception" );
2723 SC_MOD()->SetInSharedDocLoading(
false );
2726 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
2727 xClose->close(
true );
2728 return uno::Reference< frame::XModel >();
2730 catch ( uno::Exception& )
2732 return uno::Reference< frame::XModel >();
SC_DLLPUBLIC ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
void SetEditHelpId(const OString &rId)
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
virtual void SetVisArea(const tools::Rectangle &rVisArea)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
const size_t count(pCandidateA->getBorderLines().size())
void GetScaleData(Size &rPhysSize, tools::Long &rDocHdr, tools::Long &rDocFtr)
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
SC_DLLPUBLIC const ScRange * GetRepeatColRange(SCTAB nTab)
SC_DLLPUBLIC bool HasQueryParam() const
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
ScDocShell * GetDocShell() const
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
SfxChildWindow * GetChildWindow(sal_uInt16)
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
static SfxInterface * GetStaticInterface()
void ExecutePageStyle(const SfxViewShell &rCaller, SfxRequest &rReq, SCTAB nCurTab)
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
virtual const FmFormShell * GetFormShell() const override
SfxViewFrame * GetFrame() const
VclPtr< SfxInfoBarWindow > AppendInfoBar(const OUString &sId, const OUString &sPrimaryMessage, const OUString &sSecondaryMessage, InfobarType aInfobarType, bool bShowCloseButton=true)
IMPL_LINK_NOARG(ScDocShell, ReloadAllLinksHdl, weld::Button &, void)
static SfxAbstractDialogFactory * Create()
ScLkUpdMode GetLinkMode() const
#define PRINT_HEADER_WIDTH
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
bool HasSharedXMLFlagSet() const
static void GetSpellSettings(LanguageType &rDefLang, LanguageType &rCjkLang, LanguageType &rCtlLang, bool &rAutoSpell)
const SfxItemSet & GetEmptyItemSet() const
std::unique_ptr< ContentProperties > pData
static weld::Window * GetActiveDialogParent()
static void DrawToDev(ScDocument &rDoc, OutputDevice *pDev, double nPrintFactor, const tools::Rectangle &rBound, ScViewData *pViewData, bool bMetaFile)
SfxBindings * GetViewBindings()
virtual VclPtr< AbstractScColRowLabelDlg > CreateScColRowLabelDlg(weld::Window *pParent, bool bCol, bool bRow)=0
bool isTiledAnnotations()
void SetProtection(const css::uno::Sequence< sal_Int8 > &rPass)
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
void PostPaintCell(SCCOL nCol, SCROW nRow, SCTAB nTab)
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
Point GetPrintTwipsPos(SCCOL nCol, SCROW nRow) const
returns the position (top-left corner) of the requested cell in print twips coordinates.
const OUString & GetAuthor() const
Returns the author date of this note.
static void RemoveAppPrefix(OUString &rFilterName)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(175)
const OUString & GetName() const
void GetPageOnFromPageStyleSet(const SfxItemSet *pStyleSet, SCTAB nCurTab, bool &rbHeader, bool &rbFooter)
These options control how multi-line cells are converted during export in certain lossy formats (such...
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument()
bool updateDdeOrOleOrWebServiceLinks(weld::Window *pWin)
void initializeFrom(const css::uno::Sequence< css::beans::PropertyValue > &_rValues)
const OUString & getBcp47(bool bResolveSystem=true) const
ViewShellDocId GetDocId() const override
ScDocShell(const ScDocShell &rDocShell)=delete
void RefreshPivotTables(const ScRange &rSource)
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
void DeleteTable(SCTAB nTabNr, bool bRecord=true)
static SVL_DLLPUBLIC void GetHashPassword(css::uno::Sequence< sal_Int8 > &rPassHash, const char *pPass, sal_uInt32 nLen)
void SetDocumentModified()
ComplexTextLayoutFlags GetLayoutMode() const
ScStyleSheet * FindCaseIns(const OUString &rName, SfxStyleFamily eFam)
bool ImportData(const ScImportParam &rParam)
void MergeDocument(ScDocument &rOtherDoc, bool bShared=false, bool bCheckDuplicates=false, sal_uLong nOffset=0, ScChangeActionMergeMap *pMergeMap=nullptr, bool bInverseMap=false)
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
ScSplitPos GetActivePart() const
static void UpdateInputLine()
create "Importx" (if necessary)
void Done(bool bRemove=false)
virtual short run() override
virtual SfxItemSet & GetItemSet()
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
bool HasSubTotalParam() const
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
ScDBData * GetDBData(const ScRange &rMarked, ScGetDBMode eMode, ScGetDBSelection eSel)
sc::DocumentLinkManager & GetDocLinkManager()
bool ExecuteChangeProtectionDialog(bool bJustQueryIfProtected=false)
Protect/unprotect ChangeTrack and return if protection was successfully changed.
SfxStyleFamily GetFamily() const
virtual short Execute()=0
sal_uLong GetActionMax() const
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
void UpdateChartArea(const OUString &rChartName, const ScRange &rNewArea, bool bColHeaders, bool bRowHeaders, bool bAdd)
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
virtual ::sfx2::SvLinkSource * DdeCreateLinkSource(const OUString &rItem) override
SfxApplication * SfxGetpApp()
OUString GetSharedFileURL() const
bool HasAnySheetEventScript(ScSheetEventId nEvent, bool bWithVbaEvents=false) const
virtual SfxUndoManager * GetUndoManager() override
void ToggleChildWindow(sal_uInt16)
SfxStyleSheetBase * GetStyleSheet() const
Keep selection as is, expand to used data area if no selection.
bool AdjustPrintZoom(const ScRange &rRange)
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
void SetImportParam(const ScImportParam &rImportParam)
const OUString & GetName() const
PropertiesInfo aProperties
SC_DLLPUBLIC SCROW MaxRow() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
SC_DLLPUBLIC SCTAB GetTableCount() const
Additional class containing cell annotation data.
static void LOKCommentNotify(LOKCommentNotificationType nType, const ScDocument *pDocument, const ScAddress &rPos, const ScPostIt *pNote)
static LanguageType GetLanguageType(std::u16string_view rStr)
static SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SfxViewShell * Current()
bool isCompatFlagSet(Compat flag)
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
SC_DLLPUBLIC bool IsDocVisible() const
void UpdateCharts(bool bAllCharts)
const SfxPoolItem * ExecuteSynchron(sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr)
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
bool DetectiveRefresh(bool bAutomatic=false)
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
const css::uno::Any & GetValue() const
void Execute(SfxRequest &rReq)
void NotifyStyle(const SfxStyleSheetHint &rHint)
static SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
const OUString & GetName() const
static OUString GetOptions(const SfxMedium &rMedium)
void SetTheActionRange(sal_uLong nFirst, sal_uLong nLast)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(169)
SfxObjectCreateMode GetCreateMode() const
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
bool HasRowHeaders() const
bool GetMergeSizePrintTwips(SCCOL nX, SCROW nY, tools::Long &rSizeXTwips, tools::Long &rSizeYTwips) const
ScViewData & GetViewData()
ScChangeTrack * GetChangeTrack() const
static void SetError(ErrCode)
const css::uno::Sequence< sal_Int8 > & GetProtection() const
SfxItemPool & GetPool() const
constexpr OUStringLiteral aData
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
ScTabViewShell * GetViewShell() const
void InitFromStyle(const SfxStyleSheetBase *pSource)
void SetTabNo(SCTAB nNewTab)
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
SC_DLLPUBLIC SCCOL MaxCol() const
void RepeatDB(bool bRecord=true)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
#define TOOLS_WARN_EXCEPTION(area, stream)
void DoAutoStyle(const ScRange &rRange, const OUString &rStyle)
SC_DLLPUBLIC void CalcFormulaTree(bool bOnlyForced=false, bool bProgressBar=true, bool bSetAllDirty=true)
Calculate formula cells that are on the formula tree either partially, or in full.
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect) override
sal_Int16 GetValue() const
#define ERRCTX_SFX_OPENDOC
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
bool SwitchToShared(bool bShared, bool bSave)
SC_DLLPUBLIC void GetSymbol(OUString &rSymbol, const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT) const
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(182)
virtual SfxObjectShell * GetObjectShell() override
void SetAttribs(const SfxItemSet &rSet)
bool ValidCol(SCCOL nCol) const
EditEngine * GetEditEngine() const
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
bool HasSortParam() const
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
SfxBindings & GetBindings()
SfxObjectShell * GetEmbeddedObject() const
void PageStyleModified(std::u16string_view rStyleName, bool bApi)
#define ERRCODE_BASIC_NO_OBJECT
const OUString & GetValue() const
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
const T * GetArg(sal_uInt16 nSlotId) const
void ShowExtras(SfxShowExtras nExtras)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
tools::Long Width() const
ScRefFlags Parse(const OUString &, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab=0, sal_Unicode cDelimiter=0)
void ModifyScenario(SCTAB nTab, const OUString &rName, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
void SetPrintZoom(SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages)
bool RenamePageStyleInUse(std::u16string_view rOld, const OUString &rNew)
void SetLinkFormulaNeedingCheck(bool bSet)
OUString ScResId(const char *pId)
void SetYear2000(sal_uInt16 nVal)
const OUString & GetName() const
OUString GetText() const
Returns the caption text of this note.
void GetImportParam(ScImportParam &rImportParam) const
ScGridWindow * GetActiveWin()
#define LANGUAGE_DONTKNOW
HardRecalcState GetHardRecalcState() const
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
SfxItemSet * GetItemSet() const
void BroadcastUno(const SfxHint &rHint)
virtual comphelper::EmbeddedObjectContainer & getEmbeddedObjectContainer() const override
void InsertText(const OUString &rNew, bool bSelect=false)
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
const XColorListRef & GetColorList() const
#define ERRCODE_BASIC_NO_ACTIVE_OBJECT
OUString SpellIgnoreWord()
const tools::Rectangle & GetVisArea() const
static SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static ScViewData * GetViewData()
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
bool HasType(Type nType) const
void GetStatePageStyle(SfxItemSet &rSet, SCTAB nCurTab)
SfxViewShell * GetViewShell() const
virtual VclPtr< AbstractScNewScenarioDlg > CreateScNewScenarioDlg(weld::Window *pParent, const OUString &rName, bool bEdit, bool bSheetProtected)=0
enumrange< T >::Iterator end(enumrange< T >)
bool IsShareDocumentChecked() const
void RemoveInfoBar(std::u16string_view sId)
ScDBData * findByUpperName(const OUString &rName)
void SetCalcNotification(SCTAB nTab)
ScDBFunc * GetView() const
void SetMinLen(sal_uInt16 Len)
static ScDocShell * GetShellByNum(sal_uInt16 nDocNo)
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
void SetReturnValue(const SfxPoolItem &)
#define ERRCODE_BASIC_BAD_PARAMETER
bool isExportLocked() const
static bool StateMethod(SfxBindings &rBindings, std::u16string_view rUIFile, bool bReloadNotebookbar=false)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
static bool GetString(OUString &rString, const css::uno::Any &rAny, sal_uInt16 nEncoding)
Stores global named database ranges.
void SetShowAccepted(bool bVal)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
void UpdateExternalRefLinks(weld::Window *pWin)
bool HasChildWindow(sal_uInt16)
virtual VclPtr< SfxAbstractTabDialog > CreateScStyleDlg(weld::Window *pParent, SfxStyleSheetBase &rStyleBase, bool bPage)=0
static SfxViewFrame * Current()
bool ValidRow(SCROW nRow) const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
static ScTabViewShell * GetActiveViewShell()
void DisableItem(sal_uInt16 nWhich)
void setUserAllowsLinkUpdate(bool bNew)
weld::Window * GetFrameWeld() const
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
SC_DLLPUBLIC void CalcAll()
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SC_DLLPUBLIC const ScRange * GetRepeatRowRange(SCTAB nTab)
#define SAL_WARN_IF(condition, area, stream)
static SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
#define PRINT_HEADER_HEIGHT
IMPL_LINK(ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void)
static SotClipboardFormatId GetFormatIdFromMimeType(const OUString &rMimeType)
void CompareDocument(ScDocument &rOtherDoc)
#define SAL_INFO(area, stream)
static SC_DLLPUBLIC ScAbstractDialogFactory * Create()
virtual VclPtr< SfxAbstractTabDialog > CreateScHFEditDlg(weld::Window *pParent, const SfxItemSet &rCoreSet, const OUString &rPageStyle, sal_uInt16 nResId)=0
virtual LockFileEntry GetLockData() override
SfxDispatcher & GetDispatcher()
ScChangeViewSettings * GetChangeViewSettings() const
static void MirrorRectRTL(tools::Rectangle &rRect)
void UpdateAcceptChangesDialog()
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, ScAddress::ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, const OUString *pErrRef=nullptr)
sal_uInt32 GetId() const
Returns the note id.
static void ExecMethod(SfxBindings &rBindings, const OUString &rUIName)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
tools::Long Height() const
OUString GetPassword() const
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
LOKCommentNotificationType
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
std::unique_ptr< DocShell_Impl > m_pImpl
const OUString & GetDate() const
Returns the creation date of this note.
Reference< XComponentContext > getProcessComponentContext()
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
const ScDocument & GetDocument() const
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
sal_uInt16 GetYear2000() const
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
bool HasImportSelection() const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
void ShowChildWindow(sal_uInt16, bool bVisible=true)
static OUString GetLanguageString(const LanguageType eType)
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
void SetSelection(const ESelection &rNewSel)
void SetDocumentModified()
void UpdateImport(const OUString &rTarget, const svx::ODataAccessDescriptor &rDescriptor)
static bool GetFilterName(const OUString &rFileName, OUString &rFilter, OUString &rOptions, bool bWithContent, bool bWithInteraction)
Returns the filter name and options from a file name.
static SVL_DLLPUBLIC bool CompareHashPassword(const css::uno::Sequence< sal_Int8 > &rOldPassHash, const OUString &sNewPass)
void Execute(SfxRequest &rReq)
bool hasListeners() const
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
void InvalidateAll(bool bWithMsg)
bool HasColHeaders() const
void AppendItem(const SfxPoolItem &)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(181)
bool IsUndoEnabled() const
Reference< XModel > xModel
static SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
ESelection GetSelection() const
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument &, const Details &rDetails=detailsOOOa1, ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, sal_Int32 *pSheetEndPos=nullptr, const OUString *pErrRef=nullptr)
Size GetPageSize(SCTAB nTab) const
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
bool DoLoad(SfxMedium *pMedium)
void StartChangeTracking()
void SetScreen(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
SC_DLLPUBLIC void GetLanguage(LanguageType &rLatin, LanguageType &rCjk, LanguageType &rCtl) const
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(174)
SCTAB GetVisibleTab() const
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
SAL_DLLPRIVATE void EnableSharedSettings(bool bEnable)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
void SnapVisArea(tools::Rectangle &rRect) const
ScLkUpdMode GetLinkUpdateModeState() const
bool ValidTab(SCTAB nTab)
weld::Window * GetDialogParent()
parent window for dialogs Problem: OLE Server!
bool HasImportParam() const
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
Create before modifications of the document and destroy thereafter.
void GetEditView(ScSplitPos eWhich, EditView *&rViewPtr, SCCOL &rCol, SCROW &rRow)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
static void CloseMethod(SfxBindings &rBindings)
void GetState(SfxItemSet &rSet)
OUString toString(OptionInfo const *info)
SC_DLLPUBLIC bool GetAutoCalc() const
void SetShowChanges(bool bFlag)
SfxMedium * GetMedium() const