core.git: sd/source

2024-05-24 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx |   30 
--
 1 file changed, 26 insertions(+), 4 deletions(-)

New commits:
commit a50b13f357ffa403542a09de0552c048d6374011
Author: Sarper Akdemir 
AuthorDate: Fri May 24 15:11:24 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Fri May 24 18:03:28 2024 +0200

related tdf#33603: update current page on SlideSorter view

Make SlideSorterView update the current page properly when it is the
MainViewShell.

Also fixes Notes Pane not properly updating on SlideSorter
view mode.

Change-Id: If4fed4e84951cb4a1707874b288ac46e6d5c26da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168022
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index e8fc847a4a7b..684cb2da5f7e 100644
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -28,6 +28,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -166,7 +168,29 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase 
(const SharedPageDescri
 OSL_ASSERT(rpDescriptor);
 
 ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
-if (pBase != nullptr)
+if(!pBase)
+return;
+
+if (mrSlideSorter.GetViewShell() && 
mrSlideSorter.GetViewShell()->IsMainViewShell())
+{
+SdDrawDocument* pDoc = pBase->GetDocument();
+if (!pDoc)
+return;
+
+// deselect all pages
+for (sal_uInt16 i = 0; i < pDoc->GetSdPageCount(PageKind::Standard); 
i++)
+pDoc->SetSelected(pDoc->GetSdPage(i, PageKind::Standard), false);
+
+// select the given page
+pDoc->SetSelected(rpDescriptor->GetPage(), true);
+DrawController* pDrawController = pBase->GetDrawController();
+if (!pDrawController)
+return;
+
+pDrawController->FireSelectionChangeListener();
+pDrawController->FireSwitchCurrentPage(rpDescriptor->GetPage());
+}
+else
 {
 DrawViewShell* pDrawViewShell = dynamic_cast(
 pBase->GetMainViewShell().get());
@@ -245,9 +269,7 @@ IMPL_LINK_NOARG(CurrentSlideManager, SwitchPageCallback, 
Timer *, void)
 // it does not work always correctly (after some kinds of model
 // changes).  Therefore, we call DrawViewShell::SwitchPage(),
 // too.
-ViewShell* pViewShell = mrSlideSorter.GetViewShell();
-if (pViewShell==nullptr || ! pViewShell->IsMainViewShell())
-SetCurrentSlideAtViewShellBase(mpCurrentSlide);
+SetCurrentSlideAtViewShellBase(mpCurrentSlide);
 SetCurrentSlideAtXController(mpCurrentSlide);
 }
 }


core.git: sd/source

2024-05-24 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/func/fuoltext.cxx |   25 +
 1 file changed, 1 insertion(+), 24 deletions(-)

New commits:
commit 8fc4eb1149e58ed5bcc4bb2b57807cdc92d93785
Author: Sarper Akdemir 
AuthorDate: Fri May 24 12:06:08 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Fri May 24 15:18:29 2024 +0200

related tdf#33603: sd: outlineview: update current page on moving cursor

The "early rejection test" removed here is a historical
artifact when UpdateForKeyPress was created.

in the current state it checked if
pOutlineViewShell->GetActualPage() was different from
itself.

In the OutlineViewShell::UpdatePreview, there's an
additional check if we have actually moved to a new page, so
we can just safely remove this.

Also fixes Notes Pane not properly updating on Outline View Mode

Change-Id: Ic9de2e7302e76260809f90360533f0bfe6e05d2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168017
Reviewed-by: Sarper Akdemir 
Tested-by: Jenkins

diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index 0068f77d4053..6cebc1c55cb4 100644
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -85,30 +85,7 @@ const sal_uInt16 SidArray[] = {
 void FuOutlineText::UpdateForKeyPress (const KeyEvent& rEvent)
 {
 FuSimpleOutlinerText::UpdateForKeyPress(rEvent);
-
-bool bUpdatePreview = true;
-switch (rEvent.GetKeyCode().GetCode())
-{
-// When just the cursor has been moved the preview only changes when
-// it moved to entries of another page.  To prevent unnecessary
-// updates we check this here.  This is an early rejection test, so
-// missing a key is not a problem.
-case KEY_UP:
-case KEY_DOWN:
-case KEY_LEFT:
-case KEY_RIGHT:
-case KEY_HOME:
-case KEY_END:
-case KEY_PAGEUP:
-case KEY_PAGEDOWN:
-{
-SdPage* pCurrentPage = pOutlineViewShell->GetActualPage();
-bUpdatePreview = (pCurrentPage != 
pOutlineViewShell->GetActualPage());
-}
-break;
-}
-if (bUpdatePreview)
-pOutlineViewShell->UpdatePreview (pOutlineViewShell->GetActualPage());
+pOutlineViewShell->UpdatePreview(pOutlineViewShell->GetActualPage());
 }
 
 /**


core.git: sd/source

2024-05-24 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/view/NotesPanelViewShell.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit dc208a0de04b29a53fe8384043f1fc925761a912
Author: Sarper Akdemir 
AuthorDate: Fri May 24 10:41:08 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Fri May 24 15:18:11 2024 +0200

tdf#33603: sd: notes pane: properly handle movement keys

Makes it so that notes pane handles some previously
incorrectly handled keys itself. e.g. PageUp & PageDown

Change-Id: I19f73fa2782900a752889544dcc79fc180ee52d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168008
Reviewed-by: Sarper Akdemir 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/NotesPanelViewShell.cxx 
b/sd/source/ui/view/NotesPanelViewShell.cxx
index 6bccc766b7cb..a34660280459 100644
--- a/sd/source/ui/view/NotesPanelViewShell.cxx
+++ b/sd/source/ui/view/NotesPanelViewShell.cxx
@@ -1417,7 +1417,7 @@ bool NotesPanelViewShell::KeyInput(const KeyEvent& rKEvt, 
::sd::Window* pWin)
 {
 bool bReturn = false;
 
-if (pWin == nullptr && HasCurrentFunction())
+if (HasCurrentFunction())
 {
 bReturn = GetCurrentFunction()->KeyInput(rKEvt);
 }
@@ -1436,7 +1436,6 @@ bool NotesPanelViewShell::KeyInput(const KeyEvent& rKEvt, 
::sd::Window* pWin)
 Invalidate(SID_STYLE_WATERCAN);
 Invalidate(SID_STYLE_FAMILY5);
 
-vcl::KeyCode aKeyGroup(rKEvt.GetKeyCode().GetGroup());
 return bReturn;
 }
 


core.git: sd/source

2024-05-22 Thread Justin Luth (via logerrit)
 sd/source/ui/view/ToolBarManager.cxx |   71 ---
 1 file changed, 34 insertions(+), 37 deletions(-)

New commits:
commit cdbd4139790383052f004def482f32fdec604fbb
Author: Justin Luth 
AuthorDate: Wed May 22 17:50:55 2024 -0400
Commit: Justin Luth 
CommitDate: Thu May 23 02:26:26 2024 +0200

Revert "tdf#126095 sd notebookbar: don't force table/media toolbar"

This reverts my 24.2 commit e58e251756ecb0312cb6891d4df23e17ef8f6fcb.

Unintended side affect in Draw (not Writer) sidebar.

Change-Id: I948263c1e8be1202e0504f109d84ce4469ddf45d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167970
Reviewed-by: Justin Luth 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/ToolBarManager.cxx 
b/sd/source/ui/view/ToolBarManager.cxx
index 5296b7bd94ef..afb5c135e1d6 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1045,49 +1045,46 @@ void ToolBarRules::SelectionHasChanged (
 
 mpToolBarManager->ResetToolBars(ToolBarManager::ToolBarGroup::Function);
 
-if (!sfx2::SfxNotebookBar::IsActive())
+switch (rView.GetContext())
 {
-switch (rView.GetContext())
-{
-case SdrViewContext::Graphic:
-if (!bTextEdit)
-
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
-  
ToolbarId::Draw_Graf_Toolbox);
-break;
-
-case SdrViewContext::Media:
-if (!bTextEdit)
-
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
-  
ToolbarId::Draw_Media_Toolbox);
-break;
+case SdrViewContext::Graphic:
+if (!bTextEdit)
+
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
+  
ToolbarId::Draw_Graf_Toolbox);
+break;
 
-case SdrViewContext::Table:
+case SdrViewContext::Media:
+if (!bTextEdit)
 
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
-  
ToolbarId::Draw_Table_Toolbox);
-bTextEdit = true;
-break;
+  
ToolbarId::Draw_Media_Toolbox);
+break;
 
-case SdrViewContext::Standard:
-default:
-if (!bTextEdit)
+case SdrViewContext::Table:
+
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
+  ToolbarId::Draw_Table_Toolbox);
+bTextEdit = true;
+break;
+
+case SdrViewContext::Standard:
+default:
+if (!bTextEdit)
+{
+switch(rViewShell.GetShellType())
 {
-switch(rViewShell.GetShellType())
-{
-case ::sd::ViewShell::ST_IMPRESS:
-case ::sd::ViewShell::ST_DRAW:
-case ::sd::ViewShell::ST_NOTES:
-case ::sd::ViewShell::ST_HANDOUT:
-
mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Function,
- 
ToolBarManager::msDrawingObjectToolBar);
-
mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Permanent,
- 
ToolBarManager::msToolBar);
-break;
-default:
-break;
-}
-break;
+case ::sd::ViewShell::ST_IMPRESS:
+case ::sd::ViewShell::ST_DRAW:
+case ::sd::ViewShell::ST_NOTES:
+case ::sd::ViewShell::ST_HANDOUT:
+
mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Function,
+ 
ToolBarManager::msDrawingObjectToolBar);
+
mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Permanent,
+ 
ToolBarManager::msToolBar);
+break;
+default:
+break;
 }
-}
+break;
+}
 }
 
 if( bTextEdit )


core.git: sd/source

2024-05-21 Thread Hubert Figuière (via logerrit)
 sd/source/ui/view/drviews5.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 09f23b8c6cd369b5d0594119f3df62941346a610
Author: Hubert Figuière 
AuthorDate: Mon May 20 11:15:35 2024 -0400
Commit: Caolán McNamara 
CommitDate: Tue May 21 11:59:02 2024 +0200

cool#9019: draw/impress: disable the Grid for now

So that the grid isn't shown in the thumbnail.
This will need to be reverted later for cool#7406

Change-Id: I01fbc7ebc9e33a27fb866b7ea6dbaaac68ae8f9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167872
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 41130a39ad68310a0136605cbced1f191396c456)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167826
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 8583ecc182c7..fa744fe49bcd 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -315,7 +315,15 @@ void DrawViewShell::WriteFrameViewData()
 mpFrameView->SetGridCoarse( mpDrawView->GetGridCoarse() );
 mpFrameView->SetGridFine( mpDrawView->GetGridFine() );
 mpFrameView->SetSnapGridWidth(mpDrawView->GetSnapGridWidthX(), 
mpDrawView->GetSnapGridWidthY());
-mpFrameView->SetGridVisible( mpDrawView->IsGridVisible() );
+
+// In LOK, Grid isn't implemented, and it appears in the slide thumbnails
+// Remove this when Grid is implemented and/or thumbnails are fixed to no 
longer
+// show the grid.
+if (comphelper::LibreOfficeKit::isActive())
+mpFrameView->SetGridVisible( false );
+else
+mpFrameView->SetGridVisible( mpDrawView->IsGridVisible() );
+
 mpFrameView->SetGridFront( mpDrawView->IsGridFront() );
 mpFrameView->SetSnapAngle( mpDrawView->GetSnapAngle() );
 mpFrameView->SetGridSnap( mpDrawView->IsGridSnap() );


core.git: sd/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/drviewsk.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5e23cac5767c164b93491d46deef039409ea286c
Author: Caolán McNamara 
AuthorDate: Fri May 17 22:00:07 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:00:20 2024 +0200

Resolves: tdf#161057 draw/impress auto font color not updated on theme 
change

Change-Id: Id3d02c38e3bbda34f65f5623fff1a5f39238e46a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167803
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx
index 92a00d5d2ded..bdbb821e96b3 100644
--- a/sd/source/ui/view/drviewsk.cxx
+++ b/sd/source/ui/view/drviewsk.cxx
@@ -23,7 +23,9 @@ void DrawViewShell::ConfigurationChanged( 
utl::ConfigurationBroadcaster* pCb, Co
 {
 svtools::ColorConfig *pColorConfig = 
dynamic_cast(pCb);
 ConfigureAppBackgroundColor(pColorConfig);
-if (comphelper::LibreOfficeKit::isActive())
+if (!comphelper::LibreOfficeKit::isActive())
+maViewOptions.mnDocBackgroundColor = 
pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor;
+else
 {
 SfxViewShell* pCurrentShell = SfxViewShell::Current();
 ViewShellBase* pShellBase = 
dynamic_cast(pCurrentShell);


core.git: sd/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sd/source/ui/framework/module/NotesPaneModule.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64557ef9fa57507455f196dd3c96e8a25be64c53
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:36:45 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 21:23:41 2024 +0200

cid#1598235 Uninitialized pointer field

Change-Id: I8c403a0bcfa56e58fdf12cb045c98b2087889235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167794
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sd/source/ui/framework/module/NotesPaneModule.hxx 
b/sd/source/ui/framework/module/NotesPaneModule.hxx
index 69a74acbdf0c..229b61e71a89 100644
--- a/sd/source/ui/framework/module/NotesPaneModule.hxx
+++ b/sd/source/ui/framework/module/NotesPaneModule.hxx
@@ -73,7 +73,7 @@ private:
 
 std::set maActiveMainViewContainer;
 OUString msCurrentMainViewURL;
-ViewShellBase* mpViewShellBase;
+ViewShellBase* mpViewShellBase = nullptr;
 bool mbListeningEventMultiplexer = false;
 bool mbInMasterEditMode = false;
 


core.git: sd/source

2024-05-17 Thread Caolán McNamara (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1b0686234cc72f562ec5ec695c4594894838a46e
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:41:32 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 17 20:42:29 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I92ff04181d3c4ec4f0e1cd9f63ce5a1dc869ffc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167797
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index fdd199f6a7d5..823baef412c8 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -416,7 +416,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
 
 // determine PoolUnit
 SfxItemPool* pPool = rInAttrs.GetPool();
-DBG_ASSERT( pPool, "Where is the Pool?" );
+assert(pPool &&  "Where is the Pool?");
 ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
 
 // Fill the CB


core.git: sd/source

2024-05-17 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |   49 +++---
 sd/source/ui/view/frmview.cxx |3 +-
 2 files changed, 25 insertions(+), 27 deletions(-)

New commits:
commit 5e88d86d8c41b6790a365fddadbcea76712c11f3
Author: Gabor Kelemen 
AuthorDate: Sun May 12 09:15:18 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri May 17 16:33:45 2024 +0200

Use less SdOptionsSnapItem->Get/SetEliminatePolyPointLimitAngle

in favor of officecfg

Change-Id: I8a8d910578a438b494567eed30a632db6f191101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167541
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index f25649536060..fdd199f6a7d5 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -57,7 +57,6 @@ SdTpOptionsSnap::~SdTpOptionsSnap()
 bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 {
 SvxGridTabPage::FillItemSet(rAttrs);
-SdOptionsSnapItem aOptsItem;
 bool bDrawMode = SvxGridTabPage::IsDrawMode();
 
 std::shared_ptr batch(
@@ -74,6 +73,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Draw::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::Range::set( 
static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)), batch );
 officecfg::Office::Draw::Snap::Position::RotatingValue::set( 
static_cast(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE))),
 batch );
+officecfg::Office::Draw::Snap::Position::PointReduction::set ( 
static_cast(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE))),
 batch );
 }
 else
 {
@@ -86,11 +86,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Impress::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::Range::set( 
static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)), batch );
 officecfg::Office::Impress::Snap::Position::RotatingValue::set( 
static_cast(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE))),
 batch );
+officecfg::Office::Impress::Snap::Position::PointReduction::set ( 
static_cast(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE))),
 batch );
 }
 
-
aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE)));
-
-rAttrs->Put( aOptsItem );
 batch->commit();
 
 // we get a possible existing GridItem, this ensures that we do not set
@@ -102,8 +100,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 {
 SvxGridTabPage::Reset(rAttrs);
 
-SdOptionsSnapItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_SNAP ) );
-
 bool bDrawMode = SvxGridTabPage::IsDrawMode();
 if (bDrawMode)
 {
@@ -116,6 +112,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxRotate->set_active( 
officecfg::Office::Draw::Snap::Position::Rotating::get() );
 m_xMtrFldSnapArea->set_value( 
officecfg::Office::Draw::Snap::Object::Range::get(), FieldUnit::PIXEL);
 m_xMtrFldAngle->set_value( 
officecfg::Office::Draw::Snap::Position::RotatingValue::get(), 
FieldUnit::DEGREE);
+m_xMtrFldBezAngle->set_value( 
officecfg::Office::Draw::Snap::Position::PointReduction::get(), 
FieldUnit::DEGREE);
 }
 else
 {
@@ -128,6 +125,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxRotate->set_active( 
officecfg::Office::Impress::Snap::Position::Rotating::get() );
 m_xMtrFldSnapArea->set_value( 
officecfg::Office::Impress::Snap::Object::Range::get(), FieldUnit::PIXEL);
 m_xMtrFldAngle->set_value( 
officecfg::Office::Impress::Snap::Position::RotatingValue::get(), 
FieldUnit::DEGREE);
+m_xMtrFldBezAngle->set_value( 
officecfg::Office::Impress::Snap::Position::PointReduction::get(), 
FieldUnit::DEGREE);
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -176,7 +174,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::PointReduction::isReadOnly() :
 
officecfg::Office::Impress::Snap::Position::PointReduction::isReadOnly();
-
m_xMtrFldBezAngle->set_value(aOptsItem.GetOptionsSnap().GetEliminatePolyPointLimitAngle().get(),
 FieldUnit::DEGREE);
 m_xMtrFldBezAngle->set_sensitive(!bReadOnly);
 m_xMtrFldBezAngleImg->set_visible(bReadOnly);
 
@@ -248,20 +245,20 @@ bool SdTpOptionsContents::FillItemSet( SfxItemSet* )
 
 if (m_bDrawMode)
 {
-officecfg::Office::Draw::Layout::Display::Ruler::set( 
m_xCbxRuler->get_active(), batch );
-officecfg::Office::Draw::Layout::Display::Contour::set( 
m_xCbxMoveOutline->get_active(), batch );
-

core.git: sd/source

2024-05-17 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit fa16f9e19ea9ff29086e1759a8e66ccabf553ac0
Author: Gabor Kelemen 
AuthorDate: Fri May 17 13:07:37 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri May 17 16:05:40 2024 +0200

Add missing officecfg call

accidentally omitted from f1c91993e54858f9bc7ed78d25485a09157c04be

Change-Id: I19a95e4e767792543bf04bbd8ca572017eee8992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167772
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 73542633a8af..f25649536060 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -114,6 +114,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
 m_xCbxRotate->set_active( 
officecfg::Office::Draw::Snap::Position::Rotating::get() );
+m_xMtrFldSnapArea->set_value( 
officecfg::Office::Draw::Snap::Object::Range::get(), FieldUnit::PIXEL);
 m_xMtrFldAngle->set_value( 
officecfg::Office::Draw::Snap::Position::RotatingValue::get(), 
FieldUnit::DEGREE);
 }
 else


core.git: sd/source

2024-05-17 Thread Noel Grandin (via logerrit)
 sd/source/filter/eppt/eppt.cxx|   76 ++---
 sd/source/filter/eppt/epptso.cxx  |   88 
 sd/source/filter/eppt/pptexanimations.cxx |2 
 sd/source/filter/eppt/pptexsoundcollection.cxx|2 
 sd/source/filter/eppt/pptx-animations-nodectx.cxx |4 
 sd/source/filter/eppt/pptx-animations.cxx |7 -
 sd/source/filter/eppt/pptx-epptbase.cxx   |   34 +++---
 sd/source/filter/eppt/pptx-epptooxml.cxx  |  120 +++---
 sd/source/filter/eppt/pptx-stylesheet.cxx |6 -
 sd/source/filter/eppt/pptx-text.cxx   |   80 +++---
 sd/source/filter/html/htmlex.cxx  |4 
 sd/source/filter/ppt/pptin.cxx|   16 +-
 sd/source/filter/sdpptwrp.cxx |   18 +--
 sd/source/filter/xml/sdxmlwrp.cxx |  104 +--
 14 files changed, 281 insertions(+), 280 deletions(-)

New commits:
commit f2c46e9630567848e5aac3e88d98c4bfa1a4750f
Author: Noel Grandin 
AuthorDate: Fri May 17 08:50:28 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 17 12:14:54 2024 +0200

loplugin:ostr in sd/../filter

Change-Id: I0a48a71fd1386fd5baf091e041bfa82255144779
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167760
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index e6a71eb3f56c..32af30aecd97 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -99,21 +99,21 @@ void PPTWriter::exportPPTPre( const std::vector< 
css::beans::PropertyValue >& rM
 {
 mbStatusIndicator = true;
 mnStatMaxValue = ( mnPages + mnMasterPages ) * 5;
-mXStatusIndicator->start( "PowerPoint Export", mnStatMaxValue + ( 
mnStatMaxValue >> 3 ) );
+mXStatusIndicator->start( u"PowerPoint Export"_ustr, mnStatMaxValue + 
( mnStatMaxValue >> 3 ) );
 }
 
 SvGlobalName aGName(MSO_PPT8_CLASSID);
-mrStg->SetClass( aGName, SotClipboardFormatId::NONE, "MS PowerPoint 97" );
+mrStg->SetClass( aGName, SotClipboardFormatId::NONE, u"MS PowerPoint 
97"_ustr );
 
 if ( !ImplCreateCurrentUserStream() )
 return;
 
-mpStrm = mrStg->OpenSotStream( "PowerPoint Document" );
+mpStrm = mrStg->OpenSotStream( u"PowerPoint Document"_ustr );
 if ( !mpStrm )
 return;
 
 if ( !mpPicStrm )
-mpPicStrm = mrStg->OpenSotStream( "Pictures" );
+mpPicStrm = mrStg->OpenSotStream( u"Pictures"_ustr );
 
 auto aIter = std::find_if(rMediaData.begin(), rMediaData.end(),
 [](const css::beans::PropertyValue& rProp) { return rProp.Name == 
"BaseURI"; });
@@ -129,7 +129,7 @@ void PPTWriter::exportPPTPost( )
 
 if ( mbStatusIndicator )
 {
-mXStatusIndicator->setText( "PowerPoint Export" );
+mXStatusIndicator->setText( u"PowerPoint Export"_ustr );
 sal_uInt32 nValue = mnStatMaxValue + ( mnStatMaxValue >> 3 );
 if ( nValue > mnLatestStatValue )
 {
@@ -171,9 +171,9 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 bool bVisible = true;
 css::presentation::FadeEffect eFe = css::presentation::FadeEffect_NONE;
 
-if ( GetPropertyValue( aAny, mXPagePropSet, "Visible" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Visible"_ustr ) )
 aAny >>= bVisible;
-if ( GetPropertyValue( aAny, mXPagePropSet, "Change" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Change"_ustr ) )
 {
 switch ( *o3tl::doAccess(aAny) )
 {
@@ -188,7 +188,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 break;
 }
 }
-if ( GetPropertyValue( aAny, mXPagePropSet, "Effect" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Effect"_ustr ) )
 aAny >>= eFe;
 
 sal_uInt32  nSoundRef = 0;
@@ -196,7 +196,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 boolbStopSound = false;
 boolbLoopSound = false;
 
-if ( GetPropertyValue( aAny, mXPagePropSet, "Sound" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Sound"_ustr ) )
 {
 OUString aSoundURL;
 if ( aAny >>= aSoundURL )
@@ -207,7 +207,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 else
 aAny >>= bStopSound;
 }
-if ( GetPropertyValue( aAny, mXPagePropSet, "LoopSound" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"LoopSound"_ustr ) )
 aAny >>= bLoopSound;
 
 bool bNeedsSSSlideInfoAtom = !bVisible
@@ -223,7 +223,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 sal_Int32   nSlideTime = 0; // still has to !!!
 sal_uInt8   nSpeed = 1;
 
-if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionDuration" ) )

core.git: sd/source

2024-05-16 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |7 ---
 sd/source/ui/view/frmview.cxx |3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 56f4272f407fed0e013ef694276e640955add154
Author: Gabor Kelemen 
AuthorDate: Sat May 11 22:38:12 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Thu May 16 21:49:36 2024 +0200

Use less SdOptionsSnapItem->GetAngle/SetAngle

in favor of officecfg

Change-Id: I3196fb36a1513fed983998a33acce05e03a20cbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167540
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index d66536348a8f..73542633a8af 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -73,6 +73,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Draw::Snap::Position::ExtendEdges::set( 
m_xCbxBigOrtho->get_active(), batch );
 officecfg::Office::Draw::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::Range::set( 
static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)), batch );
+officecfg::Office::Draw::Snap::Position::RotatingValue::set( 
static_cast(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE))),
 batch );
 }
 else
 {
@@ -84,9 +85,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Impress::Snap::Position::ExtendEdges::set( 
m_xCbxBigOrtho->get_active(), batch );
 officecfg::Office::Impress::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::Range::set( 
static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)), batch );
+officecfg::Office::Impress::Snap::Position::RotatingValue::set( 
static_cast(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE))),
 batch );
 }
 
-
aOptsItem.GetOptionsSnap().SetAngle(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)));
 
aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE)));
 
 rAttrs->Put( aOptsItem );
@@ -113,7 +114,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
 m_xCbxRotate->set_active( 
officecfg::Office::Draw::Snap::Position::Rotating::get() );
-
+m_xMtrFldAngle->set_value( 
officecfg::Office::Draw::Snap::Position::RotatingValue::get(), 
FieldUnit::DEGREE);
 }
 else
 {
@@ -125,6 +126,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
 m_xCbxRotate->set_active( 
officecfg::Office::Impress::Snap::Position::Rotating::get() );
 m_xMtrFldSnapArea->set_value( 
officecfg::Office::Impress::Snap::Object::Range::get(), FieldUnit::PIXEL);
+m_xMtrFldAngle->set_value( 
officecfg::Office::Impress::Snap::Position::RotatingValue::get(), 
FieldUnit::DEGREE);
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -169,7 +171,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::RotatingValue::isReadOnly() :
 
officecfg::Office::Impress::Snap::Position::RotatingValue::isReadOnly();
-m_xMtrFldAngle->set_value(aOptsItem.GetOptionsSnap().GetAngle().get(), 
FieldUnit::DEGREE);
 m_xMtrFldAngle->set_sensitive(!bReadOnly);
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::PointReduction::isReadOnly() :
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 1a543d0afc06..f6ef9c350428 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -298,6 +298,7 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOPntSnap( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
 SetOrtho( 
officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
+SetSnapAngle( 
Degree100(officecfg::Office::Impress::Snap::Position::RotatingValue::get()) );
 SetSnapMagneticPixel( 
officecfg::Office::Impress::Snap::Object::Range::get() );
 }
 else
@@ -314,11 +315,11 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOPntSnap( officecfg::Office::Draw::Snap::Object::ObjectPoint::get() 
);
 SetOrtho( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
+SetSnapAngle( 

core.git: sd/source

2024-05-16 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |6 --
 sd/source/ui/view/frmview.cxx |3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit f1c91993e54858f9bc7ed78d25485a09157c04be
Author: Gabor Kelemen 
AuthorDate: Sat May 11 22:31:37 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Thu May 16 19:15:16 2024 +0200

Use less SdOptionsSnapItem->GetSnapArea/SetSnapArea

in favor of officecfg

Change-Id: I0457f565f3f5d68018a307de7afbed9dbd009d42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167539
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index ac35cbeea34f..d66536348a8f 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -72,6 +72,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Draw::Snap::Position::CreatingMoving::set( 
m_xCbxOrtho->get_active(), batch );
 officecfg::Office::Draw::Snap::Position::ExtendEdges::set( 
m_xCbxBigOrtho->get_active(), batch );
 officecfg::Office::Draw::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
+officecfg::Office::Draw::Snap::Object::Range::set( 
static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)), batch );
 }
 else
 {
@@ -82,9 +83,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Impress::Snap::Position::CreatingMoving::set( 
m_xCbxOrtho->get_active(), batch );
 officecfg::Office::Impress::Snap::Position::ExtendEdges::set( 
m_xCbxBigOrtho->get_active(), batch );
 officecfg::Office::Impress::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
+officecfg::Office::Impress::Snap::Object::Range::set( 
static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)), batch );
 }
 
-
aOptsItem.GetOptionsSnap().SetSnapArea(static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)));
 
aOptsItem.GetOptionsSnap().SetAngle(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)));
 
aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE)));
 
@@ -112,6 +113,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
 m_xCbxRotate->set_active( 
officecfg::Office::Draw::Snap::Position::Rotating::get() );
+
 }
 else
 {
@@ -122,6 +124,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxOrtho->set_active( 
officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
 m_xCbxRotate->set_active( 
officecfg::Office::Impress::Snap::Position::Rotating::get() );
+m_xMtrFldSnapArea->set_value( 
officecfg::Office::Impress::Snap::Object::Range::get(), FieldUnit::PIXEL);
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -161,7 +164,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::Range::isReadOnly() :
 officecfg::Office::Impress::Snap::Object::Range::isReadOnly();
-m_xMtrFldSnapArea->set_value(aOptsItem.GetOptionsSnap().GetSnapArea(), 
FieldUnit::PIXEL);
 m_xMtrFldSnapArea->set_sensitive(!bReadOnly);
 m_xMtrFldSnapAreaImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 318cd0be5f55..1a543d0afc06 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -298,6 +298,7 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOPntSnap( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
 SetOrtho( 
officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
+SetSnapMagneticPixel( 
officecfg::Office::Impress::Snap::Object::Range::get() );
 }
 else
 {
@@ -313,12 +314,12 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOPntSnap( officecfg::Office::Draw::Snap::Object::ObjectPoint::get() 
);
 SetOrtho( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
+SetSnapMagneticPixel( 
officecfg::Office::Draw::Snap::Object::Range::get() );
 }
 
 SetGridVisible( pOptions->IsGridVisible() );
 SetSnapAngle( pOptions->GetAngle() );
 SetGridSnap( pOptions->IsUseGridSnap() );
-SetSnapMagneticPixel( pOptions->GetSnapArea() );
 SetMarkedHitMovesAlways( 

core.git: sd/source

2024-05-15 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |6 --
 sd/source/ui/view/frmview.cxx |3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ffd199021ec24e3fb2028708a6a191bf5dd49e41
Author: Gabor Kelemen 
AuthorDate: Tue May 7 13:10:40 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Wed May 15 19:22:33 2024 +0200

Use less SdOptionsSnapItem->IsRotate/SetRotate

in favor of officecfg

Change-Id: I7c08ed5154d8f3c369c28d05381e551fa9639ecb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167538
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 41dd2545c6de..ac35cbeea34f 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -71,6 +71,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Draw::Snap::Object::ObjectPoint::set( 
m_xCbxSnapPoints->get_active(), batch );
 officecfg::Office::Draw::Snap::Position::CreatingMoving::set( 
m_xCbxOrtho->get_active(), batch );
 officecfg::Office::Draw::Snap::Position::ExtendEdges::set( 
m_xCbxBigOrtho->get_active(), batch );
+officecfg::Office::Draw::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
 }
 else
 {
@@ -80,9 +81,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Impress::Snap::Object::ObjectPoint::set( 
m_xCbxSnapPoints->get_active(), batch );
 officecfg::Office::Impress::Snap::Position::CreatingMoving::set( 
m_xCbxOrtho->get_active(), batch );
 officecfg::Office::Impress::Snap::Position::ExtendEdges::set( 
m_xCbxBigOrtho->get_active(), batch );
+officecfg::Office::Impress::Snap::Position::Rotating::set( 
m_xCbxRotate->get_active(), batch );
 }
 
-aOptsItem.GetOptionsSnap().SetRotate( m_xCbxRotate->get_active() );
 
aOptsItem.GetOptionsSnap().SetSnapArea(static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)));
 
aOptsItem.GetOptionsSnap().SetAngle(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)));
 
aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE)));
@@ -110,6 +111,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxSnapPoints->set_active( 
officecfg::Office::Draw::Snap::Object::ObjectPoint::get() );
 m_xCbxOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
+m_xCbxRotate->set_active( 
officecfg::Office::Draw::Snap::Position::Rotating::get() );
 }
 else
 {
@@ -119,6 +121,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxSnapPoints->set_active( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
 m_xCbxOrtho->set_active( 
officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
 m_xCbxBigOrtho->set_active( 
officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
+m_xCbxRotate->set_active( 
officecfg::Office::Impress::Snap::Position::Rotating::get() );
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -153,7 +156,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::Rotating::isReadOnly() :
 officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
-m_xCbxRotate->set_active( aOptsItem.GetOptionsSnap().IsRotate() );
 m_xCbxRotate->set_sensitive(!bReadOnly);
 m_xCbxRotateImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 8d7cff7d904b..318cd0be5f55 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -287,6 +287,7 @@ void FrameView::Update(SdOptions const * pOptions)
 if (bImpress)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
+SetAngleSnapEnabled( 
officecfg::Office::Impress::Snap::Position::Rotating::get() );
 SetBigOrtho( 
officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
 SetBordSnap( 
officecfg::Office::Impress::Snap::Object::PageMargin::get() );
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
@@ -301,6 +302,7 @@ void FrameView::Update(SdOptions const * pOptions)
 else
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
+SetAngleSnapEnabled( 
officecfg::Office::Draw::Snap::Position::Rotating::get() );
 SetBigOrtho( 
officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
 SetBordSnap( officecfg::Office::Draw::Snap::Object::PageMargin::get() 
);
 SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
@@ -321,7 +323,6 @@ 

core.git: sd/source

2024-05-14 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |6 --
 sd/source/ui/view/frmview.cxx |3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit bcc1b9f22d4b2772c735176e78dfa1e7c8c39b3a
Author: Gabor Kelemen 
AuthorDate: Tue May 7 10:49:30 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Tue May 14 16:19:34 2024 +0200

Use less SdOptionsSnapItem->IsOrtho/SetOrtho

in favor of officecfg

Change-Id: Iff78afb987bab8829ea595248b8ad434fe9b4cd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167536
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 597fe5705dd1..499b5e31a58f 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -69,6 +69,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Draw::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::ObjectFrame::set( 
m_xCbxSnapFrame->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::ObjectPoint::set( 
m_xCbxSnapPoints->get_active(), batch );
+officecfg::Office::Draw::Snap::Position::CreatingMoving::set( 
m_xCbxOrtho->get_active(), batch );
 }
 else
 {
@@ -76,9 +77,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Impress::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::ObjectFrame::set( 
m_xCbxSnapFrame->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::ObjectPoint::set( 
m_xCbxSnapPoints->get_active(), batch );
+officecfg::Office::Impress::Snap::Position::CreatingMoving::set( 
m_xCbxOrtho->get_active(), batch );
 }
 
-aOptsItem.GetOptionsSnap().SetOrtho( m_xCbxOrtho->get_active() );
 aOptsItem.GetOptionsSnap().SetBigOrtho( m_xCbxBigOrtho->get_active() );
 aOptsItem.GetOptionsSnap().SetRotate( m_xCbxRotate->get_active() );
 
aOptsItem.GetOptionsSnap().SetSnapArea(static_cast(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)));
@@ -106,6 +107,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxSnapBorder->set_active( 
officecfg::Office::Draw::Snap::Object::PageMargin::get() );
 m_xCbxSnapFrame->set_active( 
officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
 m_xCbxSnapPoints->set_active( 
officecfg::Office::Draw::Snap::Object::ObjectPoint::get() );
+m_xCbxOrtho->set_active( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 }
 else
 {
@@ -113,6 +115,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxSnapBorder->set_active( 
officecfg::Office::Impress::Snap::Object::PageMargin::get() );
 m_xCbxSnapFrame->set_active( 
officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
 m_xCbxSnapPoints->set_active( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
+m_xCbxOrtho->set_active( 
officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -137,7 +140,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::CreatingMoving::isReadOnly() :
 
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
-m_xCbxOrtho->set_active( aOptsItem.GetOptionsSnap().IsOrtho() );
 m_xCbxOrtho->set_sensitive(!bReadOnly);
 m_xCbxOrthoImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index dfb73b027b71..6bd8d31df9f0 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -294,6 +294,7 @@ void FrameView::Update(SdOptions const * pOptions)
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
 SetOFrmSnap( 
officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
 SetOPntSnap( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
+SetOrtho( 
officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
 }
 else
@@ -306,6 +307,7 @@ void FrameView::Update(SdOptions const * pOptions)
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
 SetOFrmSnap( officecfg::Office::Draw::Snap::Object::ObjectFrame::get() 
);
 SetOPntSnap( officecfg::Office::Draw::Snap::Object::ObjectPoint::get() 
);
+SetOrtho( 
officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
 }
 
@@ -319,7 +321,6 @@ void 

core.git: sd/source

2024-05-14 Thread Tomaž Vajngerl (via logerrit)
 sd/source/core/text/textapi.cxx |   89 
 1 file changed, 36 insertions(+), 53 deletions(-)

New commits:
commit e08c22500af085712a2514561996ae882b477ec6
Author: Tomaž Vajngerl 
AuthorDate: Fri Apr 19 17:28:50 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 14 12:42:25 2024 +0200

annot: use smart pointers in TextAPIEditSource and clean-up

rename TextAPIEditSource_Impl to OutlinerHolder and use smart
pointers (std::unique_ptr) in OutlinerHolder instead of manually
taking care of the destruction.

Change-Id: I7b8397be35ad9a7a5c6a461ecb522af15eb5c6ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166496
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index afb3c80714e5..c5f9ab631bff 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -83,13 +83,14 @@ void UndoTextAPIChanged::Redo()
 }
 }
 
-namespace {
+namespace
+{
 
-struct TextAPIEditSource_Impl
+struct OutlinerHolder
 {
 SdrModel* mpModel;
-Outliner* mpOutliner;
-SvxOutlinerForwarder* mpTextForwarder;
+std::unique_ptr mpOutliner;
+std::unique_ptr mpTextForwarder;
 };
 
 }
@@ -97,22 +98,20 @@ struct TextAPIEditSource_Impl
 class TextAPIEditSource : public SvxEditSource
 {
 // refcounted
-std::shared_ptr m_xImpl;
+std::shared_ptr mpHolder;
 
 virtual std::unique_ptr Clone() const override;
-virtual SvxTextForwarder*   GetTextForwarder() override;
-virtual voidUpdateData() override;
-explicitTextAPIEditSource( const TextAPIEditSource& rSource );
+virtual SvxTextForwarder* GetTextForwarder() override;
+virtual void UpdateData() override;
+explicit TextAPIEditSource(const TextAPIEditSource& rSource);
 
 public:
-explicitTextAPIEditSource(SdrModel* pModel);
+explicit TextAPIEditSource(SdrModel* pModel);
 
-voidDispose();
-voidSetText( OutlinerParaObject const & rText );
+void SetText(OutlinerParaObject const & rText);
 std::optional CreateText();
-OUStringGetText() const;
-
-SdrModel* getModel() { return m_xImpl->mpModel; }
+OUString GetText() const;
+SdrModel* getModel() { return mpHolder->mpModel; }
 };
 
 static const SvxItemPropertySet* ImplGetSdTextPortionPropertyMap()
@@ -152,12 +151,8 @@ rtl::Reference 
TextApiObject::create(SdrModel* pModel)
 
 void TextApiObject::dispose()
 {
-if( mpSource )
-{
-mpSource->Dispose();
+if (mpSource)
 mpSource.reset();
-}
-
 }
 
 std::optional TextApiObject::CreateText()
@@ -192,13 +187,13 @@ TextApiObject* TextApiObject::getImplementation( const 
css::uno::Reference< css:
 
 TextAPIEditSource::TextAPIEditSource(const TextAPIEditSource& rSource)
 : SvxEditSource(*this)
-, m_xImpl(rSource.m_xImpl) // shallow copy; uses internal refcounting
+, mpHolder(rSource.mpHolder) // shallow copy; uses internal refcounting
 {
 }
 
 std::unique_ptr TextAPIEditSource::Clone() const
 {
-return std::unique_ptr(new TextAPIEditSource( *this ));
+return std::unique_ptr(new TextAPIEditSource(*this));
 }
 
 void TextAPIEditSource::UpdateData()
@@ -207,70 +202,58 @@ void TextAPIEditSource::UpdateData()
 }
 
 TextAPIEditSource::TextAPIEditSource(SdrModel* pModel)
-: m_xImpl(std::make_shared())
+: mpHolder(std::make_shared())
 {
-m_xImpl->mpModel = pModel;
-m_xImpl->mpOutliner = nullptr;
-m_xImpl->mpTextForwarder = nullptr;
-}
-
-void TextAPIEditSource::Dispose()
-{
-m_xImpl->mpModel = nullptr;
-delete m_xImpl->mpTextForwarder;
-m_xImpl->mpTextForwarder = nullptr;
-
-delete m_xImpl->mpOutliner;
-m_xImpl->mpOutliner = nullptr;
+mpHolder->mpModel = pModel;
 }
 
 SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
 {
-if(!m_xImpl->mpModel)
+if (!mpHolder->mpModel)
 return nullptr; // mpModel == 0 can be used to flag this as disposed
 
-if (!m_xImpl->mpOutliner)
+if (!mpHolder->mpOutliner)
 {
 //init draw model first
-SfxItemPool* pPool = _xImpl->mpModel->GetItemPool();
-m_xImpl->mpOutliner = new SdrOutliner(pPool, OutlinerMode::TextObject);
-SdDrawDocument::SetCalcFieldValueHdl(m_xImpl->mpOutliner);
+SfxItemPool* pPool = >mpModel->GetItemPool();
+mpHolder->mpOutliner.reset(new SdrOutliner(pPool, 
OutlinerMode::TextObject));
+SdDrawDocument::SetCalcFieldValueHdl(mpHolder->mpOutliner.get());
 }
 
-if (!m_xImpl->mpTextForwarder)
-m_xImpl->mpTextForwarder = new 
SvxOutlinerForwarder(*m_xImpl->mpOutliner, false);
+if (!mpHolder->mpTextForwarder)
+mpHolder->mpTextForwarder.reset(new 
SvxOutlinerForwarder(*mpHolder->mpOutliner, false));
 
-return m_xImpl->mpTextForwarder;
+return mpHolder->mpTextForwarder.get();
 }
 
 void 

core.git: sd/source

2024-05-13 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx  |6 --
 sd/source/ui/view/drviewsg.cxx |5 -
 sd/source/ui/view/frmview.cxx  |3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 25e53d411097849ae9a00af40c6d786fa1daf2b6
Author: Gabor Kelemen 
AuthorDate: Tue May 7 09:21:15 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Mon May 13 21:40:12 2024 +0200

Use less SdOptionsSnapItem->IsSnapPoints/SetSnapPoints

in favor of officecfg

Change-Id: I578fa667f3a21ebdfacb8602c009558a03facd97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167535
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a45ba6fbf49a..597fe5705dd1 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -68,15 +68,16 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 officecfg::Office::Draw::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::ObjectFrame::set( 
m_xCbxSnapFrame->get_active(), batch );
+officecfg::Office::Draw::Snap::Object::ObjectPoint::set( 
m_xCbxSnapPoints->get_active(), batch );
 }
 else
 {
 officecfg::Office::Impress::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::ObjectFrame::set( 
m_xCbxSnapFrame->get_active(), batch );
+officecfg::Office::Impress::Snap::Object::ObjectPoint::set( 
m_xCbxSnapPoints->get_active(), batch );
 }
 
-aOptsItem.GetOptionsSnap().SetSnapPoints( m_xCbxSnapPoints->get_active() );
 aOptsItem.GetOptionsSnap().SetOrtho( m_xCbxOrtho->get_active() );
 aOptsItem.GetOptionsSnap().SetBigOrtho( m_xCbxBigOrtho->get_active() );
 aOptsItem.GetOptionsSnap().SetRotate( m_xCbxRotate->get_active() );
@@ -104,12 +105,14 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 m_xCbxSnapHelplines->set_active( 
officecfg::Office::Draw::Snap::Object::SnapLine::get() );
 m_xCbxSnapBorder->set_active( 
officecfg::Office::Draw::Snap::Object::PageMargin::get() );
 m_xCbxSnapFrame->set_active( 
officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
+m_xCbxSnapPoints->set_active( 
officecfg::Office::Draw::Snap::Object::ObjectPoint::get() );
 }
 else
 {
 m_xCbxSnapHelplines->set_active( 
officecfg::Office::Impress::Snap::Object::SnapLine::get() );
 m_xCbxSnapBorder->set_active( 
officecfg::Office::Impress::Snap::Object::PageMargin::get() );
 m_xCbxSnapFrame->set_active( 
officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
+m_xCbxSnapPoints->set_active( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -129,7 +132,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::ObjectPoint::isReadOnly() :
 officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
-m_xCbxSnapPoints->set_active( aOptsItem.GetOptionsSnap().IsSnapPoints() );
 m_xCbxSnapPoints->set_sensitive(!bReadOnly);
 m_xCbxSnapPointsImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 36324d7c8909..94fc13e6c606 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -174,7 +174,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
 case SID_SNAP_POINTS:
 {
-pOptions->SetSnapPoints( !mpDrawView->IsOPntSnap() );
+if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
+officecfg::Office::Impress::Snap::Object::ObjectPoint::set( 
!mpDrawView->IsOPntSnap(), batch );
+else
+officecfg::Office::Draw::Snap::Object::ObjectPoint::set( 
!mpDrawView->IsOPntSnap(), batch );
 }
 break;
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 7e9a8ec31ab8..dfb73b027b71 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -293,6 +293,7 @@ void FrameView::Update(SdOptions const * pOptions)
 SetHlplVisible( 
officecfg::Office::Impress::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
 SetOFrmSnap( 
officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
+SetOPntSnap( 
officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
 SetPlusHandlesAlwaysVisible( 

core.git: sd/source

2024-05-13 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx  |6 --
 sd/source/ui/view/drviewsg.cxx |5 -
 sd/source/ui/view/frmview.cxx  |3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit d9d699756125db28bd45d7c92d4c9c2dc243f418
Author: Gabor Kelemen 
AuthorDate: Fri May 3 11:57:10 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Mon May 13 09:15:04 2024 +0200

Use less SdOptionsSnapItem->IsSnapFrame/SetSnapFrame

in favor of officecfg

Change-Id: Ia9d36f3c2d0f85250da6f3483176c551226164a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167534
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 2708d8d933fa..a45ba6fbf49a 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -67,14 +67,15 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 {
 officecfg::Office::Draw::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
 officecfg::Office::Draw::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
+officecfg::Office::Draw::Snap::Object::ObjectFrame::set( 
m_xCbxSnapFrame->get_active(), batch );
 }
 else
 {
 officecfg::Office::Impress::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
 officecfg::Office::Impress::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
+officecfg::Office::Impress::Snap::Object::ObjectFrame::set( 
m_xCbxSnapFrame->get_active(), batch );
 }
 
-aOptsItem.GetOptionsSnap().SetSnapFrame( m_xCbxSnapFrame->get_active() );
 aOptsItem.GetOptionsSnap().SetSnapPoints( m_xCbxSnapPoints->get_active() );
 aOptsItem.GetOptionsSnap().SetOrtho( m_xCbxOrtho->get_active() );
 aOptsItem.GetOptionsSnap().SetBigOrtho( m_xCbxBigOrtho->get_active() );
@@ -102,11 +103,13 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 {
 m_xCbxSnapHelplines->set_active( 
officecfg::Office::Draw::Snap::Object::SnapLine::get() );
 m_xCbxSnapBorder->set_active( 
officecfg::Office::Draw::Snap::Object::PageMargin::get() );
+m_xCbxSnapFrame->set_active( 
officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
 }
 else
 {
 m_xCbxSnapHelplines->set_active( 
officecfg::Office::Impress::Snap::Object::SnapLine::get() );
 m_xCbxSnapBorder->set_active( 
officecfg::Office::Impress::Snap::Object::PageMargin::get() );
+m_xCbxSnapFrame->set_active( 
officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -121,7 +124,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::ObjectFrame::isReadOnly() :
 officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
-m_xCbxSnapFrame->set_active( aOptsItem.GetOptionsSnap().IsSnapFrame() );
 m_xCbxSnapFrame->set_sensitive(!bReadOnly);
 m_xCbxSnapFrameImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 20a7814abbee..36324d7c8909 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -165,7 +165,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
 case SID_SNAP_FRAME:
 {
-pOptions->SetSnapFrame( !mpDrawView->IsOFrmSnap() );
+if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
+
officecfg::Office::Impress::Snap::Object::ObjectFrame::set(!mpDrawView->IsOFrmSnap(),
 batch);
+else
+
officecfg::Office::Draw::Snap::Object::ObjectFrame::set(!mpDrawView->IsOFrmSnap(),
 batch);
 }
 break;
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index c252b6183a6a..7e9a8ec31ab8 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -292,6 +292,7 @@ void FrameView::Update(SdOptions const * pOptions)
 SetHlplSnap( officecfg::Office::Impress::Snap::Object::SnapLine::get() 
);
 SetHlplVisible( 
officecfg::Office::Impress::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
+SetOFrmSnap( 
officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
 }
 else
@@ -302,13 +303,13 @@ void FrameView::Update(SdOptions const * pOptions)
 SetHlplSnap( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
 SetHlplVisible( 
officecfg::Office::Draw::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
+SetOFrmSnap( 

core.git: sd/source

2024-05-12 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx  |6 --
 sd/source/ui/view/drviewsg.cxx |5 -
 sd/source/ui/view/frmview.cxx  |3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 3df9a50322dc9f24c87d0095316aadf1ad09ec3e
Author: Gabor Kelemen 
AuthorDate: Fri May 3 11:41:49 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Sun May 12 21:18:01 2024 +0200

Use less SdOptionsSnapItem->IsSnapBorder/SetSnapBorder

in favor of officecfg

Change-Id: Iaa6801ef773de7d3dcb1f08d4eac4a4f62ac656b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167533
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 1a2bfee07646..2708d8d933fa 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -66,13 +66,14 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 if (bDrawMode)
 {
 officecfg::Office::Draw::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
+officecfg::Office::Draw::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
 }
 else
 {
 officecfg::Office::Impress::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
+officecfg::Office::Impress::Snap::Object::PageMargin::set( 
m_xCbxSnapBorder->get_active(), batch );
 }
 
-aOptsItem.GetOptionsSnap().SetSnapBorder( m_xCbxSnapBorder->get_active() );
 aOptsItem.GetOptionsSnap().SetSnapFrame( m_xCbxSnapFrame->get_active() );
 aOptsItem.GetOptionsSnap().SetSnapPoints( m_xCbxSnapPoints->get_active() );
 aOptsItem.GetOptionsSnap().SetOrtho( m_xCbxOrtho->get_active() );
@@ -100,10 +101,12 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 if (bDrawMode)
 {
 m_xCbxSnapHelplines->set_active( 
officecfg::Office::Draw::Snap::Object::SnapLine::get() );
+m_xCbxSnapBorder->set_active( 
officecfg::Office::Draw::Snap::Object::PageMargin::get() );
 }
 else
 {
 m_xCbxSnapHelplines->set_active( 
officecfg::Office::Impress::Snap::Object::SnapLine::get() );
+m_xCbxSnapBorder->set_active( 
officecfg::Office::Impress::Snap::Object::PageMargin::get() );
 }
 
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -113,7 +116,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::PageMargin::isReadOnly() :
 officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
-m_xCbxSnapBorder->set_active( aOptsItem.GetOptionsSnap().IsSnapBorder() );
 m_xCbxSnapBorder->set_sensitive(!bReadOnly);
 m_xCbxSnapBorderImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index e256ef926172..20a7814abbee 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -156,7 +156,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
 case SID_SNAP_BORDER:
 {
-pOptions->SetSnapBorder( !mpDrawView->IsBordSnap() );
+if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
+officecfg::Office::Impress::Snap::Object::PageMargin::set( 
!mpDrawView->IsBordSnap(), batch );
+else
+officecfg::Office::Draw::Snap::Object::PageMargin::set( 
!mpDrawView->IsBordSnap(), batch );
 }
 break;
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index ad500cfb4eed..c252b6183a6a 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -287,6 +287,7 @@ void FrameView::Update(SdOptions const * pOptions)
 if (bImpress)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
+SetBordSnap( 
officecfg::Office::Impress::Snap::Object::PageMargin::get() );
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
 SetHlplSnap( officecfg::Office::Impress::Snap::Object::SnapLine::get() 
);
 SetHlplVisible( 
officecfg::Office::Impress::Layout::Display::Helpline::get() );
@@ -296,6 +297,7 @@ void FrameView::Update(SdOptions const * pOptions)
 else
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
+SetBordSnap( officecfg::Office::Draw::Snap::Object::PageMargin::get() 
);
 SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
 SetHlplSnap( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
 SetHlplVisible( 
officecfg::Office::Draw::Layout::Display::Helpline::get() );
@@ -306,7 +308,6 @@ void FrameView::Update(SdOptions const * pOptions)
 SetGridVisible( pOptions->IsGridVisible() );
 SetSnapAngle( pOptions->GetAngle() );
 SetGridSnap( pOptions->IsUseGridSnap() );
-SetBordSnap( pOptions->IsSnapBorder()  );
 

core.git: sd/source

2024-05-12 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx  |   25 +++--
 sd/source/ui/view/drviewsg.cxx |5 -
 sd/source/ui/view/frmview.cxx  |3 ++-
 3 files changed, 29 insertions(+), 4 deletions(-)

New commits:
commit c24f8262c884d9587ca40f3abb6b1a760c6522da
Author: Gabor Kelemen 
AuthorDate: Fri May 3 11:27:31 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Sun May 12 13:17:56 2024 +0200

Use less SdOptionsSnapItem->IsSnapHelplines/SetSnapHelplines

in favor of officecfg

Change-Id: I3f9d62380449c888b47020b4ffc765e9e8aa36ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167532
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index fb16a14bebaf..1a2bfee07646 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -58,8 +58,20 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 {
 SvxGridTabPage::FillItemSet(rAttrs);
 SdOptionsSnapItem aOptsItem;
+bool bDrawMode = SvxGridTabPage::IsDrawMode();
+
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
+
+if (bDrawMode)
+{
+officecfg::Office::Draw::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
+}
+else
+{
+officecfg::Office::Impress::Snap::Object::SnapLine::set( 
m_xCbxSnapHelplines->get_active(), batch );
+}
 
-aOptsItem.GetOptionsSnap().SetSnapHelplines( 
m_xCbxSnapHelplines->get_active() );
 aOptsItem.GetOptionsSnap().SetSnapBorder( m_xCbxSnapBorder->get_active() );
 aOptsItem.GetOptionsSnap().SetSnapFrame( m_xCbxSnapFrame->get_active() );
 aOptsItem.GetOptionsSnap().SetSnapPoints( m_xCbxSnapPoints->get_active() );
@@ -71,6 +83,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
 
aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(Degree100(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE)));
 
 rAttrs->Put( aOptsItem );
+batch->commit();
 
 // we get a possible existing GridItem, this ensures that we do not set
 // some default values by accident
@@ -84,9 +97,17 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 SdOptionsSnapItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_SNAP ) );
 
 bool bDrawMode = SvxGridTabPage::IsDrawMode();
+if (bDrawMode)
+{
+m_xCbxSnapHelplines->set_active( 
officecfg::Office::Draw::Snap::Object::SnapLine::get() );
+}
+else
+{
+m_xCbxSnapHelplines->set_active( 
officecfg::Office::Impress::Snap::Object::SnapLine::get() );
+}
+
 bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
 officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
-m_xCbxSnapHelplines->set_active( 
aOptsItem.GetOptionsSnap().IsSnapHelplines() );
 m_xCbxSnapHelplines->set_sensitive(!bReadOnly);
 m_xCbxSnapHelplinesImg->set_visible(bReadOnly);
 
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 33cb8391..e256ef926172 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -138,7 +138,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
 case SID_HELPLINES_USE:
 {
-pOptions->SetSnapHelplines( !mpDrawView->IsHlplSnap() );
+if (GetDoc()->GetDocumentType() == DocumentType::Impress)
+
officecfg::Office::Impress::Snap::Object::SnapLine::set(!mpDrawView->IsHlplSnap(),
 batch);
+else
+
officecfg::Office::Draw::Snap::Object::SnapLine::set(!mpDrawView->IsHlplSnap(), 
batch);
 }
 break;
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 1116f7d791f3..ad500cfb4eed 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -288,6 +288,7 @@ void FrameView::Update(SdOptions const * pOptions)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
+SetHlplSnap( officecfg::Office::Impress::Snap::Object::SnapLine::get() 
);
 SetHlplVisible( 
officecfg::Office::Impress::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
@@ -296,6 +297,7 @@ void FrameView::Update(SdOptions const * pOptions)
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
 SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
+SetHlplSnap( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
 SetHlplVisible( 
officecfg::Office::Draw::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
 

core.git: sd/source

2024-05-10 Thread Gabor Kelemen (via logerrit)
 sd/source/core/drawdoc.cxx  |3 ++-
 sd/source/ui/app/sdmod2.cxx |   10 --
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit edcfc1ba8ea4159c3c6f24b43f65ffe0b7b897a3
Author: Gabor Kelemen 
AuthorDate: Thu Apr 25 10:21:21 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri May 10 14:11:23 2024 +0200

Use less SdOptionsZoom->GetScale/SetScale in favor of officecfg

Change-Id: I34fca9ba9546f10268d22f92aaa5249d88f607d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166629
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 55e3a1fe6240..237deadabd30 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -158,7 +158,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 // Set measuring unit (of the application) and scale (of SdMod)
 sal_Int32 nX, nY;
 SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType);
-pOptions->GetScale( nX, nY );
+nX = officecfg::Office::Draw::Zoom::ScaleX::get();
+nY = officecfg::Office::Draw::Zoom::ScaleY::get();
 SvtSysLocale aSysLocale;
 
 // Allow UI scale only for draw documents.
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 7e98287c2bc7..a30c4f303016 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -543,7 +543,8 @@ std::optional SdModule::CreateItemSet( 
sal_uInt16 nSlot )
 else
 {
 // Get options from configuration file
-pOptions->GetScale( nX, nY );
+nX = officecfg::Office::Draw::Zoom::ScaleX::get();
+nY = officecfg::Office::Draw::Zoom::ScaleY::get();
 }
 
 aRet.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) );
@@ -660,7 +661,12 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const 
SfxItemSet& rSet )
 if( pItem )
 {
 sal_Int32 nY = pItem->GetValue();
-pOptions->SetScale( nX, nY );
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
+
+officecfg::Office::Draw::Zoom::ScaleX::set(nX, batch);
+officecfg::Office::Draw::Zoom::ScaleY::set(nY, batch);
+batch->commit();
 
 // Apply to document only if doc type match
 if( pDocSh && pDoc && eDocType == pDoc->GetDocumentType() )


core.git: sd/source

2024-05-10 Thread Gabor Kelemen (via logerrit)
 sd/source/core/drawdoc.cxx  |   14 +---
 sd/source/ui/app/sdmod2.cxx |   49 ++--
 2 files changed, 54 insertions(+), 9 deletions(-)

New commits:
commit dd8cf8a3f061d77ed7781a8b591cee86067ab973
Author: Gabor Kelemen 
AuthorDate: Wed Apr 24 12:54:26 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri May 10 14:11:06 2024 +0200

Use less SdOptionsLayout->Get/SetDefTab in favor of officecfg

Change-Id: I028790b7e5750893f38ef7775cac1671104cd603
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166600
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index b759f9b4e883..55e3a1fe6240 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -171,7 +171,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
 SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::get()),
 Fraction( 1, 1 ) );// default
 else
-SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get()),
 Fraction( 1, 1 ) );// default
+SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get()),
 Fraction( 1, 1 ) );// default
 
 SetScaleUnit(MapUnit::Map100thMM);
 SetDefaultFontHeight(o3tl::convert(24, o3tl::Length::pt, 
o3tl::Length::mm100));
@@ -219,8 +219,16 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 }
 
 // Set DefTab and SpellOptions for the SD module
-sal_uInt16 nDefTab = pOptions->GetDefTab();
-SetDefaultTabulator( nDefTab );
+if (eType == DocumentType::Impress)
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+SetDefaultTabulator( 
static_cast(officecfg::Office::Impress::Layout::Other::TabStop::Metric::get())
 );
+else
+SetDefaultTabulator( 
static_cast(officecfg::Office::Impress::Layout::Other::TabStop::NonMetric::get())
 );
+else
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+SetDefaultTabulator( 
static_cast(officecfg::Office::Draw::Layout::Other::TabStop::Metric::get())
 );
+else
+SetDefaultTabulator( 
static_cast(officecfg::Office::Draw::Layout::Other::TabStop::NonMetric::get())
 );
 
 try
 {
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index c33ea3c3f5a8..7e98287c2bc7 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -466,14 +466,28 @@ std::optional SdModule::CreateItemSet( 
sal_uInt16 nSlot )
 aRet.Put( SdOptionsLayoutItem( pOptions, pFrameView ) );
 
 sal_uInt16 nDefTab = 0;
+SvtSysLocale aSysLocale;
+
 if( pFrameView)
 nDefTab = pDoc->GetDefaultTabulator();
 else
-nDefTab = pOptions->GetDefTab();
+{
+if (eDocType == DocumentType::Impress)
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+nDefTab = 
officecfg::Office::Impress::Layout::Other::TabStop::Metric::get();
+else
+nDefTab = 
officecfg::Office::Impress::Layout::Other::TabStop::NonMetric::get();
+else
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+nDefTab = 
officecfg::Office::Draw::Layout::Other::TabStop::Metric::get();
+else
+nDefTab = 
officecfg::Office::Draw::Layout::Other::TabStop::NonMetric::get();
+}
+
 aRet.Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, nDefTab ) );
 
 FieldUnit nMetric = FieldUnit(0x);
-SvtSysLocale aSysLocale;
+
 if( pFrameView)
 nMetric = pDoc->GetUIUnit();
 else
@@ -551,6 +565,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const 
SfxItemSet& rSet )
 bool bNewDefTab = false;
 bool bNewPrintOptions = false;
 bool bMiscOptions = false;
+SvtSysLocale aSysLocale;
 
 ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( 
SfxObjectShell::Current() );
 SdDrawDocument* pDoc = nullptr;
@@ -588,7 +603,6 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const 
SfxItemSet& rSet )
 if( pDoc && eDocType == pDoc->GetDocumentType() )
 PutItem( *pItem );
 
-SvtSysLocale aSysLocale;
 std::shared_ptr batch(
 comphelper::ConfigurationChanges::create());
 if (eDocType == DocumentType::Impress)
@@ -604,12 +618,36 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const 
SfxItemSet& rSet )
 batch->commit();
 
 }
-sal_uInt16 nDefTab = pOptions->GetDefTab();
+sal_uInt16 nDefTab;
+if (eDocType == DocumentType::Impress)
+

core.git: sd/source

2024-05-10 Thread Caolán McNamara (via logerrit)
 sd/source/ui/app/sdmod2.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ce6b49c8a6c014f286deb98c353058483ae4bd95
Author: Caolán McNamara 
AuthorDate: Fri May 10 08:39:14 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 10 11:48:27 2024 +0200

cid#1597274 Identical code for different branches

Change-Id: I9672db1e788265c806336f0bf077d0bb8144dc9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167433
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 9cec489e0338..c33ea3c3f5a8 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -484,9 +484,9 @@ std::optional SdModule::CreateItemSet( 
sal_uInt16 nSlot )
 nMetric = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get());
 else
 if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
-nMetric = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::get());
+nMetric = 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::Metric::get());
 else
-nMetric = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get());
+nMetric = 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::NonMetric::get());
 
 if( nMetric == FieldUnit(0x) )
 nMetric = GetFieldUnit();
@@ -739,9 +739,9 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const 
SfxItemSet& rSet )
 eUIUnit = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get());
 else
 if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
-eUIUnit = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::get());
+eUIUnit = 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::Metric::get());
 else
-eUIUnit = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get());
+eUIUnit = 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::NonMetric::get());
 
 pDoc->SetUIUnit(eUIUnit);
 


core.git: sd/source

2024-05-10 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/framework/module/SlideSorterModule.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 423d240dc680817efae645d8305402f922bb452d
Author: Sarper Akdemir 
AuthorDate: Wed May 8 14:47:40 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Fri May 10 10:02:26 2024 +0200

sd: properly read values of optional config items for SlideSorterBar

Guessing this has regressed with
9fc28d7ef5def30a23960cf15334af1aec27460f

Read the values from std::optional properly.

The default values are taken from the configuration
officecfg/registry/data/org/openoffice/Office/Impress.xcu

Change-Id: I93d5537a9e06dc6985a2ec375353d9869b92e08c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167353
Reviewed-by: Sarper Akdemir 
Tested-by: Jenkins

diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx 
b/sd/source/ui/framework/module/SlideSorterModule.cxx
index 7d8304bec454..6b6987df2968 100644
--- a/sd/source/ui/framework/module/SlideSorterModule.cxx
+++ b/sd/source/ui/framework/module/SlideSorterModule.cxx
@@ -81,17 +81,19 @@ SlideSorterModule::SlideSorterModule (
 
 UpdateViewTabBar(nullptr);
 
-if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::ImpressView::get().has_value()
 && (!getenv("LO_TESTNAME") || !comphelper::LibreOfficeKit::isActive()))
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::ImpressView::get().value_or(true)
+&& (!getenv("LO_TESTNAME") || !comphelper::LibreOfficeKit::isActive()))
 AddActiveMainView(FrameworkHelper::msImpressViewURL);
-if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::OutlineView::get())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::OutlineView::get().value_or(true))
 AddActiveMainView(FrameworkHelper::msOutlineViewURL);
-if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::NotesView::get())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::NotesView::get().value_or(true))
 AddActiveMainView(FrameworkHelper::msNotesViewURL);
-if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::HandoutView::get())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::HandoutView::get().value_or(false))
 AddActiveMainView(FrameworkHelper::msHandoutViewURL);
-if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::SlideSorterView::get().has_value()
 && !comphelper::LibreOfficeKit::isActive())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::SlideSorterView::get().value_or(false)
+&& !comphelper::LibreOfficeKit::isActive())
 AddActiveMainView(FrameworkHelper::msSlideSorterURL);
-if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::DrawView::get())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::DrawView::get().value_or(true))
 AddActiveMainView(FrameworkHelper::msDrawViewURL);
 
 mxConfigurationController->addConfigurationChangeListener(


core.git: sd/source

2024-05-10 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/drviewsg.cxx |5 -
 sd/source/ui/view/frmview.cxx  |3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 58a9c936bb065384d50e122ee2ac9037dd60cc32
Author: Gabor Kelemen 
AuthorDate: Wed Apr 24 09:13:31 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri May 10 09:33:49 2024 +0200

Use less SdOptionsLayout->IsHelplines/SetHelplines in favor of officecfg

Change-Id: Ic6d0c80a4f95a08d969b8400704f25fc50147ad5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166599
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 7dfd06e2177c..33cb8391 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -129,7 +129,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
 case SID_HELPLINES_VISIBLE: // not here yet!
 {
-pOptions->SetHelplines( !mpDrawView->IsHlplVisible() );
+if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
+
officecfg::Office::Impress::Layout::Display::Guide::set(!mpDrawView->IsHlplVisible(),
 batch);
+else
+
officecfg::Office::Draw::Layout::Display::Guide::set(!mpDrawView->IsHlplVisible(),
 batch);
 }
 break;
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 250a088bffb1..1116f7d791f3 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -288,6 +288,7 @@ void FrameView::Update(SdOptions const * pOptions)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
+SetHlplVisible( 
officecfg::Office::Impress::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
 }
@@ -295,6 +296,7 @@ void FrameView::Update(SdOptions const * pOptions)
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
 SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
+SetHlplVisible( 
officecfg::Office::Draw::Layout::Display::Helpline::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
 SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
 }
@@ -306,7 +308,6 @@ void FrameView::Update(SdOptions const * pOptions)
 SetHlplSnap( pOptions->IsSnapHelplines() );
 SetOFrmSnap( pOptions->IsSnapFrame() );
 SetOPntSnap( pOptions->IsSnapPoints() );
-SetHlplVisible( pOptions->IsHelplines() );
 SetSnapMagneticPixel( pOptions->GetSnapArea() );
 SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
 SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );


core.git: sd/source

2024-05-10 Thread Méven Car (via logerrit)
 sd/source/ui/view/ViewShellBase.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6f993ff3c16fe3a826cfb2d9c82f45a401d77666
Author: Méven Car 
AuthorDate: Wed May 8 16:36:20 2024 +0200
Commit: Miklos Vajna 
CommitDate: Fri May 10 09:06:48 2024 +0200

sd: prevent some work outside of LibreOfficeKit

fbd8cfb046fd0882402e01c2e0b2955e6972737f added a stateChange event for 
Is/GetStartWithPresentation.
This is needed only in case we are in LibreOfficeKit context.

Change-Id: I9d853c4d50fd07c45c40fb20c27bd26ab30c1680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167362
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 1d7bf8caadd9..f03eca21b088 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -74,6 +74,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1039,7 +1040,7 @@ void ViewShellBase::afterCallbackRegistered()
 svx::theme::notifyLOK(pThemeColors, aDocumentColors);
 }
 
-if (mpDocument && mpDocument->GetStartWithPresentation())
+if (comphelper::LibreOfficeKit::isActive() && mpDocument && 
mpDocument->GetStartWithPresentation())
 {
 // Be consistent with SidebarController, emit JSON.
 boost::property_tree::ptree aTree;


core.git: sd/source

2024-05-08 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/frmview.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5ce5ffe817479faecf7889d0024e91c8a2ad6a2c
Author: Gabor Kelemen 
AuthorDate: Wed Apr 24 09:08:37 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 9 00:31:09 2024 +0200

Use less SdOptionsLayout->IsHandlesBezier in favor of officecfg

Change-Id: Id2f005413f255b4a0f0e0cd240cb8700c27ee204
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166598
Reviewed-by: Thorsten Behrens 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 1fa0c4eba45d..250a088bffb1 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -289,12 +289,14 @@ void FrameView::Update(SdOptions const * pOptions)
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
+SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
 }
 else
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
 SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
+SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
 }
 
 SetGridVisible( pOptions->IsGridVisible() );
@@ -305,7 +307,6 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOFrmSnap( pOptions->IsSnapFrame() );
 SetOPntSnap( pOptions->IsSnapPoints() );
 SetHlplVisible( pOptions->IsHelplines() );
-SetPlusHandlesAlwaysVisible( pOptions->IsHandlesBezier() );
 SetSnapMagneticPixel( pOptions->GetSnapArea() );
 SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
 SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );


core.git: sd/source

2024-05-08 Thread Gabor Kelemen (via logerrit)
 sd/source/core/drawdoc.cxx  |   14 +++-
 sd/source/ui/app/sdmod.cxx  |   12 ---
 sd/source/ui/app/sdmod1.cxx |   36 -
 sd/source/ui/app/sdmod2.cxx |   48 +---
 4 files changed, 88 insertions(+), 22 deletions(-)

New commits:
commit 055e7d866680390dca6e18864ca4297cc0ebda84
Author: Gabor Kelemen 
AuthorDate: Tue Apr 23 20:04:43 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 9 00:30:52 2024 +0200

Use less SdOptionsLayout->GetMetric/SetMetric in favor of officecfg

Change-Id: I12c9f69e0db1bf3e726b7d642e9a6855b031d3b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166597
Reviewed-by: Thorsten Behrens 
Tested-by: Jenkins

diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 5def1937684d..b759f9b4e883 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -53,6 +54,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -156,12 +159,19 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 sal_Int32 nX, nY;
 SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType);
 pOptions->GetScale( nX, nY );
+SvtSysLocale aSysLocale;
 
 // Allow UI scale only for draw documents.
 if( eType == DocumentType::Draw )
-SetUIUnit( static_cast(pOptions->GetMetric()), Fraction( 
nX, nY ) );  // user-defined
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+SetUIUnit( 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::Metric::get()),
 Fraction( nX, nY ) );  // user-defined
+else
+SetUIUnit( 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::NonMetric::get()),
 Fraction( nX, nY ) );  // user-defined
 else
-SetUIUnit( static_cast(pOptions->GetMetric()), Fraction( 1, 
1 ) );// default
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::get()),
 Fraction( 1, 1 ) );// default
+else
+SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get()),
 Fraction( 1, 1 ) );// default
 
 SetScaleUnit(MapUnit::Map100thMM);
 SetDefaultFontHeight(o3tl::convert(24, o3tl::Length::pt, 
o3tl::Length::mm100));
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index f18dd647a209..d534fe51aa23 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -141,18 +141,6 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
 
 pOptions = pImpressOptions;
 }
-if( pOptions )
-{
-sal_uInt16 nMetric = pOptions->GetMetric();
-
-::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( 
SfxObjectShell::Current() );
-SdDrawDocument* pDoc = nullptr;
-if (pDocSh)
-pDoc = pDocSh->GetDoc();
-
-if( nMetric != 0x && pDoc && eDocType == pDoc->GetDocumentType() )
-PutItem( SfxUInt16Item( SID_ATTR_METRIC, nMetric ) );
-}
 
 return pOptions;
 }
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 14f507fb1a1d..023e44a7c1e6 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -21,7 +21,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +55,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 using ::sd::framework::FrameworkHelper;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::frame::XFrame;
@@ -126,9 +131,21 @@ void SdModule::Execute(SfxRequest& rReq)
 DocumentType eDocType = 
pDocSh->GetDoc()->GetDocumentType();
 
 PutItem( *pItem );
-SdOptions* pOptions = GetSdOptions( eDocType );
-if(pOptions)
-pOptions->SetMetric( 
static_cast(eUnit) );
+SvtSysLocale aSysLocale;
+
std::shared_ptr batch(
+
comphelper::ConfigurationChanges::create());
+
+if (eDocType == DocumentType::Impress)
+if 
(aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+
officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::set(static_cast(eUnit),
 batch);
+else
+

core.git: sd/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/frmview.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ff79a22fd04f9bbb5f4f67f21862db3a531de833
Author: Caolán McNamara 
AuthorDate: Wed May 1 20:17:51 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 2 00:13:16 2024 +0200

cid#1596707 Unchecked dynamic_cast

Change-Id: I2067f335dfacf2dfb4b5b18b54c738f3fba4c375
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166981
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 88ae6825738b..1fa0c4eba45d 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -282,8 +282,9 @@ void FrameView::Update(SdOptions const * pOptions)
 return;
 
 SdDrawDocument* pDrawDocument = dynamic_cast(());
+const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == 
DocumentType::Impress;
 
-if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
+if (bImpress)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );


core.git: sd/source

2024-04-28 Thread Gabor Kelemen (via logerrit)
 sd/source/core/CustomAnimationPreset.cxx |   12 ++--
 sd/source/core/TransitionPreset.cxx  |   13 ++---
 2 files changed, 4 insertions(+), 21 deletions(-)

New commits:
commit a83b7cd01cb804d6138b4ca7de0e1d7a8abfe31d
Author: Gabor Kelemen 
AuthorDate: Fri Apr 26 16:04:09 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Sun Apr 28 17:10:31 2024 +0200

Use less ConfigurationAccess in favor of officecfg

Change-Id: I9bb0165aabb0d5ff2caac33ec948a04d96eb3316
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166756
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/core/CustomAnimationPreset.cxx 
b/sd/source/core/CustomAnimationPreset.cxx
index 1d63b5d217b9..8c4a3dcfc927 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -252,17 +253,8 @@ void CustomAnimationPresets::importEffects()
 configuration::theDefaultProvider::get( xContext );
 
 // read path to transition effects files from config
-uno::Sequence aArgs(comphelper::InitAnyPropertySequence(
-{
-{"nodepath", 
uno::Any(OUString("/org.openoffice.Office.Impress/Misc"))}
-}));
-Reference xNameAccess(
-xConfigProvider->createInstanceWithArguments(
-"com.sun.star.configuration.ConfigurationAccess",
-aArgs ), UNO_QUERY_THROW );
 uno::Sequence< OUString > aFiles;
-xNameAccess->getByName( "EffectFiles" ) >>= aFiles;
-
+aFiles = officecfg::Office::Impress::Misc::EffectFiles::get();
 for (const auto& rFile : aFiles)
 {
 OUString aURL = comphelper::getExpandedUri(xContext, rFile);
diff --git a/sd/source/core/TransitionPreset.cxx 
b/sd/source/core/TransitionPreset.cxx
index 03adee6e79ff..b92f9ce5ca18 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -329,18 +330,8 @@ bool TransitionPreset::importTransitionPresetList( 
TransitionPresetList& rList )
 configuration::theDefaultProvider::get( xContext );
 
 // read path to transition effects files from config
-uno::Sequence aArgs(comphelper::InitAnyPropertySequence(
-{
-{"nodepath", 
uno::Any(OUString("/org.openoffice.Office.Impress/Misc"))}
-}));
-Reference xNameAccess(
-xConfigProvider->createInstanceWithArguments(
-"com.sun.star.configuration.ConfigurationAccess",
-aArgs),
-UNO_QUERY_THROW );
 uno::Sequence< OUString > aFiles;
-xNameAccess->getByName("TransitionFiles") >>= aFiles;
-
+aFiles = officecfg::Office::Impress::Misc::TransitionFiles::get();
 for (const auto& rFile : aFiles)
 {
 OUString aURL = comphelper::getExpandedUri(xContext, rFile);


core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/drviewsg.cxx |   10 +-
 sd/source/ui/view/frmview.cxx  |3 ++-
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit fe0d8555150949bb8729c656af62917ffc48bbf8
Author: Gabor Kelemen 
AuthorDate: Tue Apr 23 16:28:52 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 17:01:25 2024 +0200

Use less SdOptionsLayout->IsDragStripes/SetDragStripes in favor of officecfg

Change-Id: I0c0e2dd57d1f1408f85bca4b6ee3bfcebae1cf22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166596
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 2563168433d8..7dfd06e2177c 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -26,6 +26,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -103,6 +105,8 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 sal_uInt16 nSlot = rReq.GetSlot();
 
 SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
 
 switch( nSlot )
 {
@@ -137,7 +141,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
 case SID_HELPLINES_MOVE:
 {
-pOptions->SetDragStripes( !mpDrawView->IsDragStripes() );
+if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
+
officecfg::Office::Impress::Layout::Display::Guide::set(!mpDrawView->IsDragStripes(),
 batch);
+else
+
officecfg::Office::Draw::Layout::Display::Guide::set(!mpDrawView->IsDragStripes(),
 batch);
 }
 break;
 
@@ -192,6 +199,7 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 if( bDefault )
 return;
 
+batch->commit();
 pOptions->StoreConfig();
 
 // Saves the configuration IMMEDIATELY
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 4071ee2734bf..88ae6825738b 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -286,11 +286,13 @@ void FrameView::Update(SdOptions const * pOptions)
 if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
+SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
 }
 else
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
+SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
 }
 
@@ -302,7 +304,6 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOFrmSnap( pOptions->IsSnapFrame() );
 SetOPntSnap( pOptions->IsSnapPoints() );
 SetHlplVisible( pOptions->IsHelplines() );
-SetDragStripes( pOptions->IsDragStripes() );
 SetPlusHandlesAlwaysVisible( pOptions->IsHandlesBezier() );
 SetSnapMagneticPixel( pOptions->GetSnapArea() );
 SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );


core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/frmview.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c724b81b033a9ff968a1a63d66005d48a6b97e57
Author: Gabor Kelemen 
AuthorDate: Tue Apr 23 15:39:59 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 16:59:49 2024 +0200

Use less SdOptionsLayout->IsMoveOutline in favor of officecfg

Change-Id: I848e11a64a42b670254c88b791d0b2a2534d112f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166595
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 6d8fad05af9d..4071ee2734bf 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -286,10 +286,12 @@ void FrameView::Update(SdOptions const * pOptions)
 if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
+SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
 }
 else
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
+SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
 }
 
 SetGridVisible( pOptions->IsGridVisible() );
@@ -306,7 +308,6 @@ void FrameView::Update(SdOptions const * pOptions)
 SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
 SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );
 SetSlantButShear( pOptions->IsMoveOnlyDragging() );
-SetNoDragXorPolys ( !pOptions->IsMoveOutline() );
 SetCrookNoContortion( pOptions->IsCrookNoContortion() );
 SetAngleSnapEnabled( pOptions->IsRotate() );
 SetBigOrtho( pOptions->IsBigOrtho() );


core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/vectdlg.cxx |   49 ++-
 1 file changed, 12 insertions(+), 37 deletions(-)

New commits:
commit d119f504bf279a1bbe2e5840cfd5cbfa295fca8f
Author: Gabor Kelemen 
AuthorDate: Thu Apr 25 16:07:49 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 09:41:37 2024 +0200

tdf#158305 Store Convert to Polygon dialog settings correctly

Change-Id: I4d732adb8365cd4ecddf372b5646c14c7ffe828c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166631
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 93e9c3ed6e73..30760381e58f 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -25,8 +26,6 @@
 #include 
 
 #include 
-#include 
-#include 
 #include 
 
 #define VECTORIZE_MAX_EXTENT 512
@@ -294,47 +293,23 @@ IMPL_LINK_NOARG(SdVectorizeDlg, MetricModifyHdl, 
weld::MetricSpinButton&, void)
 
 void SdVectorizeDlg::LoadSettings()
 {
-rtl::Reference  xIStm( SD_MOD()->GetOptionStream(
-   SD_OPTION_VECTORIZE ,
-   SdOptionStreamMode::Load ) );
-sal_uInt16  nLayers;
-sal_uInt16  nReduce;
-sal_uInt16  nFillHoles;
-boolbFillHoles;
-
-if( xIStm.is() )
-{
-SdIOCompat aCompat( *xIStm, StreamMode::READ );
-xIStm->ReadUInt16( nLayers ).ReadUInt16( nReduce ).ReadUInt16( 
nFillHoles ).ReadCharAsBool( bFillHoles );
-}
-else
-{
-nLayers = 8;
-nReduce = 0;
-nFillHoles = 32;
-bFillHoles = false;
-}
-
-m_xNmLayers->set_value(nLayers);
-m_xMtReduce->set_value(nReduce, FieldUnit::NONE);
-m_xMtFillHoles->set_value(nFillHoles, FieldUnit::NONE);
-m_xCbFillHoles->set_active(bFillHoles);
+
m_xNmLayers->set_value(officecfg::Office::Common::Vectorize::ColorCount::get());
+
m_xMtReduce->set_value(officecfg::Office::Common::Vectorize::PointReduce::get(),
 FieldUnit::NONE);
+
m_xCbFillHoles->set_active(officecfg::Office::Common::Vectorize::FillHole::get());
+
m_xMtFillHoles->set_value(officecfg::Office::Common::Vectorize::TileExtent::get(),
 FieldUnit::NONE);
 
 ToggleHdl(*m_xCbFillHoles);
 }
 
 void SdVectorizeDlg::SaveSettings() const
 {
-rtl::Reference xOStm( SD_MOD()->GetOptionStream(
-  SD_OPTION_VECTORIZE  ,
-  SdOptionStreamMode::Store ) );
-
-if( xOStm.is() )
-{
-SdIOCompat aCompat( *xOStm, StreamMode::WRITE, 1 );
-xOStm->WriteUInt16( m_xNmLayers->get_value() 
).WriteUInt16(m_xMtReduce->get_value(FieldUnit::NONE));
-xOStm->WriteUInt16( m_xMtFillHoles->get_value(FieldUnit::NONE) 
).WriteBool(m_xCbFillHoles->get_active());
-}
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Vectorize::ColorCount::set(m_xNmLayers->get_value(),batch);
+
officecfg::Office::Common::Vectorize::PointReduce::set(m_xMtReduce->get_value(FieldUnit::NONE),batch);
+
officecfg::Office::Common::Vectorize::FillHole::set(m_xCbFillHoles->get_active(),batch);
+
officecfg::Office::Common::Vectorize::TileExtent::set(m_xMtFillHoles->get_value(FieldUnit::NONE),batch);
+batch->commit();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/morphdlg.cxx |   44 ++
 1 file changed, 11 insertions(+), 33 deletions(-)

New commits:
commit 7bd190858f5f044225eaad03ef41f736bfbbd8da
Author: Gabor Kelemen 
AuthorDate: Thu Apr 25 16:33:37 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 09:41:19 2024 +0200

tdf#158304 Store Cross-Fading dialog settings correctly

Change-Id: I3b8de3590a83def6fd6c77a504c69085dc2f0361
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166633
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index 96ed63f0b52d..0e9b7ddf5558 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -19,14 +19,13 @@
 
 #include 
 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -61,45 +60,24 @@ MorphDlg::MorphDlg(weld::Window* pParent, const SdrObject* 
pObj1, const SdrObjec
 
 MorphDlg::~MorphDlg()
 {
+SaveSettings();
 }
 
 void MorphDlg::LoadSettings()
 {
-rtl::Reference  xIStm( SD_MOD()->GetOptionStream( 
SD_OPTION_MORPHING ,
-   SdOptionStreamMode::Load ) );
-sal_uInt16  nSteps;
-boolbOrient, bAttrib;
-
-if( xIStm.is() )
-{
-SdIOCompat aCompat( *xIStm, StreamMode::READ );
-
-xIStm->ReadUInt16( nSteps ).ReadCharAsBool( bOrient ).ReadCharAsBool( 
bAttrib );
-}
-else
-{
-nSteps = 16;
-bOrient = bAttrib = true;
-}
-
-m_xMtfSteps->set_value(nSteps);
-m_xCbxOrientation->set_active(bOrient);
-m_xCbxAttributes->set_active(bAttrib);
+
m_xMtfSteps->set_value(officecfg::Office::Draw::Misc::CrossFading::Steps::get());
+
m_xCbxOrientation->set_active(officecfg::Office::Draw::Misc::CrossFading::Orientation::get());
+
m_xCbxAttributes->set_active(officecfg::Office::Draw::Misc::CrossFading::Attributes::get());
 }
 
 void MorphDlg::SaveSettings() const
 {
-rtl::Reference xOStm( SD_MOD()->GetOptionStream( 
SD_OPTION_MORPHING ,
-   SdOptionStreamMode::Store ) );
-
-if( xOStm.is() )
-{
-SdIOCompat aCompat( *xOStm, StreamMode::WRITE, 1 );
-
-xOStm->WriteUInt16( m_xMtfSteps->get_value() )
-  .WriteBool( m_xCbxOrientation->get_active() )
-  .WriteBool( m_xCbxAttributes->get_active() );
-}
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Draw::Misc::CrossFading::Steps::set(m_xMtfSteps->get_value(),batch);
+
officecfg::Office::Draw::Misc::CrossFading::Orientation::set(m_xCbxOrientation->get_active(),batch);
+
officecfg::Office::Draw::Misc::CrossFading::Attributes::set(m_xCbxAttributes->get_active(),batch);
+batch->commit();
 }
 
 } // end of namespace sd


core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/filter/html/pubdlg.cxx |  315 ---
 1 file changed, 315 deletions(-)

New commits:
commit febb429d5e02c2d6082194320ea689e8a01a3180
Author: Gabor Kelemen 
AuthorDate: Thu Apr 25 16:15:45 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 09:40:16 2024 +0200

Drop stale pubdlg.cxx file

Seems to be unused since
commit 28b6480c6bdd179f3943f768926b7f196226c768
tdf#105303: Drop html export wizard

Change-Id: I9d7aa80d64df6f68af51cd026ef49d6a61cf9cfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166632
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
deleted file mode 100644
index 5b42d3c8cfad..
--- a/sd/source/filter/html/pubdlg.cxx
+++ /dev/null
@@ -1,315 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include "htmlattr.hxx"
-#include "htmlpublishmode.hxx"
-#include 
-#include "buttonset.hxx"
-#include 
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::beans;
-
-#define NOOFPAGES 6
-
-//ID for the config-data with the HTML-settings
-const sal_uInt16 nMagic = sal_uInt16(0x1977);
-
-// Key for the soffice.ini
-constexpr OUStringLiteral KEY_QUALITY = u"JPG-EXPORT-QUALITY";
-
-static SvStream& operator>>(SvStream& rIn, SdPublishingDesign& rDesign);
-
-static SvStream& WriteSdPublishingDesign(SvStream& rOut, const 
SdPublishingDesign& rDesign);
-
-// This class has all the settings for the HTML-export autopilot
-class SdPublishingDesign
-{
-public:
-OUString m_aDesignName;
-
-HtmlPublishMode m_eMode;
-
-// special WebCast options
-PublishingScript m_eScript;
-OUString m_aCGI;
-OUString m_aURL;
-
-// special Kiosk options
-bool m_bAutoSlide;
-sal_uInt32 m_nSlideDuration;
-bool m_bEndless;
-
-// special HTML options
-bool m_bContentPage;
-bool m_bNotes;
-
-// misc options
-sal_uInt16 m_nResolution;
-OUString m_aCompression;
-PublishingFormat m_eFormat;
-bool m_bSlideSound;
-bool m_bHiddenSlides;
-
-// title page information
-OUString m_aAuthor;
-OUString m_aEMail;
-OUString m_aWWW;
-OUString m_aMisc;
-bool m_bDownload;
-bool m_bCreated; // not used
-
-// buttons and colorscheme
-sal_Int16 m_nButtonThema;
-bool m_bUserAttr;
-Color m_aBackColor;
-Color m_aTextColor;
-Color m_aLinkColor;
-Color m_aVLinkColor;
-Color m_aALinkColor;
-bool m_bUseAttribs;
-bool m_bUseColor;
-
-SdPublishingDesign();
-
-bool operator==(const SdPublishingDesign& rDesign) const;
-friend SvStream& operator>>(SvStream& rIn, SdPublishingDesign& rDesign);
-friend SvStream& WriteSdPublishingDesign(SvStream& rOut, const 
SdPublishingDesign& rDesign);
-};
-
-// load Default-settings
-SdPublishingDesign::SdPublishingDesign()
-: m_eMode(PUBLISH_HTML)
-, m_eScript(SCRIPT_ASP)
-, m_bAutoSlide(true)
-, m_nSlideDuration(15)
-, m_bEndless(true)
-, m_bContentPage(true)
-, m_bNotes(true)
-, m_nResolution(PUB_LOWRES_WIDTH)
-, m_eFormat(FORMAT_PNG)
-, m_bSlideSound(true)
-, m_bHiddenSlides(false)
-, m_bDownload(false)
-, m_bCreated(false)
-, m_nButtonThema(-1)
-, m_bUserAttr(false)
-, m_aBackColor(COL_WHITE)
-, m_aTextColor(COL_BLACK)
-, m_aLinkColor(COL_BLUE)
-, m_aVLinkColor(COL_LIGHTGRAY)
-, m_aALinkColor(COL_GRAY)
-, m_bUseAttribs(true)
-, m_bUseColor(true)
-{
-FilterConfigItem 
aFilterConfigItem(u"Office.Common/Filter/Graphic/Export/JPG");
-sal_Int32 nCompression = aFilterConfigItem.ReadInt32(KEY_QUALITY, 75);
-m_aCompression = OUString::number(nCompression) + "%";
-
-SvtUserOptions aUserOptions;
-m_aAuthor = aUserOptions.GetFirstName();
-if (!m_aAuthor.isEmpty() && 

core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/drviewse.cxx |   15 ---
 sd/source/ui/view/frmview.cxx  |   13 -
 2 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit 3029019cd930fd672ceda413376a26a33fdbad38
Author: Gabor Kelemen 
AuthorDate: Tue Apr 16 14:16:19 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 09:38:25 2024 +0200

Use less SdOptionsLayout->IsRulerVisible/SetRulerVisible in favor of 
officecfg

Change-Id: I0f6b38d364fb880e8dcd3cae08f2c5298cb7a5bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166594
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index a49ce83b15e3..d7cc62eb9ce0 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -96,6 +96,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -1117,12 +1119,19 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
 
 if(bOldHasRuler != bHasRuler)
 {
-SdOptions* pOptions = 
SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
 
-if(pOptions && pOptions->IsRulerVisible() != bHasRuler)
+if (GetDoc()->GetDocumentType() == DocumentType::Impress)
 {
-pOptions->SetRulerVisible(bHasRuler);
+
officecfg::Office::Impress::Layout::Display::Ruler::set(bHasRuler, batch);
 }
+else
+{
+
officecfg::Office::Draw::Layout::Display::Ruler::set(bHasRuler, batch);
+}
+
+batch->commit();
 }
 
 Invalidate (SID_RULER);
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 50cf9d636396..6d8fad05af9d 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -280,7 +281,17 @@ void FrameView::Update(SdOptions const * pOptions)
 if (!pOptions)
 return;
 
-mbRuler = pOptions->IsRulerVisible();
+SdDrawDocument* pDrawDocument = dynamic_cast(());
+
+if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
+{
+mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
+}
+else
+{
+mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
+}
+
 SetGridVisible( pOptions->IsGridVisible() );
 SetSnapAngle( pOptions->GetAngle() );
 SetGridSnap( pOptions->IsUseGridSnap() );


core.git: sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |   47 +-
 1 file changed, 33 insertions(+), 14 deletions(-)

New commits:
commit cb80115f79e59720406ea245d7d914487ab343d8
Author: Gabor Kelemen 
AuthorDate: Sat Apr 13 09:09:08 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 09:37:43 2024 +0200

Use less SdOptionsLayoutItem in Options - Impress - View

in favor of officecfg

Change-Id: I3aea51bf0c1a2184163c07bf42b26164311843de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166593
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 812d39ffd8aa..39f04d15a915 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -197,7 +197,7 @@ OUString SdTpOptionsContents::GetAllStrings()
 return sAllStrings.replaceAll("_", "");
 }
 
-bool SdTpOptionsContents::FillItemSet( SfxItemSet* rAttrs )
+bool SdTpOptionsContents::FillItemSet( SfxItemSet* )
 {
 bool bModified = false;
 
@@ -206,27 +206,46 @@ bool SdTpOptionsContents::FillItemSet( SfxItemSet* rAttrs 
)
 m_xCbxDragStripes->get_state_changed_from_saved() ||
 m_xCbxHandlesBezier->get_state_changed_from_saved() )
 {
-SdOptionsLayoutItem aOptsItem;
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
 
-aOptsItem.GetOptionsLayout().SetRulerVisible( 
m_xCbxRuler->get_active() );
-aOptsItem.GetOptionsLayout().SetMoveOutline( 
m_xCbxMoveOutline->get_active() );
-aOptsItem.GetOptionsLayout().SetDragStripes( 
m_xCbxDragStripes->get_active() );
-aOptsItem.GetOptionsLayout().SetHandlesBezier( 
m_xCbxHandlesBezier->get_active() );
+if (m_bDrawMode)
+{
+officecfg::Office::Draw::Layout::Display::Ruler::set( 
m_xCbxRuler->get_active(), batch );
+officecfg::Office::Draw::Layout::Display::Contour::set( 
m_xCbxMoveOutline->get_active(), batch );
+officecfg::Office::Draw::Layout::Display::Guide::set( 
m_xCbxDragStripes->get_active(), batch );
+officecfg::Office::Draw::Layout::Display::Bezier::set( 
m_xCbxHandlesBezier->get_active(), batch );
+}
+else
+{
+officecfg::Office::Impress::Layout::Display::Ruler::set( 
m_xCbxRuler->get_active(), batch );
+officecfg::Office::Impress::Layout::Display::Contour::set( 
m_xCbxMoveOutline->get_active(), batch );
+officecfg::Office::Impress::Layout::Display::Guide::set( 
m_xCbxDragStripes->get_active(), batch );
+officecfg::Office::Impress::Layout::Display::Bezier::set( 
m_xCbxHandlesBezier->get_active(), batch );
+}
 
-rAttrs->Put( aOptsItem );
+batch->commit();
 bModified = true;
 }
 return bModified;
 }
 
-void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs )
+void SdTpOptionsContents::Reset( const SfxItemSet* )
 {
-SdOptionsLayoutItem aLayoutItem( rAttrs->Get( ATTR_OPTIONS_LAYOUT ) );
-
-m_xCbxRuler->set_active( aLayoutItem.GetOptionsLayout().IsRulerVisible() );
-m_xCbxMoveOutline->set_active( 
aLayoutItem.GetOptionsLayout().IsMoveOutline() );
-m_xCbxDragStripes->set_active( 
aLayoutItem.GetOptionsLayout().IsDragStripes() );
-m_xCbxHandlesBezier->set_active( 
aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
+if (m_bDrawMode)
+{
+m_xCbxRuler->set_active( 
officecfg::Office::Draw::Layout::Display::Ruler::get() );
+m_xCbxMoveOutline->set_active( 
officecfg::Office::Draw::Layout::Display::Contour::get() );
+m_xCbxDragStripes->set_active( 
officecfg::Office::Draw::Layout::Display::Guide::get() );
+m_xCbxHandlesBezier->set_active( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
+}
+else
+{
+
m_xCbxRuler->set_active(officecfg::Office::Impress::Layout::Display::Ruler::get()
 );
+
m_xCbxMoveOutline->set_active(officecfg::Office::Impress::Layout::Display::Contour::get()
 );
+
m_xCbxDragStripes->set_active(officecfg::Office::Impress::Layout::Display::Guide::get()
 );
+
m_xCbxHandlesBezier->set_active(officecfg::Office::Impress::Layout::Display::Bezier::get()
 );
+}
 
 bool bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Ruler::isReadOnly() :
 officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly();


core.git: sd/source

2024-04-24 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/inc/ViewShell.hxx |1 
 sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx |1 
 sd/source/ui/view/drawview.cxx |1 
 sd/source/ui/view/sdwindow.cxx |   12 -
 sd/source/ui/view/viewshe2.cxx |   97 
--
 sd/source/ui/view/viewshel.cxx |7 
 6 files changed, 95 insertions(+), 24 deletions(-)

New commits:
commit dfb412699b96e12b2758be0e422c3e775f183d17
Author: Sarper Akdemir 
AuthorDate: Tue Apr 23 16:00:32 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Wed Apr 24 11:28:00 2024 +0200

tdf#38164: sd: allow panning across pages when zoomed in

Change-Id: I513b2b8cbdc91733e551da71a1e6782fecc981a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166542
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 6ee126db9027..9e5e8e068160 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -382,6 +382,7 @@ public:
 */
 virtual void ShowUIControls (bool bVisible);
 bool IsPageFlipMode() const;
+bool CanPanAcrossPages() const;
 
 /** Set the given window as new parent window.  This is not possible for
 all views, so the return value tells the caller if the relocation
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 9203c06e8f9f..e8fc847a4a7b 100644
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -176,6 +176,7 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase 
(const SharedPageDescri
 pDrawViewShell->SwitchPage(nPageNumber);
 TabControl& rPageTabControl = pDrawViewShell->GetPageTabControl();
 
rPageTabControl.SetCurPageId(rPageTabControl.GetPageId(nPageNumber));
+pDrawViewShell->UpdateScrollBars();
 }
 }
 }
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 6792250fd8e7..99c166002cbd 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -407,6 +407,7 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& 
rHint)
 if ( mnPOCHSmph == 0 && eHintKind == SdrHintKind::PageOrderChange )
 {
 mpDrawViewShell->ResetActualPage();
+mpDrawViewShell->UpdateScrollBars();
 }
 else if ( eHintKind == SdrHintKind::LayerChange || eHintKind == 
SdrHintKind::LayerOrderChange )
 {
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index ab8a7bbd8889..8f71c17db957 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -667,8 +667,6 @@ void Window::SetVisibleXY(double fX, double fY)
 double Window::GetVisibleWidth() const
 {
 Size aWinSize = PixelToLogic(GetOutputSizePixel());
-if ( aWinSize.Width() > maViewSize.Width() )
-aWinSize.setWidth( maViewSize.Width() );
 return
 maViewSize.Width() == 0 ? 0 : (static_cast(aWinSize.Width()) / 
maViewSize.Width());
 }
@@ -680,8 +678,6 @@ double Window::GetVisibleWidth() const
 double Window::GetVisibleHeight() const
 {
 Size aWinSize = PixelToLogic(GetOutputSizePixel());
-if ( aWinSize.Height() > maViewSize.Height() )
-aWinSize.setHeight( maViewSize.Height() );
 return maViewSize.Height() == 0
 ? 0 : (static_cast(aWinSize.Height()) / maViewSize.Height());
 }
@@ -705,7 +701,7 @@ Point Window::GetVisibleCenter()
  */
 double Window::GetScrlLineWidth() const
 {
-return (GetVisibleWidth() * SCROLL_LINE_FACT);
+return std::min(1.0, GetVisibleWidth()) * SCROLL_LINE_FACT;
 }
 
 /**
@@ -714,7 +710,7 @@ double Window::GetScrlLineWidth() const
  */
 double Window::GetScrlLineHeight() const
 {
-return (GetVisibleHeight() * SCROLL_LINE_FACT);
+return std::min(1.0, GetVisibleHeight()) * SCROLL_LINE_FACT;
 }
 
 /**
@@ -723,7 +719,7 @@ double Window::GetScrlLineHeight() const
  */
 double Window::GetScrlPageWidth() const
 {
-return (GetVisibleWidth() * SCROLL_PAGE_FACT);
+return std::min(1.0, GetVisibleWidth()) * SCROLL_PAGE_FACT;
 }
 
 /**
@@ -732,7 +728,7 @@ double Window::GetScrlPageWidth() const
  */
 double Window::GetScrlPageHeight() const
 {
-return (GetVisibleHeight() * SCROLL_PAGE_FACT);
+return std::min(1.0, GetVisibleHeight()) * SCROLL_PAGE_FACT;
 }
 
 /**
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index b7ae44f2c3e1..18658fc8c929 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -63,6 +63,19 @@
 
 using namespace com::sun::star;
 
+namespace
+{
+inline double getViewToScrollScalarForPanAcrossPages(sal_uInt16 nTotalPages, 
double 

core.git: sd/source slideshow/source

2024-04-22 Thread Armin Le Grand (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx  |   12 
 slideshow/source/engine/slideshowimpl.cxx |8 
 2 files changed, 20 deletions(-)

New commits:
commit ba431d2bcb70b64bf0eaec29a09916ea37755235
Author: Armin Le Grand 
AuthorDate: Thu Apr 18 11:59:26 2024 +0200
Commit: Armin Le Grand 
CommitDate: Mon Apr 22 15:33:21 2024 +0200

Revert "IASS: Correct Buffering of last Slide"

This reverts commit 77eb3f1a76892b6070e77324e260204408383ef4.

Reason for revert:
Better solution in https://gerrit.libreoffice.org/c/core/+/166177
which is 052c668da38b70943d24770895abc8119aace2a6

Change-Id: I42248771c993bcd04c2fe368795db4e1fe7a2586
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166212
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index f8163de5b34e..e11d42a89be9 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -500,18 +500,6 @@ void AnimationSlideController::displayCurrentSlide( const 
Reference< XSlideShow
 Any(aValue),
 PropertyState_DIRECT_VALUE);
 }
-else if (-1 == nNextSlideNumber)
-{
-// IASS: next slide does not exist, thus current slide is the last one.
-// we need to signal to stop Prefetch since else SlideShowImpl *keeps* 
the
-// last slide buffered and will just re-use it when asked to update, 
thus
-// updates will not work.
-aProperties.emplace_back( "Prefetch" ,
--1,
-Any(false),
-PropertyState_DIRECT_VALUE);
-}
-
 if (bSkipAllMainSequenceEffects)
 {
 // Add one property that prevents the slide transition from being
diff --git a/slideshow/source/engine/slideshowimpl.cxx 
b/slideshow/source/engine/slideshowimpl.cxx
index ee02fc8d8f69..1acc020414db 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1041,14 +1041,6 @@ public:
 seq[0] >>= mpSlideShowImpl->mxPrefetchSlide;
 seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode;
 }
-else // rProperty.Value might be tested to 'bool' and 'false'
-{
-// IASS: There is no 'next' slide (last one is displayed),
-// so end/flush Prefetch since that might still hold the
-// last slide what would prevent updating/re-creating it
-mpSlideShowImpl->mxPrefetchSlide.clear();
-mpSlideShowImpl->mpPrefetchSlide.reset();
-}
 }
 else if ( rProperty.Name == "SkipAllMainSequenceEffects" )
 {


core.git: sd/source

2024-04-20 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/view/sdwindow.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 20e2b922da0d4d49a5e1a88fddea77ade92cbdf3
Author: Sarper Akdemir 
AuthorDate: Fri Apr 19 00:40:28 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Sat Apr 20 13:17:05 2024 +0200

related tdf#33603: sd: do not assume there's always a viewshell

Change-Id: I171639150a84372e7e25b5246d4882c467edd58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166271
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index d409aeec1304..ab8a7bbd8889 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -742,7 +742,8 @@ void Window::LoseFocus()
 {
 mnTicks = 0;
 vcl::Window::LoseFocus ();
-GetViewShell()->onLoseFocus();
+if (mpViewShell)
+mpViewShell->onLoseFocus();
 }
 
 /**
@@ -752,7 +753,8 @@ void Window::GrabFocus()
 {
 mnTicks  = 0;
 vcl::Window::GrabFocus ();
-GetViewShell()->onGrabFocus();
+if (mpViewShell)
+mpViewShell->onGrabFocus();
 }
 
 void Window::DataChanged( const DataChangedEvent& rDCEvt )


core.git: sd/source

2024-04-18 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/inc/NotesPanelView.hxx   |3 ++
 sd/source/ui/inc/NotesPanelViewShell.hxx  |2 +
 sd/source/ui/inc/ViewShell.hxx|   14 
 sd/source/ui/view/NotesPanelView.cxx  |   34 ++
 sd/source/ui/view/NotesPanelViewShell.cxx |4 +++
 sd/source/ui/view/sdwindow.cxx|2 +
 6 files changed, 59 insertions(+)

New commits:
commit efef507cfd480cc6f1efc964ac2f9e033e18ad87
Author: Sarper Akdemir 
AuthorDate: Tue Apr 16 17:09:28 2024 +0200
Commit: Sarper Akdemir 
CommitDate: Thu Apr 18 13:48:28 2024 +0200

tdf#33603: make the notes pane handle placeholder text on focus

Change-Id: Id2bca2b8a8bafa9da44a5f97a8e763b512078ef7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166152
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/sd/source/ui/inc/NotesPanelView.hxx 
b/sd/source/ui/inc/NotesPanelView.hxx
index 810cddd6af71..9f2b71523c09 100644
--- a/sd/source/ui/inc/NotesPanelView.hxx
+++ b/sd/source/ui/inc/NotesPanelView.hxx
@@ -39,6 +39,7 @@ class NotesPanelView final : public ::sd::SimpleOutlinerView
 
 SdrTextObj* mpTextObj = nullptr;
 bool mbIgnoreNotifications = false;
+bool mbInFocus = false;
 
 /** stores the last used document color.
 this is changed in onUpdateStyleSettings()
@@ -61,6 +62,8 @@ public:
 
 void Paint(const ::tools::Rectangle& rRect, ::sd::Window const* pWin);
 void onResize();
+void onGrabFocus();
+void onLoseFocus();
 
 OutlinerView* GetOutlinerView();
 OutlinerView* GetViewByWindow(vcl::Window const* pWin) const override;
diff --git a/sd/source/ui/inc/NotesPanelViewShell.hxx 
b/sd/source/ui/inc/NotesPanelViewShell.hxx
index e79ac899fe30..39901d6e4faa 100644
--- a/sd/source/ui/inc/NotesPanelViewShell.hxx
+++ b/sd/source/ui/inc/NotesPanelViewShell.hxx
@@ -49,6 +49,8 @@ public:
 virtual void Activate(bool IsMDIActivate) override;
 /** this method is called when the visible area of the view from this 
viewshell is changed */
 virtual void VisAreaChanged(const ::tools::Rectangle& rRect) override;
+virtual void onGrabFocus() override;
+virtual void onLoseFocus() override;
 
 virtual void ArrangeGUIElements() override;
 virtual SdPage* GetActualPage() override;
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 85bc43e86c09..6ee126db9027 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -412,6 +412,20 @@ public:
 SdPage* pPage,
 const sal_Int32 nInsertPosition = -1);
 
