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 SID_UPDATEDOCMODE,
false);
124 m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->
GetValue() : css::document::UpdateDocMode::NO_UPDATE;
141 if (
m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
143 else if (
m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
164 if (
m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
185 m_pDocument->UpdateExternalRefLinks(pDialogParent);
187 bool bAnyDde =
m_pDocument->GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(pDialogParent);
193 Broadcast(
SfxHint(SfxHintId::ScDataChanged));
211 VclMessageType::Warning, VclButtonsType::YesNo,
212 ScResId(STR_TRUST_DOCUMENT_WARNING)));
213 xQueryBox->set_secondary_text(
ScResId(STR_WEBSERVICE_WITH_LINKS_WARNING));
214 xQueryBox->set_default_response(
RET_NO);
215 if (xQueryBox->run() !=
RET_YES)
225 SAL_WARN_IF(!pViewFrame,
"sc",
"expected there to be a ViewFrame");
249 sal_uInt16 nSlot = rReq.
GetSlot();
258 if( pReqArgs && pReqArgs->
HasItem( FN_PARAM_1, &pColItem ) &&
259 pReqArgs->
HasItem( FN_PARAM_2, &pRowItem ) &&
260 pReqArgs->
HasItem( FN_PARAM_3, &pTabItem ) &&
261 pReqArgs->
HasItem( SID_SC_SETTEXT, &pTextItem ) )
271 if (
m_pDocument->IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) )
284#if HAVE_FEATURE_SCRIPTING
291#if HAVE_FEATURE_SCRIPTING
303 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
312 if ( pReqArgs->
GetItemState( FN_PARAM_1,
true, &pItem ) == SfxItemState::SET )
315 bool bIsNewArea =
true;
316 if ( pReqArgs->
GetItemState( FN_PARAM_2,
true, &pItem ) == SfxItemState::SET )
320 bool bMakeArea =
false;
332 OUString aStrImport =
ScResId( STR_UNDO_IMPORTDATA );
335 nViewShellId = pViewSh->GetViewShellId();
340 OSL_ENSURE(pDBData,
"Cannot create DB data");
350 OUString aTemplate =
ScResId( STR_IMPORT_REPLACE );
356 VclMessageType::Question, VclButtonsType::YesNo,
358 xQueryBox->set_default_response(
RET_YES);
359 bDo = xQueryBox->run() ==
RET_YES;
372 if ( bMakeArea && bUndo)
377 OSL_FAIL(
"arguments expected" );
382 case SID_CHART_SOURCE:
383 case SID_CHART_ADDSOURCE:
388 OUString aChartName, aRangeName;
392 bool bMultiRange =
false;
394 bool bColHeaders =
true;
395 bool bRowHeaders =
true;
396 bool bColInit =
false;
397 bool bRowInit =
false;
398 bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
401 aChartName = pChartItem->GetValue();
404 aRangeName = pChartItem->GetValue();
406 if( pReqArgs->
HasItem( FN_PARAM_1, &pItem ) )
411 if( pReqArgs->
HasItem( FN_PARAM_2, &pItem ) )
423 if ( !aRangeListRef->empty() )
426 aSingleRange = aRangeListRef->front();
430 aRangeListRef.
clear();
434 if (pViewSh && bValid && !aChartName.isEmpty() )
446 m_pDocument->LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
450 if ( !bAddRange && ( !bColInit || !bRowInit ) )
461 if ( pDlg->Execute() ==
RET_OK )
463 bColHeaders = pDlg->IsRow();
464 bRowHeaders = pDlg->IsCol();
480 std::make_unique<ScUndoChartData>(
this, aChartName, aRangeListRef,
481 bColHeaders, bRowHeaders, bAddRange ) );
483 m_pDocument->UpdateChartArea( aChartName, aRangeListRef,
484 bColHeaders, bRowHeaders, bAddRange );
488 ScRange aNewRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
492 std::make_unique<ScUndoChartData>(
this, aChartName, aNewRange,
493 bColHeaders, bRowHeaders, bAddRange ) );
495 m_pDocument->UpdateChartArea( aChartName, aNewRange,
496 bColHeaders, bRowHeaders, bAddRange );
502 OSL_FAIL(
"UpdateChartArea: no ViewShell or wrong data");
508 OSL_FAIL(
"SID_CHART_SOURCE without arguments");
516 if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
534 case FID_HARD_RECALC:
538 case SID_UPDATETABLINKS:
560 ScResId(STR_RELOAD_TABLES), InfobarType::WARNING);
577 case SID_REIMPORT_AFTER_LOAD:
584 if ((
m_nCanUpdate != css::document::UpdateDocMode::NO_UPDATE) &&
585 (
m_nCanUpdate != css::document::UpdateDocMode::QUIET_UPDATE))
589 OSL_ENSURE(pViewSh,
"SID_REIMPORT_AFTER_LOAD: no View");
590 if (pViewSh && pDBColl)
593 VclMessageType::Question, VclButtonsType::YesNo,
594 ScResId(STR_REIMPORT_AFTER_LOAD)));
595 xQueryBox->set_default_response(
RET_YES);
596 if (xQueryBox->run() ==
RET_YES)
599 for (
const auto& rxDB : rDBs)
613 bool bContinue = pViewSh->
ImportData( aImportParam );
639 if ( !bDone && pDBColl )
656 OSL_FAIL(
"use ScAutoStyleHint instead of SID_AUTO_STYLE");
659 case SID_GET_COLORLIST:
676 bool bActivateTracking = (pChangeTrack ==
nullptr);
678 bActivateTracking = pItem->
GetValue();
680 if ( !bActivateTracking )
686 VclMessageType::Warning, VclButtonsType::YesNo,
688 xWarn->set_default_response(
RET_NO);
689 bDo = (xWarn->run() ==
RET_YES );
730 case SID_CHG_PROTECT :
742 case SID_DOCUMENT_MERGE:
743 case SID_DOCUMENT_COMPARE:
747 if ( pChangeTrack && !
m_pImpl->bIgnoreLostRedliningWarning )
749 if ( nSlot == SID_DOCUMENT_COMPARE )
752 VclMessageType::Warning, VclButtonsType::YesNo,
754 xWarn->set_default_response(
RET_NO);
776 OUString aFileName = pFileNameItem->
GetValue();
778 OUString aFilterName;
781 aFilterName = pFilterItem->GetValue();
786 aOptions = pOptionsItem->GetValue();
790 if (pReqArgs->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
798 if (aFilterName.isEmpty())
805 std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
806 auto pSet = std::make_shared<SfxAllItemSet>( pApp->
GetPool() );
807 if (!aOptions.isEmpty())
808 pSet->Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
811 pMed =
new SfxMedium( aFileName, StreamMode::STD_READ, pFilter, std::move(pSet) );
819 m_pImpl->bIgnoreLostRedliningWarning =
true;
825 m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent,
826 ScDocShell::Factory().GetFactoryName(),
mode ) );
837 pOtherDocSh->
DoLoad( pMed );
844 bool bHadTrack = (
m_pDocument->GetChangeTrack() != nullptr );
845#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
847 if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
852 if ( nSlot == SID_DOCUMENT_COMPARE )
864 pViewFrm->
ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId() );
882 m_pDocument->SetChangeViewSettings(aChangeViewSet);
885#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
886 else if ( nSlot == SID_DOCUMENT_MERGE &&
IsDocShared() && pChangeTrack )
889 if ( nEnd >= nStart )
897 m_pDocument->SetChangeViewSettings( aChangeViewSet );
910 case SID_DELETE_SCENARIO:
914 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
918 const OUString&
aName = pStringItem->GetValue();
939 case SID_EDIT_SCENARIO:
942 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
946 OUString
aName = pStringItem->GetValue();
955 m_pDocument->GetScenarioData( nTab, aComment, aColor, nFlags );
960 SCTAB nActualTab = nTab;
966 bool bSheetProtected =
m_pDocument->IsTabProtected(nActualTab);
971 pNewDlg->SetScenarioData(
aName, aComment, aColor, nFlags );
972 if ( pNewDlg->Execute() ==
RET_OK )
974 pNewDlg->GetScenarioData(
aName, aComment, aColor, nFlags );
985 case SID_ATTR_YEAR2000 :
988 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
992 sal_uInt16 nY2k = pInt16Item->GetValue();
1012#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
1031 bool bContinue =
true;
1035 VclMessageType::Question, VclButtonsType::YesNo,
1036 ScResId(STR_DOC_WILLBESAVED)));
1037 xQueryBox->set_default_response(
RET_YES);
1038 if (xQueryBox->run() ==
RET_NO)
1047 SC_MOD()->SetInSharedDocSaving(
true );
1054 SC_MOD()->SetInSharedDocSaving(
false );
1068 uno::Reference< frame::XModel >
xModel;
1073 uno::Reference< util::XCloseable > xCloseable(
xModel, uno::UNO_QUERY_THROW );
1076 bool bShared =
false;
1088 bool bOwnEntry =
false;
1094 catch ( uno::Exception& )
1098 if ( bShared && bOwnEntry )
1100 uno::Reference< frame::XStorable > xStorable(
xModel, uno::UNO_QUERY_THROW );
1101 if ( xStorable->isReadonly() )
1103 xCloseable->close(
true );
1105 OUString aUserName(
ScResId( STR_UNKNOWN_USER ) );
1110 if ( !
aData[LockFileComponent::OOOUSERNAME].isEmpty() )
1112 aUserName =
aData[LockFileComponent::OOOUSERNAME];
1114 else if ( !
aData[LockFileComponent::SYSUSERNAME].isEmpty() )
1116 aUserName =
aData[LockFileComponent::SYSUSERNAME];
1119 catch ( uno::Exception& )
1122 OUString aMessage(
ScResId( STR_FILE_LOCKED_TRY_LATER ) );
1123 aMessage = aMessage.replaceFirst(
"%1", aUserName );
1126 VclMessageType::Warning, VclButtonsType::Ok,
1133 VclMessageType::Warning, VclButtonsType::YesNo,
1134 ScResId(STR_DOC_DISABLESHARED)));
1135 xWarn->set_default_response(
RET_YES);
1139 xCloseable->close(
true );
1160 xCloseable->close(
true );
1166 xCloseable->close(
true );
1168 VclMessageType::Warning, VclButtonsType::Ok,
1169 ScResId(STR_DOC_NOLONGERSHARED)));
1173 catch ( uno::Exception& )
1176 SC_MOD()->SetInSharedDocSaving(
false );
1180 uno::Reference< util::XCloseable > xClose(
xModel, uno::UNO_QUERY_THROW );
1181 xClose->close(
true );
1183 catch ( uno::Exception& )
1199 SfxStringItem aApp(SID_DOC_SERVICE,
"com.sun.star.sheet.SpreadsheetDocument");
1202 SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON,
1203 { &aApp, &aTarget });
1207 case SID_NOTEBOOKBAR:
1213 else if ( pBindings )
1217 case SID_LANGUAGE_STATUS:
1224 if ( !aLangText.isEmpty() )
1227 static const OUStringLiteral aSelectionLangPrefix(
u"Current_");
1228 static const OUStringLiteral aParagraphLangPrefix(
u"Paragraph_");
1229 static const OUStringLiteral aDocLangPrefix(
u"Default_");
1231 bool bSelection =
false;
1232 bool bParagraph =
false;
1238 if ( aLangText ==
"*" )
1247 else if ( (
nPos = aLangText.indexOf(aDocLangPrefix)) != -1 )
1249 aLangText = aLangText.replaceAt(
nPos, aDocLangPrefix.getLength(),
u"");
1251 if ( aLangText ==
"LANGUAGE_NONE" )
1256 else if ( aLangText ==
"RESET_LANGUAGES" )
1276 else if (-1 != (
nPos = aLangText.indexOf( aSelectionLangPrefix )))
1279 aLangText = aLangText.replaceAt(
nPos, aSelectionLangPrefix.getLength(),
u"" );
1281 else if (-1 != (
nPos = aLangText.indexOf( aParagraphLangPrefix )))
1284 aLangText = aLangText.replaceAt(
nPos, aParagraphLangPrefix.getLength(),
u"" );
1287 if (bSelection || bParagraph)
1301 if (nScriptType == SvtScriptType::LATIN)
1303 if (nScriptType == SvtScriptType::COMPLEX)
1305 if (nScriptType == SvtScriptType::ASIAN)
1321 else if ( eLang != eLatin )
1326 if ( pInputHandler )
1329 pViewSh->UpdateDrawTextOutliner();
1333 Broadcast(
SfxHint(SfxHintId::LanguageChanged));
1339 case SID_SPELLCHECK_IGNORE_ALL:
1349 OUString sIgnoreText;
1354 if(sIgnoreText ==
"Spelling")
1362 case SID_SPELLCHECK_APPLY_SUGGESTION:
1372 OUString sApplyText;
1377 static const OUStringLiteral sSpellingRule(
u"Spelling_");
1379 if(-1 != (
nPos = sApplyText.indexOf( sSpellingRule )))
1381 sApplyText = sApplyText.replaceAt(
nPos, sSpellingRule.getLength(),
u"");
1386 case SID_REFRESH_VIEW:
1397#if HAVE_FEATURE_SCRIPTING
1425 if ( bJustQueryIfProtected && !bProtected )
1428 OUString aTitle(
ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
1429 OUString aText(
ScResId( SCSTR_PASSWORD ) );
1434 aDlg.set_title(aTitle);
1443 if (!aPassword.isEmpty())
1449 if ( bJustQueryIfProtected )
1457 VclMessageType::Info, VclButtonsType::Ok,
1458 ScResId(SCSTR_WRONGPASSWORD)));
1464 css::uno::Sequence< sal_Int8 > aPass;
1475 else if ( bJustQueryIfProtected )
1484 SAL_WARN(
"sc",
"ScDocShell::DoRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1535 SAL_WARN(
"sc",
"ScDocShell::DoHardRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1538 auto start = std::chrono::steady_clock::now();
1556 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1566 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1570 auto end = std::chrono::steady_clock::now();
1571 SAL_INFO(
"sc.timing",
"ScDocShell::DoHardRecalc(): took " << std::chrono::duration_cast<std::chrono::milliseconds>(
end -
start).
count() <<
"ms");
1582 "DoAutoStyle with several tables");
1588 m_pDocument->ApplyStyleAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, *pStyleSheet );
1589 m_pDocument->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
1600 if ( pStyle->
GetFamily() == SfxStyleFamily::Page )
1602 if (
nId == SfxHintId::StyleSheetModified )
1606 const OUString& aNewName = pStyle->
GetName();
1607 OUString aOldName = aNewName;
1608 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1610 aOldName = pExtendedHint->GetOldName();
1612 if ( aNewName != aOldName )
1613 m_pDocument->RenamePageStyleInUse( aOldName, aNewName );
1616 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1631 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1633 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1634 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1635 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1640 else if ( pStyle->
GetFamily() == SfxStyleFamily::Para )
1642 if (
nId == SfxHintId::StyleSheetModified)
1644 const OUString& aNewName = pStyle->
GetName();
1645 OUString aOldName = aNewName;
1646 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1648 aOldName = pExtendedHint->GetOldName();
1649 if ( aNewName != aOldName )
1669 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1672 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1685 this, nTab, nOldScale, nOldPages, nScale, nPages ) );
1697 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1702 bool bChange =
false;
1705 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1708 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1715 std::optional<ScRange> oRepeatCol =
m_pDocument->GetRepeatColRange( nTab );
1716 std::optional<ScRange> oRepeatRow =
m_pDocument->GetRepeatRowRange( nTab );
1720 sal_uInt16 nNewScale = nOldScale;
1727 if ( oRepeatCol && nStartCol >= oRepeatCol->aStart.Col() )
1729 for (
SCCOL i=oRepeatCol->aStart.Col(); i<=oRepeatCol->aEnd.Col();
i++ )
1731 if ( nStartCol <= oRepeatCol->aEnd.Col() )
1732 nStartCol = oRepeatCol->aEnd.Col() + 1;
1736 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++ )
1745 if ( oRepeatRow && nStartRow >= oRepeatRow->aStart.Row() )
1747 nBlkTwipsY +=
m_pDocument->GetRowHeight( oRepeatRow->aStart.Row(),
1748 oRepeatRow->aEnd.Row(), nTab );
1749 if ( nStartRow <= oRepeatRow->aEnd.Row() )
1750 nStartRow = oRepeatRow->aEnd.Row() + 1;
1752 nBlkTwipsY +=
m_pDocument->GetRowHeight( nStartRow, nEndRow, nTab );
1758 nBlkTwipsY += nHdr + nFtr;
1760 if ( nBlkTwipsX == 0 )
1762 if ( nBlkTwipsY == 0 )
1766 aPhysPage.
Height() * 100 / nBlkTwipsY );
1769 if ( nNeeded <
static_cast<tools::Long>(nNewScale) )
1770 nNewScale =
static_cast<sal_uInt16
>(nNeeded);
1772 bChange = ( nNewScale != nOldScale || nOldPages != 0 );
1785 for (
SCTAB nTab=0; nTab<nTabCount && nUseTab>
MAXTAB; nTab++)
1786 if (
m_pDocument->GetPageStyle(nTab) == rStyleName &&
1787 ( !bApi ||
m_pDocument->GetPageSize(nTab).Width() ) )
1804 VclMessageType::Info, VclButtonsType::Ok,
1805 ScResId(STR_PRINT_INVALID_AREA)));
1815 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1816 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1817 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1829 case SID_STATUS_PAGESTYLE:
1830 case SID_FORMATPAGE:
1832 if ( pReqArgs ==
nullptr )
1834 OUString aOldName =
m_pDocument->GetPageStyle( nCurTab );
1837 = pStylePool->
Find( aOldName, SfxStyleFamily::Page );
1839 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1855 auto pRequest = std::make_shared<SfxRequest>(rReq);
1857 pDlg->StartExecuteAsync([
this, pDlg, pRequest, pStyleSheet, aOldData, aOldName, &rStyleSet, nCurTab, &rCaller, bUndo](sal_Int32 nResult){
1860 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1864 OUString aNewName = pStyleSheet->
GetName();
1865 if ( aNewName != aOldName &&
1866 m_pDocument->RenamePageStyleInUse( aOldName, aNewName ) )
1871 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1872 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1877 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
1888 std::make_unique<ScUndoModifyStyle>(
this, SfxStyleFamily::Page,
1889 aOldData, aNewData ) );
1895 pDlg->disposeOnce();
1904 if ( pReqArgs ==
nullptr )
1912 = pStylePool->
Find(
aStr, SfxStyleFamily::Page );
1914 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1921 bool bShareHeader = rStyleSet
1926 bool bShareFooter = rStyleSet
1931 sal_uInt16 nResId = 0;
1935 case SvxPageUsage::Left:
1936 case SvxPageUsage::Right:
1939 nResId = RID_SCDLG_HFEDIT;
1940 else if ( SvxPageUsage::Right == eUsage )
1943 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1945 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1951 nResId = bShareFooter ?
1952 RID_SCDLG_HFEDIT_RIGHTFOOTER :
1953 RID_SCDLG_HFEDIT_LEFTFOOTER;
1955 nResId = bShareHeader ?
1956 RID_SCDLG_HFEDIT_RIGHTHEADER :
1957 RID_SCDLG_HFEDIT_LEFTHEADER;
1962 case SvxPageUsage::Mirror:
1963 case SvxPageUsage::All:
1966 if ( !bShareHeader && !bShareFooter )
1969 nResId = RID_SCDLG_HFEDIT_ALL;
1971 nResId = RID_SCDLG_HFEDIT_FOOTER;
1973 nResId = RID_SCDLG_HFEDIT_HEADER;
1975 else if ( bShareHeader && bShareFooter )
1978 nResId = RID_SCDLG_HFEDIT;
1982 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1984 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1987 else if ( !bShareHeader && bShareFooter )
1990 nResId = RID_SCDLG_HFEDIT_SFTR;
1992 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1994 nResId = RID_SCDLG_HFEDIT_HEADER;
1996 else if ( bShareHeader && !bShareFooter )
1999 nResId = RID_SCDLG_HFEDIT_SHDR;
2001 nResId = RID_SCDLG_HFEDIT_FOOTER;
2003 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
2015 auto xRequest = std::make_shared<SfxRequest>(rReq);
2017 pDlg->StartExecuteAsync([
this, pDlg, pStyleSheet, xRequest](sal_Int32 nResult){
2020 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
2023 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
2028 pDlg->disposeOnce();
2049 case SID_STATUS_PAGESTYLE:
2059 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2099 case FID_CHG_RECORD:
2107 case SID_CHG_PROTECT:
2118 case SID_DOCUMENT_COMPARE:
2131 case SID_TABLES_COUNT:
2135 case SID_ATTR_YEAR2000 :
2149 case SID_ATTR_CHAR_FONTLIST:
2153 case SID_NOTEBOOKBAR:
2158 u"modules/scalc/ui/");
2164 case SID_LANGUAGE_STATUS:
2226 if ( eShellMode == SfxObjectCreateMode::ORGANIZER )
2247 aArea.
SetRight( SC_PREVIEW_SIZE_Y );
2252 if ( bNegativePage )
2257 else if( nAspect ==
ASPECT_CONTENT && eShellMode != SfxObjectCreateMode::EMBEDDED )
2269 m_pDocument->GetDataStart( nVisTab, nStartCol, nStartRow );
2272 m_pDocument->GetPrintArea( nVisTab, nEndCol, nEndRow );
2273 if (nStartCol>nEndCol)
2274 nStartCol = nEndCol;
2275 if (nStartRow>nEndRow)
2276 nStartRow = nEndRow;
2278 ->GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab );
2293 while ( nCol<rDoc.
MaxCol() )
2296 if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
2316 bool bFound =
false;
2320 if (rDoc.
RowHidden(i, nTab,
nullptr, &nLastRow))
2328 if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
2354 bool bNegativePage =
m_pDocument->IsNegativePage( nTab );
2355 if ( bNegativePage )
2362 tools::Long nCorrectionLeft = (nOrigLeft == 0 && nCol > 0) ? nSetLeft : 0;
2369 tools::Long nCorrectionTop = (nOrigTop == 0 && nRow > 0) ? nSetTop : 0;
2372 if ( bNegativePage )
2386 SfxStyleFamily::Page );
2388 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2393 rbHeader = rbFooter =
false;
2396 OSL_ENSURE( pStyleSet,
"PageStyle-Set not found! :-(" );
2404 pSet = &pSetItem->GetItemSet();
2408 pSet = &pSetItem->GetItemSet();
2413bool ScDocShell::DdeGetData(
const OUString& rItem,
2414 const OUString& rMimeType,
2415 css::uno::Any & rValue )
2418 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2420 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2423 osl_getThreadTextEncoding()));
2424 rValue <<= css::uno::Sequence< sal_Int8 >(
2425 reinterpret_cast<const sal_Int8*
>(aFmtByte.getStr()),
2426 aFmtByte.getLength() + 1 );
2430 if ( !aObj.IsRef() )
2434 aObj.SetFormulas(
true );
2439 if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(),
2440 SotClipboardFormatId::SYLK ) )
2442 rValue <<= css::uno::Sequence< sal_Int8 >(
2444 aData.getLength() + 1 );
2452 aObj.SetSeparator(
',' );
2454 return aObj.ExportData( rMimeType, rValue );
2459 return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
2462bool ScDocShell::DdeSetData(
const OUString& rItem,
2463 const OUString& rMimeType,
2464 const css::uno::Any & rValue )
2467 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2469 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2480 aObj.SetFormulas(
true );
2487 return aObj.ImportString( aData, SotClipboardFormatId::SYLK );
2493 aObj.SetSeparator(
',' );
2494 OSL_ENSURE(
false,
"Implementation is missing" );
2499 OSL_ENSURE(
false,
"Implementation is missing" );
2509 OUString aPos = rItem;
2519 aPos =
pData->GetSymbol();
2547 boost::property_tree::ptree aAnnotation;
2553 aAnnotation.put(
"id", pNote->
GetId());
2554 aAnnotation.put(
"tab", rPos.
Tab());
2558 aAnnotation.put(
"author", pNote->
GetAuthor());
2559 aAnnotation.put(
"dateTime", pNote->
GetDate());
2560 aAnnotation.put(
"text", pNote->
GetText());
2567 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
2568 OString aRectString;
2582 const double fPPTX = pViewData->
GetPPTX();
2583 const double fPPTY = pViewData->
GetPPTY();
2585 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)).
toString();
2587 aAnnotation.put(
"cellPos", aRectString);
2591 boost::property_tree::ptree aTree;
2592 aTree.add_child(
"comment", aAnnotation);
2594 boost::property_tree::write_json(aStream, aTree);
2595 std::string aPayload = aStream.str();
2602 if (pThisViewShell ==
nullptr || pViewShell->
GetDocId() == pThisViewShell->
GetDocId())
2612 return pViewSh ? &pViewSh->
GetViewData() :
nullptr;
2621 return pViewData ? pViewData->
GetTabNo() :
static_cast<SCTAB>(0);
2658 sal_uInt16 nShellCnt = 0;
2660 while ( pShell && !pFound )
2662 if (
auto pDocSh =
dynamic_cast<ScDocShell*
>(pShell) )
2664 if ( nShellCnt == nDocNo )
2677 OSL_ENSURE( _pFileDlg,
"ScDocShell::DialogClosedHdl(): no file dialog" );
2678 OSL_ENSURE(
m_pImpl->pDocInserter,
"ScDocShell::DialogClosedHdl(): no document inserter" );
2682 sal_uInt16 nSlot =
m_pImpl->pRequest->GetSlot();
2683 std::unique_ptr<SfxMedium> pMed =
m_pImpl->pDocInserter->CreateMedium();
2688 if ( SID_DOCUMENT_COMPARE == nSlot )
2690 if ( pMed->GetFilter() )
2691 m_pImpl->pRequest->AppendItem(
2692 SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetFilterName() ) );
2694 if ( !sOptions.isEmpty() )
2700 if (pSet && pSet->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
2706 m_pImpl->pRequest->AppendItem( *pItem );
2713 m_pImpl->bIgnoreLostRedliningWarning =
false;
2716#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
2728 sal_uInt16
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
2747 m_pDocument->SetChangeViewSettings( aChangeViewSet );
2752 uno::Reference< frame::XModel >
xModel;
2755 SC_MOD()->SetInSharedDocLoading(
true );
2756 uno::Reference< frame::XDesktop2 > xLoader = frame::Desktop::create( ::comphelper::getProcessComponentContext() );
2762 if ( pPasswordItem && !pPasswordItem->
GetValue().isEmpty() )
2765 auto pArgs = aArgs.getArray();
2766 pArgs[1].Name =
"Password";
2767 pArgs[1].Value <<= pPasswordItem->
GetValue();
2770 if (pEncryptionItem)
2772 aArgs.realloc(aArgs.getLength() + 1);
2773 auto pArgs = aArgs.getArray();
2774 pArgs[aArgs.getLength() - 1].Name =
"EncryptionData";
2775 pArgs[aArgs.getLength() - 1].Value = pEncryptionItem->
GetValue();
2781 uno::UNO_QUERY_THROW );
2782 SC_MOD()->SetInSharedDocLoading(
false );
2784 catch ( uno::Exception& )
2786 OSL_FAIL(
"ScDocShell::LoadSharedDocument(): caught exception" );
2787 SC_MOD()->SetInSharedDocLoading(
false );
2790 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
2791 xClose->close(
true );
2792 return uno::Reference< frame::XModel >();
2794 catch ( uno::Exception& )
2796 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)
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 * 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
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)