20#include <config_features.h>
22#include <boost/property_tree/json_parser.hpp>
24#include <com/sun/star/frame/Desktop.hpp>
36#include <sfx2/strings.hrc>
59#include <LibreOfficeKit/LibreOfficeKitEnums.h>
75#include <stlsheet.hxx>
102#include <com/sun/star/document/UpdateDocMode.hpp>
123 m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->
GetValue() : css::document::UpdateDocMode::NO_UPDATE;
140 if (
m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
142 else if (
m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
163 if (
m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
184 m_pDocument->UpdateExternalRefLinks(pDialogParent);
186 bool bAnyDde =
m_pDocument->GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(pDialogParent);
192 Broadcast(
SfxHint(SfxHintId::ScDataChanged));
210 VclMessageType::Warning, VclButtonsType::YesNo,
211 ScResId(STR_TRUST_DOCUMENT_WARNING)));
212 xQueryBox->set_secondary_text(
ScResId(STR_WEBSERVICE_WITH_LINKS_WARNING));
213 xQueryBox->set_default_response(
RET_NO);
214 if (xQueryBox->run() !=
RET_YES)
224 SAL_WARN_IF(!pViewFrame,
"sc",
"expected there to be a ViewFrame");
248 sal_uInt16 nSlot = rReq.
GetSlot();
257 if( pReqArgs && pReqArgs->
HasItem( FN_PARAM_1, &pColItem ) &&
258 pReqArgs->
HasItem( FN_PARAM_2, &pRowItem ) &&
259 pReqArgs->
HasItem( FN_PARAM_3, &pTabItem ) &&
260 pReqArgs->
HasItem( SID_SC_SETTEXT, &pTextItem ) )
270 if (
m_pDocument->IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) )
283#if HAVE_FEATURE_SCRIPTING
290#if HAVE_FEATURE_SCRIPTING
302 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
311 if ( pReqArgs->
GetItemState( FN_PARAM_1,
true, &pItem ) == SfxItemState::SET )
314 bool bIsNewArea =
true;
315 if ( pReqArgs->
GetItemState( FN_PARAM_2,
true, &pItem ) == SfxItemState::SET )
319 bool bMakeArea =
false;
331 OUString aStrImport =
ScResId( STR_UNDO_IMPORTDATA );
334 nViewShellId = pViewSh->GetViewShellId();
339 OSL_ENSURE(pDBData,
"Cannot create DB data");
349 OUString aTemplate =
ScResId( STR_IMPORT_REPLACE );
355 VclMessageType::Question, VclButtonsType::YesNo,
357 xQueryBox->set_default_response(
RET_YES);
358 bDo = xQueryBox->run() ==
RET_YES;
371 if ( bMakeArea && bUndo)
376 OSL_FAIL(
"arguments expected" );
381 case SID_CHART_SOURCE:
382 case SID_CHART_ADDSOURCE:
387 OUString aChartName, aRangeName;
391 bool bMultiRange =
false;
393 bool bColHeaders =
true;
394 bool bRowHeaders =
true;
395 bool bColInit =
false;
396 bool bRowInit =
false;
397 bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
400 aChartName = pChartItem->GetValue();
403 aRangeName = pChartItem->GetValue();
405 if( pReqArgs->
HasItem( FN_PARAM_1, &pItem ) )
410 if( pReqArgs->
HasItem( FN_PARAM_2, &pItem ) )
422 if ( !aRangeListRef->empty() )
425 aSingleRange = aRangeListRef->front();
429 aRangeListRef.
clear();
433 if (pViewSh && bValid && !aChartName.isEmpty() )
445 m_pDocument->LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
449 if ( !bAddRange && ( !bColInit || !bRowInit ) )
460 if ( pDlg->Execute() ==
RET_OK )
462 bColHeaders = pDlg->IsRow();
463 bRowHeaders = pDlg->IsCol();
479 std::make_unique<ScUndoChartData>(
this, aChartName, aRangeListRef,
480 bColHeaders, bRowHeaders, bAddRange ) );
482 m_pDocument->UpdateChartArea( aChartName, aRangeListRef,
483 bColHeaders, bRowHeaders, bAddRange );
487 ScRange aNewRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
491 std::make_unique<ScUndoChartData>(
this, aChartName, aNewRange,
492 bColHeaders, bRowHeaders, bAddRange ) );
494 m_pDocument->UpdateChartArea( aChartName, aNewRange,
495 bColHeaders, bRowHeaders, bAddRange );
501 OSL_FAIL(
"UpdateChartArea: no ViewShell or wrong data");
507 OSL_FAIL(
"SID_CHART_SOURCE without arguments");
515 if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
533 case FID_HARD_RECALC:
537 case SID_UPDATETABLINKS:
559 ScResId(STR_RELOAD_TABLES), InfobarType::WARNING);
576 case SID_REIMPORT_AFTER_LOAD:
583 if ((
m_nCanUpdate != css::document::UpdateDocMode::NO_UPDATE) &&
584 (
m_nCanUpdate != css::document::UpdateDocMode::QUIET_UPDATE))
588 OSL_ENSURE(pViewSh,
"SID_REIMPORT_AFTER_LOAD: no View");
589 if (pViewSh && pDBColl)
592 VclMessageType::Question, VclButtonsType::YesNo,
593 ScResId(STR_REIMPORT_AFTER_LOAD)));
594 xQueryBox->set_default_response(
RET_YES);
595 if (xQueryBox->run() ==
RET_YES)
598 for (
const auto& rxDB : rDBs)
612 bool bContinue = pViewSh->
ImportData( aImportParam );
638 if ( !bDone && pDBColl )
655 OSL_FAIL(
"use ScAutoStyleHint instead of SID_AUTO_STYLE");
658 case SID_GET_COLORLIST:
675 bool bActivateTracking = (pChangeTrack ==
nullptr);
677 bActivateTracking = pItem->
GetValue();
679 if ( !bActivateTracking )
685 VclMessageType::Warning, VclButtonsType::YesNo,
687 xWarn->set_default_response(
RET_NO);
688 bDo = (xWarn->run() ==
RET_YES );
729 case SID_CHG_PROTECT :
741 case SID_DOCUMENT_MERGE:
742 case SID_DOCUMENT_COMPARE:
746 if ( pChangeTrack && !
m_pImpl->bIgnoreLostRedliningWarning )
748 if ( nSlot == SID_DOCUMENT_COMPARE )
751 VclMessageType::Warning, VclButtonsType::YesNo,
753 xWarn->set_default_response(
RET_NO);
775 OUString aFileName = pFileNameItem->
GetValue();
777 OUString aFilterName;
780 aFilterName = pFilterItem->GetValue();
785 aOptions = pOptionsItem->GetValue();
789 if (pReqArgs->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
797 if (aFilterName.isEmpty())
804 std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
805 auto pSet = std::make_shared<SfxAllItemSet>( pApp->
GetPool() );
806 if (!aOptions.isEmpty())
807 pSet->Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
810 pMed =
new SfxMedium( aFileName, StreamMode::STD_READ, pFilter, std::move(pSet) );
818 m_pImpl->bIgnoreLostRedliningWarning =
true;
824 m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent,
825 ScDocShell::Factory().GetFactoryName(),
mode ) );
836 pOtherDocSh->
DoLoad( pMed );
843 bool bHadTrack = (
m_pDocument->GetChangeTrack() != nullptr );
844#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
846 if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
851 if ( nSlot == SID_DOCUMENT_COMPARE )
863 pViewFrm->
ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId() );
881 m_pDocument->SetChangeViewSettings(aChangeViewSet);
884#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
885 else if ( nSlot == SID_DOCUMENT_MERGE &&
IsDocShared() && pChangeTrack )
888 if ( nEnd >= nStart )
896 m_pDocument->SetChangeViewSettings( aChangeViewSet );
909 case SID_DELETE_SCENARIO:
913 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
917 const OUString&
aName = pStringItem->GetValue();
938 case SID_EDIT_SCENARIO:
941 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
945 OUString
aName = pStringItem->GetValue();
954 m_pDocument->GetScenarioData( nTab, aComment, aColor, nFlags );
959 SCTAB nActualTab = nTab;
965 bool bSheetProtected =
m_pDocument->IsTabProtected(nActualTab);
970 pNewDlg->SetScenarioData(
aName, aComment, aColor, nFlags );
971 if ( pNewDlg->Execute() ==
RET_OK )
973 pNewDlg->GetScenarioData(
aName, aComment, aColor, nFlags );
984 case SID_ATTR_YEAR2000 :
987 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
991 sal_uInt16 nY2k = pInt16Item->GetValue();
1011#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
1030 bool bContinue =
true;
1034 VclMessageType::Question, VclButtonsType::YesNo,
1035 ScResId(STR_DOC_WILLBESAVED)));
1036 xQueryBox->set_default_response(
RET_YES);
1037 if (xQueryBox->run() ==
RET_NO)
1046 SC_MOD()->SetInSharedDocSaving(
true );
1053 SC_MOD()->SetInSharedDocSaving(
false );
1067 uno::Reference< frame::XModel >
xModel;
1072 uno::Reference< util::XCloseable > xCloseable(
xModel, uno::UNO_QUERY_THROW );
1075 bool bShared =
false;
1087 bool bOwnEntry =
false;
1093 catch ( uno::Exception& )
1097 if ( bShared && bOwnEntry )
1099 uno::Reference< frame::XStorable > xStorable(
xModel, uno::UNO_QUERY_THROW );
1100 if ( xStorable->isReadonly() )
1102 xCloseable->close(
true );
1104 OUString aUserName(
ScResId( STR_UNKNOWN_USER ) );
1109 if ( !
aData[LockFileComponent::OOOUSERNAME].isEmpty() )
1111 aUserName =
aData[LockFileComponent::OOOUSERNAME];
1113 else if ( !
aData[LockFileComponent::SYSUSERNAME].isEmpty() )
1115 aUserName =
aData[LockFileComponent::SYSUSERNAME];
1118 catch ( uno::Exception& )
1121 OUString aMessage(
ScResId( STR_FILE_LOCKED_TRY_LATER ) );
1122 aMessage = aMessage.replaceFirst(
"%1", aUserName );
1125 VclMessageType::Warning, VclButtonsType::Ok,
1132 VclMessageType::Warning, VclButtonsType::YesNo,
1133 ScResId(STR_DOC_DISABLESHARED)));
1134 xWarn->set_default_response(
RET_YES);
1138 xCloseable->close(
true );
1159 xCloseable->close(
true );
1165 xCloseable->close(
true );
1167 VclMessageType::Warning, VclButtonsType::Ok,
1168 ScResId(STR_DOC_NOLONGERSHARED)));
1172 catch ( uno::Exception& )
1175 SC_MOD()->SetInSharedDocSaving(
false );
1179 uno::Reference< util::XCloseable > xClose(
xModel, uno::UNO_QUERY_THROW );
1180 xClose->close(
true );
1182 catch ( uno::Exception& )
1198 SfxStringItem aApp(SID_DOC_SERVICE,
"com.sun.star.sheet.SpreadsheetDocument");
1201 SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON,
1202 { &aApp, &aTarget });
1206 case SID_NOTEBOOKBAR:
1212 else if ( pBindings )
1216 case SID_LANGUAGE_STATUS:
1223 if ( !aLangText.isEmpty() )
1226 static constexpr OUStringLiteral aSelectionLangPrefix(
u"Current_");
1227 static constexpr OUStringLiteral aParagraphLangPrefix(
u"Paragraph_");
1228 static constexpr OUStringLiteral aDocLangPrefix(
u"Default_");
1230 bool bSelection =
false;
1231 bool bParagraph =
false;
1237 if ( aLangText ==
"*" )
1246 else if ( (
nPos = aLangText.indexOf(aDocLangPrefix)) != -1 )
1248 aLangText = aLangText.replaceAt(
nPos, aDocLangPrefix.getLength(),
u"");
1250 if ( aLangText ==
"LANGUAGE_NONE" )
1255 else if ( aLangText ==
"RESET_LANGUAGES" )
1275 else if (-1 != (
nPos = aLangText.indexOf( aSelectionLangPrefix )))
1278 aLangText = aLangText.replaceAt(
nPos, aSelectionLangPrefix.getLength(),
u"" );
1280 else if (-1 != (
nPos = aLangText.indexOf( aParagraphLangPrefix )))
1283 aLangText = aLangText.replaceAt(
nPos, aParagraphLangPrefix.getLength(),
u"" );
1286 if (bSelection || bParagraph)
1300 if (nScriptType == SvtScriptType::LATIN)
1302 if (nScriptType == SvtScriptType::COMPLEX)
1304 if (nScriptType == SvtScriptType::ASIAN)
1320 else if ( eLang != eLatin )
1325 if ( pInputHandler )
1328 pViewSh->UpdateDrawTextOutliner();
1332 Broadcast(
SfxHint(SfxHintId::LanguageChanged));
1338 case SID_SPELLCHECK_IGNORE_ALL:
1348 OUString sIgnoreText;
1353 if(sIgnoreText ==
"Spelling")
1361 case SID_SPELLCHECK_APPLY_SUGGESTION:
1371 OUString sApplyText;
1376 static constexpr OUStringLiteral sSpellingRule(
u"Spelling_");
1378 if(-1 != (
nPos = sApplyText.indexOf( sSpellingRule )))
1380 sApplyText = sApplyText.replaceAt(
nPos, sSpellingRule.getLength(),
u"");
1385 case SID_REFRESH_VIEW:
1396#if HAVE_FEATURE_SCRIPTING
1424 if ( bJustQueryIfProtected && !bProtected )
1427 OUString aTitle(
ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
1428 OUString aText(
ScResId( SCSTR_PASSWORD ) );
1433 aDlg.set_title(aTitle);
1442 if (!aPassword.isEmpty())
1448 if ( bJustQueryIfProtected )
1456 VclMessageType::Info, VclButtonsType::Ok,
1457 ScResId(SCSTR_WRONGPASSWORD)));
1463 css::uno::Sequence< sal_Int8 > aPass;
1474 else if ( bJustQueryIfProtected )
1483 SAL_WARN(
"sc",
"ScDocShell::DoRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1534 SAL_WARN(
"sc",
"ScDocShell::DoHardRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1537 auto start = std::chrono::steady_clock::now();
1555 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1565 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1569 auto end = std::chrono::steady_clock::now();
1570 SAL_INFO(
"sc.timing",
"ScDocShell::DoHardRecalc(): took " << std::chrono::duration_cast<std::chrono::milliseconds>(
end -
start).
count() <<
"ms");
1581 "DoAutoStyle with several tables");
1587 m_pDocument->ApplyStyleAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, *pStyleSheet );
1588 m_pDocument->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
1599 if ( pStyle->
GetFamily() == SfxStyleFamily::Page )
1601 if (
nId == SfxHintId::StyleSheetModified )
1605 const OUString& aNewName = pStyle->
GetName();
1606 OUString aOldName = aNewName;
1607 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1609 aOldName = pExtendedHint->GetOldName();
1611 if ( aNewName != aOldName )
1612 m_pDocument->RenamePageStyleInUse( aOldName, aNewName );
1615 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1630 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1632 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1633 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1634 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1639 else if ( pStyle->
GetFamily() == SfxStyleFamily::Para )
1641 if (
nId == SfxHintId::StyleSheetModified)
1643 const OUString& aNewName = pStyle->
GetName();
1644 OUString aOldName = aNewName;
1645 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1647 aOldName = pExtendedHint->GetOldName();
1648 if ( aNewName != aOldName )
1668 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1671 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1684 this, nTab, nOldScale, nOldPages, nScale, nPages ) );
1696 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1701 bool bChange =
false;
1704 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1707 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1714 std::optional<ScRange> oRepeatCol =
m_pDocument->GetRepeatColRange( nTab );
1715 std::optional<ScRange> oRepeatRow =
m_pDocument->GetRepeatRowRange( nTab );
1719 sal_uInt16 nNewScale = nOldScale;
1726 if ( oRepeatCol && nStartCol >= oRepeatCol->aStart.Col() )
1728 for (
SCCOL i=oRepeatCol->aStart.Col(); i<=oRepeatCol->aEnd.Col();
i++ )
1730 if ( nStartCol <= oRepeatCol->aEnd.Col() )
1731 nStartCol = oRepeatCol->aEnd.Col() + 1;
1735 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++ )
1744 if ( oRepeatRow && nStartRow >= oRepeatRow->aStart.Row() )
1746 nBlkTwipsY +=
m_pDocument->GetRowHeight( oRepeatRow->aStart.Row(),
1747 oRepeatRow->aEnd.Row(), nTab );
1748 if ( nStartRow <= oRepeatRow->aEnd.Row() )
1749 nStartRow = oRepeatRow->aEnd.Row() + 1;
1751 nBlkTwipsY +=
m_pDocument->GetRowHeight( nStartRow, nEndRow, nTab );
1757 nBlkTwipsY += nHdr + nFtr;
1759 if ( nBlkTwipsX == 0 )
1761 if ( nBlkTwipsY == 0 )
1765 aPhysPage.
Height() * 100 / nBlkTwipsY );
1768 if ( nNeeded <
static_cast<tools::Long>(nNewScale) )
1769 nNewScale =
static_cast<sal_uInt16
>(nNeeded);
1771 bChange = ( nNewScale != nOldScale || nOldPages != 0 );
1784 for (
SCTAB nTab=0; nTab<nTabCount && nUseTab>
MAXTAB; nTab++)
1785 if (
m_pDocument->GetPageStyle(nTab) == rStyleName &&
1786 ( !bApi ||
m_pDocument->GetPageSize(nTab).Width() ) )
1803 VclMessageType::Info, VclButtonsType::Ok,
1804 ScResId(STR_PRINT_INVALID_AREA)));
1814 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1815 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1816 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1828 case SID_STATUS_PAGESTYLE:
1829 case SID_FORMATPAGE:
1831 if ( pReqArgs ==
nullptr )
1833 OUString aOldName =
m_pDocument->GetPageStyle( nCurTab );
1836 = pStylePool->
Find( aOldName, SfxStyleFamily::Page );
1838 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1854 auto pRequest = std::make_shared<SfxRequest>(rReq);
1856 pDlg->StartExecuteAsync([
this, pDlg, pRequest, pStyleSheet, aOldData, aOldName, &rStyleSet, nCurTab, &rCaller, bUndo](sal_Int32 nResult){
1859 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1863 OUString aNewName = pStyleSheet->
GetName();
1864 if ( aNewName != aOldName &&
1865 m_pDocument->RenamePageStyleInUse( aOldName, aNewName ) )
1870 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1871 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1876 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
1887 std::make_unique<ScUndoModifyStyle>(
this, SfxStyleFamily::Page,
1888 aOldData, aNewData ) );
1894 pDlg->disposeOnce();
1903 if ( pReqArgs ==
nullptr )
1911 = pStylePool->
Find(
aStr, SfxStyleFamily::Page );
1913 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1920 bool bShareHeader = rStyleSet
1925 bool bShareFooter = rStyleSet
1930 sal_uInt16 nResId = 0;
1934 case SvxPageUsage::Left:
1935 case SvxPageUsage::Right:
1938 nResId = RID_SCDLG_HFEDIT;
1939 else if ( SvxPageUsage::Right == eUsage )
1942 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1944 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1950 nResId = bShareFooter ?
1951 RID_SCDLG_HFEDIT_RIGHTFOOTER :
1952 RID_SCDLG_HFEDIT_LEFTFOOTER;
1954 nResId = bShareHeader ?
1955 RID_SCDLG_HFEDIT_RIGHTHEADER :
1956 RID_SCDLG_HFEDIT_LEFTHEADER;
1961 case SvxPageUsage::Mirror:
1962 case SvxPageUsage::All:
1965 if ( !bShareHeader && !bShareFooter )
1968 nResId = RID_SCDLG_HFEDIT_ALL;
1970 nResId = RID_SCDLG_HFEDIT_FOOTER;
1972 nResId = RID_SCDLG_HFEDIT_HEADER;
1974 else if ( bShareHeader && bShareFooter )
1977 nResId = RID_SCDLG_HFEDIT;
1981 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1983 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1986 else if ( !bShareHeader && bShareFooter )
1989 nResId = RID_SCDLG_HFEDIT_SFTR;
1991 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1993 nResId = RID_SCDLG_HFEDIT_HEADER;
1995 else if ( bShareHeader && !bShareFooter )
1998 nResId = RID_SCDLG_HFEDIT_SHDR;
2000 nResId = RID_SCDLG_HFEDIT_FOOTER;
2002 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
2014 auto xRequest = std::make_shared<SfxRequest>(rReq);
2016 pDlg->StartExecuteAsync([
this, pDlg, pStyleSheet, xRequest](sal_Int32 nResult){
2019 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
2022 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
2027 pDlg->disposeOnce();
2048 case SID_STATUS_PAGESTYLE:
2058 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2098 case FID_CHG_RECORD:
2106 case SID_CHG_PROTECT:
2117 case SID_DOCUMENT_COMPARE:
2130 case SID_TABLES_COUNT:
2134 case SID_ATTR_YEAR2000 :
2148 case SID_ATTR_CHAR_FONTLIST:
2152 case SID_NOTEBOOKBAR:
2157 u"modules/scalc/ui/");
2163 case SID_LANGUAGE_STATUS:
2225 if ( eShellMode == SfxObjectCreateMode::ORGANIZER )
2246 aArea.
SetRight( SC_PREVIEW_SIZE_Y );
2251 if ( bNegativePage )
2256 else if( nAspect ==
ASPECT_CONTENT && eShellMode != SfxObjectCreateMode::EMBEDDED )
2268 m_pDocument->GetDataStart( nVisTab, nStartCol, nStartRow );
2271 m_pDocument->GetPrintArea( nVisTab, nEndCol, nEndRow );
2272 if (nStartCol>nEndCol)
2273 nStartCol = nEndCol;
2274 if (nStartRow>nEndRow)
2275 nStartRow = nEndRow;
2277 ->GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab );
2292 while ( nCol<rDoc.
MaxCol() )
2295 if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
2315 bool bFound =
false;
2319 if (rDoc.
RowHidden(i, nTab,
nullptr, &nLastRow))
2327 if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
2353 bool bNegativePage =
m_pDocument->IsNegativePage( nTab );
2354 if ( bNegativePage )
2361 tools::Long nCorrectionLeft = (nOrigLeft == 0 && nCol > 0) ? nSetLeft : 0;
2368 tools::Long nCorrectionTop = (nOrigTop == 0 && nRow > 0) ? nSetTop : 0;
2371 if ( bNegativePage )
2385 SfxStyleFamily::Page );
2387 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2392 rbHeader = rbFooter =
false;
2395 OSL_ENSURE( pStyleSet,
"PageStyle-Set not found! :-(" );
2403 pSet = &pSetItem->GetItemSet();
2407 pSet = &pSetItem->GetItemSet();
2412bool ScDocShell::DdeGetData(
const OUString& rItem,
2413 const OUString& rMimeType,
2414 css::uno::Any & rValue )
2417 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2419 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2422 osl_getThreadTextEncoding()));
2423 rValue <<= css::uno::Sequence< sal_Int8 >(
2424 reinterpret_cast<const sal_Int8*
>(aFmtByte.getStr()),
2425 aFmtByte.getLength() + 1 );
2429 if ( !aObj.IsRef() )
2433 aObj.SetFormulas(
true );
2438 if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(),
2439 SotClipboardFormatId::SYLK ) )
2441 rValue <<= css::uno::Sequence< sal_Int8 >(
2443 aData.getLength() + 1 );
2451 aObj.SetSeparator(
',' );
2453 return aObj.ExportData( rMimeType, rValue );
2458 return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
2461bool ScDocShell::DdeSetData(
const OUString& rItem,
2462 const OUString& rMimeType,
2463 const css::uno::Any & rValue )
2466 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2468 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2479 aObj.SetFormulas(
true );
2486 return aObj.ImportString( aData, SotClipboardFormatId::SYLK );
2492 aObj.SetSeparator(
',' );
2493 OSL_ENSURE(
false,
"Implementation is missing" );
2498 OSL_ENSURE(
false,
"Implementation is missing" );
2508 OUString aPos = rItem;
2518 aPos =
pData->GetSymbol();
2546 boost::property_tree::ptree aAnnotation;
2552 aAnnotation.put(
"id", pNote->
GetId());
2553 aAnnotation.put(
"tab", rPos.
Tab());
2557 aAnnotation.put(
"author", pNote->
GetAuthor());
2558 aAnnotation.put(
"dateTime", pNote->
GetDate());
2559 aAnnotation.put(
"text", pNote->
GetText());
2566 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
2567 OString aRectString;
2581 const double fPPTX = pViewData->
GetPPTX();
2582 const double fPPTY = pViewData->
GetPPTY();
2584 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)).
toString();
2586 aAnnotation.put(
"cellPos", aRectString);
2590 boost::property_tree::ptree aTree;
2591 aTree.add_child(
"comment", aAnnotation);
2593 boost::property_tree::write_json(aStream, aTree);
2594 std::string aPayload = aStream.str();
2601 if (pThisViewShell ==
nullptr || pViewShell->
GetDocId() == pThisViewShell->
GetDocId())
2611 return pViewSh ? &pViewSh->
GetViewData() :
nullptr;
2620 return pViewData ? pViewData->
GetTabNo() :
static_cast<SCTAB>(0);
2657 sal_uInt16 nShellCnt = 0;
2659 while ( pShell && !pFound )
2661 if (
auto pDocSh =
dynamic_cast<ScDocShell*
>(pShell) )
2663 if ( nShellCnt == nDocNo )
2676 OSL_ENSURE( _pFileDlg,
"ScDocShell::DialogClosedHdl(): no file dialog" );
2677 OSL_ENSURE(
m_pImpl->pDocInserter,
"ScDocShell::DialogClosedHdl(): no document inserter" );
2681 sal_uInt16 nSlot =
m_pImpl->pRequest->GetSlot();
2682 std::unique_ptr<SfxMedium> pMed =
m_pImpl->pDocInserter->CreateMedium();
2687 if ( SID_DOCUMENT_COMPARE == nSlot )
2689 if ( pMed->GetFilter() )
2690 m_pImpl->pRequest->AppendItem(
2691 SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetFilterName() ) );
2693 if ( !sOptions.isEmpty() )
2698 if (pMed->GetItemSet().GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
2704 m_pImpl->pRequest->AppendItem( *pItem );
2711 m_pImpl->bIgnoreLostRedliningWarning =
false;
2714#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
2726 sal_uInt16
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
2745 m_pDocument->SetChangeViewSettings( aChangeViewSet );
2750 uno::Reference< frame::XModel >
xModel;
2753 SC_MOD()->SetInSharedDocLoading(
true );
2754 uno::Reference< frame::XDesktop2 > xLoader = frame::Desktop::create( ::comphelper::getProcessComponentContext() );
2760 if ( pPasswordItem && !pPasswordItem->
GetValue().isEmpty() )
2763 auto pArgs = aArgs.getArray();
2764 pArgs[1].Name =
"Password";
2765 pArgs[1].Value <<= pPasswordItem->
GetValue();
2768 if (pEncryptionItem)
2770 aArgs.realloc(aArgs.getLength() + 1);
2771 auto pArgs = aArgs.getArray();
2772 pArgs[aArgs.getLength() - 1].Name =
"EncryptionData";
2773 pArgs[aArgs.getLength() - 1].Value = pEncryptionItem->
GetValue();
2779 uno::UNO_QUERY_THROW );
2780 SC_MOD()->SetInSharedDocLoading(
false );
2782 catch ( uno::Exception& )
2784 OSL_FAIL(
"ScDocShell::LoadSharedDocument(): caught exception" );
2785 SC_MOD()->SetInSharedDocLoading(
false );
2788 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
2789 xClose->close(
true );
2790 return uno::Reference< frame::XModel >();
2792 catch ( uno::Exception& )
2794 return uno::Reference< frame::XModel >();
PropertiesInfo aProperties
bool ValidTab(SCTAB nTab)
SfxApplication * SfxGetpApp()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
sal_uInt16 GetValue() const
const OUString & GetValue() const
const SfxItemSet & GetEmptyItemSet() const
ESelection GetSelection() const
void SetSelection(const ESelection &rNewSel)
void InsertText(const OUString &rNew, bool bSelect=false, bool bLOKShowSelect=true)
OUString SpellIgnoreWord()
EditEngine * GetEditEngine() const
void SetAttribs(const SfxItemSet &rSet)
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
const OUString & getBcp47(bool bResolveSystem=true) const
vcl::text::ComplexTextLayoutFlags GetLayoutMode() const
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
constexpr tools::Long getX() const
constexpr tools::Long getY() const
static void SetError(ErrCode)
virtual VclPtr< SfxAbstractTabDialog > CreateScHFEditDlg(weld::Window *pParent, const SfxItemSet &rCoreSet, const OUString &rPageStyle, sal_uInt16 nResId)=0
virtual VclPtr< SfxAbstractTabDialog > CreateScStyleDlg(weld::Window *pParent, SfxStyleSheetBase &rStyleBase, bool bPage)=0
virtual VclPtr< AbstractScColRowLabelDlg > CreateScColRowLabelDlg(weld::Window *pParent, bool bCol, bool bRow)=0
virtual VclPtr< AbstractScNewScenarioDlg > CreateScNewScenarioDlg(weld::Window *pParent, const OUString &rName, bool bEdit, bool bSheetProtected)=0
static SC_DLLPUBLIC ScAbstractDialogFactory * Create()
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)
ScLkUpdMode GetLinkMode() const
static bool GetString(OUString &rString, const css::uno::Any &rAny)
sal_uLong GetActionMax() const
void SetProtection(const css::uno::Sequence< sal_Int8 > &rPass)
const css::uno::Sequence< sal_Int8 > & GetProtection() const
void SetShowChanges(bool bFlag)
void SetTheActionRange(sal_uLong nFirst, sal_uLong nLast)
void SetShowAccepted(bool bVal)
bool hasListeners() const
bool HasColHeaders() const
bool HasRowHeaders() const
Stores global named database ranges.
ScDBData * findByUpperName(const OUString &rName)
void GetImportParam(ScImportParam &rImportParam) const
SC_DLLPUBLIC bool HasQueryParam() const
const OUString & GetName() const
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
void SetImportParam(const ScImportParam &rImportParam)
bool HasSubTotalParam() const
bool HasSortParam() const
bool HasImportSelection() const
bool HasImportParam() const
void UpdateImport(const OUString &rTarget, const svx::ODataAccessDescriptor &rDescriptor)
void RepeatDB(bool bRecord=true)
void UpdateCharts(bool bAllCharts)
bool ImportData(const ScImportParam &rParam)
bool DetectiveRefresh(bool bAutomatic=false)
void SetYear2000(sal_uInt16 nVal)
Create before modifications of the document and destroy thereafter.
void SetDocumentModified()
void NotifyStyle(const SfxStyleSheetHint &rHint)
void SetInitialLinkUpdate(const SfxMedium *pMedium)
void PostPaintCell(SCCOL nCol, SCROW nRow, SCTAB nTab)
bool AdjustPrintZoom(const ScRange &rRange)
static weld::Window * GetActiveDialogParent()
ScDocShell(const ScDocShell &rDocShell)=delete
void DoAutoStyle(const ScRange &rRange, const OUString &rStyle)
void SetDocumentModified()
SfxBindings * GetViewBindings()
void CompareDocument(ScDocument &rOtherDoc)
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument()
const ScDocument & GetDocument() const
ScLkUpdMode GetLinkUpdateModeState() const
std::shared_ptr< ScDocument > m_pDocument
std::unique_ptr< DocShell_Impl > m_pImpl
void ModifyScenario(SCTAB nTab, const OUString &rName, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
ScDBData * GetDBData(const ScRange &rMarked, ScGetDBMode eMode, ScGetDBSelection eSel)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
void MergeDocument(ScDocument &rOtherDoc, bool bShared=false, bool bCheckDuplicates=false, sal_uLong nOffset=0, ScChangeActionMergeMap *pMergeMap=nullptr, bool bInverseMap=false)
virtual ::sfx2::SvLinkSource * DdeCreateLinkSource(const OUString &rItem) override
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
void PageStyleModified(std::u16string_view rStyleName, bool bApi)
void ExecutePageStyle(const SfxViewShell &rCaller, SfxRequest &rReq, SCTAB nCurTab)
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect, bool bOutputForScreen) override
static ScViewData * GetViewData()
const tools::Rectangle & GetVisArea() const
void SnapVisArea(tools::Rectangle &rRect) const
bool ExecuteChangeProtectionDialog(bool bJustQueryIfProtected=false)
Protect/unprotect ChangeTrack and return <TRUE> if protection was successfully changed.
SAL_DLLPRIVATE void EnableSharedSettings(bool bEnable)
void Execute(SfxRequest &rReq)
static ScDocShell * GetShellByNum(sal_uInt16 nDocNo)
void SetPrintZoom(SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages)
ScModelObj * GetModel() const
void GetStatePageStyle(SfxItemSet &rSet, SCTAB nCurTab)
virtual SfxUndoManager * GetUndoManager() override
void GetPageOnFromPageStyleSet(const SfxItemSet *pStyleSet, SCTAB nCurTab, bool &rbHeader, bool &rbFooter)
void RefreshPivotTables(const ScRange &rSource)
static void LOKCommentNotify(LOKCommentNotificationType nType, const ScDocument *pDocument, const ScAddress &rPos, const ScPostIt *pNote)
void GetState(SfxItemSet &rSet)
static void RemoveAppPrefix(OUString &rFilterName)
static OUString GetOptions(const SfxMedium &rMedium)
static bool GetFilterName(const OUString &rFileName, OUString &rFilter, OUString &rOptions, bool bWithContent, bool bWithInteraction)
Returns the filter name and options from a file name.
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
bool HasLinkFormulaNeedingCheck() const
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
void StartChangeTracking()
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
SC_DLLPUBLIC void GetLanguage(LanguageType &rLatin, LanguageType &rCjk, LanguageType &rCtl) const
SC_DLLPUBLIC bool IsDocVisible() const
sc::DocumentLinkManager & GetDocLinkManager()
ScChangeTrack * GetChangeTrack() const
static void MirrorRectRTL(tools::Rectangle &rRect)
static SC_DLLPUBLIC const CharClass & getCharClass()
SfxObjectShell * GetEmbeddedObject() const
static void GetSpellSettings(LanguageType &rDefLang, LanguageType &rCjkLang, LanguageType &rCtlLang, bool &rAutoSpell)
Additional class containing cell annotation data.
sal_uInt32 GetId() const
Returns the note id.
const OUString & GetDate() const
Returns the creation date of this note.
const OUString & GetAuthor() const
Returns the author date of this note.
OUString GetText() const
Returns the caption text of this note.
static void DrawToDev(ScDocument &rDoc, OutputDevice *pDev, double nPrintFactor, const tools::Rectangle &rBound, ScViewData *pViewData, bool bMetaFile)
void GetScaleData(Size &rPhysSize, tools::Long &rDocHdr, tools::Long &rDocFtr)
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
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)
bool IsShareDocumentChecked() const
void InitFromStyle(const SfxStyleSheetBase *pSource)
ScStyleSheet * FindAutoStyle(const OUString &rName)
virtual const FmFormShell * GetFormShell() const override
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
void Execute(SfxRequest &rReq)
static ScTabViewShell * GetActiveViewShell()
weld::Window * GetDialogParent()
parent window for dialogs Problem: OLE Server!
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
static void UpdateInputLine()
ScViewData & GetViewData()
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
SfxDispatcher & GetDispatcher()
Point GetPrintTwipsPos(SCCOL nCol, SCROW nRow) const
returns the position (top-left corner) of the requested cell in print twips coordinates.
void SetScreen(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
void SetTabNo(SCTAB nNewTab)
ScDocShell * GetDocShell() const
ScGridWindow * GetActiveWin()
ScTabViewShell * GetViewShell() const
ScDBFunc * GetView() const
ScSplitPos GetActivePart() const
void GetEditView(ScSplitPos eWhich, EditView *&rViewPtr, SCCOL &rCol, SCROW &rRow)
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
bool GetMergeSizePrintTwips(SCCOL nX, SCROW nY, tools::Long &rSizeXTwips, tools::Long &rSizeYTwips) const
void DeleteTable(SCTAB nTabNr, bool bRecord=true)
static SfxAbstractDialogFactory * Create()
virtual void SAL_CALL store() override
void Invalidate(sal_uInt16 nId)
void InvalidateAll(bool bWithMsg)
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 * >())
sal_Int16 GetValue() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
SfxItemSet & GetItemSet() const
const OUString & GetName() const
virtual SfxObjectShell * GetObjectShell() override
ErrCode GetErrorCode() const
OUString GetSharedFileURL() const
virtual void SetVisArea(const tools::Rectangle &rVisArea)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
bool isExportLocked() const
bool SwitchToShared(bool bShared, bool bSave)
SfxMedium * GetMedium() const
bool HasSharedXMLFlagSet() const
const tools::Rectangle & GetVisArea() const
bool DoLoad(SfxMedium *pMedium)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
SfxObjectCreateMode GetCreateMode() const
virtual comphelper::EmbeddedObjectContainer & getEmbeddedObjectContainer() const override
void SetEditHelpId(const OUString &rId)
OUString GetPassword() const
virtual short run() override
void SetMinLen(sal_uInt16 Len)
void ShowExtras(SfxShowExtras nExtras)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void SetReturnValue(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
const OUString & GetName() const
SfxViewFrame * GetFrame() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
static SfxInterface * GetStaticInterface()
SfxViewShell * GetViewShell() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual SfxItemSet & GetItemSet()
SfxStyleSheetBase * GetStyleSheet() const
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
const css::uno::Any & GetValue() const
void ToggleChildWindow(sal_uInt16)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
void RemoveInfoBar(std::u16string_view sId)
SfxBindings & GetBindings()
bool HasChildWindow(sal_uInt16)
SfxChildWindow * GetChildWindow(sal_uInt16)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
VclPtr< SfxInfoBarWindow > AppendInfoBar(const OUString &sId, const OUString &sPrimaryMessage, const OUString &sSecondaryMessage, InfobarType aInfobarType, bool bShowCloseButton=true)
void ShowChildWindow(sal_uInt16, bool bVisible=true)
weld::Window * GetFrameWeld() const
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
ViewShellDocId GetDocId() const override
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static SotClipboardFormatId GetFormatIdFromMimeType(std::u16string_view rMimeType)
static SVL_DLLPUBLIC void GetHashPassword(css::uno::Sequence< sal_Int8 > &rPassHash, const char *pPass, sal_uInt32 nLen)
static SVL_DLLPUBLIC bool CompareHashPassword(const css::uno::Sequence< sal_Int8 > &rOldPassHash, std::u16string_view sNewPass)
static OUString GetLanguageString(const LanguageType eType)
static LanguageType GetLanguageType(std::u16string_view rStr)
const XColorListRef & GetColorList() const
bool getUserAllowsLinkUpdate() const
void setUserAllowsLinkUpdate(bool bNew)
bool hasExternalRefLinks() const
static void ExecMethod(SfxBindings &rBindings, const OUString &rUIName)
static void CloseMethod(SfxBindings &rBindings)
static bool StateMethod(SfxBindings &rBindings, std::u16string_view rUIFile, bool bReloadNotebookbar=false)
static bool IsActive(bool bConsiderSingleToolbar=false)
LockFileEntry GetLockData()
void initializeFrom(const css::uno::Sequence< css::beans::PropertyValue > &_rValues)
#define TOOLS_WARN_EXCEPTION(area, stream)
void UpdateAcceptChangesDialog()
IMPL_LINK(ScDocShell, ReloadAllLinksHdl, weld::Button &, rButton, void)
IMPL_STATIC_LINK(LinkHelp, DispatchHelpLinksHdl, weld::Button &, rBtn, void)
LOKCommentNotificationType
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
@ Keep
Keep selection as is, expand to used data area if no selection.
@ SC_DB_IMPORT
create "Importx" (if necessary)
constexpr OUStringLiteral HID_CHG_PROTECT
constexpr OUStringLiteral HID_UPDATE_LINK_WARNING
#define LANGUAGE_DONTKNOW
#define LINK(Instance, Class, Member)
#define DECL_STATIC_LINK(Class, Member, ArgType, RetType)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
bool isTrustedLocationUriForUpdatingLinks(OUString const &uri)
bool isTiledAnnotations()
bool isCompatFlagSet(Compat flag)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
constexpr sal_Int64 PRINT_HEADER_HEIGHT
constexpr sal_Int64 PRINT_HEADER_WIDTH
#define ERRCODE_BASIC_NO_ACTIVE_OBJECT
#define ERRCODE_BASIC_NO_OBJECT
#define ERRCODE_BASIC_BAD_PARAMETER
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(175)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(170)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(176)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
#define ERRCTX_SFX_OPENDOC
SFX2_DLLPUBLIC OUString SfxResId(TranslateId aId)
OUString VCL_DLLPUBLIC GetStandardText(StandardButtonType eButton)
These options control how multi-line cells are converted during export in certain lossy formats (such...
Reference< XModel > xModel
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)