+/** Called by sd::Window::LoseFocus to enable sd::ViewShell to take action
+when focus is lost.
+
+e.g. overriden by NotesPanelViewShell
+ */
+virtual void onLoseFocus(){};
+
+/** Called by sd::Window::GrabFocus to enable sd::ViewShell to take action
+when focus is grabbed.
+
+e.g. overriden by NotesPanelViewShell
+ */
+virtual void onGrabFocus(){};
+
 /// Allows adjusting the point or mark of the selection to a document 
coordinate.
 void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool 
bClearMark);
 /// Gets the current selection
diff --git a/sd/source/ui/view/NotesPanelView.cxx 
b/sd/source/ui/view/NotesPanelView.cxx
index 2822a8df4c02..a2ae58e48331 100644
--- a/sd/source/ui/view/NotesPanelView.cxx
+++ b/sd/source/ui/view/NotesPanelView.cxx
@@ -224,6 +224,40 @@ void NotesPanelView::onResize()
 }
 }
 
+void NotesPanelView::onGrabFocus()
+{
+if (mbInFocus)
+return;
+mbInFocus = true;
+
+if (mpTextObj && mpTextObj->IsEmptyPresObj())
+{
+// clear the "Click to add Notes" text on entering the window.
+maOutliner.SetToEmptyText();
+}
+}
+
+void NotesPanelView::onLoseFocus()
+{
+if (!mbInFocus)
+return;
+mbInFocus = false;
+
+aModifyIdle.Stop();
+if (mpTextObj)
+{
+if (maOutliner.GetEditEngine().GetText().getLength() == 0)
+{
+// if the notes are empty restore the placeholder text and state.
+SdPage* pPage = 
dynamic_cast(mpTextObj->getSdrPageFromSdrObject());
+if (pPage)
+pPage->RestoreDefaultText(mpTextObj);
+}
+else
+setNotesToDoc();
+}
+}
+
 /**
  * Handler for StatusEvents
  */
