summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <thorsten.behrens@allotropia.de>2024-03-10 16:18:22 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-03-10 16:25:50 +0100
commitaa47ccad36c249678f543ec662bc7f28fd3aa2e0 (patch)
tree6511241ea09b82785e58d0caeeebe54f8232213c
parent8d5440ff250cc5c9f071f312f5d6d48c91cdb068 (diff)
related tdf#33603: switch-on notes panel in default config
This is a bit of a hack, since currently SID_NOTES_WINDOW is a plain bool item, with no hooking-up into the Impress framework. So lets toggle initial state (which gets saved into /org.openoffice.Office.Views/Windows/simpress/27417 after first run) into 'visible'. Change-Id: I672b537ef78474cc9514503f9a613d12ebe92436
-rw-r--r--sd/source/ui/app/sdmod1.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 197977498189..0794a2e8f760 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -35,10 +35,12 @@
#include <sfx2/templatedlg.hxx>
#include <svl/stritem.hxx>
#include <editeng/eeitem.hxx>
+#include <unotools/viewoptions.hxx>
#include <svx/svxids.hrc>
#include <strings.hrc>
+#include <app.hrc>
#include <sdmod.hxx>
#include <pres.hxx>
#include <optsitem.hxx>
@@ -506,6 +508,13 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq )
// tdf#127946 pass in argument for dialog parent
SfxUnoFrameItem aDocFrame(SID_FILLFRAME, pFrame->GetFrameInterface());
pDispatcher->ExecuteList(SID_TIPOFTHEDAY, SfxCallMode::SLOT, {}, { &aDocFrame });
+
+ // hack: toggle notes area default-on if no config found
+ SvtViewOptions aNotesAreaWinOpt(
+ EViewType::Window, "simpress/" + OUString::number(SID_NOTES_WINDOW));
+ css::uno::Sequence < css::beans::NamedValue > aSeq = aNotesAreaWinOpt.GetUserData();
+ if ( !aSeq.hasElements() )
+ pDispatcher->Execute(SID_NOTES_WINDOW, SfxCallMode::ASYNCHRON);
}
}
}