diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/strings.hrc | 4 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 3ff7cac89795..e8a6fe8683e1 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -469,4 +469,8 @@ #define STR_INSERT_TABLESTYLE NC_("STR_INSERT_TABLESTYLE", "Add a new design") #define STR_REMOVE_TABLESTYLE NC_("STR_REMOVE_TABLESTYLE", "The selected style is in use in this document.\nIf you will delete this style, tables using it will revert to the default style.\nDo you still wish to delete this style?\n") +// To translators: %n is replaced by a large number, 100 at the time of introduction +#define STR_MANY_MASTER_PAGES NC_("STR_MANY_MASTER_PAGES", "%n Master Slides") +#define STR_MANY_MASTER_PAGES_DETAIL NC_("STR_MANY_MASTER_PAGES_DETAIL", "Large amounts of Master Slides degrade loading performance") + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 8980bc2a0148..c71706e3caab 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -38,6 +38,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/dispatch.hxx> +#include <sfx2/infobar.hxx> #include <svx/svdotext.hxx> #include <sfx2/printer.hxx> #include <svtools/ctrltool.hxx> @@ -296,8 +297,10 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) if( bRet ) { + SdDrawDocument* pDoc = GetDoc(); + // for legacy markup in OOoXML filter, convert the animations now - EffectMigration::DocumentLoaded(*GetDoc()); + EffectMigration::DocumentLoaded(*pDoc); UpdateTablePointers(); // If we're an embedded OLE object, use tight bounds @@ -317,6 +320,15 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) const INetURLObject aUrl; SfxObjectShell::SetAutoLoad( aUrl, 0, false ); + + const sal_uInt16 nMasterPages = pDoc->GetMasterSdPageCount(PageKind::Standard); + if (nMasterPages > 100) + { + const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); + OUString sMasterPages = rLocaleData.getNum(nMasterPages, 0, true, false); + AppendInfoBarWhenReady(u"toomanymasterpages"_ustr, SdResId(STR_MANY_MASTER_PAGES).replaceFirst("%n", sMasterPages), + SdResId(STR_MANY_MASTER_PAGES_DETAIL), InfobarType::INFO); + } } else { |