diff --git a/sd/source/ui/view/NotesPanelViewShell.cxx 
b/sd/source/ui/view/NotesPanelViewShell.cxx
index d4dd078dfc4d..82f3133dad75 100644
--- a/sd/source/ui/view/NotesPanelViewShell.cxx
+++ b/sd/source/ui/view/NotesPanelViewShell.cxx
@@ -233,6 +233,10 @@ void NotesPanelViewShell::VisAreaChanged(const 
::tools::Rectangle& rRect)
 GetViewShellBase().GetDrawController()->FireVisAreaChanged(rRect);
 }
 
+void NotesPanelViewShell::onGrabFocus() { mpNotesPanelView->onGrabFocus(); }
+
+void NotesPanelViewShell::onLoseFocus() { mpNotesPanelView->onLoseFocus(); }
+
 void NotesPanelViewShell::ArrangeGUIElements()
 {
 

core.git: sd/source slideshow/source

2024-04-18 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx  |   27 +++
 sd/source/ui/slideshow/slideshowimpl.hxx  |4 
 slideshow/source/engine/slideshowimpl.cxx |   14 ++
 3 files changed, 45 insertions(+)

New commits:
commit 052c668da38b70943d24770895abc8119aace2a6
Author: Armin Le Grand (allotropia) 
AuthorDate: Wed Apr 17 12:58:18 2024 +0200
Commit: Armin Le Grand 
CommitDate: Thu Apr 18 11:12:40 2024 +0200

tdf#160669 IASS: flush Prefetch for SLideShow as needed

Change-Id: I3c0e2be658358ab5b412ab18cce197eb28e5c0db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166177
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 29870dc45783..f8163de5b34e 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3434,6 +3434,21 @@ bool SlideshowImpl::isCurrentSlideInvolved(const 
SdrHint& rHint)
 return pHintPage == pCurrentSlide;
 }
 
+void SlideshowImpl::sendHintSlideChanged(const SdrPage* pChangedPage) const
+{
+if (nullptr == pChangedPage)
+return;
+
+if (!mxShow.is())
+return;
+
+mxShow->setProperty(
+beans::PropertyValue( "HintSlideChanged" ,
+-1,
+Any( GetXDrawPageForSdrPage(const_cast(pChangedPage)) ),
+beans::PropertyState_DIRECT_VALUE ) );
+}
+
 void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
 {
 if (SfxHintId::ThisIsAnSdrHint != rHint.GetId())
@@ -3463,6 +3478,9 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 // avoid multiple events
 return;
 
+// tdf#160669 IASS: inform about ALL changed slides due to prefetch
+sendHintSlideChanged(rSdrHint.GetPage());
+
 if (!isCurrentSlideInvolved(rSdrHint))
 // nothing to do when current slide is not involved
 return;
@@ -3478,6 +3496,9 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 // avoid multiple events
 return;
 
+// tdf#160669 IASS: inform about ALL changed slides due to prefetch
+sendHintSlideChanged(rSdrHint.GetPage());
+
 if (!isCurrentSlideInvolved(rSdrHint))
 // nothing to do when current slide is not involved
 return;
@@ -3493,6 +3514,9 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 // avoid multiple events
 return;
 
+// tdf#160669 IASS: inform about ALL changed slides due to prefetch
+sendHintSlideChanged(rSdrHint.GetPage());
+
 if (!isCurrentSlideInvolved(rSdrHint))
 // nothing to do when current slide is not involved
 return;
@@ -3516,6 +3540,9 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 if (nullptr != mnEventPageOrderChange)
 Application::RemoveUserEvent( mnEventPageOrderChange );
 
+// tdf#160669 IASS: inform about ALL changed slides due to prefetch
+sendHintSlideChanged(rSdrHint.GetPage());
+
 // order of pages (object pages or master pages) changed 
(Insert/Remove/ChangePos)
 uno::Reference< css::drawing::XDrawPage > 
XCurrentSlide(getCurrentSlide());
 mnEventPageOrderChange = 
AsyncUpdateSlideshow_Impl::AsyncUpdateSlideshow(this, XCurrentSlide, eHintKind);
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx 
b/sd/source/ui/slideshow/slideshowimpl.hxx
index 7d0d759680f1..8b4e25a80e83 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -217,6 +217,10 @@ private:
 // helper to check if given hint is associated with CurrentSlide
 bool isCurrentSlideInvolved(const SdrHint& rHint);
 
+// tdf#160669 IASS: helper to inform presentation::XSlideShow about change 
so that
+// prefetch can be corrected/flushed
+void sendHintSlideChanged(const SdrPage* pChangedPage) const;
+
 // override WeakComponentImplHelperBase::disposing()
 // This function is called upon disposing the component,
 // if your component needs special work when it becomes
diff --git a/slideshow/source/engine/slideshowimpl.cxx 
b/slideshow/source/engine/slideshowimpl.cxx
index 121416327191..ee02fc8d8f69 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1609,6 +1609,20 @@ sal_Bool SlideShowImpl::setProperty( 
beans::PropertyValue const& rProperty )
 // precondition: must only be called from the main thread!
 DBG_TESTSOLARMUTEX();
 
+// tdf#160669 IASS: if hint is about PrefetchSlide, flush it to avoid 
errors
+if ( rProperty.Name == "HintSlideChanged" )
+{
+uno::Reference< drawing::XDrawPage > 

core.git: sd/source

2024-04-15 Thread Oliver Specht (via logerrit)
 sd/source/ui/view/drviewse.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 6f99187ec29e8716e1fb9ffa18b1830048608fbc
Author: Oliver Specht 
AuthorDate: Mon Apr 15 11:40:12 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Apr 15 19:01:24 2024 +0200

Case rotation in Impress: skip sentence case

Sentence case does not make sense if a selection contains less than two 
words.
Rotation then skkips to the next case mode.

Change-Id: I79d6560c494b716a53bfed654027f6f37dc6c362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166115
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index da0dbedd1195..a49ce83b15e3 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1474,8 +1474,14 @@ void DrawViewShell::FuSupportRotate(SfxRequest const 
)
 
 if (!pOLV)
 return;
-
-pOLV->TransliterateText( m_aRotateCase.getNextMode() );
+TransliterationFlags transFlags = m_aRotateCase.getNextMode();
+if (TransliterationFlags::SENTENCE_CASE == transFlags)
+{
+OUString SelectedText = pOLV->GetSelected().trim();
+if (SelectedText.getLength() <= 2 || (SelectedText.indexOf(' ') < 0 && 
SelectedText.indexOf('  ') < 0))
+transFlags = m_aRotateCase.getNextMode();
+}
+pOLV->TransliterateText( transFlags );
 }
 
 void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText,


core.git: sd/source

2024-04-13 Thread Mike Kaganski (via logerrit)
 sd/source/filter/eppt/epptso.cxx  |2 +-
 sd/source/filter/eppt/pptx-stylesheet.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b21978ba644f85ca259b7d58193c6caf03291105
Author: Mike Kaganski 
AuthorDate: Sat Apr 13 23:39:01 2024 +0500
Commit: Mike Kaganski 
CommitDate: Sun Apr 14 06:51:49 2024 +0200

Use more o3tl::convert

Change-Id: I56d6909dc3b1a7d45e4e3f45583321b1338838cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166063
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 97a0f170edf0..b8d7f8fdf6e3 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -662,7 +662,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, 
TextObj& rTextObj )
 }
 else
 {
-if ( !pPara->mbFixedLineSpacing && rPortion.mnCharHeight > 
static_cast( static_cast(-nLineSpacing) * 0.001 * 72.0 / 
2.54 ) ) // 1/100mm to point
+if ( !pPara->mbFixedLineSpacing && rPortion.mnCharHeight > 
o3tl::make_unsigned( o3tl::convert(-nLineSpacing, o3tl::Length::mm100, 
o3tl::Length::pt) ) )
 nLineSpacing = nNormalSpacing;
 else
 nLineSpacing = static_cast( 
convertMm100ToMasterUnit(nLineSpacing) );
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx 
b/sd/source/filter/eppt/pptx-stylesheet.cxx
index 459020278fc9..fff1b5d06f2d 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -249,7 +249,7 @@ void PPTExParaSheet::SetStyleSheet( const 
css::uno::Reference< css::beans::XProp
 }
 else
 {
-if ( rCharLevel.mnFontHeight > static_cast( 
static_cast(-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point
+if ( rCharLevel.mnFontHeight > 
o3tl::make_unsigned(o3tl::convert(-nLineSpacing, o3tl::Length::mm100, 
o3tl::Length::pt) ) )
 {
 const FontCollectionEntry* pDesc = rFontCollection.GetById( 
rCharLevel.mnFont );
 if ( pDesc )


core.git: sd/source

2024-04-12 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/view/NotesPanelViewShell.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 34c698fe1bf26fd6b01a62df2f847ab05536c215
Author: Andrea Gelmini 
AuthorDate: Thu Apr 11 15:07:52 2024 +0200
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Fri Apr 12 12:24:33 2024 +0200

Remove duplicated include

Change-Id: I423fed50156a225d14c0afeebd7b72936c052b97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166008
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/sd/source/ui/view/NotesPanelViewShell.cxx 
b/sd/source/ui/view/NotesPanelViewShell.cxx
index ec849a2484d9..d4dd078dfc4d 100644
--- a/sd/source/ui/view/NotesPanelViewShell.cxx
+++ b/sd/source/ui/view/NotesPanelViewShell.cxx
@@ -78,8 +78,6 @@
 
 #include 
 
-#include 
-
 #define ShellClass_NotesPanelViewShell
 using namespace sd;
 #include 


core.git: sd/source

2024-04-11 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1dbe90cb078bddaf8bbd333823762744158c92bb
Author: Jim Raykowski 
AuthorDate: Wed Apr 3 11:27:21 2024 -0800
Commit: Jim Raykowski 
CommitDate: Fri Apr 12 06:13:22 2024 +0200

Resolves tdf#157403 sidebar SdNavigator does not show new slide/page

after file reload

Change-Id: I8ba7ffac3c098cf388a67e3454c5986b5a8b1f3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165767
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 5c01c44b618d..46975a6bb046 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -710,7 +710,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* 
pDocName )
 
 ::sd::DrawDocShell* pCurrentDocShell =
   dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
-SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst([](const 
SfxObjectShell*){return true;}, false);
+SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst();
 while( pSfxDocShell )
 {
 ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell 
*>( pSfxDocShell );
@@ -739,7 +739,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* 
pDocName )
 
 maDocList.push_back( aInfo );
 }
-pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, [](const 
SfxObjectShell*){return true;}, false );
+pSfxDocShell = SfxObjectShell::GetNext(*pSfxDocShell);
 }
 }
 mxLbDocs->set_active(nPos);


core.git: sd/source slideshow/source

2024-04-11 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx  |   12 
 slideshow/source/engine/slideshowimpl.cxx |8 
 2 files changed, 20 insertions(+)

New commits:
commit 77eb3f1a76892b6070e77324e260204408383ef4
Author: Armin Le Grand (allotropia) 
AuthorDate: Thu Apr 11 16:37:30 2024 +0200
Commit: Armin Le Grand 
CommitDate: Thu Apr 11 18:59:46 2024 +0200

IASS: Correct Buffering of last Slide

There is a mechanism to pre-fetch the next slide, but
at the last slide that just gets not reset/refreshed.
Thus the last slide *is* the buffered slide.
When making changes and refreshing the SlideShow display
for the last slide this pe-fetched one is just used, so
the slide content gets not re-created and thus not
updated.
I added needed code to do that now when reacing the last
slide to make that work.

Change-Id: Ie57e6917e0996d5fce46021aeb933064c47dd90f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166011
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 7c05da952c5e..29870dc45783 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -500,6 +500,18 @@ void AnimationSlideController::displayCurrentSlide( const 
Reference< XSlideShow
 Any(aValue),
 PropertyState_DIRECT_VALUE);
 }
+else if (-1 == nNextSlideNumber)
+{
+// IASS: next slide does not exist, thus current slide is the last one.
+// we need to signal to stop Prefetch since else SlideShowImpl *keeps* 
the
+// last slide buffered and will just re-use it when asked to update, 
thus
+// updates will not work.
+aProperties.emplace_back( "Prefetch" ,
+-1,
+Any(false),
+PropertyState_DIRECT_VALUE);
+}
+
 if (bSkipAllMainSequenceEffects)
 {
 // Add one property that prevents the slide transition from being
diff --git a/slideshow/source/engine/slideshowimpl.cxx 
b/slideshow/source/engine/slideshowimpl.cxx
index 5e0dbbb8074e..121416327191 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1041,6 +1041,14 @@ public:
 seq[0] >>= mpSlideShowImpl->mxPrefetchSlide;
 seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode;
 }
+else // rProperty.Value might be tested to 'bool' and 'false'
+{
+// IASS: There is no 'next' slide (last one is displayed),
+// so end/flush Prefetch since that might still hold the
+// last slide what would prevent updating/re-creating it
+mpSlideShowImpl->mxPrefetchSlide.clear();
+mpSlideShowImpl->mpPrefetchSlide.reset();
+}
 }
 else if ( rProperty.Name == "SkipAllMainSequenceEffects" )
 {


core.git: sd/source

2024-04-10 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |   61 +++---
 1 file changed, 29 insertions(+), 32 deletions(-)

New commits:
commit 64f1fbc4a66715aa616ffeff1eb612393fa9fba3
Author: Jim Raykowski 
AuthorDate: Wed Mar 13 16:26:44 2024 -0800
Commit: Jim Raykowski 
CommitDate: Wed Apr 10 18:48:39 2024 +0200

tdf#160190 Fix selection stops working in sidebar SdNavigator

after formula or OLE insert

Change-Id: I945a07fef137aa30afff91ac7c50f180e5f4c3d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164797
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 538f1c68b113..5c01c44b618d 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -164,20 +164,21 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* 
pDoc )
 sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
 ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
 
