27 #include <stlpool.hxx>
32 #include <globstr.hrc>
35 #include <compiler.hxx>
82 if ( ( bNegativePage ? (aArea.
Right() > 0) : (aArea.
Left() < 0) ) || aArea.
Top() < 0 )
172 bool bNegativePage =
m_pDocument->IsNegativePage( nTab );
188 if (aNewArea != aOldArea)
212 const SfxItemSet& rSrcSet = pItem->GetItemSet();
214 aDestSet.
Put(rSrcSet);
219 const SfxItemSet& rSrcSet = pItem->GetItemSet();
221 aDestSet.
Put(rSrcSet);
225 pStyle = pStylePool->
Next();
249 if ( !bCellStyles && !bPageStyles )
256 ( bPageStyles ? SfxStyleFamily::All : SfxStyleFamily::Para ) :
257 SfxStyleFamily::Page;
259 sal_uInt16 nSourceCount = aIter.Count();
260 if ( nSourceCount == 0 )
263 std::unique_ptr<ScStylePair[]> pStyles(
new ScStylePair[ nSourceCount ]);
264 sal_uInt16 nFound = 0;
278 pStyles[nFound].pSource = pSourceStyle;
279 pStyles[nFound].pDest = pDestStyle;
285 pStyles[nFound].pSource = pSourceStyle;
286 pStyles[nFound].pDest = &pDestPool->
Make( aName, pSourceStyle->
GetFamily(), pSourceStyle->
GetMask() );
290 pSourceStyle = aIter.Next();
295 for ( sal_uInt16
i = 0;
i < nFound; ++
i )
298 pStyles[
i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT);
299 if(pStyles[
i].pSource->HasParentSupport())
300 pStyles[
i].pDest->SetParent(pStyles[
i].pSource->GetParent());
320 typedef std::unordered_set<OUString> StrSetType;
328 for (
size_t k=nCount; k>0; )
332 if (
ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
334 if (pTabLink->IsUsed())
335 aNames.insert(pTabLink->GetFileName());
338 pTabLink->SetAddUndo(
true);
347 for (
SCTAB i = 0;
i < nTabCount; ++
i)
357 for (
SCTAB j = 0; j <
i && !bThere; ++j)
371 if (!aNames.insert(aDocName).second)
392 for (
size_t i=0;
i<nCount;
i++ )
395 if (
ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
435 static bool bInitOnce =
true;
437 if (!bForLoading || bInitOnce)
439 bool bForceInit = bInitOnce;
487 if (aDecSep == aSepArg || aDecSep == aSepArrRow || aDecSep == aSepArrCol ||
488 aDecSepAlt == aSepArg || aDecSepAlt == aSepArrRow || aDecSepAlt == aSepArrCol)
502 VclMessageType::Info, VclButtonsType::Ok,
503 ScResId(STR_OPTIONS_WARN_SEPARATORS)));
void UpdateLinks() override
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual void SetVisArea(const tools::Rectangle &rVisArea)
ScDocShell * GetDocShell() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
OUString ScResId(TranslateId aId)
virtual void ReconnectDdeLink(SfxObjectShell &rServer) override
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
void InsertFileLink(sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, std::u16string_view rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
const WhichRangesContainer & GetRanges() const
void SetDocumentModified()
virtual SfxItemSet & GetItemSet()
SfxStyleFamily GetFamily() const
void SetVisAreaOrSize(const tools::Rectangle &rVisArea)
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
SfxStyleSearchBits GetMask() const
void UpdateAllRowHeights(const ScMarkData *pTabMark=nullptr)
void SetFormulaOptions(const ScFormulaOptions &rOpt, bool bForLoading=false)
constexpr tools::Long Width() const
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
const OUString & GetName() const
bool IsConfigOptionsChecked() const
SfxObjectCreateMode GetCreateMode() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
ScViewData & GetViewData()
static void SetGlobalConfig(const ScCalcConfig &rConfig)
const OUString & getNumDecimalSep() const
static void lcl_AdjustPool(SfxStyleSheetBasePool *pStylePool)
const SvBaseLinks & GetLinks() const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
void Remove(SvBaseLink const *pLink)
SC_DLLPUBLIC const ScFormulaOptions & GetFormulaOptions()
void ReconnectDdeLink(SfxObjectShell &rServer)
virtual void LoadStyles(SfxObjectShell &rSource) override
void PutExtended(const SfxItemSet &, SfxItemState eDontCareAs, SfxItemState eDefaultAs)
std::shared_ptr< ScDocument > m_pDocument
const tools::Rectangle & GetVisArea() const
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
SfxItemPool * GetPool() const
virtual void LoadStyles(SfxObjectShell &rSource)
const OUString & getNumDecimalSepAlt() const
SC_DLLPUBLIC void SetFormulaOptions(const ScFormulaOptions &rOpt)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
static ScTabViewShell * GetActiveViewShell()
weld::Window * GetFrameWeld() const
constexpr tools::Long Height() const
void SetConfigOptionsChecked(bool bChecked)
SfxStyleSheetBase * Next()
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
void SetInCreate(bool bSet)
const ScDocument & GetDocument() const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
void CheckConfigOptions()
Called when the Options dialog is dismissed with the OK button, to handle potentially conflicting opt...
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
virtual void SetVisArea(const tools::Rectangle &rVisArea) override
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
void SnapVisArea(tools::Rectangle &rRect) const
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
static void lcl_SetTopRight(tools::Rectangle &rRect, const Point &rPos)
static void ResetFunctionList()
void LoadStylesArgs(ScDocShell &rSource, bool bReplace, bool bCellStyles, bool bPageStyles)