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));
210 SAL_WARN_IF(!pViewFrame,
"sc",
"expected there to be a ViewFrame");
234 sal_uInt16 nSlot = rReq.
GetSlot();
243 if( pReqArgs && pReqArgs->
HasItem( FN_PARAM_1, &pColItem ) &&
244 pReqArgs->
HasItem( FN_PARAM_2, &pRowItem ) &&
245 pReqArgs->
HasItem( FN_PARAM_3, &pTabItem ) &&
246 pReqArgs->
HasItem( SID_SC_SETTEXT, &pTextItem ) )
256 if (
m_pDocument->IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) )
269#if HAVE_FEATURE_SCRIPTING
276#if HAVE_FEATURE_SCRIPTING
288 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
297 if ( pReqArgs->
GetItemState( FN_PARAM_1,
true, &pItem ) == SfxItemState::SET )
300 bool bIsNewArea =
true;
301 if ( pReqArgs->
GetItemState( FN_PARAM_2,
true, &pItem ) == SfxItemState::SET )
305 bool bMakeArea =
false;
317 OUString aStrImport =
ScResId( STR_UNDO_IMPORTDATA );
320 nViewShellId = pViewSh->GetViewShellId();
325 OSL_ENSURE(pDBData,
"Cannot create DB data");
335 OUString aTemplate =
ScResId( STR_IMPORT_REPLACE );
341 VclMessageType::Question, VclButtonsType::YesNo,
343 xQueryBox->set_default_response(
RET_YES);
344 bDo = xQueryBox->run() ==
RET_YES;
357 if ( bMakeArea && bUndo)
362 OSL_FAIL(
"arguments expected" );
367 case SID_CHART_SOURCE:
368 case SID_CHART_ADDSOURCE:
373 OUString aChartName, aRangeName;
377 bool bMultiRange =
false;
379 bool bColHeaders =
true;
380 bool bRowHeaders =
true;
381 bool bColInit =
false;
382 bool bRowInit =
false;
383 bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
386 aChartName = pChartItem->GetValue();
389 aRangeName = pChartItem->GetValue();
391 if( pReqArgs->
HasItem( FN_PARAM_1, &pItem ) )
396 if( pReqArgs->
HasItem( FN_PARAM_2, &pItem ) )
408 if ( !aRangeListRef->empty() )
411 aSingleRange = aRangeListRef->front();
415 aRangeListRef.
clear();
419 if (pViewSh && bValid && !aChartName.isEmpty() )
431 m_pDocument->LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
435 if ( !bAddRange && ( !bColInit || !bRowInit ) )
446 if ( pDlg->Execute() ==
RET_OK )
448 bColHeaders = pDlg->IsRow();
449 bRowHeaders = pDlg->IsCol();
465 std::make_unique<ScUndoChartData>(
this, aChartName, aRangeListRef,
466 bColHeaders, bRowHeaders, bAddRange ) );
468 m_pDocument->UpdateChartArea( aChartName, aRangeListRef,
469 bColHeaders, bRowHeaders, bAddRange );
473 ScRange aNewRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
477 std::make_unique<ScUndoChartData>(
this, aChartName, aNewRange,
478 bColHeaders, bRowHeaders, bAddRange ) );
480 m_pDocument->UpdateChartArea( aChartName, aNewRange,
481 bColHeaders, bRowHeaders, bAddRange );
487 OSL_FAIL(
"UpdateChartArea: no ViewShell or wrong data");
493 OSL_FAIL(
"SID_CHART_SOURCE without arguments");
501 if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
519 case FID_HARD_RECALC:
523 case SID_UPDATETABLINKS:
545 ScResId(STR_RELOAD_TABLES), InfobarType::WARNING);
562 case SID_REIMPORT_AFTER_LOAD:
569 if ((
m_nCanUpdate != css::document::UpdateDocMode::NO_UPDATE) &&
570 (
m_nCanUpdate != css::document::UpdateDocMode::QUIET_UPDATE))
574 OSL_ENSURE(pViewSh,
"SID_REIMPORT_AFTER_LOAD: no View");
575 if (pViewSh && pDBColl)
578 VclMessageType::Question, VclButtonsType::YesNo,
579 ScResId(STR_REIMPORT_AFTER_LOAD)));
580 xQueryBox->set_default_response(
RET_YES);
581 if (xQueryBox->run() ==
RET_YES)
584 for (
const auto& rxDB : rDBs)
598 bool bContinue = pViewSh->
ImportData( aImportParam );
624 if ( !bDone && pDBColl )
641 OSL_FAIL(
"use ScAutoStyleHint instead of SID_AUTO_STYLE");
644 case SID_GET_COLORLIST:
661 bool bActivateTracking = (pChangeTrack ==
nullptr);
663 bActivateTracking = pItem->
GetValue();
665 if ( !bActivateTracking )
671 VclMessageType::Warning, VclButtonsType::YesNo,
673 xWarn->set_default_response(
RET_NO);
674 bDo = (xWarn->run() ==
RET_YES );
715 case SID_CHG_PROTECT :
727 case SID_DOCUMENT_MERGE:
728 case SID_DOCUMENT_COMPARE:
732 if ( pChangeTrack && !
m_pImpl->bIgnoreLostRedliningWarning )
734 if ( nSlot == SID_DOCUMENT_COMPARE )
737 VclMessageType::Warning, VclButtonsType::YesNo,
739 xWarn->set_default_response(
RET_NO);
761 OUString aFileName = pFileNameItem->
GetValue();
763 OUString aFilterName;
766 aFilterName = pFilterItem->GetValue();
771 aOptions = pOptionsItem->GetValue();
775 if (pReqArgs->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
783 if (aFilterName.isEmpty())
790 std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
791 auto pSet = std::make_shared<SfxAllItemSet>( pApp->
GetPool() );
792 if (!aOptions.isEmpty())
793 pSet->Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
796 pMed =
new SfxMedium( aFileName, StreamMode::STD_READ, pFilter, std::move(pSet) );
804 m_pImpl->bIgnoreLostRedliningWarning =
true;
810 m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent,
811 ScDocShell::Factory().GetFactoryName(),
mode ) );
822 pOtherDocSh->
DoLoad( pMed );
829 bool bHadTrack = (
m_pDocument->GetChangeTrack() != nullptr );
830#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
832 if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
837 if ( nSlot == SID_DOCUMENT_COMPARE )
849 pViewFrm->
ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId() );
867 m_pDocument->SetChangeViewSettings(aChangeViewSet);
870#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
871 else if ( nSlot == SID_DOCUMENT_MERGE &&
IsDocShared() && pChangeTrack )
874 if ( nEnd >= nStart )
882 m_pDocument->SetChangeViewSettings( aChangeViewSet );
895 case SID_DELETE_SCENARIO:
899 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
903 const OUString&
aName = pStringItem->GetValue();
924 case SID_EDIT_SCENARIO:
927 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
931 OUString
aName = pStringItem->GetValue();
940 m_pDocument->GetScenarioData( nTab, aComment, aColor, nFlags );
945 SCTAB nActualTab = nTab;
951 bool bSheetProtected =
m_pDocument->IsTabProtected(nActualTab);
956 pNewDlg->SetScenarioData(
aName, aComment, aColor, nFlags );
957 if ( pNewDlg->Execute() ==
RET_OK )
959 pNewDlg->GetScenarioData(
aName, aComment, aColor, nFlags );
970 case SID_ATTR_YEAR2000 :
973 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
977 sal_uInt16 nY2k = pInt16Item->GetValue();
997#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
1016 bool bContinue =
true;
1020 VclMessageType::Question, VclButtonsType::YesNo,
1021 ScResId(STR_DOC_WILLBESAVED)));
1022 xQueryBox->set_default_response(
RET_YES);
1023 if (xQueryBox->run() ==
RET_NO)
1032 SC_MOD()->SetInSharedDocSaving(
true );
1039 SC_MOD()->SetInSharedDocSaving(
false );
1053 uno::Reference< frame::XModel >
xModel;
1058 uno::Reference< util::XCloseable > xCloseable(
xModel, uno::UNO_QUERY_THROW );
1061 bool bShared =
false;
1073 bool bOwnEntry =
false;
1079 catch ( uno::Exception& )
1083 if ( bShared && bOwnEntry )
1085 uno::Reference< frame::XStorable > xStorable(
xModel, uno::UNO_QUERY_THROW );
1086 if ( xStorable->isReadonly() )
1088 xCloseable->close(
true );
1090 OUString aUserName(
ScResId( STR_UNKNOWN_USER ) );
1095 if ( !
aData[LockFileComponent::OOOUSERNAME].isEmpty() )
1097 aUserName =
aData[LockFileComponent::OOOUSERNAME];
1099 else if ( !
aData[LockFileComponent::SYSUSERNAME].isEmpty() )
1101 aUserName =
aData[LockFileComponent::SYSUSERNAME];
1104 catch ( uno::Exception& )
1107 OUString aMessage(
ScResId( STR_FILE_LOCKED_TRY_LATER ) );
1108 aMessage = aMessage.replaceFirst(
"%1", aUserName );
1111 VclMessageType::Warning, VclButtonsType::Ok,
1118 VclMessageType::Warning, VclButtonsType::YesNo,
1119 ScResId(STR_DOC_DISABLESHARED)));
1120 xWarn->set_default_response(
RET_YES);
1124 xCloseable->close(
true );
1145 xCloseable->close(
true );
1151 xCloseable->close(
true );
1153 VclMessageType::Warning, VclButtonsType::Ok,
1154 ScResId(STR_DOC_NOLONGERSHARED)));
1158 catch ( uno::Exception& )
1161 SC_MOD()->SetInSharedDocSaving(
false );
1165 uno::Reference< util::XCloseable > xClose(
xModel, uno::UNO_QUERY_THROW );
1166 xClose->close(
true );
1168 catch ( uno::Exception& )
1184 SfxStringItem aApp(SID_DOC_SERVICE,
"com.sun.star.sheet.SpreadsheetDocument");
1187 SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON,
1188 { &aApp, &aTarget });
1192 case SID_NOTEBOOKBAR:
1198 else if ( pBindings )
1202 case SID_LANGUAGE_STATUS:
1209 if ( !aLangText.isEmpty() )
1212 static const OUStringLiteral aSelectionLangPrefix(
u"Current_");
1213 static const OUStringLiteral aParagraphLangPrefix(
u"Paragraph_");
1214 static const OUStringLiteral aDocLangPrefix(
u"Default_");
1216 bool bSelection =
false;
1217 bool bParagraph =
false;
1223 if ( aLangText ==
"*" )
1232 else if ( (
nPos = aLangText.indexOf(aDocLangPrefix)) != -1 )
1234 aLangText = aLangText.replaceAt(
nPos, aDocLangPrefix.getLength(),
u"");
1236 if ( aLangText ==
"LANGUAGE_NONE" )
1241 else if ( aLangText ==
"RESET_LANGUAGES" )
1261 else if (-1 != (
nPos = aLangText.indexOf( aSelectionLangPrefix )))
1264 aLangText = aLangText.replaceAt(
nPos, aSelectionLangPrefix.getLength(),
u"" );
1266 else if (-1 != (
nPos = aLangText.indexOf( aParagraphLangPrefix )))
1269 aLangText = aLangText.replaceAt(
nPos, aParagraphLangPrefix.getLength(),
u"" );
1272 if (bSelection || bParagraph)
1286 if (nScriptType == SvtScriptType::LATIN)
1288 if (nScriptType == SvtScriptType::COMPLEX)
1290 if (nScriptType == SvtScriptType::ASIAN)
1306 else if ( eLang != eLatin )
1311 if ( pInputHandler )
1314 pViewSh->UpdateDrawTextOutliner();
1318 Broadcast(
SfxHint(SfxHintId::LanguageChanged));
1324 case SID_SPELLCHECK_IGNORE_ALL:
1334 OUString sIgnoreText;
1339 if(sIgnoreText ==
"Spelling")
1347 case SID_SPELLCHECK_APPLY_SUGGESTION:
1357 OUString sApplyText;
1362 static const OUStringLiteral sSpellingRule(
u"Spelling_");
1364 if(-1 != (
nPos = sApplyText.indexOf( sSpellingRule )))
1366 sApplyText = sApplyText.replaceAt(
nPos, sSpellingRule.getLength(),
u"");
1371 case SID_REFRESH_VIEW:
1382#if HAVE_FEATURE_SCRIPTING
1410 if ( bJustQueryIfProtected && !bProtected )
1413 OUString aTitle(
ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
1414 OUString aText(
ScResId( SCSTR_PASSWORD ) );
1419 aDlg.set_title(aTitle);
1428 if (!aPassword.isEmpty())
1434 if ( bJustQueryIfProtected )
1442 VclMessageType::Info, VclButtonsType::Ok,
1443 ScResId(SCSTR_WRONGPASSWORD)));
1449 css::uno::Sequence< sal_Int8 > aPass;
1460 else if ( bJustQueryIfProtected )
1469 SAL_WARN(
"sc",
"ScDocShell::DoRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1520 SAL_WARN(
"sc",
"ScDocShell::DoHardRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
1523 auto start = std::chrono::steady_clock::now();
1541 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1551 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1555 auto end = std::chrono::steady_clock::now();
1556 SAL_INFO(
"sc.timing",
"ScDocShell::DoHardRecalc(): took " << std::chrono::duration_cast<std::chrono::milliseconds>(
end -
start).
count() <<
"ms");
1563 pStylePool->
FindCaseIns( rStyle, SfxStyleFamily::Para );
1566 pStylePool->
Find(
ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ));
1571 "DoAutoStyle with several tables");
1577 m_pDocument->ApplyStyleAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, *pStyleSheet );
1578 m_pDocument->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
1589 if ( pStyle->
GetFamily() == SfxStyleFamily::Page )
1591 if (
nId == SfxHintId::StyleSheetModified )
1595 const OUString& aNewName = pStyle->
GetName();
1596 OUString aOldName = aNewName;
1597 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1599 aOldName = pExtendedHint->GetOldName();
1601 if ( aNewName != aOldName )
1602 m_pDocument->RenamePageStyleInUse( aOldName, aNewName );
1605 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1620 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1622 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1623 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1624 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1629 else if ( pStyle->
GetFamily() == SfxStyleFamily::Para )
1631 if (
nId == SfxHintId::StyleSheetModified)
1633 const OUString& aNewName = pStyle->
GetName();
1634 OUString aOldName = aNewName;
1635 const SfxStyleSheetModifiedHint* pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
1637 aOldName = pExtendedHint->GetOldName();
1638 if ( aNewName != aOldName )
1658 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1661 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1674 this, nTab, nOldScale, nOldPages, nScale, nPages ) );
1686 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1691 bool bChange =
false;
1694 OUString aStyleName =
m_pDocument->GetPageStyle( nTab );
1697 OSL_ENSURE( pStyleSheet,
"PageStyle not found" );
1704 std::optional<ScRange> oRepeatCol =
m_pDocument->GetRepeatColRange( nTab );
1705 std::optional<ScRange> oRepeatRow =
m_pDocument->GetRepeatRowRange( nTab );
1709 sal_uInt16 nNewScale = nOldScale;
1716 if ( oRepeatCol && nStartCol >= oRepeatCol->aStart.Col() )
1718 for (
SCCOL i=oRepeatCol->aStart.Col(); i<=oRepeatCol->aEnd.Col();
i++ )
1720 if ( nStartCol <= oRepeatCol->aEnd.Col() )
1721 nStartCol = oRepeatCol->aEnd.Col() + 1;
1725 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++ )
1734 if ( oRepeatRow && nStartRow >= oRepeatRow->aStart.Row() )
1736 nBlkTwipsY +=
m_pDocument->GetRowHeight( oRepeatRow->aStart.Row(),
1737 oRepeatRow->aEnd.Row(), nTab );
1738 if ( nStartRow <= oRepeatRow->aEnd.Row() )
1739 nStartRow = oRepeatRow->aEnd.Row() + 1;
1741 nBlkTwipsY +=
m_pDocument->GetRowHeight( nStartRow, nEndRow, nTab );
1747 nBlkTwipsY += nHdr + nFtr;
1749 if ( nBlkTwipsX == 0 )
1751 if ( nBlkTwipsY == 0 )
1755 aPhysPage.
Height() * 100 / nBlkTwipsY );
1758 if ( nNeeded <
static_cast<tools::Long>(nNewScale) )
1759 nNewScale =
static_cast<sal_uInt16
>(nNeeded);
1761 bChange = ( nNewScale != nOldScale || nOldPages != 0 );
1774 for (
SCTAB nTab=0; nTab<nTabCount && nUseTab>
MAXTAB; nTab++)
1775 if (
m_pDocument->GetPageStyle(nTab) == rStyleName &&
1776 ( !bApi ||
m_pDocument->GetPageSize(nTab).Width() ) )
1793 VclMessageType::Info, VclButtonsType::Ok,
1794 ScResId(STR_PRINT_INVALID_AREA)));
1804 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1805 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
1806 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
1818 case SID_STATUS_PAGESTYLE:
1819 case SID_FORMATPAGE:
1821 if ( pReqArgs ==
nullptr )
1823 OUString aOldName =
m_pDocument->GetPageStyle( nCurTab );
1826 = pStylePool->
Find( aOldName, SfxStyleFamily::Page );
1828 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1844 auto pRequest = std::make_shared<SfxRequest>(rReq);
1846 pDlg->StartExecuteAsync([
this, pDlg, pRequest, pStyleSheet, aOldData, aOldName, &rStyleSet, nCurTab, &rCaller, bUndo](sal_Int32 nResult){
1849 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1853 OUString aNewName = pStyleSheet->
GetName();
1854 if ( aNewName != aOldName &&
1855 m_pDocument->RenamePageStyleInUse( aOldName, aNewName ) )
1860 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
1861 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
1866 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
1877 std::make_unique<ScUndoModifyStyle>(
this, SfxStyleFamily::Page,
1878 aOldData, aNewData ) );
1884 pDlg->disposeOnce();
1893 if ( pReqArgs ==
nullptr )
1901 = pStylePool->
Find(
aStr, SfxStyleFamily::Page );
1903 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
1910 bool bShareHeader = rStyleSet
1915 bool bShareFooter = rStyleSet
1920 sal_uInt16 nResId = 0;
1924 case SvxPageUsage::Left:
1925 case SvxPageUsage::Right:
1928 nResId = RID_SCDLG_HFEDIT;
1929 else if ( SvxPageUsage::Right == eUsage )
1932 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1934 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1940 nResId = bShareFooter ?
1941 RID_SCDLG_HFEDIT_RIGHTFOOTER :
1942 RID_SCDLG_HFEDIT_LEFTFOOTER;
1944 nResId = bShareHeader ?
1945 RID_SCDLG_HFEDIT_RIGHTHEADER :
1946 RID_SCDLG_HFEDIT_LEFTHEADER;
1951 case SvxPageUsage::Mirror:
1952 case SvxPageUsage::All:
1955 if ( !bShareHeader && !bShareFooter )
1958 nResId = RID_SCDLG_HFEDIT_ALL;
1960 nResId = RID_SCDLG_HFEDIT_FOOTER;
1962 nResId = RID_SCDLG_HFEDIT_HEADER;
1964 else if ( bShareHeader && bShareFooter )
1967 nResId = RID_SCDLG_HFEDIT;
1971 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1973 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
1976 else if ( !bShareHeader && bShareFooter )
1979 nResId = RID_SCDLG_HFEDIT_SFTR;
1981 nResId = RID_SCDLG_HFEDIT_RIGHTFOOTER;
1983 nResId = RID_SCDLG_HFEDIT_HEADER;
1985 else if ( bShareHeader && !bShareFooter )
1988 nResId = RID_SCDLG_HFEDIT_SHDR;
1990 nResId = RID_SCDLG_HFEDIT_FOOTER;
1992 nResId = RID_SCDLG_HFEDIT_RIGHTHEADER;
2004 auto xRequest = std::make_shared<SfxRequest>(rReq);
2006 pDlg->StartExecuteAsync([
this, pDlg, pStyleSheet, xRequest](sal_Int32 nResult){
2009 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
2012 m_pDocument->ModifyStyleSheet( *pStyleSheet, *pOutSet );
2017 pDlg->disposeOnce();
2038 case SID_STATUS_PAGESTYLE:
2048 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2088 case FID_CHG_RECORD:
2096 case SID_CHG_PROTECT:
2107 case SID_DOCUMENT_COMPARE:
2120 case SID_TABLES_COUNT:
2124 case SID_ATTR_YEAR2000 :
2138 case SID_ATTR_CHAR_FONTLIST:
2142 case SID_NOTEBOOKBAR:
2147 u"modules/scalc/ui/");
2153 case SID_LANGUAGE_STATUS:
2215 if ( eShellMode == SfxObjectCreateMode::ORGANIZER )
2236 aArea.
SetRight( SC_PREVIEW_SIZE_Y );
2241 if ( bNegativePage )
2246 else if( nAspect ==
ASPECT_CONTENT && eShellMode != SfxObjectCreateMode::EMBEDDED )
2258 m_pDocument->GetDataStart( nVisTab, nStartCol, nStartRow );
2261 m_pDocument->GetPrintArea( nVisTab, nEndCol, nEndRow );
2262 if (nStartCol>nEndCol)
2263 nStartCol = nEndCol;
2264 if (nStartRow>nEndRow)
2265 nStartRow = nEndRow;
2267 ->GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab );
2282 while ( nCol<rDoc.
MaxCol() )
2285 if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
2305 bool bFound =
false;
2309 if (rDoc.
RowHidden(i, nTab,
nullptr, &nLastRow))
2317 if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
2343 bool bNegativePage =
m_pDocument->IsNegativePage( nTab );
2344 if ( bNegativePage )
2351 tools::Long nCorrectionLeft = (nOrigLeft == 0 && nCol > 0) ? nSetLeft : 0;
2358 tools::Long nCorrectionTop = (nOrigTop == 0 && nRow > 0) ? nSetTop : 0;
2361 if ( bNegativePage )
2375 SfxStyleFamily::Page );
2377 OSL_ENSURE( pStyleSheet,
"PageStyle not found! :-/" );
2382 rbHeader = rbFooter =
false;
2385 OSL_ENSURE( pStyleSet,
"PageStyle-Set not found! :-(" );
2393 pSet = &pSetItem->GetItemSet();
2397 pSet = &pSetItem->GetItemSet();
2402bool ScDocShell::DdeGetData(
const OUString& rItem,
2403 const OUString& rMimeType,
2404 css::uno::Any & rValue )
2407 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2409 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2412 osl_getThreadTextEncoding()));
2413 rValue <<= css::uno::Sequence< sal_Int8 >(
2414 reinterpret_cast<const sal_Int8*
>(aFmtByte.getStr()),
2415 aFmtByte.getLength() + 1 );
2419 if ( !aObj.IsRef() )
2423 aObj.SetFormulas(
true );
2428 if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(),
2429 SotClipboardFormatId::SYLK ) )
2431 rValue <<= css::uno::Sequence< sal_Int8 >(
2433 aData.getLength() + 1 );
2441 aObj.SetSeparator(
',' );
2443 return aObj.ExportData( rMimeType, rValue );
2448 return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
2451bool ScDocShell::DdeSetData(
const OUString& rItem,
2452 const OUString& rMimeType,
2453 const css::uno::Any & rValue )
2456 if (SotClipboardFormatId::STRING == eFormatId || SotClipboardFormatId::STRING_TSVC == eFormatId)
2458 if( rItem.equalsIgnoreAsciiCase(
"Format" ) )
2469 aObj.SetFormulas(
true );
2476 return aObj.ImportString( aData, SotClipboardFormatId::SYLK );
2482 aObj.SetSeparator(
',' );
2483 OSL_ENSURE(
false,
"Implementation is missing" );
2488 OSL_ENSURE(
false,
"Implementation is missing" );
2498 OUString aPos = rItem;
2508 aPos =
pData->GetSymbol();
2536 boost::property_tree::ptree aAnnotation;
2542 aAnnotation.put(
"id", pNote->
GetId());
2543 aAnnotation.put(
"tab", rPos.
Tab());
2547 aAnnotation.put(
"author", pNote->
GetAuthor());
2548 aAnnotation.put(
"dateTime", pNote->
GetDate());
2549 aAnnotation.put(
"text", pNote->
GetText());
2556 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
2557 OString aRectString;
2571 const double fPPTX = pViewData->
GetPPTX();
2572 const double fPPTY = pViewData->
GetPPTY();
2574 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)).
toString();
2576 aAnnotation.put(
"cellPos", aRectString);
2580 boost::property_tree::ptree aTree;
2581 aTree.add_child(
"comment", aAnnotation);
2583 boost::property_tree::write_json(aStream, aTree);
2584 std::string aPayload = aStream.str();
2591 if (pThisViewShell ==
nullptr || pViewShell->
GetDocId() == pThisViewShell->
GetDocId())
2601 return pViewSh ? &pViewSh->
GetViewData() :
nullptr;
2610 return pViewData ? pViewData->
GetTabNo() :
static_cast<SCTAB>(0);
2647 sal_uInt16 nShellCnt = 0;
2649 while ( pShell && !pFound )
2651 if (
auto pDocSh =
dynamic_cast<ScDocShell*
>(pShell) )
2653 if ( nShellCnt == nDocNo )
2666 OSL_ENSURE( _pFileDlg,
"ScDocShell::DialogClosedHdl(): no file dialog" );
2667 OSL_ENSURE(
m_pImpl->pDocInserter,
"ScDocShell::DialogClosedHdl(): no document inserter" );
2671 sal_uInt16 nSlot =
m_pImpl->pRequest->GetSlot();
2672 std::unique_ptr<SfxMedium> pMed =
m_pImpl->pDocInserter->CreateMedium();
2677 if ( SID_DOCUMENT_COMPARE == nSlot )
2679 if ( pMed->GetFilter() )
2680 m_pImpl->pRequest->AppendItem(
2681 SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetFilterName() ) );
2683 if ( !sOptions.isEmpty() )
2689 if (pSet && pSet->
GetItemState(SID_VERSION,
true, &pItem) == SfxItemState::SET)
2695 m_pImpl->pRequest->AppendItem( *pItem );
2702 m_pImpl->bIgnoreLostRedliningWarning =
false;
2705#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
2717 sal_uInt16
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
2736 m_pDocument->SetChangeViewSettings( aChangeViewSet );
2741 uno::Reference< frame::XModel >
xModel;
2744 SC_MOD()->SetInSharedDocLoading(
true );
2745 uno::Reference< frame::XDesktop2 > xLoader = frame::Desktop::create( ::comphelper::getProcessComponentContext() );
2751 if ( pPasswordItem && !pPasswordItem->
GetValue().isEmpty() )
2754 auto pArgs = aArgs.getArray();
2755 pArgs[1].Name =
"Password";
2756 pArgs[1].Value <<= pPasswordItem->
GetValue();
2759 if (pEncryptionItem)
2761 aArgs.realloc(aArgs.getLength() + 1);
2762 auto pArgs = aArgs.getArray();
2763 pArgs[aArgs.getLength() - 1].Name =
"EncryptionData";
2764 pArgs[aArgs.getLength() - 1].Value = pEncryptionItem->
GetValue();
2770 uno::UNO_QUERY_THROW );
2771 SC_MOD()->SetInSharedDocLoading(
false );
2773 catch ( uno::Exception& )
2775 OSL_FAIL(
"ScDocShell::LoadSharedDocument(): caught exception" );
2776 SC_MOD()->SetInSharedDocLoading(
false );
2779 uno::Reference< util::XCloseable > xClose( xModel, uno::UNO_QUERY_THROW );
2780 xClose->close(
true );
2781 return uno::Reference< frame::XModel >();
2783 catch ( uno::Exception& )
2785 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)
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_uInt16 nEncoding)
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)
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
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 * FindCaseIns(const OUString &rName, SfxStyleFamily eFam)
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
OUString GetPassword() const
virtual short run() override
void SetEditHelpId(const OString &rId)
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
ViewShellDocId GetDocId() const override
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)
SfxViewFrame * GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static SotClipboardFormatId GetFormatIdFromMimeType(const OUString &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)
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)
virtual LockFileEntry GetLockData() override
void initializeFrom(const css::uno::Sequence< css::beans::PropertyValue > &_rValues)
#define TOOLS_WARN_EXCEPTION(area, stream)
IMPL_LINK(ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void)
void UpdateAcceptChangesDialog()
IMPL_LINK_NOARG(ScDocShell, ReloadAllLinksHdl, weld::Button &, 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)
#define HID_UPDATE_LINK_WARNING
constexpr OStringLiteral HID_CHG_PROTECT
#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)