+// tdf#160190
+if (!pViewShell)
+return;
+
 // tdf#139944 disable navigator in master mode
-if (pViewShell)
+if (const sd::DrawViewShell* pDrawViewShell = 
static_cast<::sd::DrawViewShell*>(pViewShell))
 {
-if (const sd::DrawViewShell* pDrawViewShell = 
static_cast<::sd::DrawViewShell*>(pViewShell))
+if (pDrawViewShell->GetEditMode() == EditMode::MasterPage)
 {
-if (pDrawViewShell->GetEditMode() == EditMode::MasterPage)
-{
-m_xContainer->set_sensitive(false);
-mxTlbObjects->clear();
-return;
-}
-else
-m_xContainer->set_sensitive(true);
+m_xContainer->set_sensitive(false);
+mxTlbObjects->clear();
+return;
 }
+else
+m_xContainer->set_sensitive(true);
 }
 
 const OUString& aDocShName( pDocShell->GetName() );
@@ -189,8 +190,7 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
 mxLbDocs->set_active_text(aDocShName);
 }
 
-if (pViewShell)
-lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
+lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
 }
 
 void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
@@ -200,35 +200,33 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* 
pDoc )
 OUString aDocShName( pDocShell->GetName() );
 ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
 
+// tdf#160190
+if (!pViewShell)
+return;
+
 // tdf#139944 disable navigator in master mode
-if (pViewShell)
+if (const sd::DrawViewShell* pDrawViewShell = 
static_cast<::sd::DrawViewShell*>(pViewShell))
 {
-if (const sd::DrawViewShell* pDrawViewShell = 
static_cast<::sd::DrawViewShell*>(pViewShell))
+if (pDrawViewShell->GetEditMode() == EditMode::MasterPage)
 {
-if (pDrawViewShell->GetEditMode() == EditMode::MasterPage)
-{
-m_xContainer->set_sensitive(false);
-mxTlbObjects->clear();
-RefreshDocumentLB();
-return;
-}
-else
-m_xContainer->set_sensitive(true);
+m_xContainer->set_sensitive(false);
+mxTlbObjects->clear();
+RefreshDocumentLB();
+return;
 }
+else
+m_xContainer->set_sensitive(true);
 }
 
 // Restore the 'ShowAllShapes' flag from the last time (in this session)
 // that the navigator was shown.
-if (pViewShell != nullptr)
-{
-::sd::FrameView* pFrameView = pViewShell->GetFrameView();
-if (pFrameView != nullptr)
-
mxTlbObjects->SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), 
false);
-}
+::sd::FrameView* pFrameView = pViewShell->GetFrameView();
+if (pFrameView != nullptr)
+
mxTlbObjects->SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), 
false);
 
 // Disable the shape filter drop down menu when there is a running slide
 // show.
-if (pViewShell!=nullptr && sd::SlideShow::IsRunning( 
pViewShell->GetViewShellBase() )
+if (sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() )
 && !sd::SlideShow::IsInteractiveSlideshow( 
>GetViewShellBase() ) ) // IASS
 mxToolbox->set_item_sensitive("shapes", false);
 else
@@ -256,8 +254,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc 
)
 }
 }
 
-if (pViewShell)
-lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
+lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
 }
 
 /**


core.git: sd/source

2024-04-10 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 833e2ecf43708332b248689304a53b5c50af155d
Author: Jim Raykowski 
AuthorDate: Tue Apr 9 18:00:45 2024 -0800
Commit: Jim Raykowski 
CommitDate: Wed Apr 10 18:43:06 2024 +0200

tdf#139944 follow up

Also refresh the document info list so the objects tree will fill on
switching to normal view mode after the Navigator is opened in master
view mode.

Change-Id: I3749060206408ca2b9b58de541a9c9bf1731ec4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165917
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 893732f86662..538f1c68b113 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -209,6 +209,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc 
)
 {
 m_xContainer->set_sensitive(false);
 mxTlbObjects->clear();
+RefreshDocumentLB();
 return;
 }
 else


core.git: sd/source

2024-04-10 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/inc/ViewShell.hxx |3 +
 sd/source/ui/view/viewshel.cxx |   80 ++---
 2 files changed, 54 insertions(+), 29 deletions(-)

New commits:
commit 614bcc594285c3badb26710d9b78e80bdeca0b81
Author: Armin Le Grand (allotropia) 
AuthorDate: Wed Apr 10 15:29:13 2024 +0200
Commit: Armin Le Grand 
CommitDate: Wed Apr 10 18:22:23 2024 +0200

IASS: Support Mouse-Wheel Actions

The support for MouseWheel was missing. That showed
when using it in IASS the scroll commands were always
feeded to the SlideShow. Thus it was not possible
to e.g. scroll using MouseWheel in EditView when
IASS was active and SlideShow running.

This happens in ViewShell::HandleScrollCommand. It
needs to be made focus-dependent when IASS is active.

This is the same as already done for keyboard input,
so I consolidated this now to a method called
ViewShell::useInputForSlideShow() that does all the
necessary stuff and answers as needed. Using that
in various places: keyboard and MouseWheel, but also
adapted other places where the same has to happen,
mainly some gesture stuff.

Change-Id: I1a697e4b35b195695f1a5ea2305a3cee8851fa8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165929
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index d9fd8564edd0..89332537e94c 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -547,6 +547,9 @@ private:
 /** Create the rulers.
 */
 void SetupRulers();
+
+// IASS: Check if commands should be used for SlideShow
+bool useInputForSlideShow() const;
 };
 
 SdrView* ViewShell::GetDrawView() const
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 96a1a01463cd..9d0c7c98b7db 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -403,6 +403,34 @@ void ViewShell::Shutdown()
 Exit ();
 }
 
+// IASS: Check if commands should be used for SlideShow
+// This is the case when IASS is on, SlideShow is active
+// and the SlideShow Window has the focus
+bool ViewShell::useInputForSlideShow() const
+{
+rtl::Reference< SlideShow > 
xSlideShow(SlideShow::GetSlideShow(GetViewShellBase()));
+
+if (!xSlideShow.is())
+// no SlideShow, do not use
+return false;
+
+if (!xSlideShow->isRunning())
+// SlideShow not running, do not use
+return false;
+
+if(!xSlideShow->IsInteractiveSlideshow())
+// if IASS is deactivated, do what was done before when
+// SlideSHow is running: use for SlideShow
+return true;
+
+// else, check if SlideShow Window has the focus
+OutputDevice* pShOut(xSlideShow->getShowWindow());
+vcl::Window* pShWin(pShOut ? pShOut->GetOwnerWindow() : nullptr);
+
+// return true if we got the SlideShow Window and it has the focus
+return nullptr != pShWin && pShWin->HasFocus();
+}
+
 bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
 {
 bool bReturn(false);
@@ -418,20 +446,10 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, 
::sd::Window* pWin)
 const size_t OriCount = GetView()->GetMarkedObjectList().GetMarkCount();
 if(!bReturn)
 {
-rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( 
GetViewShellBase() ) );
-const bool bSlideShowRunning(xSlideShow.is() && 
xSlideShow->isRunning());
-bool bUseForSlideShow(bSlideShowRunning);
-
-if(bSlideShowRunning && xSlideShow->IsInteractiveSlideshow())
-{
-// IASS
-OutputDevice* pShOut(xSlideShow->getShowWindow());
-vcl::Window* pShWin(pShOut ? pShOut->GetOwnerWindow() : nullptr);
-bUseForSlideShow = pShWin && pShWin->HasFocus();
-}
-
-if(bUseForSlideShow) //IASS
+if(useInputForSlideShow()) //IASS
 {
+// use for SlideShow
+rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( 
GetViewShellBase() ) );
 bReturn = xSlideShow->keyInput(rKEvt);
 }
 else
@@ -689,9 +707,10 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& 
rCEvt, ::sd::Window* pWi
 {
 case CommandEventId::GestureSwipe:
 {
-rtl::Reference< SlideShow > xSlideShow( 
SlideShow::GetSlideShow( GetViewShellBase() ) );
-if (xSlideShow.is())
+if(useInputForSlideShow()) //IASS
 {
+// use for SlideShow
+rtl::Reference< SlideShow > xSlideShow( 
SlideShow::GetSlideShow( GetViewShellBase() ) );
 const CommandGestureSwipeData* pSwipeData = 
rCEvt.GetGestureSwipeData();
 bDone = xSlideShow->swipe(*pSwipeData);
 }
@@ -699,9 +718,10 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& 

core.git: sd/source

2024-04-09 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/view/ViewShellBase.cxx |   26 +++---
 1 file changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 32d3826a36099cbdb8675fe957348d80760f8cba
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue Apr 9 15:01:30 2024 +0200
Commit: Armin Le Grand 
CommitDate: Tue Apr 9 17:37:00 2024 +0200

IASS: Missing updates in OutlinerView mode

It looked like in OutlinerMode in IASS when doing
changes updating the other views were missing. After
debugging and finding no error I found out that the
text as COL_AUTO is painted white on white - all
updates happen but are invisible - argh.

After some more debugging I found that in
ViewShellBase::GetColorConfigColor only the
DrawViewShell case was handled, so I added the
OutlineViewShell now. Since that ViewShell has
no SdViewOptions I hard-coded the DOCCOLOR
to COL_WHITE.

That method returns {} aka COL_BLACK as default
which is a bad default for an office package
with paper as target, so I also changed that
to COL_WHITE - which is the default for unknown
ViewShells now that way. Also adapted the warning
to mention an 'unknown ViewShell' now.

Change-Id: I580a151b4c0a9eb46d190ba84b0c6d0798dc21d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165907
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index fd319fee5200..115beb928a19 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1095,12 +1096,31 @@ void ViewShellBase::NotifyCursor(SfxViewShell* 
pOtherShell) const
 }
 }
 }
-else
+// IASS: also need to handle OutlineViewShell
+else if (nullptr != 
dynamic_cast(GetMainViewShell().get()))
 {
-SAL_WARN("sd", "dynamic_cast to DrawViewShell failed");
+switch (nColorType)
+{
+case svtools::ColorConfigEntry::DOCCOLOR:
+{
+// IASS: OutlineViewShell does not have any SdViewOptions and 
no access
+// to the (currently not shown) DrawViewShell. If that should 
be
+// needed it may be added. For now, assume that DOCCOLOR is 
COL_WHITE
+return COL_WHITE;
+}
+// Should never be called for an unimplemented color type
+default:
+{
+O3TL_UNREACHABLE;
+}
+}
 }
 
-return {};
+SAL_WARN("sd", "Unknown ViewShell used: Consider adding a case for this to 
get correct colors, COL_WHITE is used as fallback.");
+// NOTE: This returned COL_BLACK. For unknown ViewShells I would assume 
that
+//   returning COL_WHITE would be safer - a better default for an 
office
+//   application dealing with Paper as target
+return COL_WHITE;
 }
 
 //= ViewShellBase::Implementation =


core.git: sd/source

2024-04-07 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx  |5 +
 sd/source/ui/view/drviews4.cxx |9 +
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 748561425774fa40ab685fed80d113f7e8301158
Author: Jim Raykowski 
AuthorDate: Thu Mar 21 22:15:08 2024 -0800
Commit: Jim Raykowski 
CommitDate: Sun Apr 7 19:22:05 2024 +0200

SdNavigator: speed up notifications to update the Navigator state

Change-Id: I191cd83ffce3f1ded9c67abcdf319034972a0b16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165151
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index af0e37e36d3a..893732f86662 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -460,6 +460,11 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, 
weld::TreeView&, bool)
 pDrawView->MarkObj(pCursorEntryObject, 
pDrawView->GetSdrPageView(), true);
 }
 
+// SID_NAVIGATOR_STATE invalidate is done in 
DrawViewShell::ExecNavigatorWin
+// and DrawDocShell::GotoBookmark. Update the bindings here to 
speed up Navigator
+// state update.
+mpBindings->Update();
+
 // moved here from SetGetFocusHdl. Reset the
 // focus only if something has been selected in the
 // document.
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 12a734a6ca45..8c547d8525fc 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -306,16 +306,9 @@ void DrawViewShell::FreshNavigatrTree()
 SfxViewFrame *pViewFrame = GetViewFrame();
 if (!pViewFrame)
 return;
-SfxChildWindow* pWindow = pViewFrame->GetChildWindow( SID_NAVIGATOR );
-if( pWindow )
-{
-SdNavigatorFloat* pNavWin = static_cast( 
pWindow->GetWindow() );
-if( pNavWin )
-pNavWin->FreshTree( GetDoc() );
-}
-// sidebar version
 SfxBindings& rBindings = pViewFrame->GetBindings();
 rBindings.Invalidate(SID_NAVIGATOR_STATE, true);
+rBindings.Update();
 }
 
 void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt,


core.git: sd/source

2024-04-05 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit f41ef630f7fc706d18cce76c3abe76a53f03b2d5
Author: Jim Raykowski 
AuthorDate: Mon Apr 1 23:18:50 2024 -0800
Commit: Jim Raykowski 
CommitDate: Sat Apr 6 03:16:52 2024 +0200

SdNavigator: Make the objects tree update after rename

Change-Id: Ibec7df5dcf5cf817b1c3574e3f3acd8206c72e20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165668
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 7423a8425eeb..af0e37e36d3a 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -303,12 +303,18 @@ IMPL_LINK(SdNavigatorWin, CommandHdl, const 
CommandEvent&, rCEvt, bool)
 
 void SdNavigatorWin::ExecuteContextMenuAction(std::u16string_view 
rSelectedPopupEntry)
 {
-if (rSelectedPopupEntry == u"rename" && mpBindings)
+if (rSelectedPopupEntry == u"rename")
 {
 weld::TreeView& rTreeView = GetObjects().get_treeview();
 std::unique_ptr xIter(rTreeView.make_iterator());
 if (rTreeView.get_selected(xIter.get()))
 {
+// grab the shell focus so the navigator will update
+if (SfxViewShell* pCurSh = SfxViewShell::Current())
+{
+if (vcl::Window* pShellWnd = pCurSh->GetWindow())
+pShellWnd->GrabFocus();
+}
 if (rTreeView.get_iter_depth(*xIter) > 0)
 mpBindings->Execute(SID_NAME_GROUP);
 else


core.git: sd/source

2024-04-05 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |   21 +
 sd/source/ui/inc/navigatr.hxx |7 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)

New commits:
commit a076bbc5261885d49c592acd46b238bd659ccb41
Author: Jim Raykowski 
AuthorDate: Thu Mar 21 19:38:21 2024 -0800
Commit: Jim Raykowski 
CommitDate: Fri Apr 5 20:21:07 2024 +0200

SdNavigator: Make the sidebar panel not visible in outline and

slide sorter view modes

Inspired by the floating version behavior of not showing when in
the outline or slide sorter view mode.

Change-Id: I19ecb5751af7798527cf6b08ca766c367f177336
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165150
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 8b955ba07035..7423a8425eeb 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -796,6 +796,27 @@ void SdNavigatorWin::SetDragImage()
 mxToolbox->set_item_icon_name("dragmode", GetDragTypeSdBmpId(meDragType));
 }
 
+// for the sidebar to make the panel invisible when the shell type is outline 
or slide sorter
+void SdNavigatorWin::HandleContextChange(const vcl::EnumContext& eContext)
+{
+if (eContext.GetApplication() != vcl::EnumContext::Application::Impress)
+return;
+
+::sd::DrawDocShell* pCurrentDocShell
+= dynamic_cast<::sd::DrawDocShell*>(SfxObjectShell::Current());
+if (!pCurrentDocShell)
+return;
+
+const ::sd::DrawViewShell* pDrawViewShell
+= 
static_cast<::sd::DrawViewShell*>(pCurrentDocShell->GetViewShell());
+if (!pDrawViewShell)
+return;
+
+sd::ViewShell::ShellType eShellType = pDrawViewShell->GetShellType();
+m_xContainer->set_visible(eShellType != sd::ViewShell::ST_OUTLINE
+&& eShellType != sd::ViewShell::ST_SLIDE_SORTER);
+}
+
 /**
  * ControllerItem for Navigator
  */
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 3e8ff9c28d21..a88ab7b4a2d6 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -25,6 +25,9 @@
 #include "sdtreelb.hxx"
 #include 
 
+#include 
+#include 
+
 // forward
 namespace vcl { class Window; }
 
@@ -97,7 +100,7 @@ public:
 
 }
 
-class SD_DLLPUBLIC SdNavigatorWin : public PanelLayout
+class SD_DLLPUBLIC SdNavigatorWin : public PanelLayout, public 
sfx2::sidebar::IContextChangeReceiver
 {
 public:
 typedef ::std::function UpdateRequestFunctor;
@@ -122,6 +125,8 @@ public:
 NavigatorDragType   GetNavigatorDragType();
 SdPageObjsTLV&  GetObjects();
 
+virtual void HandleContextChange(const vcl::EnumContext& eContext) 
override;
+
 private:
 friend class SdNavigatorFloat;
 friend class SdNavigatorControllerItem;


core.git: sd/source

2024-04-05 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 186c4cd328830c9b3a1769ea7c6a0738e019dae7
Author: Jim Raykowski 
AuthorDate: Wed Apr 3 23:26:49 2024 -0800
Commit: Jim Raykowski 
CommitDate: Fri Apr 5 17:44:18 2024 +0200

SdNavigator: fix lcl_select_marked_object page selection

...which makes invalidation of SID_NAVIGATOR_PAGENAME in InitTreeLB
unnecessary.

Also rename lcl_select_marked_object lcl_select_marked_objects.

Change-Id: I6afe0cc59808a476dcb1496e23dbb1b54ec570e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165780
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index cdbfcac41382..8b955ba07035 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -50,6 +50,8 @@
 #include 
 #include 
 
+#include 
+
 /**
  * SdNavigatorWin - FloatingWindow
  */
@@ -136,7 +138,7 @@ SdNavigatorWin::~SdNavigatorWin()
 mxLbDocs.reset();
 }
 
-static void lcl_select_marked_object(const sd::ViewShell* pViewShell, 
SdPageObjsTLV* pTlbObjects)
+static void lcl_select_marked_objects(sd::ViewShell* pViewShell, 
SdPageObjsTLV* pTlbObjects)
 {
 if (const SdrView* pView = pViewShell->GetDrawView())
 {
@@ -148,7 +150,10 @@ static void lcl_select_marked_object(const sd::ViewShell* 
pViewShell, SdPageObjs
 pTlbObjects->SelectEntry(rMarkedObject);
 }
 else
-pTlbObjects->SelectEntry(pViewShell->GetName());
+{
+if (SdPage* pPage = pViewShell->GetActualPage())
+pTlbObjects->SelectEntry(pPage->GetName());
+}
 }
 }
 
@@ -185,7 +190,7 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
 }
 
 if (pViewShell)
-lcl_select_marked_object(pViewShell, mxTlbObjects.get());
+lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
 }
 
 void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
@@ -251,11 +256,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* 
pDoc )
 }
 
 if (pViewShell)
-lcl_select_marked_object(pViewShell, mxTlbObjects.get());
-
-SfxViewFrame* pViewFrame = ( ( pViewShell && pViewShell->GetViewFrame() ) 
? pViewShell->GetViewFrame() : SfxViewFrame::Current() );
-if( pViewFrame )
-pViewFrame->GetBindings().Invalidate(SID_NAVIGATOR_PAGENAME, true, 
true);
+lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
 }
 
 /**
@@ -589,7 +590,7 @@ IMPL_LINK( SdNavigatorWin, ShapeFilterCallback, const 
OUString&, rIdent, void )
 {
 pFrameView->SetIsNavigatorShowingAllShapes(bShowAllShapes);
 }
-lcl_select_marked_object(pViewShell, mxTlbObjects.get());
+lcl_select_marked_objects(pViewShell, mxTlbObjects.get());
 }
 }
 }


core.git: sd/source

2024-04-04 Thread Thorsten Behrens (via logerrit)
 sd/source/ui/dlg/present.cxx |4 
 sd/source/ui/slideshow/slideshow.cxx |9 +
 2 files changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 2f093d16be4c87d0535d0c6338c308ad9f6a3c84
Author: Thorsten Behrens 
AuthorDate: Thu Apr 4 21:19:02 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Apr 4 23:10:47 2024 +0200

IASS: make live slideshow non-experimental

Change-Id: I36fb6eae8f77f02fa1a9bcf96a7c074d78ba86c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165804
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index d3e238b7bd3d..9640c5b72fd7 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -25,8 +25,6 @@
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 
@@ -180,8 +178,6 @@ 
SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI
 #endif
 
 m_xCbxInteractiveMode->set_active( static_cast( 
rOutAttrs.Get( ATTR_PRESENT_INTERACTIVE ) ).GetValue() );
-if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
-m_xCbxInteractiveMode->set_visible(false);
 
 InitMonitorSettings();
 
diff --git a/sd/source/ui/slideshow/slideshow.cxx 
b/sd/source/ui/slideshow/slideshow.cxx
index c25f0114c876..39e3e6a21221 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -39,8 +39,6 @@
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 
@@ -240,12 +238,7 @@ bool SlideShow::IsInteractiveSlideshow(const 
ViewShellBase* pViewShellBase)
 
 bool SlideShow::IsInteractiveSlideshow() const
 {
-// allow override with ENV_VAR for practical dev reasons
-static bool 
g_bEnable_Interactive_Slideshow(getenv("ENABLE_INTERACTIVE_SLIDESHOW"));
-if (g_bEnable_Interactive_Slideshow)
-return true;
-
-return officecfg::Office::Common::Misc::ExperimentalMode::get() && 
mpDoc->getPresentationSettings().mbInteractive;
+return mpDoc->getPresentationSettings().mbInteractive;
 }
 
 void SlideShow::CreateController(  ViewShell* pViewSh, ::sd::View* pView, 
vcl::Window* pParentWindow )


core.git: sd/source

2024-04-04 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3be164e0c7dc2cc73e32e643e30357e126238588
Author: Jim Raykowski 
AuthorDate: Mon Apr 1 23:08:40 2024 -0800
Commit: Jim Raykowski 
CommitDate: Thu Apr 4 10:04:25 2024 +0200

SdNavigator: Show context menu only for active document navigation

Change-Id: I3d622f92d411b30e5beea5432e10ae0a907eeb0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165667
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index a329601a2a35..cdbfcac41382 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -285,6 +285,8 @@ IMPL_STATIC_LINK_NOARG(SdNavigatorWin, MouseReleaseHdl, 
const MouseEvent&, bool)
 
 IMPL_LINK(SdNavigatorWin, CommandHdl, const CommandEvent&, rCEvt, bool)
 {
+if (NavDocInfo* pInfo = GetDocInfo(); !pInfo || !pInfo->IsActive())
+return false;
 if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
 return false;
 weld::TreeView& rTreeView = GetObjects().get_treeview();


core.git: sd/source

2024-04-03 Thread Gabor Kelemen (via logerrit)
 sd/source/console/PresenterPane.cxx   |1 -
 sd/source/console/PresenterSpritePane.cxx |1 -
 sd/source/core/drawdoc.cxx|1 -
 sd/source/core/drawdoc4.cxx   |1 -
 sd/source/core/sdpage2.cxx|1 -
 sd/source/filter/cgm/sdcgmfilter.cxx  |1 -
 sd/source/filter/eppt/pptx-animations-cond.cxx|1 -
 sd/source/filter/grf/sdgrffilter.cxx  |1 -
 sd/source/filter/html/htmlex.cxx  |3 ---
 sd/source/filter/xml/sdtransform.cxx  |2 --
 sd/source/ui/accessibility/AccessiblePresentationShape.cxx|1 -
 sd/source/ui/annotations/annotationmanager.cxx|6 --
 sd/source/ui/annotations/annotationtag.cxx|3 ---
 sd/source/ui/app/sdxfer.cxx   |2 --
 sd/source/ui/controller/slidelayoutcontroller.cxx |1 -
 sd/source/ui/dlg/present.cxx  |1 -
 sd/source/ui/dlg/tpaction.cxx |1 -
 sd/source/ui/docshell/docshel3.cxx|2 --
 sd/source/ui/framework/module/DrawModule.cxx  |1 -
 sd/source/ui/framework/module/ImpressModule.cxx   |1 -
 sd/source/ui/framework/module/PresentationModule.cxx  |1 -
 sd/source/ui/func/futext.cxx  |2 --
 sd/source/ui/remotecontrol/Receiver.cxx   |1 -
 sd/source/ui/remotecontrol/Server.cxx |1 -
 sd/source/ui/sidebar/MasterPageContainerFiller.cxx|1 -
 sd/source/ui/sidebar/MasterPagesSelector.cxx  |2 --
 sd/source/ui/sidebar/PanelFactory.cxx |1 -
 sd/source/ui/slideshow/slideshow.cxx  |1 -
 sd/source/ui/slideshow/slideshowimpl.cxx  |1 -
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |1 -
 sd/source/ui/slidesorter/controller/SlsPageSelector.cxx   |1 -
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx|1 -
 sd/source/ui/slidesorter/view/SlideSorterView.cxx |1 -
 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx|2 --
 sd/source/ui/table/TableDesignPane.cxx|1 -
 sd/source/ui/table/tablefunction.cxx  |5 -
 sd/source/ui/unoidl/UnoDocumentSettings.cxx   |2 --
 sd/source/ui/view/ViewShellImplementation.cxx |3 ---
 sd/source/ui/view/drviews7.cxx|1 -
 sd/source/ui/view/drviewsf.cxx|1 -
 sd/source/ui/view/outlnvs2.cxx|3 ---
 sd/source/ui/view/outlnvsh.cxx|1 -
 sd/source/ui/view/presvish.cxx|4 
 sd/source/ui/view/sdview3.cxx |1 -
 44 files changed, 71 deletions(-)

New commits:
commit 6dc092045c0e8bb46c0f5e90f529a9285727f93f
Author: Gabor Kelemen 
AuthorDate: Fri Mar 29 21:45:08 2024 +0100
Commit: Gabor Kelemen 
CommitDate: Wed Apr 3 19:03:25 2024 +0200

tdf#146619 Drop unused 'using namespace' in: sd/

Change-Id: I7e48be1962d1e643c49c8cc0d6ca01ffbbb97429
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165567
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/source/console/PresenterPane.cxx 
b/sd/source/console/PresenterPane.cxx
index ad35315438e8..41420843971f 100644
--- a/sd/source/console/PresenterPane.cxx
+++ b/sd/source/console/PresenterPane.cxx
@@ -24,7 +24,6 @@
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::drawing::framework;
 
 namespace sdext::presenter {
 
diff --git a/sd/source/console/PresenterSpritePane.cxx 
b/sd/source/console/PresenterSpritePane.cxx
index c90f250fb192..a1a2f7148168 100644
--- a/sd/source/console/PresenterSpritePane.cxx
+++ b/sd/source/console/PresenterSpritePane.cxx
@@ -23,7 +23,6 @@
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::drawing::framework;
 
 namespace sdext::presenter {
 
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index ea32e0f5e8d6..1ed511467158 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -87,7 +87,6 @@ namespace com::sun::star::linguistic2 { class XSpellChecker1; 
}
 using namespace ::sd;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::linguistic2;
 
 using namespace com::sun::star::xml::dom;
diff --git 

core.git: sd/source

2024-04-02 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |   51 +-
 1 file changed, 36 insertions(+), 15 deletions(-)

New commits:
commit 878ab17b0fad66fb7accd9573ef7f66403d593b9
Author: Jim Raykowski 
AuthorDate: Sun Mar 31 13:56:36 2024 -0800
Commit: Jim Raykowski 
CommitDate: Tue Apr 2 22:43:45 2024 +0200

tdf#139944 SdNavigator: disable in master mode

Improve where the disable is done and in addition to making disabled
also clear the objects tree.

Also fixes a drag and drop ordering scrolling bug introduced by commit
60e32969a98cad348cf8e55e8f93abc3d6e9c70c

Change-Id: I702c85bc1ba16837fb7f8c2246bdb29d96e6cc6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165606
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index dbea0b6b4818..a329601a2a35 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -157,6 +157,24 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc 
)
 {
 SdDrawDocument* pNonConstDoc = const_cast(pDoc); // const 
as const can...
 sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
+::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
+
+// tdf#139944 disable navigator in master mode
+if (pViewShell)
+{
+if (const sd::DrawViewShell* pDrawViewShell = 
static_cast<::sd::DrawViewShell*>(pViewShell))
+{
+if (pDrawViewShell->GetEditMode() == EditMode::MasterPage)
+{
+m_xContainer->set_sensitive(false);
+mxTlbObjects->clear();
+return;
+}
+else
+m_xContainer->set_sensitive(true);
+}
+}
+
 const OUString& aDocShName( pDocShell->GetName() );
 OUString aDocName = pDocShell->GetMedium()->GetName();
 if (!mxTlbObjects->IsEqualToDoc(pDoc))
@@ -165,7 +183,8 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
 RefreshDocumentLB();
 mxLbDocs->set_active_text(aDocShName);
 }
-if (const sd::ViewShell* pViewShell = pDocShell->GetViewShell())
+
+if (pViewShell)
 lcl_select_marked_object(pViewShell, mxTlbObjects.get());
 }
 
@@ -176,6 +195,22 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* 
pDoc )
 OUString aDocShName( pDocShell->GetName() );
 ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
 
+// tdf#139944 disable navigator in master mode
+if (pViewShell)
+{
+if (const sd::DrawViewShell* pDrawViewShell = 
static_cast<::sd::DrawViewShell*>(pViewShell))
+{
+if (pDrawViewShell->GetEditMode() == EditMode::MasterPage)
+{
+m_xContainer->set_sensitive(false);
+mxTlbObjects->clear();
+return;
+}
+else
+m_xContainer->set_sensitive(true);
+}
+}
+
 // Restore the 'ShowAllShapes' flag from the last time (in this session)
 // that the navigator was shown.
 if (pViewShell != nullptr)
@@ -783,20 +818,6 @@ void 
SdNavigatorControllerItem::StateChangedAtToolBoxControl( sal_uInt16 nSId,
 if( !(pInfo && pInfo->IsActive()) )
 return;
 
-if (::sd::DrawDocShell* pDrawDocShell = pInfo->GetDrawDocShell())
-{
-const auto pDrawViewShell =
-static_cast<::sd::DrawViewShell 
*>(pDrawDocShell->GetViewShell());
-if (pDrawViewShell)
-{
-pNavigatorWin->FreshTree(pDrawDocShell->GetDoc());
-bool bEditModePage(pDrawViewShell->GetEditMode() == 
EditMode::Page);
-pNavigatorWin->mxToolbox->set_sensitive(bEditModePage);
-pNavigatorWin->mxLbDocs->set_sensitive(bEditModePage);
-pNavigatorWin->mxTlbObjects->set_sensitive(bEditModePage);
-}
-}
-
 const SfxUInt32Item& rStateItem = dynamic_cast(*pItem);
 NavState nState = static_cast(rStateItem.GetValue());
 


core.git: sd/source

2024-03-29 Thread U-Aarons_LaptopAaron (via logerrit)
 sd/source/console/PresenterAccessibility.hxx   |5 +
 sd/source/console/PresenterBitmapContainer.hxx |5 +
 sd/source/console/PresenterCanvasHelper.hxx|5 +
 3 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit cd72cefbc7b8abbdc5a66366e59ec81681d74aba
Author: U-Aarons_Laptop\Aaron 
AuthorDate: Mon Mar 25 17:04:13 2024 -0400
Commit: Ilmari Lauhakangas 
CommitDate: Fri Mar 29 13:58:05 2024 +0100

tdf#143148 replace include guards with pragma once

Change-Id: Idd8ecf3ef95ce2296b31a1c7fb1ddadefdd573f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165293
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/sd/source/console/PresenterAccessibility.hxx 
b/sd/source/console/PresenterAccessibility.hxx
index 12015d0938d0..350f0995fc56 100644
--- a/sd/source/console/PresenterAccessibility.hxx
+++ b/sd/source/console/PresenterAccessibility.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERACCESSIBILITY_HXX
-#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERACCESSIBILITY_HXX
+#pragma once
 
 #include "PresenterPaneContainer.hxx"
 
@@ -110,6 +109,4 @@ private:
 
 } // end of namespace ::sd::presenter
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/console/PresenterBitmapContainer.hxx 
b/sd/source/console/PresenterBitmapContainer.hxx
index 7a9de89a7f13..ee87a5be23db 100644
--- a/sd/source/console/PresenterBitmapContainer.hxx
+++ b/sd/source/console/PresenterBitmapContainer.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERBITMAPCONTAINER_HXX
-#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERBITMAPCONTAINER_HXX
+#pragma once
 
 #include 
 #include 
@@ -141,6 +140,4 @@ typedef 
std::shared_ptr SharedBitmap
 
 } // end of namespace ::sdext::presenter
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/console/PresenterCanvasHelper.hxx 
b/sd/source/console/PresenterCanvasHelper.hxx
index 8902a9712bf6..9f5ce96ab3b6 100644
--- a/sd/source/console/PresenterCanvasHelper.hxx
+++ b/sd/source/console/PresenterCanvasHelper.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERCANVASHELPER_HXX
-#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERCANVASHELPER_HXX
+#pragma once
 
 #include "PresenterBitmapContainer.hxx"
 #include 
@@ -102,6 +101,4 @@ private:
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sd/source

2024-03-27 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/console/PresenterScreen.cxx|   28 +---
 sd/source/console/PresenterScreen.hxx|3 +++
 sd/source/ui/slideshow/slideshowimpl.cxx |   17 ++---
 3 files changed, 42 insertions(+), 6 deletions(-)

New commits:
commit 8caddb0d579030167791cb1c6d07bc28a3b35b49
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue Mar 26 18:35:21 2024 +0100
Commit: Armin Le Grand 
CommitDate: Wed Mar 27 10:32:14 2024 +0100

IASS: Fix crash with PresenterConsole

When being in IASS mode and adding e.g. an effect to
a Shape (or anything else that triggers a preview)
and the PresenterConsole being active, we got a
crash. That happend due to the PresenterConsole
being initialized *twice* due to interpreting that
preview as SlideShow start. It also closed due to
interpreting the preview end as SlideShow end. The
next SlideShow end then bites the dust in an already
messed up situation.
To solve this, SlideshowImpl::startShowImpl now only
uses NotifyDocumentEvent "OnStartPresentation" when
this is not a SlideShow startup.
I also secured PresenterScreen using a local bool
to remember if it is initialized to avoid when that
would be done twice (also used for shutdown).

Change-Id: Ice588e0783fd39ec46d90a40affcaf2f789df8ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165356
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/console/PresenterScreen.cxx 
b/sd/source/console/PresenterScreen.cxx
index 690a07f8b67c..2cbd612ff357 100644
--- a/sd/source/console/PresenterScreen.cxx
+++ b/sd/source/console/PresenterScreen.cxx
@@ -240,9 +240,17 @@ void SAL_CALL PresenterScreenListener::disposing (const 
css::lang::EventObject&)
 PresenterScreen::PresenterScreen (
 const Reference& rxContext,
 css::uno::Reference xModel)
-: PresenterScreenInterfaceBase(m_aMutex),
-  mxModel(std::move(xModel)),
-  mxContextWeak(rxContext)
+: PresenterScreenInterfaceBase(m_aMutex)
+, mxModel(std::move(xModel))
+, mxController()
+, mxConfigurationControllerWeak()
+, mxContextWeak(rxContext)
+, mpPresenterController()
+, mxSavedConfiguration()
+, mpPaneContainer()
+, mxPaneFactory()
+, mxViewFactory()
+, mbIsInitialized(false)
 {
 }
 
@@ -303,6 +311,10 @@ void SAL_CALL PresenterScreen::disposing (const 
lang::EventObject& /*rEvent*/)
 
 void PresenterScreen::InitializePresenterScreen()
 {
+// IASS: already initialized (may even assert here?)
+if (mbIsInitialized)
+return;
+
 try
 {
 Reference xContext (mxContextWeak);
@@ -388,6 +400,9 @@ void PresenterScreen::InitializePresenterScreen()
 catch (const Exception&)
 {
 }
+
+// IASS: Remember we are initialized
+mbIsInitialized = true;
 }
 
 void PresenterScreen::SwitchMonitors()
@@ -545,6 +560,10 @@ Reference 
PresenterScreen::GetMainPaneId (
 
 void PresenterScreen::RequestShutdownPresenterScreen()
 {
+// IASS: only cleanup when we are initialized
+if (!mbIsInitialized)
+return;
+
 // Restore the configuration that was active before the presenter screen
 // has been activated.  Now, that the presenter screen is displayed in
 // its own top level window this probably not necessary, but one never 
knows.
@@ -567,6 +586,9 @@ void PresenterScreen::RequestShutdownPresenterScreen()
 [xSelf=std::move(xSelf)](bool){ return 
xSelf->ShutdownPresenterScreen(); });
 xCC->update();
 }
+
+// IASS: reset to non-initialized
+mbIsInitialized = false;
 }
 
 void PresenterScreen::ShutdownPresenterScreen()
