sd/source/ui/app/sdmod1.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 1946c8d4858f1d288596c506b58dabea1578fc7b
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Sun Mar 10 16:18:22 2024 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Sun Mar 10 16:20:16 2024 +0100

    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

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);
                 }
             }
         }

Reply via email to