core.git: Branch 'distro/collabora/co-24.04' - sd/source
sd/source/ui/view/drviews2.cxx | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit 943913f74c26210ebf3ed04f36412e3c45b76f0e Author: Miklos Vajna AuthorDate: Thu May 9 11:52:13 2024 +0200 Commit: Szymon Kłos CommitDate: Thu May 9 12:06:48 2024 +0200 sd: fix -Wshadow warnings /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx: In lambda function: /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx:2713:38: error: declaration of ‘aTitle’ shadows a previous local [-Werror=shadow] 2713 | OUString aTitle; | ^~ /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx:2700:26: note: shadowed declaration is here 2700 | OUString aTitle(pSelected->GetTitle()); | ^~ /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx:2714:38: error: declaration of ‘aDescription’ shadows a previous local [-Werror=shadow] 2714 | OUString aDescription; | ^~~~ /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx:2701:26: note: shadowed declaration is here 2701 | OUString aDescription(pSelected->GetDescription()); | ^~~~ /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx:2715:34: error: declaration of ‘isDecorative’ shadows a previous local [-Werror=shadow] 2715 | bool isDecorative; | ^~~~ /home/vmiklos/git/libreoffice/co-24.04/sd/source/ui/view/drviews2.cxx:2702:22: note: shadowed declaration is here 2702 | bool isDecorative(pSelected->IsDecorative()); | ^~~~ cc1plus: all warnings being treated as errors Change-Id: I036105d084010c66b8aab75befdef590408b25ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167381 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index a7ed100977bf..d149c9633d7f 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2710,17 +2710,17 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if (nResult == RET_OK) { -OUString aTitle; -OUString aDescription; -bool isDecorative; +OUString aNewTitle; +OUString aNewDescription; +bool newIsDecorative; -pDlg->GetTitle(aTitle); -pDlg->GetDescription(aDescription); -pDlg->IsDecorative(isDecorative); +pDlg->GetTitle(aNewTitle); +pDlg->GetDescription(aNewDescription); +pDlg->IsDecorative(newIsDecorative); -pSelected->SetTitle(aTitle); -pSelected->SetDescription(aDescription); -pSelected->SetDecorative(isDecorative); +pSelected->SetTitle(aNewTitle); +pSelected->SetDescription(aNewDescription); +pSelected->SetDecorative(newIsDecorative); } pDlg->disposeOnce(); }
core.git: Branch 'distro/collabora/co-24.04' - sd/source
sd/source/ui/view/drviewse.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit dd33eeeaffaea1e155d2a6a6e9900dcb80b49411 Author: Pranam Lashkari AuthorDate: Wed Mar 20 20:53:27 2024 +0530 Commit: Caolán McNamara CommitDate: Fri Mar 22 10:24:06 2024 +0100 LOK: enter editing directly after textbox insertion Change-Id: I3e77a1eb72a12c0e4ffc289ca854e0edb4ae9e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165068 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b293773b07a..af81827d40d5 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: Branch 'distro/collabora/co-24.04' - sd/source
sd/source/ui/annotations/annotationmanager.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 248756493cb7caa860bd558f8ffb0e43a38f2cd0 Author: Pranam Lashkari AuthorDate: Wed Mar 13 20:23:47 2024 +0530 Commit: Caolán McNamara CommitDate: Thu Mar 14 09:51:28 2024 +0100 sd:annotation: added missing comment reply undo Change-Id: I63e005aa35faad1ebdaad228a22477cb1dd6de67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164801 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index dbd9768b554c..ac79f2e15724 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: Branch 'distro/collabora/co-24.04' - sd/source
sd/source/ui/dlg/headerfooterdlg.cxx | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) New commits: commit 62ae4d01dd06629413af7316ffb6a8030acf83e9 Author: Justin Luth AuthorDate: Tue Feb 27 09:57:35 2024 -0500 Commit: Justin Luth CommitDate: Wed Feb 28 03:32:22 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 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164069 Tested-by: Jenkins CollaboraOffice 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()