diff --git a/sd/source/console/PresenterScreen.hxx 
b/sd/source/console/PresenterScreen.hxx
index 0445311b9603..430384a45c6d 100644
--- a/sd/source/console/PresenterScreen.hxx
+++ b/sd/source/console/PresenterScreen.hxx
@@ -139,6 +139,9 @@ private:
 css::uno::Reference 
mxPaneFactory;
 css::uno::Reference 
mxViewFactory;
 
+// IASS: Flag to note if InitializePresenterScreen() was executed
+bool mbIsInitialized;
+
 class ViewDescriptor
 {
 public:
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index d06f867d994c..74d9ac4b0e6f 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -647,6 +647,8 @@ void SlideshowImpl::disposing(std::unique_lock&)
 #ifdef ENABLE_SDREMOTE
 RemoteServer::presentationStopped();
 #endif
+// IASS: This is the central methodology to 'steer' the
+// PresenterConsole - in this case, to shut it down
 if( mxShow.is() && mpDoc )
 NotifyDocumentEvent(
 *mpDoc,
@@ -1344,9 +1346,18 @@ bool SlideshowImpl::startShowImpl( const Sequence< 
beans::PropertyValue >& aProp
 mxListenerProxy.set( new SlideShowListenerProxy( this, mxShow ) );
 mxListenerProxy->addAsSlideShowListener();
 
-NotifyDocumentEvent(
-*mpDoc,
-

core.git: sd/source

2024-03-22 Thread Pranam Lashkari (via logerrit)
 sd/source/ui/view/drviewse.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 437161094d6e19f7cc222b1029801a481ad15618
Author: Pranam Lashkari 
AuthorDate: Wed Mar 20 20:53:27 2024 +0530
Commit: Pranam Lashkari 
CommitDate: Fri Mar 22 12:33:18 2024 +0100

LOK: enter editing directly after textbox insertion

Change-Id: I3e77a1eb72a12c0e4ffc289ca854e0edb4ae9e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165007
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 5f95769e6311..da0dbedd1195 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -614,10 +614,6 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
 if(!(HasCurrentFunction() && ((rReq.GetModifier() & KEY_MOD1) || 
bCreateDirectly)))
 return;
 
-// disable interactive drawing for LOK
-if (bCreateDirectly)
-GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
-
 // get SdOptions
 SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
 sal_uInt32 nDefaultObjectSizeWidth(pOptions->GetDefaultObjectSizeWidth());
@@ -656,6 +652,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
 {
 case SID_DRAW_CAPTION:
 case SID_DRAW_CAPTION_VERTICAL:
+case SID_ATTR_CHAR:
+case SID_ATTR_CHAR_VERTICAL:
+case SID_TEXT_FITTOSIZE:
+case SID_TEXT_FITTOSIZE_VERTICAL:
 {
 // Make FuText the current function.
 SfxUInt16Item aItem (SID_TEXTEDIT, 1);


core.git: sd/source slideshow/source

2024-03-22 Thread Balazs Varga (via logerrit)
 sd/source/core/sdpage.cxx|5 +++--
 slideshow/source/engine/shapes/shapeimporter.cxx |   20 +++-
 2 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit e136900e7a971385be9367a3dcaedea54d1e7207
Author: Balazs Varga 
AuthorDate: Thu Feb 29 16:34:45 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 22 11:44:16 2024 +0100

tdf#159258 sd: fix to show objects in slideshow if they have

fillstyle or linestyle.

Also the shape will be appeared in print and pdf view.
(Powerpoint doing the same.)

TODO: the placeholder bitmap and the default text
was not removed from the slideshow/print/pdf view.

Change-Id: Ifadc9a692d77b60a7e3514afe8e6ea5cab0018c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164163
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 10b4f34b761f..020f1f6bbfd4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2802,9 +2802,10 @@ bool SdPage::checkVisibility(
 const bool bIsInsidePageObj(pPageView && pPageView->GetPage() != 
pVisualizedPage);
 
 // empty presentation objects only visible during edit mode
-if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() 
)
+if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() 
&& !(pObj->HasFillStyle() || pObj->HasLineStyle()) )
 {
-if( (pObj->GetObjInventor() != SdrInventor::Default) || ( 
(pObj->GetObjIdentifier() != SdrObjKind::Rectangle) && 
(pObj->GetObjIdentifier() != SdrObjKind::Page) ) )
+if( (pObj->GetObjInventor() != SdrInventor::Default) || ( 
(pObj->GetObjIdentifier() != SdrObjKind::Rectangle) &&
+(pObj->GetObjIdentifier() != SdrObjKind::Page) ) )
 return false;
 }
 
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx 
b/slideshow/source/engine/shapes/shapeimporter.cxx
index 92162eeb60ad..7823a5588efd 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -346,7 +346,25 @@ bool ShapeImporter::isSkip(
   "IsEmptyPresentationObject") &&
 bEmpty )
 {
-return true;
+// check object have fill or linestyle, if have, it should be visible
+drawing::FillStyle aFillStyle{ drawing::FillStyle_NONE };
+if (getPropertyValue(aFillStyle,
+xPropSet, "FillStyle") &&
+aFillStyle != drawing::FillStyle_NONE)
+{
+bEmpty = false;
+}
+
+drawing::LineStyle aLineStyle{ drawing::LineStyle_NONE };
+if (bEmpty && getPropertyValue(aLineStyle,
+xPropSet, "LineStyle") &&
+aLineStyle != drawing::LineStyle_NONE)
+{
+bEmpty = false;
+}
+
+if (bEmpty)
+return true;
 }
 
 //skip shapes which corresponds to annotations


core.git: sd/source

2024-03-14 Thread Pranam Lashkari (via logerrit)
 sd/source/ui/annotations/annotationmanager.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 05022d33be70a76ff14ba2cda84b5fd8a15a47a1
Author: Pranam Lashkari 
AuthorDate: Wed Mar 13 20:23:47 2024 +0530
Commit: Caolán McNamara 
CommitDate: Thu Mar 14 09:50:55 2024 +0100

sd:annotation: added missing comment reply undo

Change-Id: I63e005aa35faad1ebdaad228a22477cb1dd6de67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164811
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index 2caf48df3f5e..0ab47a7b1a07 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -567,6 +567,10 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( 
SfxRequest const & rReq )
 if( !pTextApi )
 return;
 
+if (mpDoc->IsUndoEnabled())
+mpDoc->BegUndo(SdResId(STR_ANNOTATION_REPLY));
+
+CreateChangeUndo(xAnnotation);
 ::Outliner aOutliner( GetAnnotationPool(),OutlinerMode::TextObject );
 
 SdDrawDocument::SetCalcFieldValueHdl(  );
@@ -624,6 +628,9 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( 
SfxRequest const & rReq )
 // Tell our LOK clients about this (comment modification)
 LOKCommentNotifyAll(CommentNotificationType::Modify, xAnnotation);
 
+if( mpDoc->IsUndoEnabled() )
+mpDoc->EndUndo();
+
 UpdateTags(true);
 SelectAnnotation( xAnnotation, true );
 }


core.git: sd/source

2024-03-13 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/sdtreelb.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 2d88ea62d4b6663cf8839e5484e2ae8042112f81
Author: Jim Raykowski 
AuthorDate: Sat Mar 9 16:01:00 2024 -0900
Commit: Jim Raykowski 
CommitDate: Thu Mar 14 00:23:15 2024 +0100

tdf#160093 Fix SdNavigator empty after inserting formula OLE object

or OLE Object...

Also fixes empty tree occurance when multiple Draw/Impress documents
are opened at once.

Change-Id: I03d714bf96700d3a7df661fca91cceda703149f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164607
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 5bed03fa24db..9883ad847ae0 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1278,10 +1278,9 @@ void SdPageObjsTLV::Fill(const SdDrawDocument* pInDoc, 
bool bAllPages, const OUS
 sal_uInt16 nPage = 0;
 const sal_uInt16 nMaxPages = m_pDoc->GetPageCount();
 
-sd::DrawViewShell* pDrawViewShell = lcl_getDrawViewShell(m_pDoc);
-if (!pDrawViewShell)
-return;
-PageKind eDrawViewShellPageKind = pDrawViewShell->GetPageKind();
+PageKind eDrawViewShellPageKind = PageKind::Standard;
+if (sd::DrawViewShell* pDrawViewShell = lcl_getDrawViewShell(m_pDoc))
+eDrawViewShellPageKind = pDrawViewShell->GetPageKind();
 
 while( nPage < nMaxPages )
 {


core.git: sd/source

2024-03-12 Thread Hossein (via logerrit)
 sd/source/core/drawdoc2.cxx |6 +-
 sd/source/core/sdpage.cxx   |3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit c1f097854f89f35cfc0f097a10384014042b95d6
Author: Hossein 
AuthorDate: Tue Mar 12 16:32:09 2024 +0100
Commit: Hossein 
CommitDate: Wed Mar 13 00:39:16 2024 +0100

tdf#160162 Fix hyperlink update in Draw

Changing the links to keep them up-to-date was previously done only when
the name "Slide" was used for the pages, just like Impress, as Draw and
Impress share code. Now, the term "Page" is used instead of "Slide"
since 942d1d2ea59bf4605f2c464a6b29c967fa9f8de8 in Draw. This change,
fixes the above issue by also using the correct string consntant.

The patch is tested for Draw and Impress to make sure both are working
correctly now.

Change-Id: I55b4f56bd499d05f87f475d4c6cb3423247bf8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164716
Tested-by: Jenkins
Reviewed-by: Stéphane Guillou 
Reviewed-by: Hossein 

diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 4feb8f10c6fd..69e274afc906 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -339,7 +339,11 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage const * 
pPage, sal_uInt16 nPo
 if (aURL.isEmpty() || (aURL[0] != 35))
 return true; // continue callbacks
 
-OUString aHashSlide = "#" + SdResId(STR_PAGE);
+OUString aHashSlide;
+if (meDocType == DocumentType::Draw)
+aHashSlide = "#" + SdResId(STR_PAGE_NAME);
+else
+aHashSlide = "#" + SdResId(STR_PAGE);
 
 if (!aURL.startsWith(aHashSlide))
 return true; // continue callbacks
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 02609a7083fa..10b4f34b761f 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2512,9 +2512,10 @@ const OUString& SdPage::GetName() const
 // default name for handout pages
 sal_uInt16  nNum = (GetPageNum() + 1) / 2;
 
-aCreatedPageName = SdResId(STR_PAGE) + " ";
 if 
(static_cast(getSdrModelFromSdrPage()).GetDocumentType() == 
DocumentType::Draw )
  aCreatedPageName = SdResId(STR_PAGE_NAME) + " ";
+else
+aCreatedPageName = SdResId(STR_PAGE) + " ";
 
 if( getSdrModelFromSdrPage().GetPageNumType() == 
css::style::NumberingType::NUMBER_NONE )
 {


core.git: sd/source

2024-03-07 Thread Samuel Mehrbrodt (via logerrit)
 sd/source/ui/func/fuformatpaintbrush.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 9476f5ae4bff9817b9e699f7abea5690ec7ffd87
Author: Samuel Mehrbrodt 
AuthorDate: Thu Mar 7 22:51:51 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Mar 8 04:33:29 2024 +0100

tdf#160071 Don't clone formatting to whole boxes

when clicking into an empty area of that box

Change-Id: I383f1584f446e29454eda2177c8bae0f6587e42d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164555
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx 
b/sd/source/ui/func/fuformatpaintbrush.cxx
index 89eecc13f989..d66e00466072 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -145,13 +145,6 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& 
rMEvt)
 }
 
 unmarkimpl( mpView );
-
-if (aVEvt.mpObj)
-{
-sal_uInt16 nHitLog = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
-mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), 
nHitLog, false/*bToggle*/);
-return true;
-}
 }
 return false;
 }


core.git: sd/source svx/source

2024-03-07 Thread Oliver Specht (via logerrit)
 sd/source/ui/func/fuformatpaintbrush.cxx |7 ++-
 svx/source/svdraw/svdedxv.cxx|4 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit dbb05dc818afb08b3e05ac62bd92389a5cf90fa7
Author: Oliver Specht 
AuthorDate: Thu Mar 7 12:47:22 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 7 21:48:37 2024 +0100

tdf#159726 Improve Clone formatting

Paragraph attributes and lists are copied if there is no source
selection or the source selection includes at least a full paragraph.
They are only applied to an empty or a paragraph selection.
As in tdf#160069 requested the clone formatting function is only enabled
in text edit mode.

Change-Id: I789402a7928837bb85ec941fd6f958d12585ac40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164533
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx 
b/sd/source/ui/func/fuformatpaintbrush.cxx
index 930e75233f32..89eecc13f989 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -45,6 +45,9 @@ bool ShouldPasteParaFormatPerSelection(const OutlinerView* 
pOLV)
 if(!pOLV)
 return true;
 
+if(!pOLV->GetEditView().HasSelection())
+return true;
+
 if(!pOLV->GetEditView().IsSelectionWithinSinglePara())
 return false;
 
@@ -286,7 +289,9 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, 
bool bNoParagraphForma
 if( rMarkList.GetMarkCount() == 1 )
 {
 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-if( pObj && 
SdrObjEditView::SupportsFormatPaintbrush(pObj->GetObjInventor(),pObj->GetObjIdentifier())
 )
+const OutlinerView* pOLV = 
rDrawViewShell.GetDrawView()->GetTextEditOutlinerView();
+if( pObj && pOLV &&
+
SdrObjEditView::SupportsFormatPaintbrush(pObj->GetObjInventor(),pObj->GetObjIdentifier())
 )
 return;
 }
 rSet.DisableItem( SID_FORMATPAINTBRUSH );
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index fb130a16a212..c0e1b715ea31 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2896,7 +2896,9 @@ sal_Int32 
SdrObjEditView::TakeFormatPaintBrush(std::shared_ptr& rFor
 
 OutlinerView* pOLV = GetTextEditOutlinerView();
 
-bool isParaSelection = pOLV ? pOLV->GetEditView().IsSelectionFullPara() : 
false;
+bool isParaSelection
+= pOLV ? !pOLV->GetEditView().HasSelection() || 
pOLV->GetEditView().IsSelectionFullPara()
+   : false;
 rFormatSet = std::make_shared(GetModel().GetItemPool(),
   GetFormatRangeImpl(pOLV != 
nullptr, isParaSelection));
 if (pOLV)


core.git: sd/source

2024-03-06 Thread Oliver Specht (via logerrit)
 sd/source/ui/func/fuformatpaintbrush.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit bea5341c22b40f690059933550e721cdcfb466aa
Author: Oliver Specht 
AuthorDate: Tue Mar 5 15:42:18 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Mar 6 21:21:39 2024 +0100

Improve clone formatting

Follow-up to 178d8a38e133aebd4cff1af2d2c49aec60468c92
Makes sure that without selection at target position only
character attributes are copied

Change-Id: I677b1ef29855fb2cf4c42a7b821678ecdd37c7f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164430
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx 
b/sd/source/ui/func/fuformatpaintbrush.cxx
index 9bbd30939d53..930e75233f32 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -40,17 +40,13 @@
 namespace
 {
 // Paragraph properties are pasted if the selection contains a whole paragraph
-// or there was no selection at all (i.e. just a left click)
 bool ShouldPasteParaFormatPerSelection(const OutlinerView* pOLV)
 {
 if(!pOLV)
 return true;
 
-if(!pOLV->GetEditView().HasSelection())
-return true;
-
 if(!pOLV->GetEditView().IsSelectionWithinSinglePara())
-return true;
+return false;
 
 return pOLV->GetEditView().IsSelectionFullPara();
 }


core.git: sd/source

2024-03-04 Thread Caolán McNamara (via logerrit)
 sd/source/ui/animations/CustomAnimationList.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c398fead74ee63c51d54fdb06f04438b2c3233e0
Author: Caolán McNamara 
AuthorDate: Sun Mar 3 21:00:23 2024 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 4 09:37:21 2024 +0100

Resolves: tdf#159854 Trigger text is black on dark grey in Animation sidebar

in dark mode

Change-Id: I2cbf9b7d14a501c309a02dd3080511f527f9e1d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164315
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index 39b3d488d2ad..bb08f33c4411 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -310,12 +310,10 @@ void 
CustomAnimationListEntryItem::PaintTrigger(vcl::RenderContext& rRenderConte
 
 ::tools::Rectangle aOutRect(rRect);
 
-// fill the background
-Color 
aColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor());
-
 rRenderContext.Push();
-rRenderContext.SetFillColor(aColor);
+
rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor());
 rRenderContext.SetLineColor();
+// fill the background with the dialog bg color
 rRenderContext.DrawRect(aOutRect);
 
 // Erase the four corner pixels to make the rectangle appear rounded.
@@ -335,6 +333,8 @@ void 
CustomAnimationListEntryItem::PaintTrigger(vcl::RenderContext& rRenderConte
 aOutRect.AdjustTop( nVertBorder );
 aOutRect.AdjustBottom( -nVertBorder );
 
+// Draw the text with the dialog text color
+
rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogTextColor());
 rRenderContext.DrawText(aOutRect, 
rRenderContext.GetEllipsisString(msDescription, aOutRect.GetWidth()));
 rRenderContext.Pop();
 }


core.git: sd/source writerfilter/source

2024-02-29 Thread Justin Luth (via logerrit)
 sd/source/ui/dlg/headerfooterdlg.cxx  |2 +-
 writerfilter/source/dmapper/GraphicImport.cxx |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 99e33129346afeb0a386ffad859a9178290211a6
Author: Justin Luth 
AuthorDate: Thu Feb 29 11:35:43 2024 -0500
Commit: Justin Luth 
CommitDate: Fri Mar 1 01:39:18 2024 +0100

NFC writerfilter GraphicImport: streamline if statement

The function is a const static, so it doesn't require being run.

Change-Id: I31fb35e9daf54103071197e669c54818d4062264
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164172
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx 
b/sd/source/ui/dlg/headerfooterdlg.cxx
index 92f7e9be1cb0..8aaf7fed1e47 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -536,7 +536,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( 
LanguageType , boo
 }
 else
 {
-const sal_uInt16 nPageCount = 
mpDoc->GetMasterSdPageCount(PageKind::Standard);
+const sal_uInt16 nPageCount = 1;// 
mpDoc->GetMasterSdPageCount(PageKind::Standard);
 sal_uInt16 nPage;
 for( nPage = 0; nPage < nPageCount; nPage++ )
 {
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index f64bef09e958..a2acdeb604cc 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -972,8 +972,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
 && !bIsDiagram && !bIsLockedCanvas && 
!bIsWordprocessingCanvas)
 || 
xServiceInfo->supportsService("com.sun.star.drawing.LineShape");
 SdrObject* pShape = 
SdrObject::getSdrObjectFromXShape(m_xShape);
-if ((bIsGroupOrLine && 
!lcl_bHasGroupSlantedChild(pShape) && nOOXAngle == 0)
-|| !bIsGroupOrLine)
+if (!bIsGroupOrLine || (!nOOXAngle && 
!lcl_bHasGroupSlantedChild(pShape)))
 {
 if (m_pImpl->isXSizeValid())
 aSize.Width = m_pImpl->getXSize();


core.git: sd/source

2024-02-29 Thread Caolán McNamara (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 676f4e67493f4fec0004a925da675c0912b0637b
Author: Caolán McNamara 
AuthorDate: Thu Feb 29 08:34:33 2024 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 29 13:29:09 2024 +0100

cid#1592640 Dereference after null check

also possibly could be
if (mpDocSh && !maPresSettings.mbInteractive)

Change-Id: If68df161f4f7e72d6598469e398c3a8b44e1eba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164139
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index e195fe29bf38..d06f867d994c 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1127,7 +1127,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx 
const * pPresSettings )
 mpPaneHider.reset(new PaneHider(*mpViewShell,this));
 
 // these Slots are forbidden in other views for this document
-if( mpDocSh && !pPresSettings->mbInteractive) // IASS
+if( mpDocSh && pPresSettings && !pPresSettings->mbInteractive) // 
IASS
 {
 mpDocSh->SetSlotFilter( true, pAllowed );
 mpDocSh->ApplySlotFilter();


core.git: sd/source

2024-02-27 Thread Justin Luth (via logerrit)
 sd/source/ui/dlg/headerfooterdlg.cxx |   22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 62323124f54885c6de4ac4fa38052d380309a5a1
Author: Justin Luth 
AuthorDate: Tue Feb 27 09:57:35 2024 -0500
Commit: Justin Luth 
CommitDate: Wed Feb 28 00:23:11 2024 +0100

tdf#159927 sd headerfooterdlg: detect existing date/time language

Sometimes it was hard to change an existing foreign language
to your own language for Impress' header/footer fields.

The function was only checking the first master slide for the
date/time language. If it didn't have one, then the default locale
was selected.

However, although all pages share the same date/time language,
it is not necessary for all (or even the first) master slide
to have a date/time field. So check through all the master slides
until one with a date/time is found.

Obviously if none have one defined things still work OK,
because that is effectively how it was working beforehand.

I don't have much hope for a successful unit test.
I'll try to develop it as a follow-up to this patch.

Change-Id: Ida44957013978720ad12fadc9b4ebc88bc10ea40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164045
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx 
b/sd/source/ui/dlg/headerfooterdlg.cxx
index 8401ec38cd6e..92f7e9be1cb0 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -151,7 +151,8 @@ private:
 
 void FillFormatList(sal_Int32 nSelectedPos);
 void GetOrSetDateTimeLanguage( LanguageType , bool bSet );
-void GetOrSetDateTimeLanguage( LanguageType , bool bSet, SdPage* 
pPage );
+// returns true if the page has a date/time field item
+bool GetOrSetDateTimeLanguage(LanguageType& rLanguage, bool bSet, SdPage* 
pPage);
 
 public:
 HeaderFooterTabPage(weld::Container* pParent, SdDrawDocument* pDoc, 
SdPage* pActualPage, bool bHandoutMode );
@@ -535,25 +536,29 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( 
LanguageType , boo
 }
 else
 {
-// get the language from the first master page
-// or set it to all master pages
-sal_uInt16 nPageCount = bSet ? mpDoc->GetMasterSdPageCount( 
PageKind::Notes ) : 1;
+const sal_uInt16 nPageCount = 
mpDoc->GetMasterSdPageCount(PageKind::Standard);
 sal_uInt16 nPage;
 for( nPage = 0; nPage < nPageCount; nPage++ )
 {
-GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( 
nPage, PageKind::Standard ) );
+SdPage* pMasterSlide = mpDoc->GetMasterSdPage(nPage, 
PageKind::Standard);
+bool bHasDateFieldItem = GetOrSetDateTimeLanguage(rLanguage, bSet, 
pMasterSlide);
+
+// All pages must use the same language. If getting the language, 
only need to find one.
+if (!bSet && bHasDateFieldItem)
+break;
 }
 }
 }
 
-void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType , 
bool bSet, SdPage* pPage )
+bool HeaderFooterTabPage::GetOrSetDateTimeLanguage(LanguageType& rLanguage, 
bool bSet,
+   SdPage* pPage)
 {
 if( !pPage )
-return;
+return false;
 
 SdrTextObj* pObj = static_cast(pPage->GetPresObj( 
PresObjKind::DateTime ));
 if( !pObj )
-return;
+return false;
 
 Outliner* pOutl = mpDoc->GetInternalOutliner();
 pOutl->Init( OutlinerMode::TextObject );
@@ -623,6 +628,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( 
LanguageType , boo
 
 pOutl->Clear();
 pOutl->Init( nOutlMode );
+return bHasDateFieldItem;
 }
 
 PresLayoutPreview::PresLayoutPreview()


core.git: sd/source

2024-02-27 Thread Sarper Akdemir (via logerrit)
 sd/source/ui/view/drvwshrg.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 75da0c3c576253c61092e762ead974c3600b15b4
Author: Sarper Akdemir 
AuthorDate: Thu Feb 22 17:45:54 2024 +0300
Commit: Thorsten Behrens 
CommitDate: Tue Feb 27 13:34:26 2024 +0100

related tdf#33603: do not register NotesChildWindow for Draw

Draw doesn't need the notes panel introduced in
c4c1ca58bb587a56a30c7f4817c346054ce37f2a, so don't register
that for it's shell (GraphicViewShell).

Change-Id: I062a54e806058f352721b89d7c10cece8612
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163775
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index 9871db2e2de7..2b1c3459a9fd 100644
--- a/sd/source/ui/view/drvwshrg.cxx
+++ b/sd/source/ui/view/drvwshrg.cxx
@@ -105,7 +105,6 @@ void GraphicViewShell::InitInterface_Impl()
 GetStaticInterface()->RegisterChildWindow(
 sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
 
GetStaticInterface()->RegisterChildWindow(DevelopmentToolChildWindow::GetChildWindowId());
-
GetStaticInterface()->RegisterChildWindow(::sd::NotesChildWindow::GetChildWindowId());
 }
 
 } // end of namespace sd


