20 #include <config_features.h>
22 #include <boost/property_tree/json_parser.hpp>
24 #include <com/sun/star/frame/Desktop.hpp>
57 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
70 #include <docfunc.hxx>
72 #include <strings.hrc>
73 #include <stlsheet.hxx>
74 #include <stlpool.hxx>
76 #include <globstr.hrc>
100 #include <com/sun/star/document/UpdateDocMode.hpp>
121 SID_UPDATEDOCMODE,
false);
122 m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->
GetValue() : css::document::UpdateDocMode::NO_UPDATE;
139 if (
m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
141 else if (
m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
162 if (
m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
183 m_pDocument->UpdateExternalRefLinks(pDialogParent);
185 bool bAnyDde =
m_pDocument->GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(pDialogParent);
191 Broadcast(
SfxHint(SfxHintId::ScDataChanged));
208 SAL_WARN_IF(!pViewFrame,
"sc",
"expected there to be a ViewFrame");
232 sal_uInt16 nSlot = rReq.
GetSlot();
241 if( pReqArgs && pReqArgs->
HasItem( FN_PARAM_1, &pColItem ) &&
242 pReqArgs->
HasItem( FN_PARAM_2, &pRowItem ) &&
243 pReqArgs->
HasItem( FN_PARAM_3, &pTabItem ) &&
244 pReqArgs->
HasItem( SID_SC_SETTEXT, &pTextItem ) )
254 if (
m_pDocument->IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) )
267 #if HAVE_FEATURE_SCRIPTING
274 #if HAVE_FEATURE_SCRIPTING
286 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
290 if ( aAny >>= aProperties )
295 if ( pReqArgs->
GetItemState( FN_PARAM_1,
true, &pItem ) == SfxItemState::SET )
296 sTarget = static_cast<const SfxStringItem*>(pItem)->GetValue();
298 bool bIsNewArea =
true;
299 if ( pReqArgs->
GetItemState( FN_PARAM_2,
true, &pItem ) == SfxItemState::SET )
300 bIsNewArea = static_cast<const SfxBoolItem*>(pItem)->GetValue();
303 bool bMakeArea =
false;
315 OUString aStrImport =
ScResId( STR_UNDO_IMPORTDATA );
318 nViewShellId = pViewSh->GetViewShellId();
323 OSL_ENSURE(pDBData,
"Cannot create DB data");
333 OUString aTemplate =
ScResId( STR_IMPORT_REPLACE );
339 VclMessageType::Question, VclButtonsType::YesNo,
341 xQueryBox->set_default_response(
RET_YES);
342 bDo = xQueryBox->run() ==
RET_YES;
355 if ( bMakeArea && bUndo)
360 OSL_FAIL(
"arguments expected" );
365 case SID_CHART_SOURCE:
366 case SID_CHART_ADDSOURCE:
371 OUString aChartName, aRangeName;
375 bool bMultiRange =
false;
377 bool bColHeaders =
true;
378 bool bRowHeaders =
true;
379 bool bColInit =
false;
380 bool bRowInit =
false;
381 bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
384 aChartName = pChartItem->GetValue();
387 aRangeName = pChartItem->GetValue();
389 if( pReqArgs->
HasItem( FN_PARAM_1, &pItem ) )
394 if( pReqArgs->
HasItem( FN_PARAM_2, &pItem ) )
406 if ( !aRangeListRef->
empty() )
409 aSingleRange = aRangeListRef->
front();
413 aRangeListRef.
clear();
417 if (pViewSh && bValid && !aChartName.isEmpty() )
429 m_pDocument->LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
433 if ( !bAddRange && ( !bColInit || !bRowInit ) )
444 if ( pDlg->Execute() ==
RET_OK )
446 bColHeaders = pDlg->IsRow();
447 bRowHeaders = pDlg->IsCol();
463 std::make_unique<ScUndoChartData>(
this, aChartName, aRangeListRef,
464 bColHeaders, bRowHeaders, bAddRange ) );
466 m_pDocument->UpdateChartArea( aChartName, aRangeListRef,
467 bColHeaders, bRowHeaders, bAddRange );
471 ScRange aNewRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
475 std::make_unique<ScUndoChartData>(
this, aChartName, aNewRange,
476 bColHeaders, bRowHeaders, bAddRange ) );
478 m_pDocument->UpdateChartArea( aChartName, aNewRange,
479 bColHeaders, bRowHeaders, bAddRange );
485 OSL_FAIL(
"UpdateChartArea: no ViewShell or wrong data");
491 OSL_FAIL(
"SID_CHART_SOURCE without arguments");
499 if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
500 bNewVal = static_cast<const SfxBoolItem*>(pItem)->GetValue();
517 case FID_HARD_RECALC:
521 case SID_UPDATETABLINKS:
542 auto pInfoBar = pViewFrame->
AppendInfoBar(
"enablecontent",
"",
ScResId(STR_RELOAD_TABLES), InfobarType::WARNING);
559 case SID_REIMPORT_AFTER_LOAD:
566 if ((
m_nCanUpdate != css::document::UpdateDocMode::NO_UPDATE) &&
567 (
m_nCanUpdate != css::document::UpdateDocMode::QUIET_UPDATE))
571 OSL_ENSURE(pViewSh,
"SID_REIMPORT_AFTER_LOAD: no View");
572 if (pViewSh && pDBColl)
575 VclMessageType::Question, VclButtonsType::YesNo,
576 ScResId(STR_REIMPORT_AFTER_LOAD)));
577 xQueryBox->set_default_response(
RET_YES);
578 if (xQueryBox->run() ==
RET_YES)
581 for (
const auto& rxDB : rDBs)
595 bool bContinue = pViewSh->
ImportData( aImportParam );
621 if ( !bDone && pDBColl )
638 OSL_FAIL(
"use ScAutoStyleHint instead of SID_AUTO_STYLE");
641 case SID_GET_COLORLIST:
658 bool bActivateTracking = (pChangeTrack ==
nullptr);
660 bActivateTracking = pItem->
GetValue();
662 if ( !bActivateTracking )
668 VclMessageType::Warning, VclButtonsType::YesNo,
670 xWarn->set_default_response(
RET_NO);
671 bDo = (xWarn->run() ==
RET_YES );
712 case SID_CHG_PROTECT :
724 case SID_DOCUMENT_MERGE:
725 case SID_DOCUMENT_COMPARE:
729 if ( pChangeTrack && !
m_pImpl->bIgnoreLostRedliningWarning )
731 if ( nSlot == SID_DOCUMENT_COMPARE )
734 VclMessageType::Warning, VclButtonsType::YesNo,
736 xWarn->set_default_response(
RET_NO);
758 OUString aFileName = pFileNameItem->
GetValue();
760 OUString aFilterName;
763 aFilterName = pFilterItem->GetValue();
768 aOptions = pOptionsItem->GetValue();
772 if (pReqArgs->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
773 pInt16Item = dynamic_cast<const SfxInt16Item*>(pItem);
780 if (aFilterName.isEmpty())
787 std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
788 auto pSet = std::make_shared<SfxAllItemSet>( pApp->
GetPool() );
789 if (!aOptions.isEmpty())
790 pSet->Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
793 pMed =
new SfxMedium( aFileName, StreamMode::STD_READ, pFilter, std::move(pSet) );
801 m_pImpl->bIgnoreLostRedliningWarning =
true;
807 m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent,
808 ScDocShell::Factory().GetFactoryName(),
mode ) );
819 pOtherDocSh->
DoLoad( pMed );
820 ErrCode nErr = pOtherDocSh->GetErrorCode();
824 if ( !pOtherDocSh->GetError() )
826 bool bHadTrack = (
m_pDocument->GetChangeTrack() != nullptr );
827 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
829 if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
834 if ( nSlot == SID_DOCUMENT_COMPARE )
846 pViewFrm->
ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId() );
864 m_pDocument->SetChangeViewSettings(aChangeViewSet);
867 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
868 else if ( nSlot == SID_DOCUMENT_MERGE &&
IsDocShared() && pChangeTrack )
871 if ( nEnd >= nStart )
879 m_pDocument->SetChangeViewSettings( aChangeViewSet );
888 pOtherDocSh->DoClose();
892 case SID_DELETE_SCENARIO:
896 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
898 if (
const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>(pItem))
900 const OUString&
aName = pStringItem->GetValue();
921 case SID_EDIT_SCENARIO:
924 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
926 if (
const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>(pItem))
928 OUString
aName = pStringItem->GetValue();
937 m_pDocument->GetScenarioData( nTab, aComment, aColor, nFlags );
942 SCTAB nActualTab = nTab;
948 bool bSheetProtected =
m_pDocument->IsTabProtected(nActualTab);
953 pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags );
954 if ( pNewDlg->Execute() ==
RET_OK )
956 pNewDlg->GetScenarioData( aName, aComment, aColor, nFlags );
967 case SID_ATTR_YEAR2000 :
970 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
972 if (
const SfxUInt16Item* pInt16Item = dynamic_cast<const SfxUInt16Item*>(pItem))
974 sal_uInt16 nY2k = pInt16Item->GetValue();
994 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
1013 bool bContinue =
true;
1017 VclMessageType::Question, VclButtonsType::YesNo,
1018 ScResId(STR_DOC_WILLBESAVED)));
1019 xQueryBox->set_default_response(
RET_YES);
1020 if (xQueryBox->run() ==
RET_NO)
1029 SC_MOD()->SetInSharedDocSaving(
true );
1036 SC_MOD()->SetInSharedDocSaving(
false );
1050 uno::Reference< frame::XModel >
xModel;
1055 uno::Reference< util::XCloseable > xCloseable( xModel, uno::UNO_QUERY_THROW );
1058 bool bShared =
false;
1059 ScModelObj* pDocObj = comphelper::getFromUnoTunnel<ScModelObj>( xModel );
1070 bool bOwnEntry =
false;
1076 catch ( uno::Exception& )
1080 if ( bShared && bOwnEntry )
1082 uno::Reference< frame::XStorable > xStorable( xModel, uno::UNO_QUERY_THROW );
1083 if ( xStorable->isReadonly() )
1085 xCloseable->close(
true );
1087 OUString aUserName(
ScResId( STR_UNKNOWN_USER ) );
1092 if ( !aData[LockFileComponent::OOOUSERNAME].isEmpty() )
1094 aUserName = aData[LockFileComponent::OOOUSERNAME];
1096 else if ( !aData[LockFileComponent::SYSUSERNAME].isEmpty() )
1098 aUserName = aData[LockFileComponent::SYSUSERNAME];
1101 catch ( uno::Exception& )
1104 OUString aMessage(
ScResId( STR_FILE_LOCKED_TRY_LATER ) );
1105 aMessage = aMessage.replaceFirst(
"%1", aUserName );
1108 VclMessageType::Warning, VclButtonsType::Ok,
1115 VclMessageType::Warning, VclButtonsType::YesNo,
1116 ScResId(STR_DOC_DISABLESHARED)));
1117 xWarn->set_default_response(
RET_YES);
1121 xCloseable->close(
true );
1132 uno::Reference<frame::XStorable> xStorable2(
1134 xStorable2->store();
1144 xCloseable->close(
true );
1150 xCloseable->close(
true );
1152 VclMessageType::Warning, VclButtonsType::Ok,
1153 ScResId(STR_DOC_NOLONGERSHARED)));
1157 catch ( uno::Exception& )
1160 SC_MOD()->SetInSharedDocSaving(
false );
1164 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
1165 xClose->close(
true );
1167 catch ( uno::Exception& )
1180 SfxStringItem aApp(SID_DOC_SERVICE,
"com.sun.star.sheet.SpreadsheetDocument");
1183 SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON,
1184 { &aApp, &aTarget });
1187 case SID_NOTEBOOKBAR:
1193 else if ( pBindings )
1197 case SID_LANGUAGE_STATUS:
1204 if ( !aLangText.isEmpty() )
1207 static const OUStringLiteral aSelectionLangPrefix(
u"Current_");
1208 static const OUStringLiteral aParagraphLangPrefix(
u"Paragraph_");
1209 static const OUStringLiteral aDocLangPrefix(
u"Default_");
1211 bool bSelection =
false;
1212 bool bParagraph =
false;
1218 if ( aLangText ==
"*" )
1227 else if ( (nPos = aLangText.indexOf(aDocLangPrefix)) != -1 )
1229 aLangText = aLangText.replaceAt(nPos, aDocLangPrefix.getLength(),
u"");
1231 if ( aLangText ==
"LANGUAGE_NONE" )
1236 else if ( aLangText ==
"RESET_LANGUAGES" )
1256 else if (-1 != (nPos = aLangText.indexOf( aSelectionLangPrefix )))
1259 aLangText = aLangText.replaceAt( nPos, aSelectionLangPrefix.getLength(),
u"" );
1261 else if (-1 != (nPos = aLangText.indexOf( aParagraphLangPrefix )))
1264 aLangText = aLangText.replaceAt( nPos, aParagraphLangPrefix.getLength(),
u"" );
1267 if (bSelection || bParagraph)
1281 if (nScriptType == SvtScriptType::LATIN)
1283 if (nScriptType == SvtScriptType::COMPLEX)
1285 if (nScriptType == SvtScriptType::ASIAN)
1301 else if ( eLang != eLatin )
1306 if ( pInputHandler )
1309 pViewSh->UpdateDrawTextOutliner();
1313 Broadcast(
SfxHint(SfxHintId::LanguageChanged));
1319 case SID_SPELLCHECK_IGNORE_ALL:
1329 OUString sIgnoreText;
1334 if(sIgnoreText ==
"Spelling")
1342 case SID_SPELLCHECK_APPLY_SUGGESTION:
1352 OUString sApplyText;
1357 static const OUStringLiteral sSpellingRule(
u"Spelling_");
1359 if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
1361 sApplyText = sApplyText.replaceAt(nPos, sSpellingRule.getLength(),
u"");
1366 case SID_REFRESH_VIEW:
1377 #if HAVE_FEATURE_SCRIPTING
1405 if ( bJustQueryIfProtected && !bProtected )
1408 OUString aTitle(
ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
1409 OUString aText(
ScResId( SCSTR_PASSWORD ) );
1414 aDlg.set_title(aTitle);
1423 if (!aPassword.isEmpty())
1429 if ( bJustQueryIfProtected )
1437 VclMessageType::Info, VclButtonsType::Ok,
1438 ScResId(SCSTR_WRONGPASSWORD)));
1444 css::uno::Sequence< sal_Int8 > aPass;
1455 else if ( bJustQueryIfProtected )
1464 SAL_WARN(
"sc",
"ScDocShell::DoRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1515 SAL_WARN(
"sc",
"ScDocShell::DoHardRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1518 auto start = std::chrono::steady_clock::now();
1536 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1546 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1550 auto end = std::chrono::steady_clock::now();
1551 SAL_INFO(
"sc.timing",
"ScDocShell::DoHardRecalc(): took " << std::chrono::duration_cast<std::chrono::milliseconds>(
end -
start).
count() <<
"ms");
1558 pStylePool->
FindCaseIns( rStyle, SfxStyleFamily::Para );
1561 pStylePool->
Find(
ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ));
1566 "DoAutoStyle with several tables");
1572 m_pDocument->ApplyStyleAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, *pStyleSheet );
1573 m_pDocument->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
1584 if ( pStyle->
GetFamily() == SfxStyleFamily::Page )
1586 if ( nId == SfxHintId::StyleSheetModified )
1590 const OUString& aNewName = pStyle->
GetName();
1591 OUString aOldName = aNewName;
1592 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1594 aOldName = pExtendedHint->GetOldName();
1596 if ( aNewName != aOldName )
1597 m_pDocument->RenamePageStyleInUse( aOldName, aNewName );
1600 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1615 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1617 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1618 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1619 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1624 else if ( pStyle->
GetFamily() == SfxStyleFamily::Para )
1626 if ( nId == SfxHintId::StyleSheetModified)
1628 const OUString& aNewName = pStyle->
GetName();
1629 OUString aOldName = aNewName;
1630 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1632 aOldName = pExtendedHint->GetOldName();
1633 if ( aNewName != aOldName )
1653 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1656 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1669 this, nTab, nOldScale, nOldPages, nScale, nPages ) );
1681 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1686 bool bChange =
false;
1689 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1692 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1704 sal_uInt16 nNewScale = nOldScale;
1711 if ( pRepeatCol && nStartCol >= pRepeatCol->
aStart.
Col() )
1715 if ( nStartCol <= pRepeatCol->aEnd.Col() )
1716 nStartCol = pRepeatCol->
aEnd.
Col() + 1;
1720 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++ )
1729 if ( pRepeatRow && nStartRow >= pRepeatRow->
aStart.
Row() )
1732 pRepeatRow->
aEnd.
Row(), nTab );
1733 if ( nStartRow <= pRepeatRow->aEnd.Row() )
1734 nStartRow = pRepeatRow->
aEnd.
Row() + 1;
1736 nBlkTwipsY +=
m_pDocument->GetRowHeight( nStartRow, nEndRow, nTab );
1742 nBlkTwipsY += nHdr + nFtr;
1744 if ( nBlkTwipsX == 0 )
1746 if ( nBlkTwipsY == 0 )
1750 aPhysPage.
Height() * 100 / nBlkTwipsY );
1753 if ( nNeeded < static_cast<tools::Long>(nNewScale) )
1754 nNewScale = static_cast<sal_uInt16>(nNeeded);
1756 bChange = ( nNewScale != nOldScale || nOldPages != 0 );
1769 for (
SCTAB nTab=0; nTab<nTabCount && nUseTab>
MAXTAB; nTab++)
1770 if (
m_pDocument->GetPageStyle(nTab) == rStyleName &&
1771 ( !bApi ||
m_pDocument->GetPageSize(nTab).Width() ) )
1788 VclMessageType::Info, VclButtonsType::Ok,
1789 ScResId(STR_PRINT_INVALID_AREA)));
1799 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1800 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1801 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1813 case SID_STATUS_PAGESTYLE:
1814 case SID_FORMATPAGE:
1816 if ( pReqArgs ==
nullptr )
1818 OUString aOldName =
m_pDocument->GetPageStyle( nCurTab );
1821 = pStylePool->
Find( aOldName, SfxStyleFamily::Page );
1823 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1839 auto pRequest = std::make_shared<SfxRequest>(rReq);
1841 pDlg->StartExecuteAsync([
this, pDlg, pRequest, pStyleSheet, aOldData, aOldName, &rStyleSet, nCurTab, &rCaller, bUndo](sal_Int32 nResult){
1844 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1848 OUString aNewName = pStyleSheet->
GetName();
1849 if ( aNewName != aOldName &&
1850 m_pDocument->RenamePageStyleInUse( aOldName, aNewName ) )
1855 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1856 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1861 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
1872 std::make_unique<ScUndoModifyStyle>(
this, SfxStyleFamily::Page,
1873 aOldData, aNewData ) );
1879 pDlg->disposeOnce();
1888 if ( pReqArgs ==
nullptr )
1896 = pStylePool->Find(
aStr, SfxStyleFamily::Page );
1898 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1905 bool bShareHeader = rStyleSet
1910 bool bShareFooter = rStyleSet
1915 sal_uInt16 nResId = 0;
1919 case SvxPageUsage::Left:
1920 case SvxPageUsage::Right:
1923 nResId = RID_SCDLG_HFEDIT;
1924 else if ( SvxPageUsage::Right == eUsage )
1927 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1929 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1935 nResId = bShareFooter ?
1936 RID_SCDLG_HFEDIT_RIGHTFOOTER :
1937 RID_SCDLG_HFEDIT_LEFTFOOTER;
1939 nResId = bShareHeader ?
1940 RID_SCDLG_HFEDIT_RIGHTHEADER :
1941 RID_SCDLG_HFEDIT_LEFTHEADER;
1946 case SvxPageUsage::Mirror:
1947 case SvxPageUsage::All:
1950 if ( !bShareHeader && !bShareFooter )
1953 nResId = RID_SCDLG_HFEDIT_ALL;
1955 nResId = RID_SCDLG_HFEDIT_FOOTER;
1957 nResId = RID_SCDLG_HFEDIT_HEADER;
1959 else if ( bShareHeader && bShareFooter )
1962 nResId = RID_SCDLG_HFEDIT;
1966 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1968 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1971 else if ( !bShareHeader && bShareFooter )
1974 nResId = RID_SCDLG_HFEDIT_SFTR;
1976 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1978 nResId = RID_SCDLG_HFEDIT_HEADER;
1980 else if ( bShareHeader && !bShareFooter )
1983 nResId = RID_SCDLG_HFEDIT_SHDR;
1985 nResId = RID_SCDLG_HFEDIT_FOOTER;
1987 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1999 auto xRequest = std::make_shared<SfxRequest>(rReq);
2001 pDlg->StartExecuteAsync([
this, pDlg, pStyleSheet, xRequest](sal_Int32 nResult){
2004 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
2007 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
2012 pDlg->disposeOnce();
2033 case SID_STATUS_PAGESTYLE:
2043 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2083 case FID_CHG_RECORD:
2091 case SID_CHG_PROTECT:
2102 case SID_DOCUMENT_COMPARE:
2115 case SID_TABLES_COUNT:
2119 case SID_ATTR_YEAR2000 :
2133 case SID_ATTR_CHAR_FONTLIST:
2137 case SID_NOTEBOOKBAR:
2142 u"modules/scalc/ui/");
2148 case SID_LANGUAGE_STATUS:
2210 if ( eShellMode == SfxObjectCreateMode::ORGANIZER )
2231 aArea.
SetRight( SC_PREVIEW_SIZE_Y );
2236 if ( bNegativePage )
2241 else if( nAspect ==
ASPECT_CONTENT && eShellMode != SfxObjectCreateMode::EMBEDDED )
2253 m_pDocument->GetDataStart( nVisTab, nStartCol, nStartRow );
2256 m_pDocument->GetPrintArea( nVisTab, nEndCol, nEndRow );
2257 if (nStartCol>nEndCol)
2258 nStartCol = nEndCol;
2259 if (nStartRow>nEndRow)
2260 nStartRow = nEndRow;
2262 ->GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab );
2277 while ( nCol<rDoc.
MaxCol() )
2280 if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
2300 bool bFound =
false;
2304 if (rDoc.
RowHidden(i, nTab,
nullptr, &nLastRow))
2312 if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
2338 bool bNegativePage =
m_pDocument->IsNegativePage( nTab );
2339 if ( bNegativePage )
2346 tools::Long nCorrectionLeft = (nOrigLeft == 0 && nCol > 0) ? nSetLeft : 0;
2353 tools::Long nCorrectionTop = (nOrigTop == 0 && nRow > 0) ? nSetTop : 0;
2356 if ( bNegativePage )
2370 SfxStyleFamily::Page );
2372 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2377 rbHeader = rbFooter =
false;
2380 OSL_ENSURE( pStyleSet,
"PageStyle-Set not found! :-(" );
2388 pSet = &pSetItem->GetItemSet();
2392 pSet = &pSetItem->GetItemSet();
2397 bool ScDocShell::DdeGetData(
const OUString& rItem,
2398 const OUString& rMimeType,
2399 css::uno::Any & rValue )
2402 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2404 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2407 osl_getThreadTextEncoding()));
2408 rValue <<= css::uno::Sequence< sal_Int8 >(
2409 reinterpret_cast<const sal_Int8*
>(aFmtByte.getStr()),
2410 aFmtByte.getLength() + 1 );
2414 if ( !aObj.IsRef() )
2418 aObj.SetFormulas(
true );
2423 if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(),
2424 SotClipboardFormatId::SYLK ) )
2426 rValue <<= css::uno::Sequence< sal_Int8 >(
2427 reinterpret_cast<const sal_Int8*
>(aData.getStr()),
2428 aData.getLength() + 1 );
2436 aObj.SetSeparator(
',' );
2438 return aObj.ExportData( rMimeType, rValue );
2443 return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
2446 bool ScDocShell::DdeSetData(
const OUString& rItem,
2447 const OUString& rMimeType,
2448 const css::uno::Any & rValue )
2451 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2453 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2464 aObj.SetFormulas(
true );
2471 return aObj.ImportString( aData, SotClipboardFormatId::SYLK );
2477 aObj.SetSeparator(
',' );
2478 OSL_ENSURE(
false,
"Implementation is missing" );
2483 OSL_ENSURE(
false,
"Implementation is missing" );
2493 OUString aPos = rItem;
2531 boost::property_tree::ptree aAnnotation;
2537 aAnnotation.put(
"id", pNote->
GetId());
2538 aAnnotation.put(
"tab", rPos.
Tab());
2542 aAnnotation.put(
"author", pNote->
GetAuthor());
2543 aAnnotation.put(
"dateTime", pNote->
GetDate());
2544 aAnnotation.put(
"text", pNote->
GetText());
2551 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
2552 OString aRectString;
2566 const double fPPTX = pViewData->
GetPPTX();
2567 const double fPPTY = pViewData->
GetPPTY();
2569 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)).
toString();
2571 aAnnotation.put(
"cellPos", aRectString);
2575 boost::property_tree::ptree aTree;
2576 aTree.add_child(
"comment", aAnnotation);
2577 std::stringstream aStream;
2578 boost::property_tree::write_json(aStream, aTree);
2579 std::string aPayload = aStream.str();
2586 if (pThisViewShell ==
nullptr || pViewShell->
GetDocId() == pThisViewShell->
GetDocId())
2596 return pViewSh ? &pViewSh->
GetViewData() :
nullptr;
2605 return pViewData ? pViewData->
GetTabNo() :
static_cast<SCTAB>(0);
2642 sal_uInt16 nShellCnt = 0;
2644 while ( pShell && !pFound )
2646 if (
auto pDocSh = dynamic_cast<ScDocShell*>(pShell) )
2648 if ( nShellCnt == nDocNo )
2661 OSL_ENSURE( _pFileDlg,
"ScDocShell::DialogClosedHdl(): no file dialog" );
2662 OSL_ENSURE(
m_pImpl->pDocInserter,
"ScDocShell::DialogClosedHdl(): no document inserter" );
2666 sal_uInt16 nSlot =
m_pImpl->pRequest->GetSlot();
2667 std::unique_ptr<SfxMedium> pMed =
m_pImpl->pDocInserter->CreateMedium();
2672 if ( SID_DOCUMENT_COMPARE == nSlot )
2674 if ( pMed->GetFilter() )
2675 m_pImpl->pRequest->AppendItem(
2676 SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetFilterName() ) );
2678 if ( !sOptions.isEmpty() )
2684 if (pSet && pSet->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
2690 m_pImpl->pRequest->AppendItem( *pItem );
2697 m_pImpl->bIgnoreLostRedliningWarning =
false;
2700 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
2712 sal_uInt16
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
2731 m_pDocument->SetChangeViewSettings( aChangeViewSet );
2736 uno::Reference< frame::XModel >
xModel;
2739 SC_MOD()->SetInSharedDocLoading(
true );
2746 if ( pPasswordItem && !pPasswordItem->
GetValue().isEmpty() )
2749 auto pArgs = aArgs.getArray();
2750 pArgs[1].Name =
"Password";
2751 pArgs[1].Value <<= pPasswordItem->
GetValue();
2754 if (pEncryptionItem)
2756 aArgs.realloc(aArgs.getLength() + 1);
2757 auto pArgs = aArgs.getArray();
2758 pArgs[aArgs.getLength() - 1].Name =
"EncryptionData";
2759 pArgs[aArgs.getLength() - 1].Value = pEncryptionItem->
GetValue();
2765 uno::UNO_QUERY_THROW );
2766 SC_MOD()->SetInSharedDocLoading(
false );
2768 catch ( uno::Exception& )
2770 OSL_FAIL(
"ScDocShell::LoadSharedDocument(): caught exception" );
2771 SC_MOD()->SetInSharedDocLoading(
false );
2774 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
2775 xClose->close(
true );
2776 return uno::Reference< frame::XModel >();
2778 catch ( uno::Exception& )
2780 return uno::Reference< frame::XModel >();
ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
void SetEditHelpId(const OString &rId)
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
virtual void SetVisArea(const tools::Rectangle &rVisArea)
void SetInitialLinkUpdate(const SfxMedium *pMedium)
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 * >())
void GetScaleData(Size &rPhysSize, tools::Long &rDocHdr, tools::Long &rDocFtr)
SC_DLLPUBLIC bool HasQueryParam() const
ScRefFlags Parse(std::u16string_view, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab=0, sal_Unicode cDelimiter=0)
ScDocShell * GetDocShell() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
SfxChildWindow * GetChildWindow(sal_uInt16)
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
OUString ScResId(TranslateId aId)
static SfxInterface * GetStaticInterface()
void ExecutePageStyle(const SfxViewShell &rCaller, SfxRequest &rReq, SCTAB nCurTab)
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
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
bool HasSharedXMLFlagSet() const
SC_DLLPUBLIC OUString GetSymbol(const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT) const
static void GetSpellSettings(LanguageType &rDefLang, LanguageType &rCjkLang, LanguageType &rCtlLang, bool &rAutoSpell)
const SfxItemSet & GetEmptyItemSet() const
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
OUString GetStandardText(StandardButtonType eButton)
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)
std::unique_ptr< sal_Int32[]> pData
Point GetPrintTwipsPos(SCCOL nCol, SCROW nRow) const
returns the position (top-left corner) of the requested cell in print twips coordinates.
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(175)
const OUString & GetAuthor() const
Returns the author date of this note.
static void RemoveAppPrefix(OUString &rFilterName)
const OUString & GetName() const
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
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...
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument()
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
css::uno::Reference< css::frame::XModel3 > GetModel() const
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)
sal_uInt16 GetValue() const
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()
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
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)
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)
vcl::text::ComplexTextLayoutFlags GetLayoutMode() const
bool HasSubTotalParam() const
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
ScDBData * GetDBData(const ScRange &rMarked, ScGetDBMode eMode, ScGetDBSelection eSel)
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
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
virtual SfxUndoManager * GetUndoManager() override
void ToggleChildWindow(sal_uInt16)
constexpr tools::Long Width() const
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)
void SetImportParam(const ScImportParam &rImportParam)
const OUString & GetName() const
PropertiesInfo aProperties
SC_DLLPUBLIC SCROW MaxRow() 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)
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
static SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SfxViewShell * Current()
bool isCompatFlagSet(Compat flag)
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
SC_DLLPUBLIC bool IsDocVisible() const
void UpdateCharts(bool bAllCharts)
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)
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)
SfxObjectCreateMode GetCreateMode() const
bool HasRowHeaders() const
constexpr OStringLiteral HID_CHG_PROTECT
bool GetMergeSizePrintTwips(SCCOL nX, SCROW nY, tools::Long &rSizeXTwips, tools::Long &rSizeYTwips) const
ScViewData & GetViewData()
ScChangeTrack * GetChangeTrack() const
constexpr sal_Int64 PRINT_HEADER_WIDTH
static void SetError(ErrCode)
const css::uno::Sequence< sal_Int8 > & GetProtection() const
SfxItemPool & GetPool() const
constexpr OUStringLiteral aData
ScTabViewShell * GetViewShell() const
void InitFromStyle(const SfxStyleSheetBase *pSource)
void SetTabNo(SCTAB nNewTab)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
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)
bool getUserAllowsLinkUpdate() const
void DoAutoStyle(const ScRange &rRange, const OUString &rStyle)
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)
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
virtual SfxObjectShell * GetObjectShell() override
void SetAttribs(const SfxItemSet &rSet)
EditEngine * GetEditEngine() const
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
bool HasSortParam() const
static SC_DLLPUBLIC const CharClass & getCharClass()
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)
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)
void SetYear2000(sal_uInt16 nVal)
const OUString & GetName() const
OUString GetText() const
Returns the caption text of this note.
void GetImportParam(ScImportParam &rImportParam) const
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
ScGridWindow * GetActiveWin()
#define LANGUAGE_DONTKNOW
#define HID_UPDATE_LINK_WARNING
SfxItemSet * GetItemSet() const
virtual comphelper::EmbeddedObjectContainer & getEmbeddedObjectContainer() const override
std::shared_ptr< ScDocument > m_pDocument
const XColorListRef & GetColorList() const
#define ERRCODE_BASIC_NO_ACTIVE_OBJECT
OUString SpellIgnoreWord()
const tools::Rectangle & GetVisArea() const
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(170)
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
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)
void InsertText(const OUString &rNew, bool bSelect=false, bool bLOKShowSelect=true)
ScDBData * findByUpperName(const OUString &rName)
ScDBFunc * GetView() const
void SetMinLen(sal_uInt16 Len)
static ScDocShell * GetShellByNum(sal_uInt16 nDocNo)
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
bool HasChildWindow(sal_uInt16)
virtual VclPtr< SfxAbstractTabDialog > CreateScStyleDlg(weld::Window *pParent, SfxStyleSheetBase &rStyleBase, bool bPage)=0
static SfxViewFrame * Current()
static ScTabViewShell * GetActiveViewShell()
void DisableItem(sal_uInt16 nWhich)
static SVL_DLLPUBLIC bool CompareHashPassword(const css::uno::Sequence< sal_Int8 > &rOldPassHash, std::u16string_view sNewPass)
void setUserAllowsLinkUpdate(bool bNew)
weld::Window * GetFrameWeld() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr sal_Int64 PRINT_HEADER_HEIGHT
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
static SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
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()
static void MirrorRectRTL(tools::Rectangle &rRect)
void UpdateAcceptChangesDialog()
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
OUString GetPassword() const
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
LOKCommentNotificationType
std::unique_ptr< DocShell_Impl > m_pImpl
const OUString & GetDate() const
Returns the creation date of this note.
Reference< XComponentContext > getProcessComponentContext()
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)
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
bool HasImportSelection() const
void ShowChildWindow(sal_uInt16, bool bVisible=true)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(176)
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.
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 &)
#define SAL_WARN(area, stream)
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)
IMPL_STATIC_LINK(LinkHelp, DispatchHelpLinksHdl, weld::Button &, rBtn, void)
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
bool DoLoad(SfxMedium *pMedium)
void StartChangeTracking()
#define DECL_STATIC_LINK(Class, Member, ArgType, RetType)
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
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)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
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)
bool isTrustedLocationUriForUpdatingLinks(OUString const &uri)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
static void CloseMethod(SfxBindings &rBindings)
void GetState(SfxItemSet &rSet)
OUString toString(OptionInfo const *info)
void SetShowChanges(bool bFlag)
SfxMedium * GetMedium() const