core.git: sd/source

2024-02-27 Thread Caolán McNamara (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dba077327bbb9bf31cf1b8d16807baa3bf64402e
Author: Caolán McNamara 
AuthorDate: Tue Feb 27 08:55:47 2024 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 27 12:05:14 2024 +0100

cid#1592376 Uninitialized scalar field

Change-Id: I8f62faac5a1170b9932afe08f03145e4ca7b1be1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164009
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 095c4436965f..e195fe29bf38 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -253,6 +253,7 @@ AnimationSlideController::AnimationSlideController( 
Reference< XIndexAccess > co
 ,   mnCurrentSlideIndex(0)
 ,   mnHiddenSlideNumber( -1 )
 ,   mxSlides( xSlides )
+,   meMode2( eMode )
 {
 if( mxSlides.is() )
 mnSlideCount = xSlides->getCount();


core.git: sd/source

2024-02-27 Thread Julien Nabet (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d5e012b85a20d467fd8c0e86689039eb8c79457e
Author: Julien Nabet 
AuthorDate: Tue Feb 27 09:22:18 2024 +0100
Commit: Julien Nabet 
CommitDate: Tue Feb 27 11:00:54 2024 +0100

cid#1592380 COPY_PASTE_ERROR

Change-Id: Ib5c57ba2118531449908600b22fd49f52277159b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164005
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 31418cdcd2ef..095c4436965f 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3436,7 +3436,7 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 {
 case SdrHintKind::ObjectInserted:
 {
-if (nullptr != mnEventObjectChange)
+if (nullptr != mnEventObjectInserted)
 // avoid multiple events
 return;
 


core.git: sd/source

2024-02-23 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 66e34e795689c92283644d379bdbbbc587cd8b34
Author: Andrea Gelmini 
AuthorDate: Fri Feb 23 22:00:54 2024 +0100
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sat Feb 24 06:22:39 2024 +0100

Fix typo

Change-Id: I4d15f9f31c782ffd2b6f4c5decc3ba3e4891f41b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163873
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 3db608c60869..31418cdcd2ef 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3477,7 +3477,7 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 // Refresh current slide. Need to do that asynchronous, else e.g.
 // text edit changes EditEngine/Outliner are not progressed far
 // enough (ObjectChanged broadcast which we are in here seems
-// to early for some cases)
+// too early for some cases)
 uno::Reference< css::drawing::XDrawPage > 
XCurrentSlide(getCurrentSlide());
 mnEventObjectChange = 
AsyncUpdateSlideshow_Impl::AsyncUpdateSlideshow(this, XCurrentSlide, eHintKind);
 break;


core.git: sd/source

2024-02-23 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |  246 +++
 sd/source/ui/slideshow/slideshowimpl.hxx |5 
 2 files changed, 161 insertions(+), 90 deletions(-)

New commits:
commit c7616ef5a473c50df360d3b69bad74c577ab78c7
Author: Armin Le Grand (allotropia) 
AuthorDate: Thu Feb 22 23:25:39 2024 +0100
Commit: Armin Le Grand 
CommitDate: Fri Feb 23 10:40:03 2024 +0100

IASS: Added SdrObject Insert/Remove suppport

Change-Id: I7f6aad0ec12de3c3b2677f1ca07e8efd5a881982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163797
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 61e8bcf8f90a..12a8cc31dcae 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -565,6 +565,8 @@ SlideshowImpl::SlideshowImpl( const Reference< 
XPresentation2 >& xPresentation,
 , mnEndShowEvent(nullptr)
 , mnContextMenuEvent(nullptr)
 , mnEventObjectChange(nullptr)
+, mnEventObjectInserted(nullptr)
+, mnEventObjectRemoved(nullptr)
 , mnEventPageOrderChange(nullptr)
 , mxPresentation( xPresentation )
 , mxListenerProxy()
@@ -658,6 +660,10 @@ void 
SlideshowImpl::disposing(std::unique_lock&)
 Application::RemoveUserEvent( mnContextMenuEvent );
 if( mnEventObjectChange )
 Application::RemoveUserEvent( mnEventObjectChange );
+if( mnEventObjectInserted )
+Application::RemoveUserEvent( mnEventObjectInserted );
+if( mnEventObjectRemoved )
+Application::RemoveUserEvent( mnEventObjectRemoved );
 if( mnEventPageOrderChange )
 Application::RemoveUserEvent( mnEventPageOrderChange );
 
@@ -3305,53 +3311,104 @@ void SlideshowImpl::AsyncNotifyEvent(
 const uno::Reference< css::drawing::XDrawPage >& rXCurrentSlide,
 const SdrHintKind eHintKind)
 {
-if (SdrHintKind::ObjectChange == eHintKind)
+switch (eHintKind)
 {
-mnEventObjectChange = nullptr;
-
-// refresh single slide
-gotoSlide(rXCurrentSlide);
-}
-else if (SdrHintKind::PageOrderChange == eHintKind)
-{
-mnEventPageOrderChange = nullptr;
+case SdrHintKind::ObjectInserted:
+{
+mnEventObjectInserted = nullptr;
 
-// order of pages (object pages or master pages) changed 
(Insert/Remove/ChangePos)
-// rXCurrentSlide is the current slide before the change.
-Reference< XDrawPagesSupplier > xDrawPages( mpDoc->getUnoModel(), 
UNO_QUERY_THROW );
-Reference< XIndexAccess > xSlides( xDrawPages->getDrawPages(), 
UNO_QUERY_THROW );
-const sal_Int32 nNewSlideCount(xSlides.is() ? xSlides->getCount() : 0);
+// refresh single slide
+gotoSlide(rXCurrentSlide);
+break;
+}
+case SdrHintKind::ObjectRemoved:
+{
+mnEventObjectRemoved = nullptr;
 
-if (nNewSlideCount != mpSlideController->getSlideNumberCount())
+// refresh single slide
+gotoSlide(rXCurrentSlide);
+break;
+}
+case SdrHintKind::ObjectChange:
 {
-// need to reinitialize AnimationSlideController
-OUString aPresSlide( maPresSettings.maPresPage );
-createSlideList( maPresSettings.mbAll, aPresSlide );
+mnEventObjectChange = nullptr;
+
+// refresh single slide
+gotoSlide(rXCurrentSlide);
+break;
 }
+case SdrHintKind::PageOrderChange:
+{
+mnEventPageOrderChange = nullptr;
 
-// Check if current slide before change is still valid (maybe removed)
-const sal_Int32 nSlideCount(mpSlideController->getSlideNumberCount());
-bool bSlideStillValid(false);
+// order of pages (object pages or master pages) changed 
(Insert/Remove/ChangePos)
+// rXCurrentSlide is the current slide before the change.
+Reference< XDrawPagesSupplier > xDrawPages( mpDoc->getUnoModel(), 
UNO_QUERY_THROW );
+Reference< XIndexAccess > xSlides( xDrawPages->getDrawPages(), 
UNO_QUERY_THROW );
+const sal_Int32 nNewSlideCount(xSlides.is() ? xSlides->getCount() 
: 0);
 
-for (sal_Int32 nSlide(0); !bSlideStillValid && nSlide < nSlideCount; 
nSlide++)
-{
-if (rXCurrentSlide == mpSlideController->getSlideByNumber(nSlide))
+if (nNewSlideCount != mpSlideController->getSlideNumberCount())
 {
-bSlideStillValid = true;
+// need to reinitialize AnimationSlideController
+OUString aPresSlide( maPresSettings.maPresPage );
+createSlideList( maPresSettings.mbAll, aPresSlide );
 }
-}
 
-if(bSlideStillValid)
-{
-// stay on that slide
-gotoSlide(rXCurrentSlide);
+// Check if current slide before change is 

core.git: sd/source

2024-02-22 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/dlg/NotesChildWindow.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 22d95e9746b4cbeeaae56526e9ab083066ad1a52
Author: Andrea Gelmini 
AuthorDate: Thu Feb 22 11:41:49 2024 +0100
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Thu Feb 22 15:33:02 2024 +0100

Remove duplicated include

Change-Id: Ica5e5e95f99f30a59b91cd1243ac3ec401e6e94d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163728
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/sd/source/ui/dlg/NotesChildWindow.cxx 
b/sd/source/ui/dlg/NotesChildWindow.cxx
index ebcc94d316e3..9b037757a2dd 100644
--- a/sd/source/ui/dlg/NotesChildWindow.cxx
+++ b/sd/source/ui/dlg/NotesChildWindow.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 


core.git: sd/source

2024-02-21 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/unoidl/DrawController.cxx |   23 +--
 1 file changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 8eee7eab8087590aa19bb9989c294e9be767f356
Author: Armin Le Grand (allotropia) 
AuthorDate: Wed Feb 21 15:51:23 2024 +0100
Commit: Armin Le Grand 
CommitDate: Wed Feb 21 23:29:41 2024 +0100

IASS: Allow exit Impress when SlideShow is running

Change-Id: Iffccf2c7fe37845f9da44fd911cf974db026af89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163697
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/unoidl/DrawController.cxx 
b/sd/source/ui/unoidl/DrawController.cxx
index 011bfe939858..8ae76e58e66b 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -182,8 +182,27 @@ sal_Bool SAL_CALL DrawController::suspend( sal_Bool 
Suspend )
 {
 // do not allow suspend if a slideshow needs this controller!
 rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( 
*pViewShellBase ) );
-if( xSlideShow.is() && xSlideShow->dependsOn(pViewShellBase) )
-return false;
+if (xSlideShow.is())
+{
+if (SlideShow::IsInteractiveSlideshow())
+{
+// IASS mode: If preview mode, end it
+if (xSlideShow->isInteractiveSetup())
+xSlideShow->endInteractivePreview();
+
+// end the SlideShow
+xSlideShow->end();
+
+// use SfxBaseController::suspend( Suspend ) below
+// for normal processing and return value
+}
+else
+{
+// original reaction - prevent exit
+if (xSlideShow->dependsOn(pViewShellBase))
+return false;
+}
+}
 }
 }
 


core.git: sd/source

2024-02-21 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/animations/CustomAnimationPane.cxx |3 
 sd/source/ui/animations/SlideTransitionPane.cxx |2 
 sd/source/ui/inc/slideshow.hxx  |6 
 sd/source/ui/slideshow/slideshow.cxx|   39 +
 sd/source/ui/slideshow/slideshowimpl.cxx|  174 +++-
 sd/source/ui/slideshow/slideshowimpl.hxx|   19 ++
 6 files changed, 240 insertions(+), 3 deletions(-)

New commits:
commit 69bac9b78ce7dcbe91da3d3552aa3dd7edaf2b4a
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue Feb 20 20:03:51 2024 +0100
Commit: Armin Le Grand 
CommitDate: Wed Feb 21 10:34:42 2024 +0100

IASS: Avoid more SlideShow shutdowns

There are many ways the SlideShow may be stopped,
but with IASS mode less are needed. Identified
quite some and added needed code.
Also added that for setting transitions or adding
an effect to an Object when the SlideShow is up
(the FullScreen one, makes no sense in-place)
the Preview for that is show in the running
SlideShow by switching to it, showing, and back.
So this is used in this mode as a permanent
preview for those changes.

Change-Id: I5cc34e230358aecad30fec8aee05acfa937f9270
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163669
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 77607e06d033..35425a5dfea5 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1879,7 +1879,8 @@ void CustomAnimationPane::onAdd()
 
 updateControls();
 
-SlideShow::Stop( mrBase );
+if (!SlideShow::IsInteractiveSlideshow()) // IASS
+SlideShow::Stop( mrBase );
 }
 
 void CustomAnimationPane::onRemove()
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index e2c954623eaa..b83bb98087b0 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -884,7 +884,7 @@ void SlideTransitionPane::applyToSelectedPages(bool 
bPreview = true)
 {
 if (aEffect.mnType) // mnType = 0 denotes no transition
 playCurrentEffect();
-else if( mxView.is() )
+else if( mxView.is() && !SlideShow::IsInteractiveSlideshow()) // IASS
 SlideShow::Stop( mrBase );
 }
 
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index 81af4a52f4ee..2703d9611e31 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -106,6 +106,12 @@ public:
 
 // helper api
 
+bool startInteractivePreview(
+const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
+const css::uno::Reference< css::animations::XAnimationNode >& 
xAnimationNode );
+bool isInteractiveSetup() const;
+void endInteractivePreview();
+
 void startPreview(
 const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
 const css::uno::Reference< css::animations::XAnimationNode >& 
xAnimationNode );
diff --git a/sd/source/ui/slideshow/slideshow.cxx 
b/sd/source/ui/slideshow/slideshow.cxx
index d0913569bd11..be3b95f27805 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -193,6 +193,16 @@ bool SlideShow::StartPreview( ViewShellBase const & rBase,
 if( !xSlideShow.is() )
 return false;
 
+// end an already running IASS Preview (when someone is fast)
+if (SlideShow::IsInteractiveSlideshow() && 
xSlideShow->isInteractiveSetup())
+xSlideShow->endInteractivePreview();
+
+// check if IASS re-use of running Slideshow can/should be done
+// and do it
+if (SlideShow::IsInteractiveSlideshow() && xSlideShow->isFullScreen()) // 
IASS
+return xSlideShow->startInteractivePreview( xDrawPage, xAnimationNode 
);
+
+// fallback to usual mode
 xSlideShow->startPreview( xDrawPage, xAnimationNode );
 return true;
 }
@@ -644,6 +654,13 @@ void SAL_CALL SlideShow::end()
 {
 SolarMutexGuard aGuard;
 
+if (SlideShow::IsInteractiveSlideshow() && isInteractiveSetup())
+{
+// If IASS was active clean that up, but do not end SlideShow
+endInteractivePreview();
+return;
+}
+
 // The mbIsInStartup flag should have been reset during the start of the
 // slide show.  Reset it here just in case that something has horribly
 // gone wrong.
@@ -909,6 +926,28 @@ void SlideShow::disposing(std::unique_lock&)
 mpDoc = nullptr;
 }
 
+bool SlideShow::startInteractivePreview( const Reference< XDrawPage >& 
xDrawPage, const Reference< XAnimationNode >& xAnimationNode )
+{
+if (!mxController.is())
+return false;
+
+mxController->startInteractivePreview(xDrawPage, xAnimationNode);
+return mxController->isInteractiveSetup();
+}
+
+bool 

core.git: sd/source

2024-02-18 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |3 +
 sd/source/ui/app/sdmod1.cxx   |2 -
 sd/source/ui/dlg/navigatr.cxx |2 -
 sd/source/ui/docshell/docshel3.cxx|2 -
 sd/source/ui/func/funavig.cxx |2 -
 sd/source/ui/func/fupoor.cxx  |4 +-
 sd/source/ui/inc/slideshow.hxx|3 +
 sd/source/ui/slideshow/slideshow.cxx  |7 +++
 sd/source/ui/slideshow/slideshowimpl.cxx  |2 -
 sd/source/ui/view/drawview.cxx|3 +
 sd/source/ui/view/drviews1.cxx|4 +-
 sd/source/ui/view/drviews2.cxx|6 ++-
 sd/source/ui/view/drviews3.cxx|4 +-
 sd/source/ui/view/drviews4.cxx|2 -
 sd/source/ui/view/drviews7.cxx|9 ++---
 sd/source/ui/view/drviewsa.cxx|9 +++--
 sd/source/ui/view/drviewse.cxx|8 ++--
 sd/source/ui/view/drviewsh.cxx|5 ++
 sd/source/ui/view/sdview2.cxx |3 +
 sd/source/ui/view/viewshel.cxx|   25 +++---
 20 files changed, 72 insertions(+), 33 deletions(-)

New commits:
commit 9a41cafae06fc01d7ee0764898cba526b7944b52
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Feb 16 17:01:39 2024 +0100
Commit: Armin Le Grand 
CommitDate: Sun Feb 18 13:28:55 2024 +0100

IASS: Preparations for InterActiveSlideShow

The idea is a long wanted feature, to allow the
EditView to stay active during a running Presentation
so that you can do changes which then directly show
up in the running presentation. This will need quite
some steps. To be on the safe side all of the changes
are isolated by a variable to cause no harm. For
now this uses ENVVAR ENABLE_INTERACTIVE_SLIDESHOW,
but that may change e.g. as config entry or option.

Change-Id: Id0ab9a473603225456206fbd933e932248681509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163514
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx 
b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 3ec3efb2be91..0071b0e85647 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -339,7 +339,8 @@ void SAL_CALL
 //mpChildrenManager->SetShapeList 
(uno::Reference (
 //xView->getCurrentPage(), uno::UNO_QUERY));
 rtl::Reference< sd::SlideShow > xSlideshow( 
sd::SlideShow::GetSlideShow( mpSdViewSh->GetViewShellBase() ) );
-if( xSlideshow.is() && xSlideshow->isRunning() && 
xSlideshow->isFullScreen() )
+if( xSlideshow.is() && (xSlideshow->isRunning() && 
!sd::SlideShow::IsInteractiveSlideshow()) //IASS
+&& xSlideshow->isFullScreen() )
 {
 css::uno::Reference< drawing::XDrawPage > xSlide;
 // MT IA2: Not used...
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 310ee95190ac..199e8a41c6f0 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -196,7 +196,7 @@ void SdModule::Execute(SfxRequest& rReq)
 ::sd::ViewShell* pViewShell = pDocShell ? 
pDocShell->GetViewShell() : nullptr;
 if (pViewShell)
 {
-if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) 
)
+if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) 
&& !sd::SlideShow::IsInteractiveSlideshow() ) // IASS
 {
 // Prevent documents from opening while the slide
 // show is running, except when this request comes
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index f1a4a66c1e5f..930a68f7ec66 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -187,7 +187,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc 
)
 
 // Disable the shape filter drop down menu when there is a running slide
 // show.
-if (pViewShell!=nullptr && sd::SlideShow::IsRunning( 
pViewShell->GetViewShellBase() ))
+if (pViewShell!=nullptr && sd::SlideShow::IsRunning( 
pViewShell->GetViewShellBase() ) && !sd::SlideShow::IsInteractiveSlideshow() ) 
// IASS
 mxToolbox->set_item_sensitive("shapes", false);
 else
 mxToolbox->set_item_sensitive("shapes", true);
diff --git a/sd/source/ui/docshell/docshel3.cxx 
b/sd/source/ui/docshell/docshel3.cxx
index 1e3ab4512792..c79f23580872 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx

core.git: sd/source

2024-02-05 Thread Samuel Mehrbrodt (via logerrit)
 sd/source/ui/view/DocumentRenderer.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 5f9ce732300d3301b574b569fe331e8a93057e73
Author: Samuel Mehrbrodt 
AuthorDate: Mon Feb 5 12:23:26 2024 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 5 14:33:20 2024 +0100

Fix typo in comment

Also relayout the text

Change-Id: Id774c5a5089e1c031ae705e6b23281e882b6739f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162995
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index c7587a1d2d40..a8d5a6f1de25 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -2123,13 +2123,10 @@ private:
 else
 nPaperBin = rInfo.mpPrinter->GetPaperBin();
 
-// For pages larger then the printable area there
-// are three options:
+// For pages larger than the printable area there are three options:
 // 1. Scale down to the page to the printable area.
-// 2. Print only the upper left part of the page
-//(without the unprintable borders).
-// 3. Split the page into parts of the size of the
-// printable area.
+// 2. Print only the upper left part of the page (without the 
unprintable borders).
+// 3. Split the page into parts of the size of the printable area.
 const bool bScalePage (mpOptions->IsPageSize());
 const bool bCutPage (mpOptions->IsCutPage());
 MapMode aMap (rInfo.maMap);


core.git: sd/source

2024-01-24 Thread Tomaž Vajngerl (via logerrit)
 sd/source/ui/view/drviewsf.cxx |   15 ---
 1 file changed, 15 deletions(-)

New commits:
commit ad8248bcc7ed19285147aeff71a508453a61
Author: Tomaž Vajngerl 
AuthorDate: Wed Aug 30 09:15:56 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jan 24 10:45:14 2024 +0100

sd: remove condition to only show ThemeDialog in master view

Change-Id: I09ce07f7b520688aa54dd30107b5ab2218b12894
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156277
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 62804da3c0ab9443cf36f2e02387a2e9c272d5dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162463
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 979225bb06dd..cb0e6495323d 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -470,21 +470,6 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 }
 break;
 
-case SID_THEME_DIALOG:
-{
-bool bDisable = true;
-SdrPageView* pPageView = mpDrawView->GetSdrPageView();
-if (pPageView)
-{
-SdPage* pPage = 
dynamic_cast(pPageView->GetPage());
-if (pPage && pPage->IsMasterPage())
-bDisable = false;
-}
-if (bDisable)
-rSet.DisableItem(nWhich);
-}
-break;
-
 case SID_STYLE_FAMILY2:
 case SID_STYLE_FAMILY3:
 case SID_STYLE_FAMILY5:


core.git: sd/source

2024-01-18 Thread Gökay Şatır (via logerrit)
 sd/source/ui/unoidl/unomodel.cxx |   24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

New commits:
commit 98f73277667d9fb440c47ff6f9c5c7bd74343dc5
Author: Gökay Şatır 
AuthorDate: Wed Jan 17 18:11:23 2024 +0300
Commit: Caolán McNamara 
CommitDate: Thu Jan 18 11:13:27 2024 +0100

Implement hyperlinkInfoAtPosition for Impress.

It is used in readonly mode.

Signed-off-by: Gökay Şatır 
Change-Id: I428d4923ab89dbcf6df237c68ae792753c1edf13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162201
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 876543305c78cb596720da087454a5c54e5feb06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/16
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 89efc76df232..c97cd9ff0ab8 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -127,6 +127,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2708,9 +2709,28 @@ void SdXImpressDocument::setTextSelection(int nType, int 
nX, int nY)
 }
 }
 
-OUString SdXImpressDocument::hyperlinkInfoAtPosition(int /*x*/, int /*y*/)
+OUString SdXImpressDocument::hyperlinkInfoAtPosition(int x, int y)
 {
-// To be implemented..
+::sd::ViewShell* viewSh = GetViewShell();
+
+if (viewSh)
+{
+Point point(x, y);
+point = o3tl::convert(point, o3tl::Length::twip, o3tl::Length::mm100);
+SdrView* pSdrView = SfxViewShell::Current()->GetDrawView();
+
+if (pSdrView)
+{
+SdrViewEvent aVEvt;
+pSdrView->PickAnything(point, aVEvt);
+if (aVEvt.mpURLField)
+{
+OUString aURL = 
INetURLObject::decode(aVEvt.mpURLField->GetURL(), 
INetURLObject::DecodeMechanism::WithCharset);
+return aURL;
+}
+}
+}
+
 return OUString();
 }
 


core.git: sd/source

2024-01-11 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 2184890a0eebc55aa24cbe61de5b8918d958c65f
Author: Armin Le Grand (allotropia) 
AuthorDate: Thu Jan 11 14:22:32 2024 +0100
Commit: Armin Le Grand 
CommitDate: Thu Jan 11 18:12:48 2024 +0100

tdf#158664 Ignore Notifications when SlideShow is inactive

The impl SlideshowImpl gets notifications for changes from
the ObjectModel, but needs to ignore them when SlideShow
is not active/running. For discussion how to do this see
comments in task.

Change-Id: Ic251af4b82f0f4b48d8d9b0127dd2f6015966935
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161922
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 1e739ab97f26..4bf43fc3bda5 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3192,6 +3192,14 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, 
const SfxHint& rHint)
 // better do nothing when no DrawModel (should not happen)
 return;
 
+// tdf#158664 I am surprised, but the 'this' instance keeps incarnated
+// when the slideshow was running once, so need to check for
+// SlideShow instance/running to be safe.
+// NOTE: isRunning() checks mxShow.is(), that is what we want
+if (!isRunning())
+// no SlideShow instance or not running, nothing to do
+return;
+
 const SdrHintKind eHintKind(static_cast(rHint).GetKind());
 
 if (SdrHintKind::ObjectChange == eHintKind)


core.git: sd/source

2024-01-03 Thread Mike Kaganski (via logerrit)
 sd/source/core/annotations/Annotation.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 9a2a1dfef1b085b1b899dfd2775d61c2fc41d2f3
Author: Mike Kaganski 
AuthorDate: Wed Jan 3 18:12:18 2024 +0100
Commit: Mike Kaganski 
CommitDate: Thu Jan 4 04:52:33 2024 +0100

Simplify rectangle unit conversion

Change-Id: Idc3a4e983de0dec226ae1830fd70dc222624edd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161565
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sd/source/core/annotations/Annotation.cxx 
b/sd/source/core/annotations/Annotation.cxx
index 9faee9d7b701..597c357dd3ba 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -364,10 +364,11 @@ OString lcl_LOKGetCommentPayload(CommentNotificationType 
nType, uno::ReferenceGetHashCode()) : OString());
 geometry::RealPoint2D const & rPoint = rxAnnotation->getPosition();
 geometry::RealSize2D const & rSize = rxAnnotation->getSize();
-::tools::Rectangle aRectangle(Point(rPoint.X * 100.0, rPoint.Y * 
100.0), Size(rSize.Width * 100.0, rSize.Height * 100.0));
-aRectangle = OutputDevice::LogicToLogic(aRectangle, 
MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
-OString sRectangle = aRectangle.toString();
-aJsonWriter.put("rectangle", sRectangle.getStr());
+::tools::Rectangle 
aRectangle(Point(std::round(o3tl::toTwips(rPoint.X, o3tl::Length::mm)),
+
std::round(o3tl::toTwips(rPoint.Y, o3tl::Length::mm))),
+  
Size(std::round(o3tl::toTwips(rSize.Width, o3tl::Length::mm)),
+   
std::round(o3tl::toTwips(rSize.Height, o3tl::Length::mm;
+aJsonWriter.put("rectangle", aRectangle.toString());
 }
 }
 return aJsonWriter.finishAndGetAsOString();


core.git: sd/source

2024-01-02 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/framework/module/SlideSorterModule.cxx |   29 +++-
 sd/source/ui/unoidl/unomodel.cxx|8 ++---
 2 files changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 9fc28d7ef5def30a23960cf15334af1aec27460f
Author: Gabor Kelemen 
AuthorDate: Fri Dec 29 00:47:56 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Jan 3 00:01:55 2024 +0100

Use officecfg instead of SvtSlideSorterBarOptions class

Change-Id: Ie2965f343e6df31502596c35e1d17c22bbccb142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161451
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx 
b/sd/source/ui/framework/module/SlideSorterModule.cxx
index 1b6bbb7f9fae..7d8304bec454 100644
--- a/sd/source/ui/framework/module/SlideSorterModule.cxx
+++ b/sd/source/ui/framework/module/SlideSorterModule.cxx
@@ -19,8 +19,10 @@
 
 #include "SlideSorterModule.hxx"
 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,7 +31,6 @@
 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -80,17 +81,17 @@ SlideSorterModule::SlideSorterModule (
 
 UpdateViewTabBar(nullptr);
 
-if (SvtSlideSorterBarOptions().GetVisibleImpressView())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::ImpressView::get().has_value()
 && (!getenv("LO_TESTNAME") || !comphelper::LibreOfficeKit::isActive()))
 AddActiveMainView(FrameworkHelper::msImpressViewURL);
-if (SvtSlideSorterBarOptions().GetVisibleOutlineView())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::OutlineView::get())
 AddActiveMainView(FrameworkHelper::msOutlineViewURL);
-if (SvtSlideSorterBarOptions().GetVisibleNotesView())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::NotesView::get())
 AddActiveMainView(FrameworkHelper::msNotesViewURL);
-if (SvtSlideSorterBarOptions().GetVisibleHandoutView())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::HandoutView::get())
 AddActiveMainView(FrameworkHelper::msHandoutViewURL);
-if (SvtSlideSorterBarOptions().GetVisibleSlideSorterView())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::SlideSorterView::get().has_value()
 && !comphelper::LibreOfficeKit::isActive())
 AddActiveMainView(FrameworkHelper::msSlideSorterURL);
-if (SvtSlideSorterBarOptions().GetVisibleDrawView())
+if 
(officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::DrawView::get())
 AddActiveMainView(FrameworkHelper::msDrawViewURL);
 
 mxConfigurationController->addConfigurationChangeListener(
@@ -105,12 +106,14 @@ SlideSorterModule::~SlideSorterModule()
 
 void SlideSorterModule::SaveResourceState()
 {
-
SvtSlideSorterBarOptions().SetVisibleImpressView(IsResourceActive(FrameworkHelper::msImpressViewURL));
-
SvtSlideSorterBarOptions().SetVisibleOutlineView(IsResourceActive(FrameworkHelper::msOutlineViewURL));
-
SvtSlideSorterBarOptions().SetVisibleNotesView(IsResourceActive(FrameworkHelper::msNotesViewURL));
-
SvtSlideSorterBarOptions().SetVisibleHandoutView(IsResourceActive(FrameworkHelper::msHandoutViewURL));
-
SvtSlideSorterBarOptions().SetVisibleSlideSorterView(IsResourceActive(FrameworkHelper::msSlideSorterURL));
-
SvtSlideSorterBarOptions().SetVisibleDrawView(IsResourceActive(FrameworkHelper::msDrawViewURL));
+auto xChanges = comphelper::ConfigurationChanges::create();
+
officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::ImpressView::set(IsResourceActive(FrameworkHelper::msImpressViewURL),xChanges);
+
officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::OutlineView::set(IsResourceActive(FrameworkHelper::msOutlineViewURL),xChanges);
+
officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::NotesView::set(IsResourceActive(FrameworkHelper::msNotesViewURL),xChanges);
+
officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::HandoutView::set(IsResourceActive(FrameworkHelper::msHandoutViewURL),xChanges);
+
officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::SlideSorterView::set(IsResourceActive(FrameworkHelper::msSlideSorterURL),xChanges);
+
officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::DrawView::set(IsResourceActive(FrameworkHelper::msDrawViewURL),xChanges);
+xChanges->commit();
 }
 
 void SAL_CALL SlideSorterModule::notifyConfigurationChange (
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 52c95e556561..075ee6e383a7 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -33,6 +33,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -71,7 +72,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 

core.git: sd/source

2024-01-01 Thread Balazs Varga (via logerrit)
 sd/source/core/drawdoc3.cxx |   64 +++-
 1 file changed, 46 insertions(+), 18 deletions(-)

New commits:
commit 167659bf16a68c27fa547e6eccd62c1a6f69b057
Author: Balazs Varga 
AuthorDate: Fri Dec 29 12:01:10 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Jan 1 19:11:39 2024 +0100

tdf#157742 tdf#157783 - sd: fix copy master slides style

Copy SlideLayout property and themes from the old slide to
the new one.

Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 5062630edb88..5310789d2988 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -67,11 +67,11 @@ namespace {
 class InsertBookmarkAsPage_FindDuplicateLayouts
 {
 public:
-explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map  )
+explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector 
 )
 : mrLayoutsToTransfer(rLayoutsToTransfer) {}
 void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* );
 private:
-std::map 
+std::vector 
 };
 
 }
@@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 if( nIndex != -1 )
 aLayout = aLayout.copy(0, nIndex);
 
-std::map::const_iterator pIter = 
mrLayoutsToTransfer.find(aLayout);
+std::vector::const_iterator pIter =
+find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout);
 
 bool bFound = pIter != mrLayoutsToTransfer.end();
 
-sal_Int32 nLayout = 20; // blank page - master slide layout ID
 const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount();
 for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
 {
@@ -110,15 +110,6 @@ void 
InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
 pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_");
 aLayout = pBMMPage->GetName();
 
-uno::Reference< drawing::XDrawPage > 
xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW);
-uno::Reference xPropSet(xOldPage, 
uno::UNO_QUERY_THROW);
-if (xPropSet.is())
-{
-uno::Any aLayoutID = 
xPropSet->getPropertyValue("SlideLayout");
-if (aLayoutID.hasValue()) {
-aLayoutID >>= nLayout;
-}
-}
 break;
 }
 else
@@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 }
 
 if (!bFound)
-mrLayoutsToTransfer.insert({ aLayout, nLayout });
+mrLayoutsToTransfer.push_back(aLayout);
 }
 
 // Inserts a bookmark as a page
@@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
 // Refactored copy'n'pasted layout name collection into 
IterateBookmarkPages
 
-std::map aLayoutsToTransfer;
+std::vector aLayoutsToTransfer;
 InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( 
aLayoutsToTransfer );
 lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, 
nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this 
) );
 
@@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 if( !aLayoutsToTransfer.empty() )
 bMergeMasterPages = true;
 
-for ( const auto& layout : aLayoutsToTransfer )
+std::map aSlideLayoutsToTransfer;
+std::map> aThemesToTransfer;
+
+for ( const OUString& layoutName : aLayoutsToTransfer )
 {
 StyleSheetCopyResultVector aCreatedStyles;
 
-rStyleSheetPool.CopyLayoutSheets(layout.first, 
rBookmarkStyleSheetPool, aCreatedStyles);
+rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, 
aCreatedStyles);
 
 if(!aCreatedStyles.empty())
 {
@@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
pUndoMgr->AddUndoAction(std::make_unique(this, 
aCreatedStyles, true));
 }
 }
+
+// copy SlideLayout and Theme of the master slide
+sal_Int32 nLayout = 20; // blank page - master slide layout ID
+bool bIsMasterPage = false;
+sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, 
bIsMasterPage);
+if (bIsMasterPage)
+{
+uno::Reference< drawing::XDrawPage > 
xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), 
uno::UNO_QUERY_THROW);
+SdrPage* pMasterPage = SdPage::getImplementation(xOldPage);
+if (pMasterPage)
+{
+aThemesToTransfer.insert({ layoutName, 
pMasterPage->getSdrPageProperties().getTheme() });
+uno::Reference xPropSet(xOldPage, 
uno::UNO_QUERY_THROW);
+if (xPropSet.is())
+ 

core.git: sd/source sd/uiconfig

2023-12-31 Thread Jim Raykowski (via logerrit)
 sd/source/ui/animations/CustomAnimationList.cxx  |2 +-
 sd/uiconfig/simpress/ui/customanimationspanel.ui |   10 +++---
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 7e378516bc596d0308bcb1c974760c224f516ea6
Author: Jim Raykowski 
AuthorDate: Sun Dec 31 17:19:09 2023 -0900
Commit: Jim Raykowski 
CommitDate: Mon Jan 1 05:13:35 2024 +0100

tdf#158710 Fix animation list custom rendering for vcl gen plugin

Change-Id: I5d2eb9e74392036a99b90fca1c5a49ac7bee828b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161511
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index 69d0e9f7dce3..39b3d488d2ad 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -449,7 +449,7 @@ 
CustomAnimationList::CustomAnimationList(std::unique_ptr xTreeVi
 mxTreeView->connect_drag_begin(LINK(this, CustomAnimationList, 
DragBeginHdl));
 mxTreeView->connect_custom_get_size(LINK(this, CustomAnimationList, 
CustomGetSizeHdl));
 mxTreeView->connect_custom_render(LINK(this, CustomAnimationList, 
CustomRenderHdl));
-mxTreeView->set_column_custom_renderer(0, true);
+mxTreeView->set_column_custom_renderer(1, true);
 }
 
 
CustomAnimationListDropTarget::CustomAnimationListDropTarget(CustomAnimationList&
 rTreeView)
diff --git a/sd/uiconfig/simpress/ui/customanimationspanel.ui 
b/sd/uiconfig/simpress/ui/customanimationspanel.ui
index dda5cda5d1cc..277736f13280 100644
--- a/sd/uiconfig/simpress/ui/customanimationspanel.ui
+++ b/sd/uiconfig/simpress/ui/customanimationspanel.ui
@@ -111,14 +111,18 @@
   
 
 
-  
-6
+  
 
-  
+  
   
 0
   
 
+  
+
+
+  
+6
 
   
   


core.git: sd/source

2023-12-31 Thread Julien Nabet (via logerrit)
 sd/source/filter/ppt/pptin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6103a8e1ad31c08cab4b42993152d04f69e4f0ae
Author: Julien Nabet 
AuthorDate: Sun Dec 31 12:15:09 2023 +0100
Commit: Julien Nabet 
CommitDate: Sun Dec 31 13:52:39 2023 +0100

Replace "size() == 0 with empty()" (sd)

Change-Id: I3421e931dc8d6d58f85b238de9c3ca94a4255911
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161467
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index dcb48c5697f1..28c3fbe60127 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -535,7 +535,7 @@ bool ImplSdPPTImport::Import()
 break;
 }
 
-if (m_aHyperList.size() == 0)
+if (m_aHyperList.empty())
 {
 while(true)
 {


core.git: sd/source

2023-12-23 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/LayerTabBar.cxx |   95 ++-
 sd/source/ui/inc/LayerTabBar.hxx |9 +++
 2 files changed, 103 insertions(+), 1 deletion(-)

New commits:
commit d6a94c51130f62b17b29060fab6befe576e8c078
Author: Jim Raykowski 
AuthorDate: Sun Nov 12 17:52:09 2023 -0900
Commit: Jim Raykowski 
CommitDate: Sat Dec 23 20:10:25 2023 +0100

tdf#157244 Enhancement to identify objects in a layer

Show an invert overlay on objects of a layer after a 1/2 second delay
when the mouse pointer is on a layer tab.

Change-Id: Ifcb2d82d73b8745ad9aecddd18b22193525ed756
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159358
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 96b96068f331..ece1e0884bcf 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -39,6 +39,12 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 namespace sd {
 
 /**
@@ -47,12 +53,17 @@ namespace sd {
 LayerTabBar::LayerTabBar(DrawViewShell* pViewSh, vcl::Window* pParent)
 : TabBar( pParent, WinBits( WB_BORDER | WB_3DLOOK | WB_SCROLL ) ),
 DropTargetHelper( this ),
-pDrViewSh(pViewSh)
+pDrViewSh(pViewSh),
+m_aBringLayerObjectsToAttentionDelayTimer("LayerTabBar 
m_aBringLayerObjectsToAttentionDelayTimer")
 {
 EnableEditMode();
 SetSizePixel(Size(0, 0));
 SetMaxPageWidth( 150 );
 SetHelpId( HID_SD_TABBAR_LAYERS );
+
+m_aBringLayerObjectsToAttentionDelayTimer.SetInvokeHandler(
+LINK(this, LayerTabBar, 
BringLayerObjectsToAttentionDelayTimerHdl));
+m_aBringLayerObjectsToAttentionDelayTimer.SetTimeout(500);
 }
 
 LayerTabBar::~LayerTabBar()
@@ -137,6 +148,87 @@ void LayerTabBar::Select()
 pDispatcher->Execute(SID_SWITCHLAYER, SfxCallMode::SYNCHRON);
 }
 
+void LayerTabBar::MouseMove(const MouseEvent )
+{
+sal_uInt16 nPageId = 0;
+if (!rMEvt.IsLeaveWindow())
+nPageId = GetPageId(rMEvt.GetPosPixel());
+BringLayerObjectsToAttention(nPageId);
+return;
+}
+
+void LayerTabBar::BringLayerObjectsToAttention(const sal_uInt16 nPageId)
+{
+if (nPageId == m_nBringLayerObjectsToAttentionLastPageId)
+return;
+
+m_aBringLayerObjectsToAttentionDelayTimer.Stop();
+
+m_nBringLayerObjectsToAttentionLastPageId = nPageId;
+
+std::vector aRanges;
+
+if (nPageId != 0)
+{
+OUString aLayerName(GetLayerName(nPageId));
+if (pDrViewSh->GetView()->GetSdrPageView()->IsLayerVisible(aLayerName))
+{
+SdrLayerAdmin& rLayerAdmin = pDrViewSh->GetDoc()->GetLayerAdmin();
+SdrObjListIter aIter(pDrViewSh->GetActualPage(), 
SdrIterMode::DeepWithGroups);
+while (aIter.IsMore())
+{
+SdrObject* pObj = aIter.Next();
+assert(pObj != nullptr);
+if (pObj && (aLayerName == 
rLayerAdmin.GetLayerPerID(pObj->GetLayer())->GetName()))
+{
+::tools::Rectangle aRect(pObj->GetLogicRect());
+if (!aRect.IsEmpty())
+aRanges.emplace_back(aRect.Left(), aRect.Top(), 
aRect.Right(), aRect.Bottom());
+// skip over objects in groups
+if (pObj->IsGroupObject())
+{
+SdrObjListIter aSubListIter(pObj->GetSubList(), 
SdrIterMode::DeepWithGroups);
+while (aSubListIter.IsMore())
+{
+aIter.Next();
+aSubListIter.Next();
+}
+}
+}
+}
+}
+}
+
+if (m_xOverlayObject && m_xOverlayObject->getOverlayManager())
+m_xOverlayObject->getOverlayManager()->remove(*m_xOverlayObject);
+if (aRanges.empty())
+m_xOverlayObject.reset();
+else
+{
+m_xOverlayObject.reset(new sdr::overlay::OverlaySelection(
+   sdr::overlay::OverlayType::Invert,
+   Color(), std::move(aRanges), true/*unused 
for Invert type*/));
+m_aBringLayerObjectsToAttentionDelayTimer.Start();
+}
+}
+
+IMPL_LINK_NOARG(LayerTabBar, BringLayerObjectsToAttentionDelayTimerHdl, Timer 
*, void)
+{
+m_aBringLayerObjectsToAttentionDelayTimer.Stop();
+if (m_xOverlayObject)
+{
+if (SdrView* pView = pDrViewSh->GetDrawView())
+{
+if (SdrPaintWindow* pPaintWindow = pView->GetPaintWindow(0))
+{
+const rtl::Reference& 
xOverlayManager =
+pPaintWindow->GetOverlayManager();
+xOverlayManager->add(*m_xOverlayObject);
+}
+}
+}
+}
+
 void LayerTabBar::MouseButtonDown(const MouseEvent& rMEvt)
 {
 bool bSetPageID=false;
@@ -302,6 +394,7 @@ void  

core.git: sd/source

2023-12-22 Thread Balazs Varga (via logerrit)
 sd/source/filter/eppt/epptbase.hxx   |3 ++-
 sd/source/filter/eppt/epptooxml.hxx  |2 +-
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd
Author: Balazs Varga 
AuthorDate: Fri Dec 22 13:55:42 2023 +0100
Commit: Caolán McNamara 
CommitDate: Fri Dec 22 20:30:51 2023 +0100

cid#1559857 Illegal address computation

Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1

Change-Id: I1abfcea1c7ca8e55f8a4b19b66d80b901f575bcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161179
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/filter/eppt/epptbase.hxx 
b/sd/source/filter/eppt/epptbase.hxx
index 64709fa14f39..70bcd3a4b6ce 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -73,7 +73,8 @@ enum class EppLayout
 TITLERIGHT2BODIESLEFT = 18  /* Vertical title on the right, body on the 
left split into 2 rows*/
 };
 
-#define EPP_LAYOUT_SIZE 36
+#define EPP_LAYOUT_SIZE 25
+#define OOXML_LAYOUT_SIZE 36
 
 struct PHLayout
 {
diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index 2d67ebce2c77..d9d65a2e8300 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -139,7 +139,7 @@ private:
 
 ::sax_fastparser::FSHelperPtr mPresentationFS;
 
-LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE];
+LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE];
 std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray;
 sal_Int32 mnLayoutFileIdMax;
 
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 41ef744c1799..2148653dcd20 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -196,7 +196,7 @@ struct PPTXLayoutInfo
 
 }
 
-const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] =
+const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] =
 {
 { 0, "Title Slide", "title" },
 { 1, "Title and text", "tx" },


core.git: sd/source

2023-12-14 Thread Julien Nabet (via logerrit)
 sd/source/ui/animations/CustomAnimationDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f618e9b8c1d4748a9ff9ee97405af8e43c6ae294
Author: Julien Nabet 
AuthorDate: Thu Dec 14 15:13:29 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu Dec 14 15:27:24 2023 +0100

Regression typo closewise->clockwise in sd/CustomAnimationDialog

Regression from a756bd31dd2da1ef134d80b2dc276cb0be228aba

https://cgit.freedesktop.org/libreoffice/core/commit/?id=a756bd31dd2da1ef134d80b2dc276cb0be228aba

Change-Id: Ia5fc84250eb64016f028f3ffe8b3dc581733904d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160778
Reviewed-by: Julien Nabet 
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx 
b/sd/source/ui/animations/CustomAnimationDialog.cxx
index f546fcd951d0..7ed2f4590452 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -528,7 +528,7 @@ void SdRotationPropertyBox::updateMenu()
 mxControl->set_item_active("360", nValue == 360);
 mxControl->set_item_active("720", nValue == 720);
 
-mxControl->set_item_active("closewise", bDirection);
+mxControl->set_item_active("clockwise", bDirection);
 mxControl->set_item_active("counterclock", !bDirection);
 }
 


core.git: sd/source

2023-12-07 Thread Laurent Balland (via logerrit)
 sd/source/core/stlsheet.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0b504bb12e4d563d1505e9c2039cbbd723cf1162
Author: Laurent Balland 
AuthorDate: Sun Dec 3 13:58:11 2023 +0100
Commit: Laurent Balland 
CommitDate: Thu Dec 7 16:56:36 2023 +0100

tdf#158500 missing style Object with no fill no line

Style "Object with no fill no line" was not correctly treated during
automatic translation to UI language

Change-Id: I9364b25e326387110af81494d7fa5e4c05b5f972
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160262
Tested-by: Jenkins
Reviewed-by: Laurent Balland 

diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 391cd8eada8a..e262e7a713ff 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -621,6 +621,7 @@ struct ApiNameMap
 { std::u16string_view(u"notes"), HID_PSEUDOSHEET_NOTES },
 { std::u16string_view(u"standard"), HID_STANDARD_STYLESHEET_NAME },
 { std::u16string_view(u"objectwithoutfill"), 
HID_POOLSHEET_OBJWITHOUTFILL },
+{ std::u16string_view(u"Object with no fill and no line"), 
HID_POOLSHEET_OBJNOLINENOFILL },
 
 { std::u16string_view(u"Text"), HID_POOLSHEET_TEXT },
 { std::u16string_view(u"A4"), HID_POOLSHEET_A4 },


[Libreoffice-commits] core.git: sd/source

2023-11-29 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 828f3b9a2432ab9d1d2c11a7aaabebe112d20f13
Author: Andrea Gelmini 
AuthorDate: Wed Nov 29 14:28:51 2023 +0100
Commit: Julien Nabet 
CommitDate: Wed Nov 29 14:56:37 2023 +0100

Fix typo

Change-Id: Ib7a9d442c90f628b9d82e7e714c1c59dc576b891
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160091
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx 
b/sd/source/ui/slideshow/slideshowimpl.hxx
index 5211e73dc163..155cdc329f03 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -198,7 +198,7 @@ public:
 /// ends the presentation async
 void endPresentation();
 
-// possibly triggered from events @SlideshowImpl::Notify if needed, but 
asynchron to
+// possibly triggered from events @SlideshowImpl::Notify if needed, but 
make it asynchronous to
 // allow the noted event to completely finish in the core
 void AsyncNotifyEvent(const css::uno::Reference< css::drawing::XDrawPage 
>&, const SdrHintKind);
 


[Libreoffice-commits] core.git: sd/source

2023-11-29 Thread Balazs Varga (via logerrit)
 sd/source/ui/dlg/prntopts.cxx |   76 +-
 sd/source/ui/inc/prntopts.hxx |2 +
 2 files changed, 55 insertions(+), 23 deletions(-)

New commits:
commit 05f60be48a51a64ce99a7a7b62ae030002b16a14
Author: Balazs Varga 
AuthorDate: Tue Nov 28 14:06:09 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 29 11:00:41 2023 +0100

tdf#158245 - UI: Part 46 - Unify lockdown behavior of Options dialog

for Draw - Print Page.

Change-Id: I9c5004253b0b871a14fe92475339cdad598491a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160027
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 6a608932adce..0349fe688919 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -23,12 +23,14 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
  *  dialog to adjust print options
  */
 SdPrintOptions::SdPrintOptions(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "modules/simpress/ui/prntopts.ui", 
"prntopts", )
+, m_bDrawMode(false)
 , m_xFrmContent(m_xBuilder->weld_frame("contentframe"))
 , m_xCbxDraw(m_xBuilder->weld_check_button("drawingcb"))
 , m_xCbxNotes(m_xBuilder->weld_check_button("notecb"))
@@ -200,41 +202,59 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
 m_xRbtBlackWhite->set_active(true);
 }
 
-bool bReadOnly = 
officecfg::Office::Impress::Print::Page::PageSize::isReadOnly() ||
-officecfg::Office::Impress::Print::Page::PageTile::isReadOnly() ||
-officecfg::Office::Impress::Print::Page::Booklet::isReadOnly();
+bool bReadOnly = false;
+if (m_bDrawMode)
+{
+bReadOnly = 
officecfg::Office::Draw::Print::Page::PageSize::isReadOnly() ||
+officecfg::Office::Draw::Print::Page::PageTile::isReadOnly() ||
+officecfg::Office::Draw::Print::Page::Booklet::isReadOnly();
+}
+else
+{
+bReadOnly = 
officecfg::Office::Impress::Print::Page::PageSize::isReadOnly() ||
+officecfg::Office::Impress::Print::Page::PageTile::isReadOnly() ||
+officecfg::Office::Impress::Print::Page::Booklet::isReadOnly();
+}
 m_xGridPageOpt->set_sensitive(!bReadOnly);
 m_xRbtPageOptImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Page::BookletFront::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Page::BookletFront::isReadOnly() :
+officecfg::Office::Impress::Print::Page::BookletFront::isReadOnly();
 m_xCbxFront->set_sensitive(!bReadOnly);
 m_xCbxFrontImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Page::BookletBack::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Page::BookletBack::isReadOnly() :
+officecfg::Office::Impress::Print::Page::BookletBack::isReadOnly();
 m_xCbxBack->set_sensitive(!bReadOnly);
 m_xCbxBackImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::FromPrinterSetup::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::FromPrinterSetup::isReadOnly() :
+
officecfg::Office::Impress::Print::Other::FromPrinterSetup::isReadOnly();
 m_xCbxPaperbin->set_sensitive(!bReadOnly);
 m_xCbxPaperbinImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::PageName::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::PageName::isReadOnly() :
+officecfg::Office::Impress::Print::Other::PageName::isReadOnly();
 m_xCbxPagename->set_sensitive(!bReadOnly);
 m_xCbxPagenameImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Print::Other::Date::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::Date::isReadOnly() :
+officecfg::Office::Impress::Print::Other::Date::isReadOnly();
 m_xCbxDate->set_sensitive(!bReadOnly);
 m_xCbxDateImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Print::Other::Time::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::Time::isReadOnly() :
+officecfg::Office::Impress::Print::Other::Time::isReadOnly();
 m_xCbxTime->set_sensitive(!bReadOnly);
 m_xCbxTimeImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::HiddenPage::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::HiddenPage::isReadOnly() :
+officecfg::Office::Impress::Print::Other::HiddenPage::isReadOnly();
 m_xCbxHiddenPages->set_sensitive(!bReadOnly);
 m_xCbxHiddenPagesImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::Quality::isReadOnly();
+bReadOnly = 

[Libreoffice-commits] core.git: sd/source

2023-11-29 Thread Balazs Varga (via logerrit)
 sd/source/ui/app/sdmod2.cxx   |7 +++
 sd/source/ui/dlg/tpoption.cxx |   24 
 sd/source/ui/inc/tpoption.hxx |5 +
 3 files changed, 32 insertions(+), 4 deletions(-)

New commits:
commit 34d3f383b62ebd87f842e48e6627dbf5ed369667
Author: Balazs Varga 
AuthorDate: Mon Nov 27 14:03:20 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 29 09:45:40 2023 +0100

tdf#158243 - UI: Part 44 - Unify lockdown behavior of Options dialog

for Draw - View Page.

Change-Id: If06945482e5a441903d6eb44b66242bd8806bcd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159995
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index cccf425172bc..8a6424d16263 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -736,7 +736,14 @@ std::unique_ptr SdModule::CreateTabPage( 
sal_uInt16 nId, weld::Conta
 {
 ::CreateTabPage fnCreatePage = 
pFact->GetSdOptionsContentsTabPageCreatorFunc();
 if( fnCreatePage )
+{
 xRet = (*fnCreatePage)( pPage, pController,  );
+if (SID_SD_TP_CONTENTS == nId)
+aSet.Put(SfxUInt32Item(SID_SDMODE_FLAG, SD_DRAW_MODE));
+else
+aSet.Put(SfxUInt32Item(SID_SDMODE_FLAG, SD_IMPRESS_MODE));
+xRet->PageCreated(aSet);
+}
 }
 break;
 case SID_SD_TP_SNAP:
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index f6f5b4f5aa7e..8c5416c9cb09 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -148,6 +148,7 @@ std::unique_ptr SdTpOptionsSnap::Create( 
weld::Container* pPage, wel
 \/
 SdTpOptionsContents::SdTpOptionsContents(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "modules/simpress/ui/sdviewpage.ui", 
"SdViewPage", )
+, m_bDrawMode(false)
 , m_xCbxRuler(m_xBuilder->weld_check_button("ruler"))
 , m_xCbxRulerImg(m_xBuilder->weld_widget("lockruler"))
 , m_xCbxDragStripes(m_xBuilder->weld_check_button("dragstripes"))
@@ -216,19 +217,23 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs 
)
 m_xCbxDragStripes->set_active( 
aLayoutItem.GetOptionsLayout().IsDragStripes() );
 m_xCbxHandlesBezier->set_active( 
aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
 
-bool bReadOnly = 
officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly();
+bool bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Ruler::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly();
 m_xCbxRuler->set_sensitive(!bReadOnly);
 m_xCbxRulerImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Layout::Display::Contour::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Contour::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Contour::isReadOnly();
 m_xCbxMoveOutline->set_sensitive(!bReadOnly);
 m_xCbxMoveOutlineImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Layout::Display::Guide::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Guide::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Guide::isReadOnly();
 m_xCbxDragStripes->set_sensitive(!bReadOnly);
 m_xCbxDragStripesImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Layout::Display::Bezier::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Bezier::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Bezier::isReadOnly();
 m_xCbxHandlesBezier->set_sensitive(!bReadOnly);
 m_xCbxHandlesBezierImg->set_visible(bReadOnly);
 
@@ -244,6 +249,17 @@ std::unique_ptr SdTpOptionsContents::Create( 
weld::Container* pPage,
 return std::make_unique(pPage, pController, *rAttrs);
 }
 
+void SdTpOptionsContents::PageCreated( const SfxAllItemSet& aSet )
+{
+const SfxUInt32Item* pFlagItem = 
aSet.GetItem(SID_SDMODE_FLAG, false);
+if (pFlagItem)
+{
+sal_uInt32 nFlags = pFlagItem->GetValue();
+if ((nFlags & SD_DRAW_MODE) == SD_DRAW_MODE)
+SetDrawMode();
+}
+}
+
 /*
 |*
 |*  TabPage to adjust the misc options
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index e53c55284cf0..e1065eb28b1b 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -42,6 +42,7 @@ public:
 class SdTpOptionsContents final : public SfxTabPage
 {
 private:
+bool m_bDrawMode;
 std::unique_ptr m_xCbxRuler;
 std::unique_ptr m_xCbxRulerImg;
 

[Libreoffice-commits] core.git: sd/source

2023-11-28 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1ca6f51567ec35f88652d0adcc0d26478bb0aad9
Author: Andrea Gelmini 
AuthorDate: Tue Nov 28 15:09:03 2023 +0100
Commit: Julien Nabet 
CommitDate: Tue Nov 28 15:54:48 2023 +0100

Fix typo

Change-Id: I834d1e296e19af269853bb1d8e73f754eebe2fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160028
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx 
b/sd/source/ui/slideshow/slideshowimpl.hxx
index 9c0ae75dd5e9..5211e73dc163 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -198,7 +198,7 @@ public:
 /// ends the presentation async
 void endPresentation();
 
-// possibly triggered from events @SlideshowImpl::Notify if needed, but 
asychron to
+// possibly triggered from events @SlideshowImpl::Notify if needed, but 
asynchron to
 // allow the noted event to completely finish in the core
 void AsyncNotifyEvent(const css::uno::Reference< css::drawing::XDrawPage 
>&, const SdrHintKind);
 


[Libreoffice-commits] core.git: sd/source

2023-11-28 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |   96 ---
 sd/source/ui/slideshow/slideshowimpl.hxx |6 +
 2 files changed, 94 insertions(+), 8 deletions(-)

New commits:
commit 878b4ffc3e2c80c7f65b75c35fea26b978b71daf
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Nov 24 16:02:17 2023 +0100
Commit: Armin Le Grand 
CommitDate: Tue Nov 28 11:52:04 2023 +0100

Update SlideShow on DrawModel changes II

Change-Id: Idfbbb7744cc7b2182647b45f509399535a2d4df2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159930
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 97216f9bec79..7619624544b4 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -517,6 +517,8 @@ SlideshowImpl::SlideshowImpl( const Reference< 
XPresentation2 >& xPresentation,
 , mdUserPaintStrokeWidth ( 150.0 )
 , mnEndShowEvent(nullptr)
 , mnContextMenuEvent(nullptr)
+, mnEventObjectChange(nullptr)
+, mnEventPageOrderChange(nullptr)
 , mxPresentation( xPresentation )
 {
 if( mpViewShell )
@@ -598,6 +600,10 @@ void 
SlideshowImpl::disposing(std::unique_lock&)
 Application::RemoveUserEvent( mnEndShowEvent );
 if( mnContextMenuEvent )
 Application::RemoveUserEvent( mnContextMenuEvent );
+if( mnEventObjectChange )
+Application::RemoveUserEvent( mnEventObjectChange );
+if( mnEventPageOrderChange )
+Application::RemoveUserEvent( mnEventPageOrderChange );
 
 maInputFreezeTimer.Stop();
 
@@ -3094,16 +3100,19 @@ namespace
 {
 SlideshowImpl* pSlideshowImpl;
 uno::Reference< css::drawing::XDrawPage > XCurrentSlide;
+SdrHintKind eHintKind;
 };
 
-static void AsyncUpdateSlideshow(
+static ImplSVEvent* AsyncUpdateSlideshow(
 SlideshowImpl* pSlideshowImpl,
-uno::Reference< css::drawing::XDrawPage >& rXCurrentSlide)
+uno::Reference< css::drawing::XDrawPage >& rXCurrentSlide,
+SdrHintKind eHintKind)
 {
 AsyncUpdateSlideshowData* pNew(new AsyncUpdateSlideshowData);
 pNew->pSlideshowImpl = pSlideshowImpl;
 pNew->XCurrentSlide = rXCurrentSlide;
-Application::PostUserEvent(LINK(nullptr, 
AsyncUpdateSlideshow_Impl, Update), pNew);
+pNew->eHintKind = eHintKind;
+return Application::PostUserEvent(LINK(nullptr, 
AsyncUpdateSlideshow_Impl, Update), pNew);
 // coverity[leaked_storage] - pDisruptor takes care of its own 
destruction at idle time
 }
 
@@ -3113,11 +3122,64 @@ namespace
 IMPL_STATIC_LINK(AsyncUpdateSlideshow_Impl, Update, void*, pData, void)
 {
 AsyncUpdateSlideshowData* 
pSlideData(static_cast(pData));
-pSlideData->pSlideshowImpl->gotoSlide(pSlideData->XCurrentSlide);
+
pSlideData->pSlideshowImpl->AsyncNotifyEvent(pSlideData->XCurrentSlide, 
pSlideData->eHintKind);
 delete pSlideData;
 }
 }
 
+void SlideshowImpl::AsyncNotifyEvent(
+const uno::Reference< css::drawing::XDrawPage >& rXCurrentSlide,
+const SdrHintKind eHintKind)
+{
+if (SdrHintKind::ObjectChange == eHintKind)
+{
+mnEventObjectChange = nullptr;
+
+// refresh single slide
+gotoSlide(rXCurrentSlide);
+}
+else if (SdrHintKind::PageOrderChange == eHintKind)
+{
+mnEventPageOrderChange = nullptr;
+
+// order of pages (object pages or master pages) changed 
(Insert/Remove/ChangePos)
+// rXCurrentSlide is the current slide before the change.
+Reference< XDrawPagesSupplier > xDrawPages( mpDoc->getUnoModel(), 
UNO_QUERY_THROW );
+Reference< XIndexAccess > xSlides( xDrawPages->getDrawPages(), 
UNO_QUERY_THROW );
+const sal_Int32 nNewSlideCount(xSlides.is() ? xSlides->getCount() : 0);
+
+if (nNewSlideCount != mpSlideController->getSlideNumberCount())
+{
+// need to reinitialize AnimationSlideController
+OUString aPresSlide( maPresSettings.maPresPage );
+createSlideList( maPresSettings.mbAll, aPresSlide );
+}
+
+// Check if current slide before change is still valid (maybe removed)
+const sal_Int32 nSlideCount(mpSlideController->getSlideNumberCount());
+bool bSlideStillValid(false);
+
+for (sal_Int32 nSlide(0); !bSlideStillValid && nSlide < nSlideCount; 
nSlide++)
+{
+if (rXCurrentSlide == mpSlideController->getSlideByNumber(nSlide))
+{
+bSlideStillValid = true;
+}
+}
+
+if(bSlideStillValid)
+{
+// stay on that slide
+gotoSlide(rXCurrentSlide);
+}
+else
+{
+// not possible to stay on that slide, go to 1st slide (kinda 
restart)
+gotoFirstSlide();
+  

  1   2   3   4   5   6   7   8   9   10   >