[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/helpids.h |7 --- sd/source/filter/html/pubdlg.cxx |5 - 2 files changed, 12 deletions(-) New commits: commit 59480a5e4ebb849c06d7f16579208d0847c5557e Author: Stephan Bergmann AuthorDate: Fri Oct 13 23:07:18 2023 +0200 Commit: Stephan Bergmann CommitDate: Sun Oct 15 18:34:28 2023 +0200 Drop leftover aPageHelpIds ...from 28b6480c6bdd179f3943f768926b7f196226c768 "tdf#105303: Drop html export wizard" Change-Id: I996324e06a2f5eb04d722c45be9ce54715490b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h index bb9233441553..6579bd43ff79 100644 --- a/sd/inc/helpids.h +++ b/sd/inc/helpids.h @@ -27,13 +27,6 @@ inline constexpr OUStringLiteral HID_SDOUTLINEVIEWSHELL = u"SD_HID_SDOUTLINEVIEW inline constexpr OUStringLiteral HID_SD_WIN_PRESENTATION = u"SD_HID_SD_WIN_PRESENTATION"; -inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE1 = u"SD_HID_SD_HTMLEXPORT_PAGE1"; -inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE2 = u"SD_HID_SD_HTMLEXPORT_PAGE2"; -inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE3 = u"SD_HID_SD_HTMLEXPORT_PAGE3"; -inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE4 = u"SD_HID_SD_HTMLEXPORT_PAGE4"; -inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE5 = u"SD_HID_SD_HTMLEXPORT_PAGE5"; -inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE6 = u"SD_HID_SD_HTMLEXPORT_PAGE6"; - inline constexpr OUStringLiteral HID_SD_TABBAR_PAGES = u"SD_HID_SD_TABBAR_PAGES"; inline constexpr OUStringLiteral HID_SD_TABBAR_LAYERS = u"SD_HID_SD_TABBAR_LAYERS"; diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 9136de7c8f40..5b42d3c8cfad 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -55,11 +55,6 @@ const sal_uInt16 nMagic = sal_uInt16(0x1977); // Key for the soffice.ini constexpr OUStringLiteral KEY_QUALITY = u"JPG-EXPORT-QUALITY"; -// The Help-IDs of the pages -constexpr rtl::OUStringConstExpr aPageHelpIds[NOOFPAGES] -= { HID_SD_HTMLEXPORT_PAGE1, HID_SD_HTMLEXPORT_PAGE2, HID_SD_HTMLEXPORT_PAGE3, -HID_SD_HTMLEXPORT_PAGE4, HID_SD_HTMLEXPORT_PAGE5, HID_SD_HTMLEXPORT_PAGE6 }; - static SvStream& operator>>(SvStream& rIn, SdPublishingDesign& rDesign); static SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDesign);
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc|2 ++ sd/source/ui/dlg/titledockwin.cxx |6 ++ sd/source/ui/inc/titledockwin.hxx |2 ++ sd/source/ui/view/drviews1.cxx| 21 + 4 files changed, 31 insertions(+) New commits: commit 25d09bdb9f48313c000cc8ec8df60b1bb8efe2e6 Author: Andreas Heinisch AuthorDate: Sun Oct 1 11:28:31 2023 +0200 Commit: Andreas Heinisch CommitDate: Mon Oct 2 10:21:26 2023 +0200 tdf#87638 - Modify slide pane title in Impress/Draw based on edit mode Change-Id: I0dd668324c32172144f29cf40c52e2b66e7895b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157444 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 8438a9262a95..e3f5c45a5fcd 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -234,7 +234,9 @@ #define STR_PLACEHOLDER_DESCRIPTION_NOTES NC_("STR_PLACEHOLDER_DESCRIPTION_NOTES", "Notes Area") #define STR_UNDO_HANGULHANJACONVERSION NC_("STR_UNDO_HANGULHANJACONVERSION", "Hangul/Hanja Conversion") #define STR_LEFT_PANE_IMPRESS_TITLE NC_("STR_LEFT_PANE_IMPRESS_TITLE", "Slides") +#define STR_LEFT_PANE_IMPRESS_TITLE_MASTER NC_("STR_LEFT_PANE_IMPRESS_TITLE_MASTER", "Master Slides") #define STR_LEFT_PANE_DRAW_TITLE NC_("STR_LEFT_PANE_DRAW_TITLE", "Pages") +#define STR_LEFT_PANE_DRAW_TITLE_MASTER NC_("STR_LEFT_PANE_DRAW_TITLE_MASTER", "Master Pages") #define STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION NC_("STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION", "Preview not available") #define STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION NC_("STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION", "Preparing preview") #define STR_TASKPANEL_LAYOUT_MENU_TITLE NC_("STR_TASKPANEL_LAYOUT_MENU_TITLE", "Layouts") diff --git a/sd/source/ui/dlg/titledockwin.cxx b/sd/source/ui/dlg/titledockwin.cxx index 0550f05d2f8b..d545170da688 100644 --- a/sd/source/ui/dlg/titledockwin.cxx +++ b/sd/source/ui/dlg/titledockwin.cxx @@ -68,6 +68,12 @@ namespace sd SfxDockingWindow::dispose(); } +void TitledDockingWindow::SetTitle(const OUString& i_rText) +{ +m_sTitle = i_rText; +Invalidate(); +} + void TitledDockingWindow::SetText( const OUString& i_rText ) { SfxDockingWindow::SetText( i_rText ); diff --git a/sd/source/ui/inc/titledockwin.hxx b/sd/source/ui/inc/titledockwin.hxx index bdbd386ba62a..5a880e268739 100644 --- a/sd/source/ui/inc/titledockwin.hxx +++ b/sd/source/ui/inc/titledockwin.hxx @@ -76,6 +76,8 @@ namespace sd */ Orientation GetOrientation() const; +void SetTitle(const OUString& i_rText); + private: // Window overridables virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& i_rArea) override; diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index f9378e1ec4fd..309a5d5ed3cc 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -71,6 +71,9 @@ #include #include #include +#include +#include +#include using namespace com::sun::star; @@ -393,6 +396,16 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) ConfigureAppBackgroundColor(); +// tdf#87638 - change slide pane title according to the edit mode +auto setLeftPaneTitleIfPaneExists += [pViewShell = GetViewFrame()](sal_uInt16 nId, TranslateId aId) +{ +if (auto* pChildWindow = pViewShell->GetChildWindow(nId)) +if (auto* pTitledDockingWindow += static_cast(pChildWindow->GetWindow())) +pTitledDockingWindow->SetTitle(SdResId(aId)); +}; + if (meEditMode == EditMode::Page) { /** @@ -401,6 +414,10 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) maTabControl->Clear(); +// tdf#87638 - change slide pane title according to the edit mode +setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_DRAW, STR_LEFT_PANE_DRAW_TITLE); +setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_IMPRESS, STR_LEFT_PANE_IMPRESS_TITLE); + SdPage* pPage; sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); @@ -431,6 +448,10 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) GetViewFrame()->SetChildWindow( AnimationChildWindow::GetChildWindowId(), false ); +// tdf#87638 - change slide pane title according to the edit mode +setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_DRAW, STR_LEFT_PANE_DRAW_TITLE_MASTER); +setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_IMPRESS, STR_LEFT_PANE_IMPRESS_TITLE_MASTER); + if (comphelper::LibreOfficeKit::isActive()) GetViewShell()->libre
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdgrffilter.hxx |1 sd/source/filter/grf/sdgrffilter.cxx | 85 +-- 2 files changed, 54 insertions(+), 32 deletions(-) New commits: commit 1c47cd54da5f193f4b27cf86ef167c8a415c0408 Author: rash419 AuthorDate: Wed Jun 7 11:25:00 2023 +0530 Commit: Tomaž Vajngerl CommitDate: Thu Jun 8 14:30:52 2023 +0200 tdf#155444 added support for multi image tiff file Signed-off-by: rash419 Change-Id: I188aebae9c853e87dc50ffda5b7d88228559a7c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152657 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx index dc9027f94ca3..28ce9de6dd29 100644 --- a/sd/inc/sdgrffilter.hxx +++ b/sd/inc/sdgrffilter.hxx @@ -34,6 +34,7 @@ public: bool Export() override; static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError); +static void InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 71f9221ab055..693f297a19c6 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -156,50 +156,71 @@ bool SdGRFFilter::Import() if( mrDocument.GetPageCount() == 0 ) mrDocument.CreateFirstPages(); -SdPage* pPage = mrDocument.GetSdPage( 0, PageKind::Standard ); -Point aPos; -SizeaPagSize( pPage->GetSize() ); -SizeaGrfSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(), -aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM))); - -aPagSize.AdjustWidth( -(pPage->GetLeftBorder() + pPage->GetRightBorder()) ); -aPagSize.AdjustHeight( -(pPage->GetUpperBorder() + pPage->GetLowerBorder()) ); - -// scale to fit page -if ( ( ( aGrfSize.Height() > aPagSize.Height() ) || ( aGrfSize.Width() > aPagSize.Width() ) ) && -aGrfSize.Height() && aPagSize.Height() ) +GfxLink aGfxLink = aGraphic.GetGfxLink(); +if( aGfxLink.GetType() == GfxLinkType::NativeTif && aGraphic.IsAnimated() ) { -double fGrfWH = static_cast(aGrfSize.Width()) / aGrfSize.Height(); -double fWinWH = static_cast(aPagSize.Width()) / aPagSize.Height(); - -// adjust graphic to page size (scales) -if( fGrfWH < fWinWH ) +Animation aAnim( aGraphic.GetAnimation() ); +const auto nImages = aAnim.Count(); +for (size_t i = 0; i < nImages - 1; ++i) { -aGrfSize.setWidth( static_cast( aPagSize.Height() * fGrfWH ) ); -aGrfSize.setHeight( aPagSize.Height() ); +mrDocument.DuplicatePage(0); } -else if( fGrfWH > 0.F ) +for (size_t nPageIndex = 0; nPageIndex < nImages; ++nPageIndex) { -aGrfSize.setWidth( aPagSize.Width() ); -aGrfSize.setHeight( static_cast( aPagSize.Width() / fGrfWH ) ); +Graphic pGraphic = aAnim.Get(nPageIndex).maBitmapEx; +SdPage* pPage = mrDocument.GetSdPage(nPageIndex, PageKind::Standard); +InsertSdrGrafObj(pGraphic, pPage); } } - -// set output rectangle for graphic -aPos.setX( ( ( aPagSize.Width() - aGrfSize.Width() ) >> 1 ) + pPage->GetLeftBorder() ); -aPos.setY( ( ( aPagSize.Height() - aGrfSize.Height() ) >> 1 ) + pPage->GetUpperBorder() ); - -pPage->InsertObject( -new SdrGrafObj( -pPage->getSdrModelFromSdrPage(), -aGraphic, -::tools::Rectangle(aPos, aGrfSize))); +else +{ +SdPage* pPage = mrDocument.GetSdPage(0, PageKind::Standard); +InsertSdrGrafObj(aGraphic, pPage); +} bRet = true; } return bRet; } +void SdGRFFilter::InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage) +{ +Point aPos; +Size aPagSize(pPage->GetSize()); +Size aGrfSize(OutputDevice::LogicToLogic(pGraphic.GetPrefSize(), pGraphic.GetPrefMapMode(), + MapMode(MapUnit::Map100thMM))); + +aPagSize.AdjustWidth(-(pPage->GetLeftBorder() + pPage->GetRightBorder())); +aPagSize.AdjustHeight(-(pPage->GetUpperBorder() + pPage->GetLowerBorder())); + +// scale to fit page +if (((aGrfSize.Height() > aPagSize.Height()) || (aGrfSize.Width() > aPagSize.Width())) +&& aGrfSize.Height() && aPagSize.Height()) +{ +double fGrfWH = static_cast(aGrfSize.Width()) / aGrfSize.Height(); +double fWinWH = static_cast(aPagSize.Width()) / aPagSize.Height(); + +// adjust graphic to page size (scales) +if (fGrfWH < fWinWH) +{ +aGrfSize.setWidth(static_c
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |2 ++ sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |6 +- sd/source/ui/view/drviewsa.cxx |6 +- sd/source/ui/view/outlnvsh.cxx |5 - 4 files changed, 16 insertions(+), 3 deletions(-) New commits: commit 487010ef62405a1a728ae9b3d838e934015b1719 Author: Baole Fang AuthorDate: Tue Mar 28 22:50:30 2023 -0400 Commit: Heiko Tietze CommitDate: Tue Apr 11 15:24:43 2023 +0200 tdf#150477: Change "Slide" to "Page" in Draw status bar Originally, Draw displays "Slide x of y". Now, a new string is added, so that it displays "Page x of y". Change-Id: I5857626b5a18decda4bf235b67a3c7d877556e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149671 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 81c54ccb8e86..187a411dc38e 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -94,6 +94,8 @@ #define STR_SVX_FILENC_("STR_SVX_FILE", "Amiga SVX Audio") #define STR_SD_PAGE_COUNT NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2") #define STR_SD_PAGE_COUNT_CUSTOM NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)") +#define STR_SD_PAGE_COUNT_DRAW NC_("STR_SD_PAGE_COUNT_DRAW", "Page %1 of %2") +#define STR_SD_PAGE_COUNT_CUSTOM_DRAW NC_("STR_SD_PAGE_COUNT_CUSTOM_DRAW", "Page %1 of %2 (%3)") #define STR_ALL_SUPPORTED_FORMATS NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats") #define STR_ALL_FILES NC_("STR_ALL_FILES", "All files") #define STR_UNDO_INSERT_TEXTFRAME NC_("STR_UNDO_INSERT_TEXTFRAME", "Insert text frame") diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 2bd908fe93d0..d1c130ae3a8f 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -820,6 +820,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) // page view and layout SdPage* pPage = nullptr; sal_uInt16 nSelectedPages = mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount(); +View* pDrView = &mrSlideSorter.GetView(); //Set number of slides if (nSelectedPages > 0) @@ -836,7 +837,10 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) sal_Int32 nPageCount = mrSlideSorter.GetModel().GetPageCount(); sal_Int32 nActivePageCount = static_cast(mrSlideSorter.GetModel().GetDocument()->GetActiveSdPageCount()); -aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); +if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw) +aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT_DRAW) : SdResId(STR_SD_PAGE_COUNT_CUSTOM_DRAW); +else +aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); aPageStr = aPageStr.replaceFirst("%1", OUString::number(nFirstPage)); aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount)); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index b09944043c24..34324d3aa93f 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -656,7 +656,11 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind)); sal_Int32 nActivePageCount = sal_Int32(GetDoc()->GetActiveSdPageCount()); // Always show the slide/page number. -OUString aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); +OUString aOUString; +if (GetDoc()->GetDocumentType() == DocumentType::Draw) +aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT_DRAW) : SdResId(STR_SD_PAGE_COUNT_CUSTOM_DRAW); +else +aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); aOUString = aOUString.replaceFirst("%1", OUString::number(maTabControl->GetCurPagePos() + 1)); aOUString = aOUString.replaceFirst("%2", OUString::number(nPageCount)); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 1d3bd9500841..8add43b4ad4b 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1320,7 +1320,10 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) SdrPage* pPage = GetDoc()->GetSdPage( static_cast(nPos), PageKind::Standard ); -
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 - sd/source/ui/docshell/docshel2.cxx | 11 --- 2 files changed, 8 insertions(+), 4 deletions(-) New commits: commit 04bf1d2385ed80e7aee8015dc69e868c2abe4142 Author: Baole Fang AuthorDate: Tue Mar 28 23:18:37 2023 -0400 Commit: Mike Kaganski CommitDate: Fri Apr 7 16:30:21 2023 +0200 tdf#154437: Check "Page" instead of "Slide" in Draw rename Change-Id: Iec1ee88f12895007240408c8411cc1638c2f0559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149672 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index c9a48bfe3574..81c54ccb8e86 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -92,7 +92,6 @@ #define STR_VOC_FILENC_("STR_VOC_FILE", "Creative Labs Audio") #define STR_AIFF_FILE NC_("STR_AIFF_FILE", "Apple/SGI Audio") #define STR_SVX_FILENC_("STR_SVX_FILE", "Amiga SVX Audio") -#define STR_SD_PAGE NC_("STR_SD_PAGE", "Slide") #define STR_SD_PAGE_COUNT NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2") #define STR_SD_PAGE_COUNT_CUSTOM NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)") #define STR_ALL_SUPPORTED_FORMATS NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats") diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index caf0fc86f1b1..582afec0517a 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -305,12 +305,17 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr { bool bCanUseNewName = false; -// check if name is something like 'Slide n' -OUString aStrPage(SdResId(STR_SD_PAGE) + " "); +// check if name is something like 'Slide/Page n' +OUString aStrPage; +if (GetDoc()->GetDocumentType() == DocumentType::Draw) +aStrPage = SdResId(STR_PAGE_NAME) + " "; +else +// using the same strings as SdPage::GetName +aStrPage = SdResId(STR_PAGE) + " "; bool bIsStandardName = false; -// prevent also _future_ slide names of the form "'STR_SD_PAGE' + ' ' + '[0-9]+|[a-z]|[A-Z]|[CDILMVX]+|[cdilmvx]+'" +// prevent also _future_ slide names of the form "'STR_PAGE' + ' ' + '[0-9]+|[a-z]|[A-Z]|[CDILMVX]+|[cdilmvx]+'" // (arabic, lower- and upper case single letter, lower- and upper case roman numbers) if (rInOutPageName.startsWith(aStrPage) && rInOutPageName.getLength() > aStrPage.getLength())
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlsheet.hxx | 13 sd/source/core/stlsheet.cxx | 71 +++- 2 files changed, 40 insertions(+), 44 deletions(-) New commits: commit a39f5da6f621fc60df0dbdd6c5a08cae5a18763f Author: Noel Grandin AuthorDate: Thu Feb 23 15:27:49 2023 +0200 Commit: Noel Grandin CommitDate: Fri Feb 24 20:30:29 2023 + BaseMutex->std::mutex in SdStyleSheet Change-Id: I9700622ac805a9e74df1701c4ece97ef960388ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147586 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index e830c097e990..fe1079ffd616 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -29,13 +29,14 @@ #include #include +#include #include #include -#include #include #include +#include #include "prlayout.hxx" @@ -50,7 +51,7 @@ typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet, css::util::XModifyBroadcaster, css::lang::XComponent > SdStyleSheetBase ; -class SdStyleSheet final : public SdStyleSheetBase, private ::cppu::BaseMutex +class SdStyleSheet final : public SdStyleSheetBase { public: SdStyleSheet( const OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, SfxStyleSearchBits nMask ); @@ -152,12 +153,14 @@ private: void disposing(); +mutable std::mutex m_aMutex; +bool m_bDisposed = false; +bool m_bInDispose = false; +comphelper::OInterfaceContainerHelper4 maModifyListeners; +comphelper::OInterfaceContainerHelper4 maEventListeners; OUString msApiName; rtl::Reference< SfxStyleSheetBasePool > mxPool; -/** broadcast helper for events */ -::cppu::OBroadcastHelper mrBHelper; - std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder; SdStyleSheet( const SdStyleSheet& ) = delete; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 96850f5b107e..71b08db448f0 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -142,10 +142,8 @@ void ModifyListenerForwarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*r SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, SfxStyleSearchBits _nMask) : SdStyleSheetBase( rDisplayName, _rPool, eFamily, _nMask) -, ::cppu::BaseMutex() , msApiName( rDisplayName ) , mxPool( &_rPool ) -, mrBHelper( m_aMutex ) { } @@ -301,12 +299,11 @@ bool SdStyleSheet::IsUsed() const if( !bResult ) { -MutexGuard aGuard( mrBHelper.rMutex ); +std::unique_lock aGuard( m_aMutex ); -cppu::OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( cppu::UnoType::get() ); -if( pContainer ) +if( maModifyListeners.getLength(aGuard) ) { -const Sequence< Reference< XInterface > > aModifyListeners( pContainer->getElements() ); +std::vector> aModifyListeners( maModifyListeners.getElements(aGuard) ); bResult = std::any_of(aModifyListeners.begin(), aModifyListeners.end(), [](const Reference& rListener) { Reference< XStyle > xStyle( rListener, UNO_QUERY ); @@ -349,10 +346,8 @@ bool SdStyleSheet::IsEditable() return false; } -MutexGuard aGuard(mrBHelper.rMutex); - -auto pContainer = mrBHelper.getContainer(cppu::UnoType::get()); -return !pContainer || pContainer->getLength() <= 1; +std::unique_lock aGuard(m_aMutex); +return maModifyListeners.getLength(aGuard) <= 1; } /** @@ -736,7 +731,7 @@ void SAL_CALL SdStyleSheet::release( ) noexcept // restore reference count: osl_atomic_increment( &m_refCount ); -if (! mrBHelper.bDisposed) try +if (! m_bDisposed) try { dispose(); } @@ -745,7 +740,7 @@ void SAL_CALL SdStyleSheet::release( ) noexcept // don't break throw () TOOLS_WARN_EXCEPTION( "sd", "" ); } -OSL_ASSERT( mrBHelper.bDisposed ); +OSL_ASSERT( m_bDisposed ); SdStyleSheetBase::release(); } @@ -754,33 +749,33 @@ void SAL_CALL SdStyleSheet::release( ) noexcept void SAL_CALL SdStyleSheet::dispose( ) { { -MutexGuard aGuard(mrBHelper.rMutex); -if (mrBHelper.bDisposed || mrBHelper.bInDispose) +std::unique_lock aGuard(m_aMutex); +if (m_bDisposed || m_bInDispose) return; -mrBHelper.bInDispose = true; +m_bInDispose = true; } try { +std::unique_lock aGuard(m_aMutex); // side effect: keeping a reference to this EventObject aEvt( static_cast< OWeakObject * >( this ) ); try { -mrBHelper.aLC.disposeAndClear( aEvt ); +maModifyListeners.disposeAndClear( aGuard, aEvt ); +maEventListeners.disposeAndClear( aGuard, aEv
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Annotation.hxx | 11 --- sd/source/core/annotations/Annotation.cxx | 22 -- sd/source/ui/annotations/annotationtag.cxx |3 ++- 3 files changed, 26 insertions(+), 10 deletions(-) New commits: commit 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 Author: Stephan Bergmann AuthorDate: Wed Dec 21 16:09:49 2022 +0100 Commit: Stephan Bergmann CommitDate: Thu Dec 22 07:44:42 2022 + loplugin:unocast (sd::Annotation) (See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: Id600e83ae94409914b20a2a2620031ce340a9390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx index 707f2cdc8e78..b23cd2503bb3 100644 --- a/sd/inc/Annotation.hxx +++ b/sd/inc/Annotation.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -74,7 +75,8 @@ struct SD_DLLPUBLIC CustomAnnotationMarker }; class Annotation final : private ::cppu::BaseMutex, - public ::cppu::WeakComponentImplHelper, + public ::cppu::WeakComponentImplHelper< + css::office::XAnnotation, css::lang::XUnoTunnel>, public ::cppu::PropertySetMixin { public: @@ -90,8 +92,8 @@ public: // XInterface: virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) override; -virtual void SAL_CALL acquire() noexcept override { ::cppu::WeakComponentImplHelper::acquire(); } -virtual void SAL_CALL release() noexcept override { ::cppu::WeakComponentImplHelper::release(); } +virtual void SAL_CALL acquire() noexcept override { WeakComponentImplHelper::acquire(); } +virtual void SAL_CALL release() noexcept override { WeakComponentImplHelper::release(); } // css::beans::XPropertySet: virtual css::uno::Reference SAL_CALL getPropertySetInfo() override; @@ -116,6 +118,9 @@ public: virtual void SAL_CALL setDateTime(const css::util::DateTime & the_value) override; virtual css::uno::Reference SAL_CALL getTextRange() override; +sal_Int64 SAL_CALL getSomething(css::uno::Sequence const & aIdentifier) override; +static css::uno::Sequence const & getUnoTunnelId(); + void createChangeUndo(); void createCustomAnnotationMarker() diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx index 991412f063d5..1cd608c69e00 100644 --- a/sd/source/core/annotations/Annotation.cxx +++ b/sd/source/core/annotations/Annotation.cxx @@ -26,6 +26,7 @@ #include #include +#include #include @@ -118,7 +119,7 @@ void createAnnotation(uno::Reference& xAnnotation, SdPage* sal_uInt32 Annotation::m_nLastId = 1; Annotation::Annotation( const uno::Reference& context, SdPage* pPage ) -: ::cppu::WeakComponentImplHelper(m_aMutex) +: WeakComponentImplHelper(m_aMutex) , ::cppu::PropertySetMixin(context, IMPLEMENTS_PROPERTY_SET, uno::Sequence()) , m_nId( m_nLastId++ ) , mpPage( pPage ) @@ -141,7 +142,7 @@ void SAL_CALL Annotation::disposing() uno::Any Annotation::queryInterface(css::uno::Type const & type) { -return ::cppu::WeakComponentImplHelper::queryInterface(type); +return WeakComponentImplHelper::queryInterface(type); } // com.sun.star.beans.XPropertySet: @@ -301,9 +302,18 @@ uno::Reference SAL_CALL Annotation::getTextRange() return m_TextRange; } +sal_Int64 Annotation::getSomething(css::uno::Sequence const & aIdentifier) { +return comphelper::getSomethingImpl(aIdentifier, this); +} + +css::uno::Sequence const & Annotation::getUnoTunnelId() { +static comphelper::UnoIdInit const id; +return id.getSeq(); +} + std::unique_ptr CreateUndoInsertOrRemoveAnnotation( const uno::Reference& xAnnotation, bool bInsert ) { -Annotation* pAnnotation = dynamic_cast< Annotation* >( xAnnotation.get() ); +Annotation* pAnnotation = comphelper::getFromUnoTunnel< Annotation >( xAnnotation ); if( pAnnotation ) { return std::make_unique< UndoInsertOrRemoveAnnotation >( *pAnnotation, bInsert ); @@ -316,14 +326,14 @@ std::unique_ptr CreateUndoInsertOrRemoveAnnotation( const uno::Re void CreateChangeUndo(const uno::Reference& xAnnotation) { -Annotation* pAnnotation = dynamic_cast(xAnnotation.get()); +Annotation* pAnnotation = comphelper::getFromUnoTunnel(xAnnotation); if (pAnnotation) pAnnotation->createChangeUndo(); } sal_uInt32 getAnnotationId(const uno::Reference& xAnnotation) { -Annotation* pAnnotation = dynamic_cast(xAnnotation.get()); +Annotation* pAnnotation = comphelper::getFromUnoTunnel(xAnnotation); sal_uInt32 nId = 0; if (pAnnotation) nId = pAnnotation->GetId(); @@ -332,7 +342,7 @@ sal_uInt32 getAnnotationId(const uno::Reference& xAnnotatio c
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlpool.hxx |1 + sd/inc/stlsheet.hxx |1 + sd/source/core/drawdoc3.cxx | 21 ++--- sd/source/core/stlpool.cxx |9 + 4 files changed, 29 insertions(+), 3 deletions(-) New commits: commit 441ecdc951211cc1e8453434d26ae40c121cb153 Author: Maxim Monastirsky AuthorDate: Mon Dec 5 14:25:31 2022 +0200 Commit: Maxim Monastirsky CommitDate: Wed Dec 7 10:59:29 2022 + sd: improve handling of table styles on page pasting - Remove table styles that were copied from the source document, but not actually used in the pasted pages. Same as we were doing already for graphic/cell styles. - Disable the undo record of inserted cell styles, as long as we don't have undo actions also for the table style. This prevents data loss, as otherwise the table style will be exported, but not the cell styles it uses. The difficulty with having an undo action for table styles is that once a style is removed from its family it is disposed, so we no longer able to use that style for a redo action. This was "solved" in i#120015 for graphic/cell styles, by not disposing them at all. However table styles maintain cyclic references with their cell styles, so we can't give up on disposing. I'll take the time to think on a proper solution for this (e.g. making copies of styles instead of dealing with the original ones might be an option). For now, let's just remove this unfinished undo attempt. Change-Id: Iae06273217b2d695401921a84e7edf096556530e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143749 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index bb73e157ed3f..9e1693249f86 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -75,6 +75,7 @@ public: voidCopyGraphicSheets(SdStyleSheetPool& rSourcePool); voidCopyCellSheets(SdStyleSheetPool& rSourcePool); voidCopyTableStyles(SdStyleSheetPool const & rSourcePool); +voidCopyTableStyles(SdStyleSheetPool const & rSourcePool, XStyleVector& rCreatedSheets); voidCopyCellSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets); voidRenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix); diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 9080c3b8805b..e830c097e990 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -165,6 +165,7 @@ private: }; typedef std::vector< rtl::Reference< SdStyleSheet > > SdStyleSheetVector; +typedef std::vector< css::uno::Reference< css::style::XStyle > > XStyleVector; struct StyleSheetCopyResult { diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 810969940bae..bf7d304e 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -345,6 +345,21 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const pStyleSheetPool, StyleSheetC rStyles = aUsedStyles; } +void +lcl_removeUnusedTableStyles(SdStyleSheetPool* const pStyleSheetPool, XStyleVector const & rStyles) +{ +css::uno::Reference xTableFamily( +pStyleSheetPool->getByName("table"), css::uno::UNO_QUERY); +if (!xTableFamily) +return; + +for (const auto& a : rStyles) +{ +if (!a->isInUse()) +xTableFamily->removeByName(a->getName()); +} +} + SfxStyleSheet *lcl_findStyle(StyleSheetCopyResultVector& rStyles, std::u16string_view aStyleName) { for (const auto& a : rStyles) @@ -524,7 +539,8 @@ bool SdDrawDocument::InsertBookmarkAsPage( rStyleSheetPool.CopyCellSheets(rBookmarkStyleSheetPool, aNewCellStyles); // TODO handle undo of table styles too -rStyleSheetPool.CopyTableStyles(rBookmarkStyleSheetPool); +XStyleVector aNewTableStyles; +rStyleSheetPool.CopyTableStyles(rBookmarkStyleSheetPool, aNewTableStyles); // Insert document @@ -934,9 +950,8 @@ bool SdDrawDocument::InsertBookmarkAsPage( lcl_removeUnusedStyles(GetStyleSheetPool(), aNewGraphicStyles); if (!aNewGraphicStyles.empty() && pUndoMgr) pUndoMgr->AddUndoAction(std::make_unique(this, aNewGraphicStyles, true)); + lcl_removeUnusedTableStyles(static_cast(GetStyleSheetPool()), aNewTableStyles); lcl_removeUnusedStyles(GetStyleSheetPool(), aNewCellStyles); -if (!aNewCellStyles.empty() && pUndoMgr) - pUndoMgr->AddUndoAction(std::make_unique(this, aNewCellStyles, true)); if( bUndo ) EndUndo(); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 738279e8a440..4bca10fb71bc 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -521,6 +521,12 @@ void SdStyleSheetPool::CopyCellSheets(SdStyleSheetPool& rSourcePool) }
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlsheet.hxx|2 ++ sd/source/core/stlsheet.cxx| 29 + sd/source/ui/table/TableDesignPane.cxx | 16 +--- 3 files changed, 40 insertions(+), 7 deletions(-) New commits: commit 423c2a6ac74cd30c6576e6794f67fda4fb685c11 Author: Maxim Monastirsky AuthorDate: Thu Nov 24 21:22:42 2022 +0200 Commit: Maxim Monastirsky CommitDate: Fri Nov 25 14:17:22 2022 +0100 sd: better detection of user defined cell styles Cell style might be used for several table roles at once, or even in several table styles (esp. after new/clone actions). But when we're editing a style, we want just a single place to be changed. The initial solution was to check if the style is user defined. The problem is that if we change the built-in styles set, then documents created with the old styles will have their once built-in styles turned into user defined. In such case we might still attempt to edit a shared style, which is unintended. So try harder, and check also that the style isn't used twice and that there is no other styles inheriting from it. Change-Id: I67d8c61b15161c9d839e97f7a31a1349a7e2613c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143288 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 645259e9e8fc..9080c3b8805b 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -63,6 +63,8 @@ public: virtual boolHasClearParentSupport() const override; virtual voidSetHelpId( const OUString& r, sal_uLong nId ) override; +bool IsEditable(); + voidAdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems = true); SdStyleSheet* GetRealStyleSheet() const; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 1c11e5fea39d..4d72cf0915c6 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -325,6 +325,35 @@ bool SdStyleSheet::IsUsed() const return bResult; } +/** + * Checks if a cell style is used in two places at once. + * Typically we modify the formatting of a single place, + * so such style shouldn't be edited directly. + */ +bool SdStyleSheet::IsEditable() +{ +if (GetFamily() != SfxStyleFamily::Frame) +return true; + +if (!IsUserDefined()) +return false; + +const size_t nListenerCount = GetSizeOfVector(); +for (size_t n = 0; n < nListenerCount; ++n) +{ +SfxListener* pListener = GetListener(n); +if (pListener == this) +continue; +if (dynamic_cast(pListener)) +return false; +} + +MutexGuard aGuard(mrBHelper.rMutex); + +auto pContainer = mrBHelper.getContainer(cppu::UnoType::get()); +return !pContainer || pContainer->getLength() <= 1; +} + /** * Determine the style sheet for which this dummy is for. */ diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index dd7749db7e79..aa331c3dcda1 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -303,8 +303,10 @@ void TableDesignWidget::ResetStyle() for (sal_Int32 i = 0; i < xTableStyle->getCount(); ++i) { Reference xCellStyle(xTableStyle->getByIndex(i), UNO_QUERY); -if (xCellStyle && xCellStyle->isUserDefined()) -xTableStyle->replaceByIndex(i, mxCellFamily->getByName(xCellStyle->getParentStyle())); +while (xCellStyle && xCellStyle->isUserDefined() && !xCellStyle->getParentStyle().isEmpty()) + xCellStyle.set(mxCellFamily->getByName(xCellStyle->getParentStyle()), UNO_QUERY); + +xTableStyle->replaceByIndex(i, Any(xCellStyle)); } endTextEditForStyle(xTableStyle); @@ -353,17 +355,17 @@ void TableDesignWidget::EditStyle(std::string_view rCommand) { Reference xTableStyle(mxTableFamily->getByIndex(m_xValueSet->GetSelectedItemId() - 1), UNO_QUERY_THROW); Reference xCellStyle(xTableStyle->getByName(OUString::fromUtf8(rCommand)), UNO_QUERY_THROW); +rtl::Reference xStyleSheet = static_cast(xCellStyle.get()); -bool bUserDefined = xCellStyle->isUserDefined(); +bool bUserDefined = xStyleSheet->IsEditable(); if (!bUserDefined) { Reference xFactory(mxCellFamily, UNO_QUERY_THROW); -Reference xNewStyle(xFactory->createInstance(), UNO_QUERY_THROW); -xNewStyle->setParentStyle(xCellStyle->getName()); -xCellStyle = xNewStyle; +xCellStyle.set(xFactory->createInstance(), UNO_QUERY_THROW); +xCellStyle->setParentStyle(xStyleSheet->getName()); +xStyleSheet = static_cast(xCellStyle.get()); } -rtl::Reference xStyleSheet = static_cast(xCellStyle.get()); SfxItemSe
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdfilter.hxx| 13 +++-- sd/source/filter/eppt/eppt.cxx |2 +- sd/source/filter/sdfilter.cxx | 38 -- sd/source/filter/sdpptwrp.cxx | 18 +- 4 files changed, 5 insertions(+), 66 deletions(-) New commits: commit 7bc10ea4fae2f2cbaa485f2a9820cfa3f9cfe121 Author: Noel Grandin AuthorDate: Wed Sep 14 12:59:00 2022 +0200 Commit: Noel Grandin CommitDate: Thu Sep 15 09:24:37 2022 +0200 no need to load SaveVBA symbol at runtime Change-Id: I246168902d07dbc75b68142c73f148e711320d03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139938 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx index 928a1c0575d4..1a8c8b6739a6 100644 --- a/sd/inc/sdfilter.hxx +++ b/sd/inc/sdfilter.hxx @@ -32,6 +32,7 @@ namespace osl { class Module; } namespace sd { class DrawDocShell; } class SdDrawDocument; class SfxMedium; +class SfxObjectShell; class SotStorage; class SvMemoryStream; @@ -44,11 +45,6 @@ public: boolIsDraw() const { return mbIsDraw; } virtual boolExport() = 0; -#ifndef DISABLE_DYNLOADING -/// Open library @rLibraryName and lookup symbol @rFnSymbol -static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol ); -#endif - protected: css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::task::XStatusIndicator >mxStatusIndicator; @@ -58,11 +54,6 @@ protected: SdDrawDocument& mrDocument; boolmbIsDraw : 1; voidCreateStatusIndicator(); - -private: - -static OUString ImplGetFullLibraryName( std::u16string_view rLibraryName ); - }; SD_DLLPUBLIC bool ExportPPT( const std::vector< css::beans::PropertyValue >& rMediaData, @@ -76,4 +67,6 @@ SD_DLLPUBLIC bool ExportPPT( const std::vector< css::beans::PropertyValue >& rMe SD_DLLPUBLIC bool ImportPPT( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium ); +SD_DLLPUBLIC bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ); + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 34f85553e8bf..64df662c7e68 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1431,7 +1431,7 @@ SAL_DLLPUBLIC_EXPORT bool ExportPPT( const std::vector< css::beans::PropertyValu return bStatus; } -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) +SAL_DLLPUBLIC_EXPORT bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) { tools::SvRef xDest( new SotStorage( new SvMemoryStream(), true ) ); SvxImportMSVBasic aMSVBas( rDocShell, *xDest ); diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index af001e611883..e1ee1393226e 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -50,44 +50,6 @@ SdFilter::~SdFilter() { } -OUString SdFilter::ImplGetFullLibraryName( std::u16string_view rLibraryName ) -{ -return OUString(SVLIBRARY("?")).replaceFirst( "?", rLibraryName ); -} - -#ifndef DISABLE_DYNLOADING - -static std::map> g_SdModuleMap; - -extern "C" { static void thisModule() {} } - -oslGenericFunction SdFilter::GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol ) -{ -osl::Module *pMod = nullptr; -auto it = g_SdModuleMap.find(rLibraryName); -if (it != g_SdModuleMap.end()) -pMod = it->second.get(); - -if (!pMod) -{ -pMod = new osl::Module; -if (pMod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName), - SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY)) -g_SdModuleMap[rLibraryName] = std::unique_ptr(pMod); -else -{ -delete pMod; -pMod = nullptr; -} -} -if (!pMod) -return nullptr; -else -return pMod->getFunctionSymbol(rFnSymbol); -} - -#endif - void SdFilter::CreateStatusIndicator() { // The status indicator must be retrieved from the provided medium arguments diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 0f9e2f4a38fc..168fe11ffa1a 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -40,15 +40,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; -typedef sal_Bool ( *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& ); - -#ifdef DISABLE_DYNLOADING - -extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& ); - -#endif - - SdPPTFilter::SdPPTFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ) : SdFilter( rMedium, rDocShell ),
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdfilter.hxx|4 +++- sd/source/filter/ppt/pptin.cxx |2 +- sd/source/filter/sdfilter.cxx |5 - sd/source/filter/sdpptwrp.cxx | 14 +- sd/source/ui/app/sddll.cxx |1 - 5 files changed, 5 insertions(+), 21 deletions(-) New commits: commit 572c2ee4c4f4b8e53f2fa4398a5600f1468f3a38 Author: Noel Grandin AuthorDate: Wed Sep 14 12:56:39 2022 +0200 Commit: Noel Grandin CommitDate: Wed Sep 14 20:31:29 2022 +0200 no need to load ImportPPT symbol at runtime Change-Id: I4b50822183d9752d6a413b0308e1d661785fb10e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139937 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx index 707679642dee..928a1c0575d4 100644 --- a/sd/inc/sdfilter.hxx +++ b/sd/inc/sdfilter.hxx @@ -45,7 +45,6 @@ public: virtual boolExport() = 0; #ifndef DISABLE_DYNLOADING -static void Preload(); /// Open library @rLibraryName and lookup symbol @rFnSymbol static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol ); #endif @@ -73,5 +72,8 @@ SD_DLLPUBLIC bool ExportPPT( const std::vector< css::beans::PropertyValue >& rMe SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ); +// exported function +SD_DLLPUBLIC bool ImportPPT( +SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium ); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 7fd3a903dcd4..c2673ef4ce44 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2766,7 +2766,7 @@ ImplSdPPTImport::ReadFormControl( tools::SvRef& rSrc1, css::uno::Ref } // exported function -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool ImportPPT( +SAL_DLLPUBLIC_EXPORT bool ImportPPT( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium ) { std::unique_ptr pImport( new SdPPTImport( pDocument, rDocStream, rStorage, rMedium )); diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index 24aa42a7ec9d..af001e611883 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -86,11 +86,6 @@ oslGenericFunction SdFilter::GetLibrarySymbol( const OUString& rLibraryName, con return pMod->getFunctionSymbol(rFnSymbol); } -void SdFilter::Preload() -{ -(void)GetLibrarySymbol("sd", "ImportPPT"); -} - #endif void SdFilter::CreateStatusIndicator() diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 6dd1964b2b73..0f9e2f4a38fc 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -40,14 +40,10 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; -typedef sal_Bool ( *ImportPPTPointer )( SdDrawDocument*, SvStream&, SotStorage&, SfxMedium& ); - typedef sal_Bool ( *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& ); #ifdef DISABLE_DYNLOADING -extern "C" sal_Bool ImportPPT( SdDrawDocument*, SvStream&, SotStorage&, SfxMedium& ); - extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& ); #endif @@ -186,15 +182,7 @@ bool SdPPTFilter::Import() mrMedium.SetError(ERRCODE_SVX_READ_FILTER_PPOINT); else { -#ifdef DISABLE_DYNLOADING -ImportPPTPointer pPPTImport = ImportPPT; -#else -ImportPPTPointer pPPTImport = reinterpret_cast< ImportPPTPointer >( - SdFilter::GetLibrarySymbol(mrMedium.GetFilter()->GetUserData(), "ImportPPT")); -#endif - -if ( pPPTImport ) -bRet = pPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium ); +bRet = ImportPPT( &mrDocument, *pDocStream, *pStorage, mrMedium ); if ( !bRet ) mrMedium.SetError(SVSTREAM_WRONGVERSION); diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 4e20d0997fb8..c195869b790e 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -260,7 +260,6 @@ void SdDLL::Init() extern "C" SAL_DLLPUBLIC_EXPORT void lok_preload_hook() { -SdFilter::Preload(); SdAbstractDialogFactory::Create(); }
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationEffect.hxx |4 - sd/inc/CustomAnimationPreset.hxx |5 + sd/inc/Outliner.hxx |5 + sd/inc/animations.hxx |5 + sd/inc/stlfamily.hxx |2 sd/source/core/CustomAnimationEffect.cxx |9 +-- sd/source/core/stlfamily.cxx |5 + sd/source/filter/eppt/eppt.cxx |5 + sd/source/filter/eppt/eppt.hxx |7 +- sd/source/filter/eppt/pptexanimations.hxx |7 +- sd/source/filter/eppt/pptexsoundcollection.cxx |5 + sd/source/filter/eppt/pptexsoundcollection.hxx |2 sd/source/filter/grf/sdgrffilter.cxx |5 + sd/source/filter/html/htmlex.cxx |5 + sd/source/filter/html/htmlex.hxx |2 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |5 + sd/source/ui/accessibility/AccessiblePageShape.cxx |5 + sd/source/ui/animations/CustomAnimationList.cxx | 11 ++- sd/source/ui/animations/STLPropertySet.hxx |3 - sd/source/ui/animations/SlideTransitionPane.cxx |5 + sd/source/ui/animations/motionpathtag.cxx | 29 +- sd/source/ui/annotations/annotationtag.cxx |7 +- sd/source/ui/dlg/RemoteDialogClientBox.cxx |5 + sd/source/ui/dlg/RemoteDialogClientBox.hxx |2 sd/source/ui/dlg/TemplateScanner.cxx |5 + sd/source/ui/dlg/diactrl.cxx |5 + sd/source/ui/dlg/dlgfield.cxx |5 + sd/source/ui/dlg/navigatr.cxx |5 + sd/source/ui/dlg/sdtreelb.cxx |5 + sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx |5 + sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx |2 sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx |9 +-- sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.hxx |4 - sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |9 +-- sd/source/ui/framework/configuration/ConfigurationUpdater.hxx |7 +- sd/source/ui/framework/tools/FrameworkHelper.cxx | 25 sd/source/ui/func/smarttag.cxx |9 +-- sd/source/ui/func/undoheaderfooter.cxx |5 + sd/source/ui/func/undolayer.cxx | 17 +++-- sd/source/ui/inc/AccessibleDocumentViewBase.hxx |2 sd/source/ui/inc/AccessiblePageShape.hxx |2 sd/source/ui/inc/OutlinerIteratorImpl.hxx |2 sd/source/ui/inc/RemoteServer.hxx |5 + sd/source/ui/inc/TemplateScanner.hxx |7 +- sd/source/ui/inc/ToolBarManager.hxx |5 + sd/source/ui/inc/ViewShellManager.hxx |5 + sd/source/ui/inc/ViewTabBar.hxx |2 sd/source/ui/inc/diactrl.hxx |2 sd/source/ui/inc/dlgfield.hxx |2 sd/source/ui/inc/navigatr.hxx |2 sd/source/ui/inc/sdtreelb.hxx |2 sd/source/ui/inc/smarttag.hxx |5 - sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx |2 sd/source/ui/inc/undoheaderfooter.hxx |2 sd/source/ui/inc/undolayer.hxx
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/pch/precompiled_sd.hxx |4 - sd/source/ui/inc/SlideSorter.hxx| 16 - sd/source/ui/inc/ViewShell.hxx |3 - sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx | 19 -- sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx |7 -- sd/source/ui/slidesorter/shell/SlideSorter.cxx | 15 + sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |3 - sd/source/ui/slidesorter/view/SlideSorterView.cxx |1 sd/source/ui/view/drviews1.cxx |1 sd/source/ui/view/outlnvsh.cxx |1 sd/source/ui/view/viewshe2.cxx |4 - sd/source/ui/view/viewshel.cxx | 28 -- 12 files changed, 10 insertions(+), 92 deletions(-) New commits: commit d564d73673dc4dce43c988421397a6feae7620d5 Author: Caolán McNamara AuthorDate: Mon Aug 8 09:41:51 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Aug 8 14:56:30 2022 +0200 no need for ScrollBarBox if bg is already the desired color Change-Id: Ia471938bf0340bdef51b4a745814194f57893eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137947 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 13d31e340a9e..4018285cf363 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2022-06-27 18:58:59 using: + Generated on 2022-08-08 10:27:15 using: ./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -23,6 +23,7 @@ #include #if PCH_LEVEL >= 1 #include +#include #include #include #include @@ -98,7 +99,6 @@ #include #include #include -#include #include #include #include diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx index 4926e11583ec..ae51bd518c09 100644 --- a/sd/source/ui/inc/SlideSorter.hxx +++ b/sd/source/ui/inc/SlideSorter.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include @@ -87,16 +86,12 @@ public: Typically the horizontal scroll bar of the ViewShell. @param rpVerticalScrollBar Typically the vertical scroll bar of the ViewShell. -@param rpScrollBarBox -The little square enclosed by the two scroll bars. Typically -the one from the ViewShell. */ static std::shared_ptr CreateSlideSorter ( ViewShell& rViewShell, sd::Window* pContentWindow, ScrollAdaptor* pHorizontalScrollBar, -ScrollAdaptor* pVerticalScrollBar, -ScrollBarBox* pScrollBarBox); +ScrollAdaptor* pVerticalScrollBar); /** Create a new slide sorter that is loosely coupled to the given view shell. The view shell may even be missing. @@ -120,11 +115,6 @@ public: */ const VclPtr& GetHorizontalScrollBar() const { return mpHorizontalScrollBar;} -/** Return the scroll bar filler that paints the little square that is -enclosed by the two scroll bars. -*/ -const VclPtr& GetScrollBarFiller (void) const { return mpScrollBarBox;} - /** Return the content window. This is a sibling and is geometrically enclosed by the scroll bars. */ @@ -207,7 +197,6 @@ private: VclPtr mpContentWindow; VclPtr mpHorizontalScrollBar; VclPtr mpVerticalScrollBar; -VclPtr mpScrollBarBox; /** Some slide sorter wide properties that are used in different classes. @@ -219,8 +208,7 @@ private: ViewShell& rViewShell, sd::Window* pContentWindow, ScrollAdaptor* pHorizontalScrollBar, -ScrollAdaptor* pVerticalScrollBar, -ScrollBarBox* pScrollBarBox); +ScrollAdaptor* pVerticalScrollBar); SlideSorter ( ViewShellBase& rBase, vcl::Window& rParentWindow); diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 17161c049007..5454639687ed 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include "View.hxx" @@ -442,8 +441,6 @@ protected: VclPtr mpHorizontalRuler; /// Vertical ruler is not shown by default. VclPtr mpVerticalRuler; -/// Filler of the little square enclosed by the two scroll bars. -VclPtr mpScrollBarBox; /// Layer tab bar. VclPtr mpLayerTabBar; diff --git a/sd/source/ui/slidesorter/controller/SlsScr
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|2 +- sd/source/ui/view/Outliner.cxx |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit 583185235389b55d6cfffac3067c0e1ccb2852b1 Author: Justin Luth AuthorDate: Wed Feb 2 11:00:07 2022 +0200 Commit: Caolán McNamara CommitDate: Fri Feb 4 21:40:10 2022 +0100 related tdf#145868 sd: Clone SvxSearchItem to avoid use after free I tested "if (mpSearchItem)" which passed, but then it crashed when trying to access (*mpSearchItem) == (*pSearchItem) because the mpSearchItem's DTOR had already been called prior to the if(mpSearchItem). Since mpSearchItem is never compared to another memory pointer, it is safe to assign it to a Clone. Steps to reproduce: 1.) open Impress and search for something 2.) change the search string to something else 3.) search again. Note that there isn't currently any code that hits this. I discovered it trying to craft a fix for bug 145868. Change-Id: Idc5f5a3e812ed3e49631347c35c3f4b2d8bb4127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129347 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Justin Luth Reviewed-by: Caolán McNamara diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 772040f7a610..4a7100db3bb1 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -316,7 +316,7 @@ private: search. It is set every time the SearchAndReplaceAll method is called. */ -const SvxSearchItem* mpSearchItem; +std::unique_ptr mpSearchItem; /// The actual object iterator. ::sd::outliner::Iterator maObjectIterator; diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 0f77f2070219..23353ba87c82 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -154,7 +154,6 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode ) meStartEditMode(EditMode::Page), mnStartPageIndex(sal_uInt16(-1)), mpStartEditedObject(nullptr), - mpSearchItem(nullptr), mbPrepareSpellingPending(true) { SetStyleSheetPool(static_cast( mpDrawDocument->GetStyleSheetPool() )); @@ -464,7 +463,7 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) if ( ! bAbort) { meMode = SEARCH; -mpSearchItem = pSearchItem; +mpSearchItem = std::unique_ptr(pSearchItem->Clone()); mbFoundObject = false;
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/bitmaps.hlst | 16 ++-- sd/source/ui/controller/displaymodecontroller.cxx |8 +++--- sd/source/ui/controller/slidelayoutcontroller.cxx | 28 +++--- sd/source/ui/dlg/sdpreslt.cxx |2 - sd/source/ui/sidebar/LayoutMenu.cxx | 24 +- 5 files changed, 39 insertions(+), 39 deletions(-) New commits: commit 568293d7ce6d96ba71ae8c2d591b6cf237e31db1 Author: Tor Lillqvist AuthorDate: Thu Jan 6 15:03:05 2022 +0200 Commit: Tor Lillqvist CommitDate: Thu Jan 6 20:22:44 2022 +0100 It's called a slide, not a foil Change-Id: I8b5b062faf9d2728c729384bbdafead00d5bf917 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128042 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst index 5b3ae7851897..9e66e87dd032 100644 --- a/sd/inc/bitmaps.hlst +++ b/sd/inc/bitmaps.hlst @@ -26,13 +26,13 @@ inline constexpr OUStringLiteral BMP_LAYOUT_HEAD06 = u"sd/res/layout_head06.png" inline constexpr OUStringLiteral BMP_LAYOUT_TEXTONLY = u"sd/res/layout_textonly.png"; inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL01 = u"sd/res/layout_vertical01.png"; inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL02 = u"sd/res/layout_vertical02.png"; -inline constexpr OUStringLiteral BMP_FOIL_NONE = u"sd/res/foilnone.png"; -inline constexpr OUStringLiteral BMP_FOILH_01 = u"sd/res/foilh01.png"; -inline constexpr OUStringLiteral BMP_FOILH_02 = u"sd/res/foilh02.png"; -inline constexpr OUStringLiteral BMP_FOILH_03 = u"sd/res/foilh03.png"; -inline constexpr OUStringLiteral BMP_FOILH_04 = u"sd/res/foilh04.png"; -inline constexpr OUStringLiteral BMP_FOILH_06 = u"sd/res/foilh06.png"; -inline constexpr OUStringLiteral BMP_FOILH_09 = u"sd/res/foilh09.png"; +inline constexpr OUStringLiteral BMP_SLIDE_NONE = u"sd/res/foilnone.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_01 = u"sd/res/foilh01.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_02 = u"sd/res/foilh02.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_03 = u"sd/res/foilh03.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_04 = u"sd/res/foilh04.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_06 = u"sd/res/foilh06.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_09 = u"sd/res/foilh09.png"; inline constexpr OUStringLiteral BMP_DISPLAYMODE_SLIDE = u"sd/res/displaymode_slide.png"; inline constexpr OUStringLiteral BMP_DISPLAYMODE_OUTLINE = u"sd/res/displaymode_outline.png"; inline constexpr OUStringLiteral BMP_DISPLAYMODE_NOTES = u"sd/res/displaymode_notes.png"; @@ -56,7 +56,7 @@ inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE = u"sd/res/placehol inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE_HOVER = u"sd/res/placeholder_movie_large_hover.png"; inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE = u"sd/res/placeholder_table_large.png"; inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE_HOVER = u"sd/res/placeholder_table_large_hover.png"; -inline constexpr OUStringLiteral BMP_FOILN_01 = u"sd/res/foiln01.png"; +inline constexpr OUStringLiteral BMP_SLIDEN_01 = u"sd/res/foiln01.png"; inline constexpr OUStringLiteral BMP_PAGE = u"sd/res/page.png"; inline constexpr OUStringLiteral BMP_PAGE_EXCLUDED = u"sd/res/pageexcl.png"; inline constexpr OUStringLiteral BMP_PAGEOBJS_EXCLUDED = u"sd/res/pagobjex.png"; diff --git a/sd/source/ui/controller/displaymodecontroller.cxx b/sd/source/ui/controller/displaymodecontroller.cxx index 7c29a03659b6..81ad2d19e477 100644 --- a/sd/source/ui/controller/displaymodecontroller.cxx +++ b/sd/source/ui/controller/displaymodecontroller.cxx @@ -70,7 +70,7 @@ private: DECL_LINK(SelectValueSetHdl, ValueSet*, void); }; -struct snewfoil_value_info +struct snew_slide_value_info { sal_uInt16 mnId; OUString msBmpResId; @@ -80,7 +80,7 @@ struct snewfoil_value_info } -const snewfoil_value_info editmodes[] = +const snew_slide_value_info editmodes[] = { {1, BMP_DISPLAYMODE_SLIDE, @@ -101,7 +101,7 @@ const snewfoil_value_info editmodes[] = {0, "", {}, "" } }; -const snewfoil_value_info mastermodes[] = +const snew_slide_value_info mastermodes[] = { {5, BMP_DISPLAYMODE_SLIDE_MASTER, @@ -119,7 +119,7 @@ const snewfoil_value_info mastermodes[] = }; -static void fillLayoutValueSet(ValueSet* pValue, const snewfoil_value_info* pInfo) +static void fillLayoutValueSet(ValueSet* pValue, const snew_slide_value_info* pInfo) { Size aLayoutItemSize; for( ; pInfo->mnId; pInfo++ ) diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 06814feda90f..55a4d0419b82 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -77,7 +77,7 @@ private: std::unique_ptr mxMoreButton; }; -struct snewfoil_value_info_layo
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/AnnotationEnumeration.hxx|2 - sd/inc/CustomAnimationPreset.hxx|4 +-- sd/source/core/CustomAnimationPreset.cxx|2 - sd/source/core/annotations/AnnotationEnumeration.cxx| 10 sd/source/ui/app/sdxfer.cxx |4 +-- sd/source/ui/framework/configuration/ResourceId.cxx |6 ++--- sd/source/ui/inc/framework/ResourceId.hxx |2 - sd/source/ui/inc/sdxfer.hxx |2 - sd/source/ui/slidesorter/controller/SlsClipboard.cxx|8 +++--- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |4 +-- sd/source/ui/slidesorter/controller/SlsTransferableData.cxx |8 +++--- sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx |4 +-- sd/source/ui/unoidl/unopage.cxx |2 - sd/source/ui/view/DocumentRenderer.cxx | 12 +- 14 files changed, 35 insertions(+), 35 deletions(-) New commits: commit 126510981b3a71bf0e73551938c483f14281d3c4 Author: Noel Grandin AuthorDate: Mon Oct 11 14:31:41 2021 +0200 Commit: Noel Grandin CommitDate: Mon Oct 11 16:11:47 2021 +0200 loplugin:moveparam in sd Change-Id: Ia29e29d9af21dbd9bfb846db03f0100832835352 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123390 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/AnnotationEnumeration.hxx b/sd/inc/AnnotationEnumeration.hxx index 6dbc7250e92f..ed35b46b4068 100644 --- a/sd/inc/AnnotationEnumeration.hxx +++ b/sd/inc/AnnotationEnumeration.hxx @@ -31,7 +31,7 @@ class XAnnotationEnumeration; namespace sd { css::uno::Reference -createAnnotationEnumeration(const AnnotationVector&); +createAnnotationEnumeration(AnnotationVector&&); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx index 6894a7c7af77..b746b20b7f83 100644 --- a/sd/inc/CustomAnimationPreset.hxx +++ b/sd/inc/CustomAnimationPreset.hxx @@ -75,8 +75,8 @@ struct PresetCategory OUString maLabel; EffectDescriptorList maEffects; -PresetCategory( const OUString& rLabel, const EffectDescriptorList& rEffects ) -: maLabel( rLabel ), maEffects( rEffects ) {} +PresetCategory( const OUString& rLabel, EffectDescriptorList&& rEffects ) +: maLabel( rLabel ), maEffects( std::move(rEffects) ) {} }; typedef std::shared_ptr< PresetCategory > PresetCategoryPtr; typedef std::vector< PresetCategoryPtr > PresetCategoryList; diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 1afc9f360e51..5147cb3cf0e0 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -381,7 +381,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor } #endif } -rPresetMap.push_back( std::make_shared( aLabel, aEffectsList ) ); +rPresetMap.push_back( std::make_shared( aLabel, std::move(aEffectsList) ) ); } } } diff --git a/sd/source/core/annotations/AnnotationEnumeration.cxx b/sd/source/core/annotations/AnnotationEnumeration.cxx index 018de9b379b2..5fae2422b8f4 100644 --- a/sd/source/core/annotations/AnnotationEnumeration.cxx +++ b/sd/source/core/annotations/AnnotationEnumeration.cxx @@ -38,7 +38,7 @@ namespace { class AnnotationEnumeration: public ::cppu::WeakImplHelper< css::office::XAnnotationEnumeration > { public: -explicit AnnotationEnumeration( const AnnotationVector& rAnnotations ); +explicit AnnotationEnumeration( AnnotationVector&& rAnnotations ); AnnotationEnumeration(const AnnotationEnumeration&) = delete; AnnotationEnumeration& operator=(const AnnotationEnumeration&) = delete; @@ -55,13 +55,13 @@ private: } -Reference< XAnnotationEnumeration > createAnnotationEnumeration( const sd::AnnotationVector& rAnnotations ) +Reference< XAnnotationEnumeration > createAnnotationEnumeration( sd::AnnotationVector&& rAnnotations ) { -return new AnnotationEnumeration( rAnnotations ); +return new AnnotationEnumeration( std::move(rAnnotations) ); } -AnnotationEnumeration::AnnotationEnumeration( const AnnotationVector& rAnnotations ) -: maAnnotations(rAnnotations) +AnnotationEnumeration::AnnotationEnumeration( AnnotationVector&& rAnnotations ) +: maAnnotations(std::move(rAnnotations)) { maIter = maAnnotations.begin(); } diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index dcd3e6d2517d..e813c687f5c7 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -666,7 +666,7 @@ void SdTransferable::SetObjectDescriptor( std::unique_ptr &rPageBookmarks, bool bPersistent
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|2 +- sd/source/ui/inc/ViewShellHint.hxx |2 +- sd/source/ui/inc/tools/IconCache.hxx |2 +- sd/source/ui/inc/tools/SlotStateListener.hxx |5 ++--- sd/source/ui/inc/unomodel.hxx |7 +++ sd/source/ui/inc/unopage.hxx |7 +++ sd/source/ui/inc/view/viewoverlaymanager.hxx |2 +- sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx |5 ++--- sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx|2 +- sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx |2 +- sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx |2 +- sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx |2 +- 12 files changed, 18 insertions(+), 22 deletions(-) New commits: commit fbb9a98a78a349aef7b69d29a7534fd35ff1aa53 Author: Noel Grandin AuthorDate: Wed Sep 15 14:27:43 2021 +0200 Commit: Noel Grandin CommitDate: Wed Sep 15 18:58:00 2021 +0200 loplugin:finalclasses in sd Change-Id: I6070a392319bdc4e04db3a36a6876c194c8a6495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122147 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 7be1b3488d28..772040f7a610 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -118,7 +118,7 @@ struct SearchSelection queried. This is only sufficient for searching the outline view. */ -class SdOutliner : public SdrOutliner +class SdOutliner final : public SdrOutliner { public: friend class ::sd::outliner::OutlinerContainer; diff --git a/sd/source/ui/inc/ViewShellHint.hxx b/sd/source/ui/inc/ViewShellHint.hxx index 8bde7c2f4473..05a0c8328666 100644 --- a/sd/source/ui/inc/ViewShellHint.hxx +++ b/sd/source/ui/inc/ViewShellHint.hxx @@ -26,7 +26,7 @@ namespace sd /** Local derivation of the SfxHint class that defines some hint ids that are used by the ViewShell class and its descendants. */ -class ViewShellHint : public SfxHint +class ViewShellHint final : public SfxHint { public: enum HintId diff --git a/sd/source/ui/inc/tools/IconCache.hxx b/sd/source/ui/inc/tools/IconCache.hxx index 2bacbe27fce5..fef994764f88 100644 --- a/sd/source/ui/inc/tools/IconCache.hxx +++ b/sd/source/ui/inc/tools/IconCache.hxx @@ -34,7 +34,7 @@ namespace sd This cache acts like a singleton with a lifetime equal to that of the sd module. */ -class IconCache : public SdGlobalResource +class IconCache final : public SdGlobalResource { public: /** The lifetime of the returned reference is limited to that of the sd diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx index 9df4ceec19f3..85c123929fce 100644 --- a/sd/source/ui/inc/tools/SlotStateListener.hxx +++ b/sd/source/ui/inc/tools/SlotStateListener.hxx @@ -39,7 +39,7 @@ typedef cppu::WeakComponentImplHelper< to be informed when the support for vertical writing changes but it can be used to relay state changes of other slots as well. */ -class SlotStateListener +class SlotStateListener final : protected MutexOwner, public SlotStateListenerInterfaceBase { @@ -98,14 +98,13 @@ public: virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent) override; -protected: +private: /** This method is called by the WeakComponentImplHelper base class in reaction to a XComponent::dispose() call. It releases all currently active listeners. */ virtual void SAL_CALL disposing() override; -private: Link maCallback; /** Remember the URLs that describe slots whose state changes we are diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index 8cfa5a81d06a..86b1f7a854e0 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -61,7 +61,7 @@ class DrawViewShell; extern OUString getPageApiName( SdPage const * pPage ); extern OUString getPageApiNameFromUiName( const OUString& rUIName ); -class SD_DLLPUBLIC SdXImpressDocument : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other +class SD_DLLPUBLIC SdXImpressDocument final : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other public SvxFmMSFactory, public css::drawing::XDrawPageDuplicator, public css::drawing::XLayerSupplier, @@ -121,7 +121,6 @@ private: sd::DrawViewShell* GetViewShell(); -protected: /** abstract SdrModel provider */ virtual SdrModel& getSdrModelFromUnoModel() const override; @@ -292,7 +291,7 @@ public: * * **
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlsheet.hxx | 12 + sd/source/core/stlsheet.cxx | 101 +++- 2 files changed, 94 insertions(+), 19 deletions(-) New commits: commit f234fe77a0070927b8ae2ba3309f63aa718624f5 Author: Mike Kaganski AuthorDate: Wed Aug 4 11:33:09 2021 +0300 Commit: Mike Kaganski CommitDate: Wed Aug 4 15:50:46 2021 +0200 SdStyleSheet: implement XMultiPropertySet Reduces broadcast frequency Change-Id: I25f4281e792aa6bb42a11d3566e7d4e64e833f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119992 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 105eb4cd797a..645259e9e8fc 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -43,6 +44,7 @@ struct SfxItemPropertyMapEntry; typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet, css::beans::XPropertySet, +css::beans::XMultiPropertySet, css::lang::XServiceInfo, css::beans::XPropertyState, css::util::XModifyBroadcaster, @@ -109,6 +111,13 @@ public: virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; +// XMultiPropertySet +virtual void SAL_CALL setPropertyValues(const css::uno::Sequence& aPropertyNames, const css::uno::Sequence& aValues) override; +virtual css::uno::Sequence SAL_CALL getPropertyValues(const css::uno::Sequence& aPropertyNames) override; +virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence& aPropertyNames, const css::uno::Reference& xListener) override; +virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference& xListener) override; +virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence& aPropertyNames, const css::uno::Reference& xListener) override; + // XPropertyState virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override; virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override; @@ -130,6 +139,9 @@ private: /// @throws css::uno::RuntimeException static const SfxItemPropertyMapEntry* getPropertyMapEntry( std::u16string_view rPropertyName ); +void setPropertyValue_Impl(const OUString& aPropertyName, const css::uno::Any& aValue); +css::uno::Any getPropertyValue_Impl(const OUString& PropertyName); + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; virtual ~SdStyleSheet() override; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 9f87290c52f2..533a9846557f 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -951,20 +951,12 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) } } -// XPropertySet +// XPropertySet/XMultiPropertySet utility functions -Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo() -{ -throwIfDisposed(); -static Reference< XPropertySetInfo > xInfo = GetStylePropertySet().getPropertySetInfo(); -return xInfo; -} - -void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) +// Does not broadcast +// Must be guarded by solar mutex; must not be disposed +void SdStyleSheet::setPropertyValue_Impl(const OUString& aPropertyName, const css::uno::Any& aValue) { -SolarMutexGuard aGuard; -throwIfDisposed(); - const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( aPropertyName ); if( pEntry == nullptr ) { @@ -1058,16 +1050,11 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con } rStyleSet.Put( aSet ); -Broadcast(SfxHint(SfxHintId::DataChanged)); - } -Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) +// Must be guarded by solar mutex; must not be disposed +css::uno::Any SdStyleSheet::getPropertyValue_Impl(const OUString& PropertyName) { -SolarMutexGuard aGuard; - -throwIfDisposed(); - const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( PropertyName ); if( pEntry == nullptr ) { @@ -1164,7 +1151,32 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) } return aAny; +} + +// XPropertySet + +Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo() +{ +throwIfDisposed(
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|3 + sd/source/ui/view/Outliner.cxx | 63 + 2 files changed, 36 insertions(+), 30 deletions(-) New commits: commit 36db408b9027da01464927e5853950435596ae05 Author: Tomaž Vajngerl AuthorDate: Wed Jun 9 14:58:28 2021 +0900 Commit: Tomaž Vajngerl CommitDate: Thu Jun 10 02:36:22 2021 +0200 sd: ubsan - fix heap-use-after-free in SdOutliner OutlinerView can change (old one deleted and new one create) so we can't store it in a local vairable and need to always fetch it. UBSAN Error log: ==21484==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000af7d28 at pc 0x2ab7c5979405 bp 0x7ffcd1a3d1a0 sp 0x7ffcd1a3d198 READ of size 8 at 0x606000af7d28 thread T0 -0 0x2ab7c5979404 in std::__uniq_ptr_impl >::_M_ptr() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:147:42 -1 0x2ab7c59792ea in std::unique_ptr >::get() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:337:21 -2 0x2ab7c59791d9 in std::unique_ptr >::operator*() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322:2 -3 0x2ab7c59725da in OutlinerView::GetEditView() const /include/editeng/outliner.hxx:209:46 -4 0x2ab7c70e36bb in SdOutliner::SearchAndReplaceOnce(std::__debug::vector >*) /sd/source/ui/view/Outliner.cxx:903:21 -5 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -6 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -7 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -8 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -9 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -10 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -11 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -12 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -13 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence const&, com::sun::star::uno::Reference const&) /sfx2/source/control/unoctitm.cxx:738:46 -14 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence const&, com::sun::star::uno::Reference const&) /sfx2/source/control/unoctitm.cxx:243:16 -15 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence const&) /framework/source/services/dispatchhelper.cxx:159:30 -16 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence const&) /framework/source/services/dispatchhelper.cxx:117:16 -17 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence const&) /framework/source/services/dispatchhelper.cxx -18 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference const&, rtl::OUString const&, com::sun::star::uno::Sequence const&) /unotest/source/cpp/macros_test.cxx:85:22 -19 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -20 0x2ab7b1b43f84 in void std::__invoke_impl(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -21 0x2ab7b1b43b5e in std::__invoke_result::type std::__invoke(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -22 0x2ab7b1b439b2 in void std::_Bind::__call(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlsheet.hxx |2 +- sd/source/core/stlfamily.cxx |2 +- sd/source/core/stlsheet.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit fd91c4937b942f7e28a1b6a30afddfb2abadfcf1 Author: Noel AuthorDate: Tue Mar 2 09:23:06 2021 +0200 Commit: Noel Grandin CommitDate: Wed Mar 3 09:33:29 2021 +0100 loplugin:refcounting in sd Change-Id: I5e259fc7028b75910efd6a99ed445690a9c496ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111803 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index dc32df9fa5eb..b6b693d4f937 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -72,7 +72,7 @@ public: static OUString GetFamilyString( SfxStyleFamily eFamily ); -static SdStyleSheet* CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily ); +static rtl::Reference CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily ); //Broadcast that a SdStyleSheet has changed, taking into account outline sublevels //which need to be explicitly broadcast as changing if their parent style was diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 8e9150a292ef..164fb7814b41 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -429,7 +429,7 @@ Reference< XInterface > SAL_CALL SdStyleFamily::createInstance() throw IllegalAccessException(); } return Reference( -static_cast(SdStyleSheet::CreateEmptyUserStyle(*mxPool, mnFamily))); +static_cast(SdStyleSheet::CreateEmptyUserStyle(*mxPool, mnFamily).get())); } Reference< XInterface > SAL_CALL SdStyleFamily::createInstanceWithArguments( const Sequence< Any >& ) diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 270b1c5d63b7..a470ff28c4f1 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -675,7 +675,7 @@ void SdStyleSheet::throwIfDisposed() throw DisposedException(); } -SdStyleSheet* SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily ) +rtl::Reference SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily ) { OUString aName; sal_Int32 nIndex = 1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig
sd/inc/bitmaps.hlst |5 sd/inc/strings.hrc |7 sd/source/ui/slideshow/slideshowimpl.cxx| 202 sd/source/ui/slideshow/slideshowimpl.hxx|2 sd/uiconfig/simpress/ui/slidecontextmenu.ui | 120 ++-- 5 files changed, 146 insertions(+), 190 deletions(-) New commits: commit e872d77cc0e5dc1571df4559101d0b80e40097c2 Author: Caolán McNamara AuthorDate: Fri Feb 19 16:13:36 2021 + Commit: Caolán McNamara CommitDate: Fri Feb 19 21:05:57 2021 +0100 weld slidecontextmenu Change-Id: Ia3fea3ddf920c45daa244826dffb7effa58c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111238 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst index 6186abcab3c1..6986085a8992 100644 --- a/sd/inc/bitmaps.hlst +++ b/sd/inc/bitmaps.hlst @@ -204,6 +204,11 @@ #define BMP_CUSTOMANIMATION_MEDIA_PAUSE "sd/res/breakplayingblue_16.png" #define BMP_CUSTOMANIMATION_MEDIA_STOP "sd/res/stopplayingblue_16.png" +#define BMP_MENU_NEXT "cmd/sc_nextrecord.png" +#define BMP_MENU_PREV "cmd/sc_prevrecord.png" +#define BMP_MENU_FIRST "cmd/sc_firstrecord.png" +#define BMP_MENU_LAST "cmd/sc_lastrecord.png" + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index ec8222b8bd15..183324d2679a 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -478,7 +478,12 @@ #define STR_ANIMATION_DIALOG_TITLE NC_("STR_ANIMATION_DIALOG_TITLE", "Animation") -#define RID_SVXSTR_EDIT_GRAPHIC NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link") +#define RID_SVXSTR_EDIT_GRAPHIC NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link") + +#define RID_SVXSTR_MENU_NEXT NC_("RID_SVXSTR_MENU_NEXT", "~Next") +#define RID_SVXSTR_MENU_PREV NC_("RID_SVXSTR_MENU_NEXT", "~Previous") +#define RID_SVXSTR_MENU_FIRST NC_("RID_SVXSTR_MENU_FIRST", "~First Slide") +#define RID_SVXSTR_MENU_LAST NC_("RID_SVXSTR_MENU_LAST", "~Last Slide") #endif diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 22893cf34a3a..b9639f184cb9 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -67,10 +67,12 @@ #include "PaneHider.hxx" #include -#include +#include +#include #include #include #include +#include #include #include @@ -1942,119 +1944,102 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void) if( !mbWasPaused ) pause(); -VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/simpress/ui/slidecontextmenu.ui", ""); -VclPtr pMenu(aBuilder.get_menu("menu")); +std::unique_ptr xBuilder(Application::CreateBuilder(nullptr, "modules/simpress/ui/slidecontextmenu.ui")); +std::unique_ptr xMenu(xBuilder->weld_menu("menu")); +OUString sNextImage(BMP_MENU_NEXT), sPrevImage(BMP_MENU_PREV); +xMenu->insert(0, "next", SdResId(RID_SVXSTR_MENU_NEXT), &sNextImage, nullptr, nullptr, TRISTATE_INDET); +xMenu->insert(1, "prev", SdResId(RID_SVXSTR_MENU_PREV), &sPrevImage, nullptr, nullptr, TRISTATE_INDET); // Adding button to display if in Pen mode -pMenu->CheckItem("pen", mbUsePen); +xMenu->set_active("pen", mbUsePen); const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode(); -pMenu->EnableItem(pMenu->GetItemId("next"), mpSlideController->getNextSlideIndex() != -1); -pMenu->EnableItem(pMenu->GetItemId("prev"), (mpSlideController->getPreviousSlideIndex() != -1 ) || (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK)); -pMenu->EnableItem(pMenu->GetItemId("edit"), mpViewShell->GetDoc()->IsStartWithPresentation()); +xMenu->set_visible("next", mpSlideController->getNextSlideIndex() != -1); +xMenu->set_visible("prev", (mpSlideController->getPreviousSlideIndex() != -1 ) || (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK)); +xMenu->set_visible("edit", mpViewShell->GetDoc()->IsStartWithPresentation()); -PopupMenu* pPageMenu = pMenu->GetPopupMenu(pMenu->GetItemId("goto")); +std::unique_ptr xPageMenu(xBuilder->weld_menu("gotomenu")); +OUString sFirstImage(BMP_MENU_FIRST), sLastImage(BMP_MENU_LAST); +xPageMenu->insert(0, "first", SdResId(RID_SVXSTR_MENU_FIRST), &sFirstImage, nullptr, nullptr, TRISTATE_INDET); +xPageMenu->insert(1, "last", SdResId(RID_SVXSTR_MENU_LAST), &sLast
[Libreoffice-commits] core.git: sd/inc sd/source sfx2/source
sd/inc/sdmod.hxx |4 +++- sd/source/ui/app/sdmod1.cxx | 12 +--- sfx2/source/view/frmload.cxx |3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) New commits: commit d4892e5452bff155da6c34063ffe8c331284d8e9 Author: Jan-Marek Glogowski AuthorDate: Wed Oct 21 00:18:03 2020 +0200 Commit: Jan-Marek Glogowski CommitDate: Mon Nov 2 13:14:35 2020 +0100 tdf#126700 handle Impress default documents Impress has a two stage load, eventually because of the optional template manager. Since I don't know, what the 2nd load URL "private:object" is used for otherwise in LO, this just marks the empty and default documents as replaceable in Impress. Regressed-by: 61e1e0413296928d929f99c0f006c6cbbcf4ac40 Change-Id: Ief8d9eeaa65e8fb40400e64c16768d37ca343893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104581 Tested-by: Jenkins Reviewed-by: Michael Weghorn Reviewed-by: Jan-Marek Glogowski diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 9b07b442abdc..42c4ea4e85bc 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -142,7 +142,9 @@ private: SfxFrame* ExecuteNewDocument( SfxRequest const & rReq ); static SfxFrame* CreateEmptyDocument( const css::uno::Reference< css::frame::XFrame >& i_rFrame ); -static SfxFrame* CreateFromTemplate( const OUString& rTemplatePath, const css::uno::Reference< css::frame::XFrame >& i_rFrame ); +static SfxFrame* CreateFromTemplate(const OUString& rTemplatePath, +const css::uno::Reference& i_rFrame, +const bool bReplaceable); bool mbEventListenerAdded; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 4ec1e83b190d..35bf5ebfb5ea 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -411,7 +412,8 @@ IMPL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, voi } -SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Reference< XFrame >& i_rFrame ) +SfxFrame* SdModule::CreateFromTemplate(const OUString& rTemplatePath, const Reference& i_rFrame, + const bool bReplaceable) { SfxFrame* pFrame = nullptr; @@ -430,6 +432,8 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Ref } else if( pDocShell ) { +if (pDocShell->GetMedium() && pDocShell->GetMedium()->GetItemSet()) + pDocShell->GetMedium()->GetItemSet()->Put(SfxBoolItem(SID_REPLACEABLE, bReplaceable)); SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pDocShell, i_rFrame ); OSL_ENSURE( pViewFrame, "SdModule::CreateFromTemplate: no view frame - was the document really loaded?" ); pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr; @@ -464,7 +468,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq ) if( !aStandardTemplate.isEmpty() ) { //load a template document -pFrame = CreateFromTemplate( aStandardTemplate, xTargetFrame ); +pFrame = CreateFromTemplate(aStandardTemplate, xTargetFrame, true); } else { @@ -485,7 +489,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq ) //pFrame is loaded with the desired template if (!aTemplDlg.getTemplatePath().isEmpty()) -pFrame = CreateFromTemplate(aTemplDlg.getTemplatePath(), xTargetFrame); +pFrame = CreateFromTemplate(aTemplDlg.getTemplatePath(), xTargetFrame, false); } } @@ -506,6 +510,8 @@ SfxFrame* SdModule::CreateEmptyDocument( const Reference< XFrame >& i_rFrame ) pDoc->CreateFirstPages(); pDoc->StopWorkStartupDelay(); } +if (pNewDocSh->GetMedium() && pNewDocSh->GetMedium()->GetItemSet()) +pNewDocSh->GetMedium()->GetItemSet()->Put(SfxBoolItem(SID_REPLACEABLE, true)); SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pNewDocSh, i_rFrame ); OSL_ENSURE( pViewFrame, "SdModule::CreateEmptyDocument: no view frame - was the document really loaded?" ); diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index f69706de1b04..bb9c3218da21 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -612,7 +612,8 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA const bool bIsFactoryURL = sURL.startsWith( "private:factory/" ); bool bInitNewModel = bIsFactoryURL; const bool bIsDefault = bIsFactoryURL && !bExternalModel; -aDescriptor.put("Replaceable", bIsDefault); +if (!aDescriptor.has("Replaceable")) +aDescriptor.put("Replaceable", bIsDefault); if
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Annotation.hxx | 75 +- sd/source/core/annotations/Annotation.cxx | 74 - 2 files changed, 76 insertions(+), 73 deletions(-) New commits: commit 73576d93ebec33a97d8a13bfd8d1f374438b414b Author: Tomaž Vajngerl AuthorDate: Sat Oct 3 13:25:20 2020 +0200 Commit: Caolán McNamara CommitDate: Sun Oct 4 15:06:58 2020 +0200 sd: move Annotation to the header file Change-Id: Ibae50a235dcc80af94be37fce2b35c69586ca111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103893 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx index cd3c011fe8a5..24eb09989aca 100644 --- a/sd/inc/Annotation.hxx +++ b/sd/inc/Annotation.hxx @@ -23,7 +23,15 @@ #include #include -class SdPage; +#include +#include +#include +#include + +#include "drawdoc.hxx" +#include "sdpage.hxx" +#include "textapi.hxx" + class SdrUndoAction; namespace com::sun::star::office { @@ -53,6 +61,71 @@ void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell* pViewSh void LOKCommentNotifyAll(CommentNotificationType nType, css::uno::Reference const & rxAnnotation); + +class Annotation : private ::cppu::BaseMutex, + public ::cppu::WeakComponentImplHelper, + public ::cppu::PropertySetMixin +{ +public: +explicit Annotation( const css::uno::Reference& context, SdPage* pPage ); +Annotation(const Annotation&) = delete; +Annotation& operator=(const Annotation&) = delete; + +static sal_uInt32 m_nLastId; + +SdPage* GetPage() const { return mpPage; } +SdrModel* GetModel() { return (mpPage != nullptr) ? &mpPage->getSdrModelFromSdrPage() : nullptr; } +sal_uInt32 GetId() const { return m_nId; } + +// XInterface: +virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) override; +virtual void SAL_CALL acquire() throw () override { ::cppu::WeakComponentImplHelper::acquire(); } +virtual void SAL_CALL release() throw () override { ::cppu::WeakComponentImplHelper::release(); } + +// css::beans::XPropertySet: +virtual css::uno::Reference SAL_CALL getPropertySetInfo() override; +virtual void SAL_CALL setPropertyValue(const OUString & aPropertyName, const css::uno::Any & aValue) override; +virtual css::uno::Any SAL_CALL getPropertyValue(const OUString & PropertyName) override; +virtual void SAL_CALL addPropertyChangeListener(const OUString & aPropertyName, const css::uno::Reference & xListener) override; +virtual void SAL_CALL removePropertyChangeListener(const OUString & aPropertyName, const css::uno::Reference & aListener) override; +virtual void SAL_CALL addVetoableChangeListener(const OUString & PropertyName, const css::uno::Reference & aListener) override; +virtual void SAL_CALL removeVetoableChangeListener(const OUString & PropertyName, const css::uno::Reference & aListener) override; + +// css::office::XAnnotation: +virtual css::uno::Any SAL_CALL getAnchor() override; +virtual css::geometry::RealPoint2D SAL_CALL getPosition() override; +virtual void SAL_CALL setPosition(const css::geometry::RealPoint2D & the_value) override; +virtual css::geometry::RealSize2D SAL_CALL getSize() override; +virtual void SAL_CALL setSize(const css::geometry::RealSize2D& _size) override; +virtual OUString SAL_CALL getAuthor() override; +virtual void SAL_CALL setAuthor(const OUString & the_value) override; +virtual OUString SAL_CALL getInitials() override; +virtual void SAL_CALL setInitials(const OUString & the_value) override; +virtual css::util::DateTime SAL_CALL getDateTime() override; +virtual void SAL_CALL setDateTime(const css::util::DateTime & the_value) override; +virtual css::uno::Reference SAL_CALL getTextRange() override; + +void createChangeUndo(); + +private: +// destructor is private and will be called indirectly by the release call virtual ~Annotation() {} + +// override WeakComponentImplHelperBase::disposing() +// This function is called upon disposing the component, +// if your component needs special work when it becomes +// disposed, do it here. +virtual void SAL_CALL disposing() override; + +sal_uInt32 m_nId; +SdPage* mpPage; +css::geometry::RealPoint2D m_Position; +css::geometry::RealSize2D m_Size; +OUString m_Author; +OUString m_Initials; +css::util::DateTime m_DateTime; +rtl::Reference m_TextRange; +}; + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx index 6a22623c1da5..d1562581c7bd 100644 --- a/sd/source/core/annotations/Annotation.cxx +++ b/sd/source/core/annotations/Annotation.cxx @@ -19,16 +19,14 @@ #include +#include + #include -#include #include #include #incl
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlsheet.hxx|4 ++-- sd/source/core/stlsheet.cxx| 12 ++-- sd/source/ui/annotations/annotationmanager.cxx | 10 +- sd/source/ui/annotations/annotationmanagerimpl.hxx |4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) New commits: commit 9742be3aff5436d242d78f71e2b6ec416692f337 Author: Andrea Gelmini AuthorDate: Mon Aug 31 16:19:22 2020 +0200 Commit: Julien Nabet CommitDate: Tue Sep 1 09:48:56 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: Id5aa544f169a13b52ebd126a71a7e5b8cc9e4ffa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101803 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 83bce2472c58..42f6a4e4bde4 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -39,7 +39,7 @@ #include "prlayout.hxx" -class ModifyListenerForewarder; +class ModifyListenerForwarder; struct SfxItemPropertySimpleEntry; typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet, @@ -145,7 +145,7 @@ private: /** broadcast helper for events */ ::cppu::OBroadcastHelper mrBHelper; -std::unique_ptr< ModifyListenerForewarder > mpModifyListenerForewarder; +std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder; SdStyleSheet( const SdStyleSheet& ) = delete; SdStyleSheet& operator=( const SdStyleSheet& ) = delete; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 4c4703e188aa..616da711d329 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -106,10 +106,10 @@ static SvxItemPropertySet& GetStylePropertySet() return aPropSet; } -class ModifyListenerForewarder : public SfxListener +class ModifyListenerForwarder : public SfxListener { public: -explicit ModifyListenerForewarder( SdStyleSheet* pStyleSheet ); +explicit ModifyListenerForwarder( SdStyleSheet* pStyleSheet ); virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; @@ -117,7 +117,7 @@ private: SdStyleSheet* mpStyleSheet; }; -ModifyListenerForewarder::ModifyListenerForewarder( SdStyleSheet* pStyleSheet ) +ModifyListenerForwarder::ModifyListenerForwarder( SdStyleSheet* pStyleSheet ) : mpStyleSheet( pStyleSheet ) { if( pStyleSheet ) @@ -127,7 +127,7 @@ ModifyListenerForewarder::ModifyListenerForewarder( SdStyleSheet* pStyleSheet ) } } -void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) +void ModifyListenerForwarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) { if( mpStyleSheet ) mpStyleSheet->notifyModifyListener(); @@ -800,8 +800,8 @@ void SAL_CALL SdStyleSheet::addModifyListener( const Reference< XModifyListener } else { -if (!mpModifyListenerForewarder) -mpModifyListenerForewarder.reset( new ModifyListenerForewarder( this ) ); +if (!mpModifyListenerForwarder) +mpModifyListenerForwarder.reset( new ModifyListenerForwarder( this ) ); mrBHelper.addListener( cppu::UnoType::get(), xListener ); } } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 2f2f668a5f3e..80f6fba904c4 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -746,7 +746,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet) } } -void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) +void AnnotationManagerImpl::SelectNextAnnotation(bool bForward) { ShowAnnotations( true ); @@ -758,7 +758,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) AnnotationVector aAnnotations( pPage->getAnnotations() ); -if( bForeward ) +if( bForward ) { if( xCurrent.is() ) { @@ -804,7 +804,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) { do { -pPage = GetNextPage( pPage, bForeward ); +pPage = GetNextPage( pPage, bForward ); if( pPage && !pPage->getAnnotations().empty() ) { @@ -817,7 +817,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) SfxDispatcher* pDispatcher = getDispatcher( mrBase ); if( pDispatcher ) -pDispatcher->Execute( bForeward ? SID_NEXT_POSTIT : SID_PREVIOUS_POSTIT ); +pDispatcher->Execute( bForward ? SID_NEXT_POSTIT : SID_PREVIOUS_POSTIT ); return; } @@ -828,7 +828,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) // The question text depends on the search direction. bool bImpress = mpDoc->GetDocumentType() == DocumentType::Impress; const char* pStringId; -
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdabstdlg.hxx|2 +- sd/source/ui/dlg/inspagob.cxx |2 +- sd/source/ui/dlg/sddlgfact.cxx |4 ++-- sd/source/ui/dlg/sddlgfact.hxx |2 +- sd/source/ui/func/fuinsfil.cxx |2 +- sd/source/ui/inc/inspagob.hxx |2 +- sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx |2 +- 7 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 3426cc7a4a19cb5d9ea5ba6b12f1eb5a901d5cfe Author: Andrea Gelmini AuthorDate: Mon Aug 31 15:00:15 2020 +0200 Commit: Julien Nabet CommitDate: Tue Sep 1 09:11:21 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: I89200406a2422173a96caa5fd74b66211cced557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101784 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index eebe5695748d..820c3666214b 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -114,7 +114,7 @@ protected: public: virtual std::vector GetList ( const sal_uInt16 nType ) = 0; virtual boolIsLink() = 0; -virtual boolIsRemoveUnnessesaryMasterPages() const = 0; +virtual boolIsRemoveUnnecessaryMasterPages() const = 0; }; class AbstractMorphDlg : public VclAbstractDialog diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index d36adcd5b8ad..5c984dd2329a 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -110,7 +110,7 @@ bool SdInsertPagesObjsDlg::IsLink() const /** * is link checked */ -bool SdInsertPagesObjsDlg::IsRemoveUnnessesaryMasterPages() const +bool SdInsertPagesObjsDlg::IsRemoveUnnecessaryMasterPages() const { return m_xCbxMasters->get_active(); } diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 30b945a82e51..f5ab2524cdb9 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -468,9 +468,9 @@ bool AbstractSdInsertPagesObjsDlg_Impl::IsLink() return m_xDlg->IsLink(); } -bool AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnessesaryMasterPages() const +bool AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnecessaryMasterPages() const { -return m_xDlg->IsRemoveUnnessesaryMasterPages(); +return m_xDlg->IsRemoveUnnecessaryMasterPages(); } BitmapEx AbstractSdInsertPagesObjsDlg_Impl::createScreenshot() const diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 75071a54f07a..52bcf2efb631 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -274,7 +274,7 @@ public: virtual short Execute() override; virtual std::vector GetList ( const sal_uInt16 nType ) override; virtual boolIsLink() override; -virtual boolIsRemoveUnnessesaryMasterPages() const override; +virtual boolIsRemoveUnnecessaryMasterPages() const override; // screenshotting virtual BitmapEx createScreenshot() const override; diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index acb012fdbf1a..abff3b1c7046 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -388,7 +388,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) bOK = mpDoc->InsertBookmarkAsObject( aObjectBookmarkList, aExchangeList, nullptr, nullptr, false ); -if( pDlg->IsRemoveUnnessesaryMasterPages() ) +if( pDlg->IsRemoveUnnecessaryMasterPages() ) mpDoc->RemoveUnnecessaryMasterPages(); } diff --git a/sd/source/ui/inc/inspagob.hxx b/sd/source/ui/inc/inspagob.hxx index daad42cf1e63..0c3ffc76009d 100644 --- a/sd/source/ui/inc/inspagob.hxx +++ b/sd/source/ui/inc/inspagob.hxx @@ -52,7 +52,7 @@ public: std::vector GetList ( const sal_uInt16 nType ) ; boolIsLink() const; -boolIsRemoveUnnessesaryMasterPages() const; +boolIsRemoveUnnecessaryMasterPages() const; }; #endif // INCLUDED_SD_SOURCE_UI_INC_INSPAGOB_HXX diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx index 70e53010e163..9eba6427953d 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx @@ -206,7 +206,7 @@ void CurrentMasterPagesSelector::ExecuteCommand(const OString &rIdent) && mrDocument.GetMasterPageUserCount(pMasterPage) == 0) { // Removing the precious flag so that the following call to -// RemoveUnnessesaryMasterPages() will remove this master page. +// RemoveUnnecessaryMasterPages() will remove this master page. pMasterPage->SetPrecious(false); mrDocument.RemoveUnnecessaryMasterPages(pMasterPage); } ___
[Libreoffice-commits] core.git: sd/inc sd/source svx/source
sd/inc/sdpage.hxx |2 +- sd/source/core/sdpage2.cxx|4 ++-- sd/source/ui/animations/CustomAnimationDialog.cxx |2 +- sd/source/ui/animations/CustomAnimationDialog.hxx |2 +- sd/source/ui/animations/CustomAnimationPane.cxx |2 +- svx/source/engine3d/view3d.cxx| 10 +- svx/source/form/ParseContext.cxx |6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) New commits: commit 3dfbb9d41cf8fad3b41a9528967febcec6ea433b Author: Andrea Gelmini AuthorDate: Mon Aug 31 10:51:34 2020 +0200 Commit: Julien Nabet CommitDate: Mon Aug 31 14:50:49 2020 +0200 Fix typos in code It passed "make check" on Linux Change-Id: I9ba795bf188a9fe11d83516d6895888f880747c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101706 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index c29d2c84ebe2..4c4c3b9ca88a 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -245,7 +245,7 @@ public: voidsetTransitionFadeColor( sal_Int32 nTransitionFadeColor ); double getTransitionDuration() const { return mfTransitionDuration;} -voidsetTransitionDuration( double fTranstionDuration ); +voidsetTransitionDuration( double fTransitionDuration ); virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const ::tools::Rectangle& rOldBoundRect) override; diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index b477b03e1930..2f8f36c2b682 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -520,9 +520,9 @@ void SdPage::setTransitionFadeColor ( sal_Int32 nTransitionFadeColor ) ActionChanged(); } -void SdPage::setTransitionDuration ( double fTranstionDuration ) +void SdPage::setTransitionDuration ( double fTransitionDuration ) { -mfTransitionDuration = fTranstionDuration; +mfTransitionDuration = fTransitionDuration; ActionChanged(); } diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index c9f64e2c8125..ff9f8538b899 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -2032,7 +2032,7 @@ std::unique_ptr CustomAnimationDialog::createDefaultSet() pSet->setPropertyDefaultValue( nHandleCurrentPage, aEmpty ); pSet->setPropertyDefaultValue( nHandleSoundURL, aEmpty ); -pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( 1.0) ); +pSet->setPropertyDefaultValue( nHandleSoundVolume, makeAny( 1.0) ); pSet->setPropertyDefaultValue( nHandleSoundEndAfterSlide, makeAny( sal_Int32(0) ) ); pSet->setPropertyDefaultValue( nHandleCommand, makeAny( sal_Int16(0) ) ); diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx index 64272633505d..ea8ebaed3158 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.hxx +++ b/sd/source/ui/animations/CustomAnimationDialog.hxx @@ -58,7 +58,7 @@ const sal_Int32 nHandleTextReverse = 26; const sal_Int32 nHandleCurrentPage = 27; const sal_Int32 nHandleSoundURL = 28; -const sal_Int32 nHandleSoundVolumne = 29; +const sal_Int32 nHandleSoundVolume = 29; const sal_Int32 nHandleSoundEndAfterSlide = 30; const sal_Int32 nHandleCommand = 31; diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 5e80435051bd..f7bfc28fca55 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1140,7 +1140,7 @@ std::unique_ptr CustomAnimationPane::createSelectionSet() if( pEffect->getAudio().is() ) { aSoundSource = pEffect->getAudio()->getSource(); -addValue( pSet, nHandleSoundVolumne, makeAny( pEffect->getAudio()->getVolume() ) ); +addValue( pSet, nHandleSoundVolume, makeAny( pEffect->getAudio()->getVolume() ) ); // todo addValue( pSet, nHandleSoundEndAfterSlide, makeAny( pEffect->getAudio()->getEndAfterSlide() ) ); // this is now stored at the XCommand parameter sequence } diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 2a03587f1fe2..f572b92d1c0e 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -1573,26 +1573,26 @@ void E3dView::CheckPossibilities() return; const size_t nMarkCnt = GetMarkedObjectCount(); -bool bCoumpound = false; +bool bCompound = false; bool b3DObject = false; -for(size_t nObjs = 0; (nObjs < nMarkCnt) && !bCoumpound; ++nObjs) +for(size_t nObjs = 0; (nObjs < nMarkCnt) && !bCompound; ++nObjs) { SdrObject *pObj = GetMarkedObjectByIndex(nObjs); if(dynamic_cast< const E3dCompoundObject* >(pObj)) -
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|2 +- sd/source/ui/view/Outliner.cxx |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 233b75581456efe2ec93c57678f05ef663f28118 Author: Andrea Gelmini AuthorDate: Fri Aug 28 12:03:43 2020 +0200 Commit: Noel Grandin CommitDate: Sat Aug 29 11:25:53 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: I173e4887af5cbe3c660412d8463a5a82ee2c5724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101591 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 5a65f3aab4be..d49140a6ea3f 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -414,7 +414,7 @@ private: beginning/end of the document and continue with the search/spell check. */ -bool ShowWrapArroundDialog(); +bool ShowWrapAroundDialog(); /** Put text of current text object into outliner so that the text can be searched/spell checked. diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 8ac435249f7a..98fd0bdc87b2 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1347,7 +1347,7 @@ void SdOutliner::EndOfSearch() } // Ask the user whether to wrap around and continue the search or // to terminate. -else if (meMode==TEXT_CONVERSION || ShowWrapArroundDialog ()) +else if (meMode==TEXT_CONVERSION || ShowWrapAroundDialog ()) { mbMatchMayExist = false; // Everything back to beginning (or end?) of the document. @@ -1402,7 +1402,7 @@ void SdOutliner::ShowEndOfSearchDialog() xInfoBox->run(); } -bool SdOutliner::ShowWrapArroundDialog() +bool SdOutliner::ShowWrapAroundDialog() { // Determine whether to show the dialog. if (mpSearchItem) @@ -1691,7 +1691,7 @@ bool SdOutliner::HandleFailedSearch() { // No further matches found. Ask the user whether to wrap // around and start again. -bContinueSearch = ShowWrapArroundDialog(); +bContinueSearch = ShowWrapAroundDialog(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/VectorGraphicSearchContext.hxx | 35 sd/source/ui/inc/View.hxx |6 +++ sd/source/ui/view/Outliner.cxx| 59 ++ 3 files changed, 66 insertions(+), 34 deletions(-) New commits: commit 74e2f2178fd8a0ad29c5dbcefb22a9778a75ae82 Author: Tomaž Vajngerl AuthorDate: Sun Aug 16 12:06:30 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Mon Aug 17 16:49:39 2020 +0200 move vector graphic search to View, so it works in multiple views VectorGraphicSearch was instantiated for the Outline, which is the same for every view. The problem with this is that when we have multiple views, the search would interfere with each other, which is especially distracting in online when multiple users connect to the same document and try searching. This adds VectorGraphicSearchContext class, that is added to the View, which makes the search view dependent and multiple instances of VectorGraphicSearch are created, each one for its own view. Change-Id: Ia0f34647b30b35f4ddb84d33353990d635756905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100837 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sd/inc/VectorGraphicSearchContext.hxx b/sd/inc/VectorGraphicSearchContext.hxx new file mode 100644 index ..e6f978ca273c --- /dev/null +++ b/sd/inc/VectorGraphicSearchContext.hxx @@ -0,0 +1,35 @@ +/* -*- 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/. + * + */ + +#pragma once + +#include + +namespace sd +{ +struct VectorGraphicSearchContext +{ +bool mbCurrentIsVectorGraphic; +std::unique_ptr mpVectorGraphicSearch; + +VectorGraphicSearchContext() +: mbCurrentIsVectorGraphic(false) +{ +} + +void reset() +{ +mbCurrentIsVectorGraphic = false; +mpVectorGraphicSearch.reset(); +} +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 5aba1fb326d9..d7da6fc2df12 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include "smarttag.hxx" @@ -217,6 +218,8 @@ public: void SetAuthor(const OUString& rAuthor) { m_sAuthor = rAuthor; } const OUString& GetAuthor() const { return m_sAuthor; } +VectorGraphicSearchContext& getVectorGraphicSearchContext() { return aVectorGraphicSearchContext; } + protected: DECL_LINK( OnParagraphInsertedHdl, ::Outliner::ParagraphHdlParam, void ); DECL_LINK( OnParagraphRemovingHdl, ::Outliner::ParagraphHdlParam, void ); @@ -250,6 +253,9 @@ protected: private: ::std::unique_ptr mpClipboard; OutlinerMasterViewFilter maMasterViewFilter; + +VectorGraphicSearchContext aVectorGraphicSearchContext; + OUString m_sAuthor; }; diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index b6fc569b9b61..8ac435249f7a 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -61,6 +60,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -99,11 +99,6 @@ public: */ void ReleaseOutlinerView(); -/** Search in vector graphic - */ -bool mbCurrentIsVectorGraphic; -std::unique_ptr mpVectorGraphicSearch; - private: /** Flag that specifies whether we own the outline view pointed to by mpOutlineView and thus have to @@ -729,9 +724,10 @@ void SdOutliner::sendLOKSearchResultCallback(std::shared_ptr & pV std::vector* pSelections) { std::vector<::tools::Rectangle> aLogicRects; -if (mpImpl->mbCurrentIsVectorGraphic) +auto& rVectorGraphicSearchContext = pViewShell->GetView()->getVectorGraphicSearchContext(); +if (rVectorGraphicSearchContext.mbCurrentIsVectorGraphic) { -basegfx::B2DRectangle aSelectionHMM = getPDFSelection(mpImpl->mpVectorGraphicSearch, mpObj); +basegfx::B2DRectangle aSelectionHMM = getPDFSelection(rVectorGraphicSearchContext.mpVectorGraphicSearch, mpObj); tools::Rectangle aSelection(Point(aSelectionHMM.getMinX(), aSelectionHMM.getMinY()), Size(aSelectionHMM.getWidth(), aSelectionHMM.getHeight())); @@ -787,7 +783,7 @@ void SdOutliner::sendLOKSearchResultCallback(std::shared_ptr & pV aPayload = aStream.str().c_str(); rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload.getStr());
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx| 16 +--- sd/source/filter/eppt/epptooxml.hxx |6 ++ sd/source/filter/eppt/pptx-animations.hxx |5 + sd/source/ui/unoidl/sddetect.hxx | 14 +- sd/source/ui/unoidl/unomodule.hxx | 15 +-- 5 files changed, 6 insertions(+), 50 deletions(-) New commits: commit 39aa0d149eb71fabe9307d0aa466624f855d6daf Author: Noel Grandin AuthorDate: Sun Jul 19 18:46:26 2020 +0200 Commit: Noel Grandin CommitDate: Sun Jul 19 19:54:00 2020 +0200 compact namespace: sd Change-Id: I3189239e100f2bf6bef55bb787c850dd2ca5c8fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99004 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 9bcce338fa0e..12d905f732db 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -35,21 +35,7 @@ namespace com::sun::star::xml::dom { class XNode; } namespace com::sun::star::uno { class XInterface; } namespace vcl { class Font; } - -namespace com -{ -namespace sun -{ -namespace star -{ -namespace presentation -{ -class XPresentation2; -} -} -} -} - +namespace com::sun::star::presentation { class XPresentation2; } class SdOutliner; class Timer; class SfxObjectShell; diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index d4f2b618f25d..56b70a0d9d58 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -27,9 +27,7 @@ using ::sax_fastparser::FSHelperPtr; -namespace oox { - -namespace core { +namespace oox::core { struct LayoutInfo { @@ -155,7 +153,7 @@ private: }; } -} + #endif diff --git a/sd/source/filter/eppt/pptx-animations.hxx b/sd/source/filter/eppt/pptx-animations.hxx index 67aeb4fda7e1..7f9cb6f1ca8a 100644 --- a/sd/source/filter/eppt/pptx-animations.hxx +++ b/sd/source/filter/eppt/pptx-animations.hxx @@ -16,15 +16,12 @@ #include "epptooxml.hxx" -namespace oox -{ -namespace core +namespace oox::core { void WriteAnimations(const ::sax_fastparser::FSHelperPtr& pFS, const css::uno::Reference& rXDrawPage, PowerPointExport& rExport); } -} #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/unoidl/sddetect.hxx b/sd/source/ui/unoidl/sddetect.hxx index 612dfd2d0659..7b9da4383334 100644 --- a/sd/source/ui/unoidl/sddetect.hxx +++ b/sd/source/ui/unoidl/sddetect.hxx @@ -27,19 +27,7 @@ #include -namespace com -{ -namespace sun -{ -namespace star -{ -namespace beans -{ -struct PropertyValue; -} -} -} -} +namespace com::sun::star::beans { struct PropertyValue; } class SdFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo > { diff --git a/sd/source/ui/unoidl/unomodule.hxx b/sd/source/ui/unoidl/unomodule.hxx index e68d54c802c5..8f1c1f85a3be 100644 --- a/sd/source/ui/unoidl/unomodule.hxx +++ b/sd/source/ui/unoidl/unomodule.hxx @@ -28,20 +28,7 @@ #include -namespace com -{ -namespace sun -{ -namespace star -{ -namespace beans -{ -struct PropertyValue; -} -} -} -} - +namespace com::sun::star::beans { struct PropertyValue; } namespace com::sun::star::frame { struct DispatchDescriptor; } class SdUnoModule : public ::cppu::WeakImplHelper< css::frame::XDispatchProvider, css::frame::XNotifyingDispatch, css::lang::XServiceInfo > ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strmname.h |8 +- sd/source/core/sdpage.cxx |4 - sd/source/filter/eppt/pptx-epptbase.cxx|2 sd/source/filter/eppt/pptx-epptooxml.cxx |2 sd/source/filter/html/htmlex.cxx | 12 +-- sd/source/filter/xml/sdtransform.cxx |6 - sd/source/ui/animations/motionpathtag.cxx |2 sd/source/ui/annotations/annotationtag.cxx |2 sd/source/ui/controller/displaymodecontroller.cxx |4 - sd/source/ui/controller/slidelayoutcontroller.cxx |8 +- sd/source/ui/dlg/gluectrl.cxx |2 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx | 10 +-- sd/source/ui/framework/factories/BasicPaneFactory.cxx |4 - sd/source/ui/framework/factories/PresentationFactory.cxx |2 sd/source/ui/framework/module/ModuleController.cxx |4 - sd/source/ui/framework/module/SlideSorterModule.cxx|4 - sd/source/ui/framework/module/ToolBarModule.cxx|8 +- sd/source/ui/framework/module/ViewTabBarModule.cxx |6 - sd/source/ui/func/fuoltext.cxx |2 sd/source/ui/func/fusearch.cxx |2 sd/source/ui/func/futext.cxx |2 sd/source/ui/inc/OutlineView.hxx |2 sd/source/ui/inc/ViewShell.hxx |8 +- sd/source/ui/presenter/PresenterTextView.cxx | 18 ++--- sd/source/ui/remotecontrol/BluetoothServiceRecord.hxx |2 sd/source/ui/sidebar/LayoutMenu.cxx|6 - sd/source/ui/sidebar/MasterPagesSelector.cxx |2 sd/source/ui/sidebar/PreviewValueSet.cxx |4 - sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx |2 sd/source/ui/sidebar/SlideBackground.hxx |2 sd/source/ui/slideshow/showwin.cxx |4 - sd/source/ui/slideshow/slideshowimpl.cxx | 10 +-- sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx |2 sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx|4 - sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 32 +- sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx |2 sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx |6 - sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx |2 sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx|8 +- sd/source/ui/slidesorter/view/SlsTheme.cxx |4 - sd/source/ui/table/TableDesignPane.cxx | 16 ++--- sd/source/ui/tools/EventMultiplexer.cxx|6 - sd/source/ui/unoidl/DrawController.cxx |2 sd/source/ui/unoidl/UnoDocumentSettings.cxx|2 sd/source/ui/unoidl/unoobj.cxx | 30 - sd/source/ui/unoidl/unopage.cxx|2 sd/source/ui/view/viewoverlaymanager.cxx |6 - 47 files changed, 140 insertions(+), 140 deletions(-) New commits: commit 72fcc08ea042f660dba802f20714a7fe8e86e1a8 Author: Stephan Bergmann AuthorDate: Wed Jul 1 21:26:45 2020 +0200 Commit: Stephan Bergmann CommitDate: Wed Jul 1 23:44:43 2020 +0200 Upcoming improved loplugin:staticanonymous -> redundantstatic: sd Change-Id: I4a7a3771890e3b7f782954a1bdce9e55db99739c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97656 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sd/inc/strmname.h b/sd/inc/strmname.h index 724bd3987fa3..5af7cdd1fd36 100644 --- a/sd/inc/strmname.h +++ b/sd/inc/strmname.h @@ -23,12 +23,12 @@ #include // PowerPoint-Filter -static const OUString pFilterPowerPoint97( "MS PowerPoint 97" ); -static const OUString pFilterPowerPoint97Template( "MS PowerPoint 97 Vorlage" ); -static const OUString pFilterPowerPoint97AutoPlay( "MS PowerPoint 97 AutoPlay" ); +const OUString pFilterPowerPoint97( "MS PowerPoint 97" ); +const OUString pFilterPowerPoint97Template( "MS PowerPoint 97 Vorlage" ); +const OUString pFilterPowerPoint97AutoPlay( "MS PowerPoint 97 AutoPlay" ); // XML content stream -static const OUString pStarDrawXMLContent( "content.xml" ); +const OUString pStarDrawXMLContent( "content.xml" ); #endif // INCLUDED_SD_INC_STRMNAME_H diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 39b59ca30ed6..899912028ea2 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -888,11 +888,11 @@ void SdPage::CreateTitl
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|7 --- sd/source/ui/view/Outliner.cxx | 20 +--- 2 files changed, 13 insertions(+), 14 deletions(-) New commits: commit 14b55b3a8de070935489acd4f6f8be7b6a3d96a4 Author: Tomaž Vajngerl AuthorDate: Wed May 27 14:13:02 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Jun 2 09:20:05 2020 +0200 sd: move IsValidTextObject into source as anon. function IsValidTextObject is only used internally in Outline, so put it inside the source file as an anonymous function and not as a member function of Outliner. Change-Id: I867dc4f465a694e61b6102b19f8e54ce623e2858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95307 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 79c54c032a03..5a65f3aab4be 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -416,13 +416,6 @@ private: */ bool ShowWrapArroundDialog(); -/** Check whether the object pointed to by the iterator is a valid text -object. -@param aPosition -The object for which to test whether it is a valid text object. -*/ -static bool IsValidTextObject(const ::sd::outliner::IteratorPosition& rPosition); - /** Put text of current text object into outliner so that the text can be searched/spell checked. */ diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 0aebe2838e4c..7ce6cab0b0a7 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1013,6 +1013,18 @@ void SdOutliner::RestoreStartPosition() } } +namespace +{ + +bool lclIsValidTextObject(const sd::outliner::IteratorPosition& rPosition) +{ +auto* pObject = dynamic_cast< SdrTextObj* >( rPosition.mxObject.get() ); +return (pObject != nullptr) && pObject->HasText() && ! pObject->IsEmptyPresObj(); +} + +} // end anonymous namespace + + /** The main purpose of this method is to iterate over all shape objects of the search area (current selection, current view, or whole document) until a text object has been found that contains at least one match or @@ -1058,7 +1070,7 @@ void SdOutliner::ProvideNextTextObject() bool bForbiddenPage = comphelper::LibreOfficeKit::isActive() && (maCurrentPosition.mePageKind != PageKind::Standard || maCurrentPosition.meEditMode != EditMode::Page); // Switch to the current object only if it is a valid text object. -if (!bForbiddenPage && IsValidTextObject(maCurrentPosition)) +if (!bForbiddenPage && lclIsValidTextObject(maCurrentPosition)) { // Don't set yet in case of searching: the text object may not match. if (meMode != SEARCH) @@ -1226,12 +1238,6 @@ bool SdOutliner::ShowWrapArroundDialog() return (nBoxResult == RET_YES); } -bool SdOutliner::IsValidTextObject (const sd::outliner::IteratorPosition& rPosition) -{ -SdrTextObj* pObject = dynamic_cast< SdrTextObj* >( rPosition.mxObject.get() ); -return (pObject != nullptr) && pObject->HasText() && ! pObject->IsEmptyPresObj(); -} - void SdOutliner::PutTextIntoOutliner() { mpSearchSpellTextObj = dynamic_cast( mpObj ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|7 ++- sd/source/ui/view/Outliner.cxx | 11 --- 2 files changed, 6 insertions(+), 12 deletions(-) New commits: commit beacca27ecc1b1463477c644e36a7e5815053433 Author: Tomaž Vajngerl AuthorDate: Sat May 23 16:52:09 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Sat May 23 19:15:21 2020 +0200 sd: move SearchSelection constructor to header file Change-Id: I71d7986044208b6c733c1d46db7bf84bc6254915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94727 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index c95786577b62..3a73b9339f09 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -46,13 +46,18 @@ struct SearchSelection { /// 0-based index of the page that has the selection. int m_nPage; + /** * List of selection rectangles in twips -- multiple rectangles only in * case the selection spans over more layout lines. */ OString m_aRectangles; -SearchSelection(int nPage, const OString& rRectangles); +SearchSelection(int nPage, const OString& rRectangles) +: m_nPage(nPage) +, m_aRectangles(rRectangles) +{ +} bool operator==(const SearchSelection& rOther) const { diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index e67d823e9a11..e7f676f43e4e 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -66,17 +66,6 @@ using namespace ::com::sun::star::linguistic2; class SfxStyleSheetPool; -namespace sd { - -SearchSelection::SearchSelection(int nPage, const OString& rRectangles) -: m_nPage(nPage), -m_aRectangles(rRectangles) -{ -} - -} // end of namespace sd - - class SdOutliner::Implementation { public: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/pres.hxx | 41 - sd/source/core/anminfo.cxx|4 sd/source/core/sdpage.cxx | 383 +++--- sd/source/core/sdpage2.cxx|6 sd/source/core/undo/undoobjects.cxx | 12 sd/source/filter/html/htmlex.cxx | 20 sd/source/filter/ppt/pptin.cxx| 86 +-- sd/source/filter/xml/sdxmlwrp.cxx |4 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |2 sd/source/ui/dlg/PhotoAlbumDialog.cxx |4 sd/source/ui/dlg/headerfooterdlg.cxx | 14 sd/source/ui/dlg/masterlayoutdlg.cxx | 24 sd/source/ui/func/fuexpand.cxx| 10 sd/source/ui/func/fuinsert.cxx|4 sd/source/ui/func/fuinsfil.cxx|2 sd/source/ui/func/fusumry.cxx |6 sd/source/ui/func/futext.cxx | 10 sd/source/ui/inc/DrawViewShell.hxx|2 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx|4 sd/source/ui/table/tablefunction.cxx |4 sd/source/ui/unoidl/unoobj.cxx|2 sd/source/ui/unoidl/unopage.cxx | 85 +-- sd/source/ui/view/DocumentRenderer.cxx|2 sd/source/ui/view/drawview.cxx| 26 sd/source/ui/view/drviews1.cxx|2 sd/source/ui/view/drviews2.cxx|8 sd/source/ui/view/drviews7.cxx|6 sd/source/ui/view/drviewse.cxx|4 sd/source/ui/view/outlnvsh.cxx| 10 sd/source/ui/view/outlview.cxx| 20 sd/source/ui/view/sdview.cxx | 34 - sd/source/ui/view/sdview2.cxx |2 sd/source/ui/view/sdview4.cxx |6 sd/source/ui/view/sdview5.cxx | 14 34 files changed, 433 insertions(+), 430 deletions(-) New commits: commit 10055ff899ed8f9c205155cd15c6de81cba37471 Author: Noel Grandin AuthorDate: Thu Apr 2 21:04:59 2020 +0200 Commit: Noel Grandin CommitDate: Fri Apr 3 10:19:24 2020 +0200 convert PresObjKind to scoped enum Change-Id: I30761f15f46f91435e80296c4f685bc691bb6304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91600 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx index d5b29c3cb04d..6019283af66b 100644 --- a/sd/inc/pres.hxx +++ b/sd/inc/pres.hxx @@ -19,28 +19,27 @@ #ifndef INCLUDED_SD_INC_PRES_HXX #define INCLUDED_SD_INC_PRES_HXX -enum PresObjKind +enum class PresObjKind { -PRESOBJ_NONE = 0, -PRESOBJ_TITLE, -PRESOBJ_OUTLINE, -PRESOBJ_TEXT, -PRESOBJ_GRAPHIC, -PRESOBJ_OBJECT, -PRESOBJ_CHART, -PRESOBJ_ORGCHART, -PRESOBJ_TABLE, -PRESOBJ_PAGE, -PRESOBJ_HANDOUT, -PRESOBJ_NOTES, -PRESOBJ_HEADER, -PRESOBJ_FOOTER, -PRESOBJ_DATETIME, -PRESOBJ_SLIDENUMBER, -PRESOBJ_CALC, -PRESOBJ_MEDIA, - -PRESOBJ_MAX +NONE = 0, +Title, +Outline, +Text, +Graphic, +Object, +Chart, +OrgChart, +Table, +Page, +Handout, +Notes, +Header, +Footer, +DateTime, +SlideNumber, +Calc, +Media, +LAST = Media }; enum class PageKind diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx index d54a318d67d4..5abc0accf39e 100644 --- a/sd/source/core/anminfo.cxx +++ b/sd/source/core/anminfo.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) : SdrObjUserData(SdrInventor::StarDrawUserData, SD_ANIMATIONINFO_ID), - mePresObjKind (PRESOBJ_NONE), + mePresObjKind (PresObjKind::NONE), meEffect (presentation::AnimationEffect_NONE), meTextEffect (presentation::AnimationEffect_NONE), meSpeed (presentation::AnimationSpeed_SLOW), @@ -52,7 +52,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rObject) : SdrObjUserData (rAnmInfo), - mePresObjKind (PRESOBJ_NONE), + mePresObjKind (PresObjKind::NONE), meEffect (rAnmInfo.meEffect), meTextEffect (rAnmInfo.meTextEffect), meSpeed(r
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |6 +++--- sd/source/core/drawdoc.cxx |8 sd/source/filter/xml/sdxmlwrp.cxx |2 +- sd/source/ui/docshell/docshel4.cxx |4 ++-- sd/source/ui/view/sdview3.cxx |2 +- 5 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 8d43860bbdee020080503ed838d92e634ee9092e Author: Noel Grandin AuthorDate: Wed Apr 1 09:51:26 2020 +0200 Commit: Noel Grandin CommitDate: Wed Apr 1 12:54:16 2020 +0200 convert DocCreationMode to scoped enum Change-Id: I42fd704601fe81462f17b3968911fd79c13b50ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91473 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index ab7c46c8614b..28ea7a6107f0 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -99,10 +99,10 @@ struct StyleReplaceData OUStringaNewName; }; -enum DocCreationMode +enum class DocCreationMode { -NEW_DOC, -DOC_LOADED +New, +Loaded }; namespace sd diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index c793ef34df74..02c7b5667d8a 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -618,7 +618,7 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const lcl_copyUserDefinedProperties(GetDocSh(), pNewDocSh); -pNewModel->NewOrLoadCompleted( DOC_LOADED ); // loaded from source document +pNewModel->NewOrLoadCompleted( DocCreationMode::Loaded ); // loaded from source document } else if( mbAllocDocSh ) { @@ -683,7 +683,7 @@ void SdDrawDocument::NbcSetChanged(bool bFlag) // it won't load any more. void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) { -if (eMode == NEW_DOC) +if (eMode == DocCreationMode::New) { // New document: // create slideshow and default templates, @@ -693,7 +693,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) static_cast< SdStyleSheetPool* >( mxStyleSheetPool.get() )->CreatePseudosIfNecessary(); } -else if (eMode == DOC_LOADED) +else if (eMode == DocCreationMode::Loaded) { // Document has finished loading @@ -770,7 +770,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) mpInternalOutliner->SetStyleSheetPool(static_cast(GetStyleSheetPool())); } -if ( eMode == DOC_LOADED ) +if ( eMode == DocCreationMode::Loaded ) { // Make presentation objects listeners of the appropriate styles SdStyleSheetPool* pSPool = static_cast( GetStyleSheetPool() ); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 5dcbc27c4fe3..c866a5ab6680 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -472,7 +472,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) SdDrawDocument* pDoc = mrDocShell.GetDoc(); bool const bWasUndo(pDoc->IsUndoEnabled()); pDoc->EnableUndo(false); -pDoc->NewOrLoadCompleted( NEW_DOC ); +pDoc->NewOrLoadCompleted( DocCreationMode::New ); pDoc->CreateFirstPages(); pDoc->StopWorkStartupDelay(); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 93c1fd4df139..9e90dd020282 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -247,7 +247,7 @@ bool DrawDocShell::InitNew( const css::uno::Reference< css::embed::XStorage >& x if (bRet) { if( !mbSdDataObj ) -mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling +mpDoc->NewOrLoadCompleted(DocCreationMode::New); // otherwise calling // NewOrLoadCompleted(NEW_LOADED) in // SdDrawDocument::AllocModel() } @@ -350,7 +350,7 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) if( mpViewShell ) pWait.reset(new weld::WaitObject(mpViewShell->GetFrameWeld())); -mpDoc->NewOrLoadCompleted( NEW_DOC ); +mpDoc->NewOrLoadCompleted( DocCreationMode::New ); mpDoc->CreateFirstPages(); mpDoc->StopWorkStartupDelay(); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index c74845cc836d..ba876ab75c25 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -1524,7 +1524,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, bool View::PasteRTFTable( const ::tools::SvRef& xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions ) { std::unique_ptr pModel(new SdDrawDocument( DocumentType::Impress, mpDocSh )); -pModel->NewOrLoadCompleted(NEW_DOC); +pModel->NewOrLoadCompleted(DocCreationMode::New); pModel->GetItemPool().SetDefaultMetric(MapUnit::Map100thMM); pModel->InsertPage(pModel->AllocPage(false)); ___ Libreoffice-c
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdenumdef.hxx |3 ++- sd/source/ui/dlg/dlgsnap.cxx |6 +++--- sd/source/ui/func/fusnapln.cxx |6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) New commits: commit e73688139b1d861a19bddbf5c2fd82de97d0c741 Author: Noel Grandin AuthorDate: Wed Apr 1 09:27:39 2020 +0200 Commit: Noel Grandin CommitDate: Wed Apr 1 11:33:51 2020 +0200 convert SnapKind to scoped enum Change-Id: I56a17f582b66212933077a7de62b3dbe7d3c3af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91465 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdenumdef.hxx b/sd/inc/sdenumdef.hxx index cb9f9a8def34..d042c7671f12 100644 --- a/sd/inc/sdenumdef.hxx +++ b/sd/inc/sdenumdef.hxx @@ -21,7 +21,8 @@ #define INCLUDED_SD_INC_SDENUMDEF_HXX #define RET_SNAP_DELETE 111 -enum SnapKind { SK_HORIZONTAL, SK_VERTICAL, SK_POINT }; + +enum class SnapKind { Horizontal, Vertical, Point }; #endif diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index c07fa83552e4..9657608c23bb 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -119,9 +119,9 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs) { SnapKind eKind; -if (m_xRbHorz->get_active()) eKind = SK_HORIZONTAL; -else if (m_xRbVert->get_active()) eKind = SK_VERTICAL; -else eKind = SK_POINT; +if (m_xRbHorz->get_active()) eKind = SnapKind::Horizontal; +else if (m_xRbVert->get_active()) eKind = SnapKind::Vertical; +else eKind = SnapKind::Point; nXValue = sal_Int32(GetCoreValue(*m_xMtrFldX, MapUnit::Map100thMM) * aUIScale); nYValue = sal_Int32(GetCoreValue(*m_xMtrFldY, MapUnit::Map100thMM) * aUIScale); diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index bbad6ce82ef7..dbf08f4fbe01 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -172,9 +172,9 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) switch ( static_cast(static_cast( pArgs->Get(ATTR_SNAPLINE_KIND)).GetValue()) ) { -case SK_HORIZONTAL : eKind = SdrHelpLineKind::Horizontal; break; -case SK_VERTICAL: eKind = SdrHelpLineKind::Vertical; break; -default : eKind = SdrHelpLineKind::Point;break; +case SnapKind::Horizontal : eKind = SdrHelpLineKind::Horizontal; break; +case SnapKind::Vertical: eKind = SdrHelpLineKind::Vertical; break; +default: eKind = SdrHelpLineKind::Point; break; } pPV->InsertHelpLine(SdrHelpLine(eKind, aHlpPos)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdmod.hxx |6 +++--- sd/source/ui/app/sdmod.cxx|2 +- sd/source/ui/dlg/morphdlg.cxx |4 ++-- sd/source/ui/dlg/vectdlg.cxx |4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) New commits: commit f370aa88faf3c0ef7138b87d2bcf89f5eb8541c1 Author: Noel Grandin AuthorDate: Wed Apr 1 09:24:58 2020 +0200 Commit: Noel Grandin CommitDate: Wed Apr 1 11:11:44 2020 +0200 convert SdOptionStreamMode to scoped enum Change-Id: Ib9784c5364e52dde03c0ba2a91cc8fab9d286029 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91464 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index f37b79771f3e..7b12253c07d8 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -49,10 +49,10 @@ namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } } -enum SdOptionStreamMode +enum class SdOptionStreamMode { -SD_OPTION_LOAD = 0, -SD_OPTION_STORE = 1 +Load = 0, +Store = 1 }; typedef std::map< SfxItemPropertyMapEntry const * , css::uno::Reference > SdExtPropertySetInfoCache; diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 077ab4b259bd..27fea87ae28b 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -193,7 +193,7 @@ tools::SvRef SdModule::GetOptionStream( const OUString& rOptio aStmName += rOptionName; -if( SD_OPTION_STORE == eMode || xOptionStorage->IsContained( aStmName ) ) +if( SdOptionStreamMode::Store == eMode || xOptionStorage->IsContained( aStmName ) ) xStm = xOptionStorage->OpenSotStream( aStmName ); } diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index b359b802fb19..c0d7f4e5af20 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -66,7 +66,7 @@ MorphDlg::~MorphDlg() void MorphDlg::LoadSettings() { tools::SvRef xIStm( SD_MOD()->GetOptionStream( SD_OPTION_MORPHING , - SD_OPTION_LOAD ) ); + SdOptionStreamMode::Load ) ); sal_uInt16 nSteps; boolbOrient, bAttrib; @@ -90,7 +90,7 @@ void MorphDlg::LoadSettings() void MorphDlg::SaveSettings() const { tools::SvRef xOStm( SD_MOD()->GetOptionStream( SD_OPTION_MORPHING , - SD_OPTION_STORE ) ); + SdOptionStreamMode::Store ) ); if( xOStm.is() ) { diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 6bc0f8dffa7b..843d593f5e28 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -292,7 +292,7 @@ void SdVectorizeDlg::LoadSettings() { tools::SvRef xIStm( SD_MOD()->GetOptionStream( SD_OPTION_VECTORIZE , - SD_OPTION_LOAD ) ); + SdOptionStreamMode::Load ) ); sal_uInt16 nLayers; sal_uInt16 nReduce; sal_uInt16 nFillHoles; @@ -323,7 +323,7 @@ void SdVectorizeDlg::SaveSettings() const { tools::SvRef xOStm( SD_MOD()->GetOptionStream( SD_OPTION_VECTORIZE , - SD_OPTION_STORE ) ); + SdOptionStreamMode::Store ) ); if( xOStm.is() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdxmlwrp.hxx|8 sd/source/filter/xml/sdxmlwrp.cxx |6 +++--- sd/source/ui/docshell/docshel4.cxx | 12 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) New commits: commit 8fb5ee2a1399383dbfe3baec8c8716788c1fa0e8 Author: Noel Grandin AuthorDate: Wed Apr 1 09:21:10 2020 +0200 Commit: Noel Grandin CommitDate: Wed Apr 1 10:28:58 2020 +0200 convert SdXMLFilterMode to scoped enum Change-Id: I5e5e533c076f3108fed776d00c7ec649e202d9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91463 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdxmlwrp.hxx b/sd/inc/sdxmlwrp.hxx index 84d3862b0c03..0c42447be28f 100644 --- a/sd/inc/sdxmlwrp.hxx +++ b/sd/inc/sdxmlwrp.hxx @@ -26,10 +26,10 @@ class ErrCode; // SdXMLFilter -enum SdXMLFilterMode +enum class SdXMLFilterMode { -SDXMLMODE_Normal, ///< standard load and save of the complete document -SDXMLMODE_Organizer ///< only for import, only the styles are loaded +Normal, ///< standard load and save of the complete document +Organizer ///< only for import, only the styles are loaded }; class SdXMLFilter final : public SdFilter @@ -38,7 +38,7 @@ public: SdXMLFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, -SdXMLFilterMode eFilterMode = SDXMLMODE_Normal, +SdXMLFilterMode eFilterMode = SdXMLFilterMode::Normal, sal_uLong nStoreVer = SOFFICE_FILEFORMAT_8 ); virtual ~SdXMLFilter() override; diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 34bdf10d30bf..5dcbc27c4fe3 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -598,7 +598,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) xInfoSet->setPropertyValue( "StreamRelPath", Any( aName ) ); } -if (SDXMLMODE_Organizer == meFilterMode) +if (SdXMLFilterMode::Organizer == meFilterMode) xInfoSet->setPropertyValue("OrganizerMode", uno::makeAny(true)); if( ERRCODE_NONE == nRet ) @@ -630,7 +630,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) pServices->mpMeta, aEmptyArgs, aName, false ); -if( meFilterMode != SDXMLMODE_Organizer ) +if( meFilterMode != SdXMLFilterMode::Organizer ) { nWarn2 = ReadThroughComponent( xStorage, xModelComp, "settings.xml", nullptr, rxContext, @@ -643,7 +643,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) pServices->mpStyles, aFilterArgs, aName, true ); -if( !nRet && (meFilterMode != SDXMLMODE_Organizer) ) +if( !nRet && (meFilterMode != SdXMLFilterMode::Organizer) ) nRet = ReadThroughComponent( xStorage, xModelComp, "content.xml", "Content.xml", rxContext, pServices->mpContent, diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index b2a7bc8cc18c..93c1fd4df139 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -292,7 +292,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) { comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer(); rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false); -bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError ); +bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError ); } if( bRet ) @@ -356,7 +356,7 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) // TODO/LATER: nobody is interested in the error code?! ErrCode nError = ERRCODE_NONE; -bool bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError ); +bool bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError ); // tell SFX to change viewshell when in preview mode if( IsPreview() ) @@ -470,7 +470,7 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) mpDoc->CreateFirstPages(); mpDoc->StopWorkStartupDelay(); ErrCode nError = ERRCODE_NONE; -bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError ); +bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Normal, SOFFICE_FILEFORMAT_60 ).Import( nError ); } else if (aFilterName == "CGM - Computer Graphics Metafile") { @@ -528,7 +528,7 @@ bool DrawDocShell::Save() bool bRet = SfxObjectShell::Save(); if( bRet ) -bRet = SdXMLFilter( *GetMedium(), *this, SDXMLMODE_Normal, SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export(); +bRet = SdXMLFilter( *GetMedium(), *this, SdXMLFilterMode::Normal, SotStorag
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationEffect.hxx|2 sd/inc/CustomAnimationPreset.hxx|2 sd/inc/Outliner.hxx |4 sd/inc/OutlinerIterator.hxx |2 sd/inc/animations.hxx |2 sd/inc/anminfo.hxx |4 sd/inc/drawdoc.hxx |2 sd/inc/sdfilter.hxx |2 sd/inc/sdiocmpt.hxx |2 sd/inc/sdpage.hxx |2 sd/inc/sdxmlwrp.hxx |4 sd/inc/undo/undoobjects.hxx |2 sd/source/core/CustomAnimationEffect.cxx|2 sd/source/core/EffectMigration.cxx |4 sd/source/core/annotations/Annotation.cxx |4 sd/source/core/stlpool.cxx |2 sd/source/core/stlsheet.cxx |4 sd/source/filter/eppt/eppt.hxx | 10 - sd/source/filter/eppt/epptbase.hxx | 10 - sd/source/filter/eppt/pptexsoundcollection.hxx |2 sd/source/filter/eppt/pptx-epptooxml.cxx|2 sd/source/filter/html/htmlex.hxx|2 sd/source/filter/ppt/pptatom.hxx|2 sd/source/ui/animations/CustomAnimationDialog.cxx | 16 +-- sd/source/ui/animations/CustomAnimationDialog.hxx |2 sd/source/ui/animations/CustomAnimationList.cxx |8 - sd/source/ui/animations/SlideTransitionPane.cxx |2 sd/source/ui/animations/motionpathtag.cxx |8 - sd/source/ui/annotations/annotationtag.hxx |4 sd/source/ui/annotations/annotationwindow.hxx |2 sd/source/ui/controller/displaymodecontroller.cxx |2 sd/source/ui/controller/slidelayoutcontroller.cxx |2 sd/source/ui/dlg/TemplateScanner.cxx|4 sd/source/ui/dlg/headerfooterdlg.cxx|6 - sd/source/ui/framework/factories/ChildWindowPane.hxx|2 sd/source/ui/framework/tools/FrameworkHelper.cxx|6 - sd/source/ui/inc/AccessibleDrawDocumentView.hxx |2 sd/source/ui/inc/AccessibleSlideSorterObject.hxx|2 sd/source/ui/inc/AccessibleViewForwarder.hxx|2 sd/source/ui/inc/Client.hxx |2 sd/source/ui/inc/DrawDocShell.hxx |4 sd/source/ui/inc/EventMultiplexer.hxx |2 sd/source/ui/inc/MasterPageObserver.hxx |2 sd/source/ui/inc/OutlineView.hxx|2 sd/source/ui/inc/RemoteServer.hxx |4 sd/source/ui/inc/SlideTransitionPane.hxx|2 sd/source/ui/inc/TemplateScanner.hxx|4 sd/source/ui/inc/ViewShellHint.hxx |2 sd/source/ui/inc/copydlg.hxx|4 sd/source/ui/inc/dlgsnap.hxx|2 sd/source/ui/inc/framework/Configuration.hxx|2 sd/source/ui/inc/fuinsert.hxx |2 sd/source/ui/inc/inspagob.hxx |2 sd/source/ui/inc/prltempl.hxx |2 sd/source/ui/inc/sdxfer.hxx |2 sd/source/ui/inc/slideshow.hxx |2 sd/source/ui/inc/smarttag.hxx |2 sd/source/ui/inc/tabtempl.hxx | 18 +-- sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx |2 sd/source/ui/inc/undolayer.hxx | 26 ++--- sd/source/ui/inc/undopage.hxx | 52 +- sd/source/ui/inc/unmodpg.hxx|2 sd/source/ui/inc/unoaprms.hxx |2 sd/source/ui/inc/unosrch.hxx|2 sd/source/ui/inc/vectdlg.hxx|4 sd/source/ui/remotecontrol/BufferedStreamSocket.hxx |2 sd/source/ui/remotecontrol/Server.cxx |4 sd/source/ui/remotecontrol/ZeroconfService.hxx |2 sd/sou
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 + sd/source/ui/func/futext.cxx |3 +++ 2 files changed, 4 insertions(+) New commits: commit 5f2cf0cc76316d27c0841fda027b350b83032531 Author: Muhammet Kara AuthorDate: Mon Feb 24 17:03:12 2020 +0300 Commit: Muhammet Kara CommitDate: Sun Mar 1 17:27:36 2020 +0100 lok: Set default text for new text box on mobile Change-Id: I0b6056e9dbf5fb81d092092cc183b05120b95d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89352 Reviewed-by: Jan Holesovsky Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89710 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index e4a1ed418524..26ec246e19b3 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -309,6 +309,7 @@ #define STR_PRESOBJ_TITLE_MOBILE NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" ) #define STR_PRESOBJ_OUTLINE_MOBILE NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" ) #define STR_PRESOBJ_TEXT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" ) +#define STR_PRESOBJ_TEXT_EDIT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Tap to edit text" ) #define STR_PRESOBJ_NOTESTEXT_MOBILE NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" ) #define STR_PRESOBJ_GRAPHIC NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" ) #define STR_PRESOBJ_OBJECT NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" ) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index f26d25504722..a6b7677debae 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -523,6 +524,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) pTxtObj->AdjustTextFrameWidthAndHeight(); aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height())); pTxtObj->SetMergedItemSet(aSet); +if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE)); } else if( nSlotId == SID_ATTR_CHAR_VERTICAL ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc|4 sd/source/core/sdpage.cxx | 42 ++ 2 files changed, 34 insertions(+), 12 deletions(-) New commits: commit e701ab6945e62bb958a435aaef7cb67ca6ffa9ed Author: Jan Holesovsky AuthorDate: Fri Feb 21 18:45:20 2020 +0100 Commit: Andras Timar CommitDate: Fri Feb 28 14:03:45 2020 +0100 android: Hardcode the 'double-tap' in case of the native app. We know we are mobile, so why bother... We could go even further, and do that directly in the comphelper, but that would need more testing I guess. Change-Id: Ia371d42fe0e31b5c6f17313fbf6baad4c256cbe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89236 Tested-by: Michael Meeks Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89695 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 08481d170398..e4a1ed418524 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -290,6 +290,8 @@ #define STR_HANDOUT NC_("STR_HANDOUT", "Handouts" ) #define STR_PRESOBJ_MPTITLE NC_("STR_PRESOBJ_MPTITLE", "Click to edit the title text format" ) #define STR_PRESOBJ_MPOUTLINE NC_("STR_PRESOBJ_MPOUTLINE", "Click to edit the outline text format" ) +#define STR_PRESOBJ_MPTITLE_MOBILE NC_("STR_PRESOBJ_MPTITLE_MOBILE", "Double-tap to edit the title text format" ) +#define STR_PRESOBJ_MPOUTLINE_MOBILE NC_("STR_PRESOBJ_MPOUTLINE_MOBILE", "Double-tap to edit the outline text format" ) #define STR_PRESOBJ_MPOUTLLAYER2 NC_("STR_PRESOBJ_MPOUTLLAYER2", "Second Outline Level" ) #define STR_PRESOBJ_MPOUTLLAYER3 NC_("STR_PRESOBJ_MPOUTLLAYER3", "Third Outline Level" ) #define STR_PRESOBJ_MPOUTLLAYER4 NC_("STR_PRESOBJ_MPOUTLLAYER4", "Fourth Outline Level" ) @@ -298,6 +300,8 @@ #define STR_PRESOBJ_MPOUTLLAYER7 NC_("STR_PRESOBJ_MPOUTLLAYER7", "Seventh Outline Level" ) #define STR_PRESOBJ_MPNOTESTITLE NC_("STR_PRESOBJ_MPNOTESTITLE", "Click to move the slide" ) #define STR_PRESOBJ_MPNOTESTEXT NC_("STR_PRESOBJ_MPNOTESTEXT", "Click to edit the notes format" ) +#define STR_PRESOBJ_MPNOTESTITLE_MOBILE NC_("STR_PRESOBJ_MPNOTESTITLE_MOBILE", "Double-tap to move the slide" ) +#define STR_PRESOBJ_MPNOTESTEXT_MOBILE NC_("STR_PRESOBJ_MPNOTESTEXT_MOBILE", "Double-tap to edit the notes format" ) #define STR_PRESOBJ_TITLE NC_("STR_PRESOBJ_TITLE", "Click to add Title" ) #define STR_PRESOBJ_OUTLINE NC_("STR_PRESOBJ_OUTLINE", "Click to add Text" ) #define STR_PRESOBJ_TEXT NC_("STR_PRESOBJ_TEXT", "Click to add Text" ) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7c280cfc1f7f..31bc4cec27d1 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2600,24 +2600,32 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const { OUString aString; +#if defined(IOS) || defined(ANDROID) +bool isMobile = true; +#else +bool isMobile = comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()); +#endif + if (eObjKind == PRESOBJ_TITLE) { if (mbMaster) { if (mePageKind != PageKind::Notes) { -aString = SdResId( STR_PRESOBJ_MPTITLE ); +if (isMobile) +aString = SdResId(STR_PRESOBJ_MPTITLE_MOBILE); +else +aString = SdResId(STR_PRESOBJ_MPTITLE); } else { -aString = SdResId( STR_PRESOBJ_MPNOTESTITLE ); +if (isMobile) +aString = SdResId(STR_PRESOBJ_MPNOTESTITLE_MOBILE); +else +aString = SdResId(STR_PRESOBJ_MPNOTESTITLE); } } -else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) -#ifdef IOS - || (true) -#endif - ) +else if (isMobile) aString = SdResId(STR_PRESOBJ_TITLE_MOBILE); else aString = SdResId(STR_PRESOBJ_TITLE); @@ -2625,8 +2633,13 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const else if (eObjKind == PRESOBJ_OUTLINE) { if (mbMaster) -aString = SdResId(STR_PRESOBJ_MPOUTLINE); -else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +{ +if (isMobile) +aString = SdResId(STR_PRESOBJ_MPOUTLINE_MOBILE); +else +aString = SdResId(STR_PRESOBJ_MPOUTLINE); +} +else if (isMobile) aString = SdR
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc|4 sd/source/core/sdpage.cxx | 33 + 2 files changed, 21 insertions(+), 16 deletions(-) New commits: commit 74e46a9f2e55a1e918e03efe269abcb93cc1a10d Author: Jan Holesovsky AuthorDate: Wed Jan 29 10:51:49 2020 +0100 Commit: Jan Holesovsky CommitDate: Sat Feb 1 09:25:40 2020 +0100 android lok: Correct the hint in the slides from click to double-tap. Change-Id: I71744dc48f50115c9b4245ac2c81a6431ecbdce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87678 Reviewed-by: Jan Holesovsky Tested-by: Jenkins diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 3d1d90273395..0f188c5b1227 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -304,6 +304,10 @@ #define STR_PRESOBJ_OUTLINE NC_("STR_PRESOBJ_OUTLINE", "Click to add Text" ) #define STR_PRESOBJ_TEXT NC_("STR_PRESOBJ_TEXT", "Click to add Text" ) #define STR_PRESOBJ_NOTESTEXT NC_("STR_PRESOBJ_NOTESTEXT", "Click to add Notes" ) +#define STR_PRESOBJ_TITLE_MOBILE NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" ) +#define STR_PRESOBJ_OUTLINE_MOBILE NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" ) +#define STR_PRESOBJ_TEXT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" ) +#define STR_PRESOBJ_NOTESTEXT_MOBILE NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" ) #define STR_PRESOBJ_GRAPHIC NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" ) #define STR_PRESOBJ_OBJECT NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" ) #define STR_PRESOBJ_CHART NC_("STR_PRESOBJ_CHART", "Double-click to add a Chart" ) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 5ce948618f18..ab91aec1d9d2 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -35,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -2611,36 +2613,35 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const aString = SdResId( STR_PRESOBJ_MPNOTESTITLE ); } } +else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +aString = SdResId(STR_PRESOBJ_TITLE_MOBILE); else -{ -aString = SdResId( STR_PRESOBJ_TITLE ); -} +aString = SdResId(STR_PRESOBJ_TITLE); } else if (eObjKind == PRESOBJ_OUTLINE) { if (mbMaster) -{ -aString = SdResId( STR_PRESOBJ_MPOUTLINE ); -} +aString = SdResId(STR_PRESOBJ_MPOUTLINE); +else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +aString = SdResId(STR_PRESOBJ_OUTLINE_MOBILE); else -{ -aString = SdResId( STR_PRESOBJ_OUTLINE ); -} +aString = SdResId(STR_PRESOBJ_OUTLINE); } else if (eObjKind == PRESOBJ_NOTES) { if (mbMaster) -{ -aString = SdResId( STR_PRESOBJ_MPNOTESTEXT ); -} +aString = SdResId(STR_PRESOBJ_MPNOTESTEXT); +else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +aString = SdResId(STR_PRESOBJ_NOTESTEXT_MOBILE); else -{ -aString = SdResId( STR_PRESOBJ_NOTESTEXT ); -} +aString = SdResId(STR_PRESOBJ_NOTESTEXT); } else if (eObjKind == PRESOBJ_TEXT) { -aString = SdResId( STR_PRESOBJ_TEXT ); +if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +aString = SdResId(STR_PRESOBJ_TEXT_MOBILE); +else +aString = SdResId(STR_PRESOBJ_TEXT); } else if (eObjKind == PRESOBJ_GRAPHIC) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig
sd/inc/strings.hrc |2 sd/source/ui/dlg/animobjs.cxx | 378 ++--- sd/source/ui/inc/animobjs.hxx | 79 +- sd/uiconfig/simpress/ui/dockinganimation.ui | 775 4 files changed, 580 insertions(+), 654 deletions(-) New commits: commit cad2485d924a9f766a8e65379bdcd7a42c0228ee Author: Caolán McNamara AuthorDate: Tue Jan 28 14:29:11 2020 + Commit: Caolán McNamara CommitDate: Tue Jan 28 20:56:33 2020 +0100 weld AnimationWindow Change-Id: I66bcd02a5fc98fff4d2fb0fcd24d702ff894d536 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87638 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 9c645f7a6250..3d1d90273395 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -487,6 +487,8 @@ #define STR_SD_NONE NC_("STR_SD_NONE", "- None -") +#define STR_ANIMATION_DIALOG_TITLE NC_("STR_ANIMATION_DIALOG_TITLE", "Animation") + #define RID_SVXSTR_EDIT_GRAPHIC NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link") #endif diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index f2807c71e570..b3f21c63a75a 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -53,13 +54,9 @@ namespace sd { /** * SdDisplay - Control */ -SdDisplay::SdDisplay(vcl::Window* pWin) -: Control(pWin, 0) -, aScale(1, 1) +SdDisplay::SdDisplay() +: aScale(1, 1) { -SetMapMode(MapMode(MapUnit::MapPixel)); -const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); -SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); } SdDisplay::~SdDisplay() @@ -80,10 +77,18 @@ void SdDisplay::SetBitmapEx( BitmapEx const * pBmpEx ) } } -void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& ) +void SdDisplay::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { +rRenderContext.Push(PushFlags::MAPMODE); + +rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel)); +const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); +rRenderContext.SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); +rRenderContext.Erase(); + Point aPt; -Size aSize = GetOutputSize(); +Size aSize = GetOutputSizePixel(); + Size aBmpSize = aBitmapEx.GetBitmap().GetSizePixel(); aBmpSize.setWidth( static_cast( static_cast(aBmpSize.Width()) * static_cast(aScale) ) ); aBmpSize.setHeight( static_cast( static_cast(aBmpSize.Height()) * static_cast(aScale) ) ); @@ -93,7 +98,9 @@ void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Re if( aBmpSize.Height() < aSize.Height() ) aPt.setY( ( aSize.Height() - aBmpSize.Height() ) / 2 ); -aBitmapEx.Draw( this, aPt, aBmpSize ); +aBitmapEx.Draw(&rRenderContext, aPt, aBmpSize); + +rRenderContext.Pop(); } void SdDisplay::SetScale( const Fraction& rFrac ) @@ -101,23 +108,12 @@ void SdDisplay::SetScale( const Fraction& rFrac ) aScale = rFrac; } -Size SdDisplay::GetOptimalSize() const +void SdDisplay::SetDrawingArea(weld::DrawingArea* pDrawingArea) { -return LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont)); -} - -void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt ) -{ -Control::DataChanged( rDCEvt ); - -if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) -{ -const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); -SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); -SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() -? sd::OUTPUT_DRAWMODE_CONTRAST -: sd::OUTPUT_DRAWMODE_COLOR ); -} +CustomWidgetController::SetDrawingArea(pDrawingArea); +Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont))); +pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); +SetOutputSizePixel(aSize); } const size_t AnimationWindow::EMPTY_FRAMELIST = std::numeric_limits::max(); @@ -127,37 +123,33 @@ const size_t AnimationWindow::EMPTY_FRAMELIST = std::numeric_limits::max */ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent) : SfxDockingWindow(pInBindings, pCW, pParent, -"DockingAnimation", "modules/simpress/ui/dockinganimation.ui") +"DockingAnimation", "modules/simpress/ui/dockinganimation.ui", true) +, m_xCtlDisplay(new SdDisplay) +, m_xCtlDisplayWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlDisplay)) +, m_xBtnFirst(m_xBuilder->weld_button("first")) +, m_xBtnReverse(m_xBuilder->we
[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig sd/UIConfig_simpress.mk
sd/UIConfig_simpress.mk |1 sd/inc/strings.hrc|2 sd/source/ui/controller/displaymodecontroller.cxx | 147 +- sd/uiconfig/simpress/ui/displaywindow.ui | 134 4 files changed, 197 insertions(+), 87 deletions(-) New commits: commit f6154457c704f75d37ed216d7ac2dbda8fa0c5c4 Author: Caolán McNamara AuthorDate: Mon Jan 27 10:57:31 2020 + Commit: Caolán McNamara CommitDate: Mon Jan 27 20:25:31 2020 +0100 weld DisplayModeToolbarMenu Change-Id: I210c608d2493c5b8b1ccf32af39c51b144bb45e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87509 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index 09d97c63..fe0dcce15873 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -115,6 +115,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/customanimationtexttab \ sd/uiconfig/simpress/ui/customslideshows \ sd/uiconfig/simpress/ui/definecustomslideshow \ + sd/uiconfig/simpress/ui/displaywindow \ sd/uiconfig/simpress/ui/dlgfield \ sd/uiconfig/simpress/ui/dockinganimation \ sd/uiconfig/simpress/ui/effectmenu \ diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index fe3e182f2b2f..9c645f7a6250 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -62,8 +62,6 @@ #define STR_AUTOLAYOUT_HANDOUT4 NC_("STR_AUTOLAYOUT_HANDOUT4", "Four Slides") #define STR_AUTOLAYOUT_HANDOUT6 NC_("STR_AUTOLAYOUT_HANDOUT6", "Six Slides") #define STR_AUTOLAYOUT_HANDOUT9 NC_("STR_AUTOLAYOUT_HANDOUT9", "Nine Slides") -#define STR_DISPLAYMODE_EDITMODES NC_("STR_DISPLAYMODE_EDITMODES", "Edit Modes") -#define STR_DISPLAYMODE_MASTERMODES NC_("STR_DISPLAYMODE_MASTERMODES", "Master Modes") #define STR_AUTOLAYOUT_NOTES NC_("STR_AUTOLAYOUT_NOTES", "Notes") #define STR_TRANSFORM NC_("STR_TRANSFORM", "Transform") #define STR_LINEEND NC_("STR_LINEEND", "Line Ends") diff --git a/sd/source/ui/controller/displaymodecontroller.cxx b/sd/source/ui/controller/displaymodecontroller.cxx index 7fc63d053e4d..1513e543fbb9 100644 --- a/sd/source/ui/controller/displaymodecontroller.cxx +++ b/sd/source/ui/controller/displaymodecontroller.cxx @@ -36,6 +36,7 @@ class DisplayModeController : public svt::PopupWindowController public: explicit DisplayModeController( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); +virtual std::unique_ptr weldPopupWindow() override; virtual VclPtr createVclPopupWindow( vcl::Window* pParent ) override; // XInitialization @@ -48,22 +49,25 @@ public: void setToolboxItemImage(const OUString& rImage); }; -class DisplayModeToolbarMenu : public svtools::ToolbarMenu +class DisplayModeToolbarMenu final : public WeldToolbarPopup { public: -DisplayModeToolbarMenu( DisplayModeController& rController, vcl::Window* pParent ); -virtual ~DisplayModeToolbarMenu() override; -virtual void dispose() override; - -protected: -DECL_LINK( SelectToolbarMenuHdl, ToolbarMenu*, void ); -DECL_LINK( SelectValueSetHdl, ValueSet*, void ); -void SelectHdl(void const *); +DisplayModeToolbarMenu(DisplayModeController* pControl, weld::Widget* pParent); +virtual void GrabFocus() override +{ +mxDisplayModeSet1->GrabFocus(); +} private: -DisplayModeController& mrController; -VclPtr mpDisplayModeSet1; -VclPtr mpDisplayModeSet2; +rtl::Reference mxControl; +std::unique_ptr mxFrame1; +std::unique_ptr mxDisplayModeSet1; +std::unique_ptr mxDisplayModeSetWin1; +std::unique_ptr mxFrame2; +std::unique_ptr mxDisplayModeSet2; +std::unique_ptr mxDisplayModeSetWin2; + +DECL_LINK(SelectValueSetHdl, SvtValueSet*, void); }; struct snewfoil_value_info @@ -115,7 +119,7 @@ static const snewfoil_value_info mastermodes[] = }; -static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info* pInfo ) +static void fillLayoutValueSet(SvtValueSet* pValue, const snewfoil_value_info* pInfo) { Size aLayoutItemSize; for( ; pInfo->mnId; pInfo++ ) @@ -130,97 +134,60 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info* pIn } aLayoutItemSize = pValue->CalcItemSizePixel( aLayoutItemSize ); -pValue->SetSizePixel( pValue->CalcWindowSizePixel( aLayoutItemSize ) ); -} +Size aSize(pValue->CalcWindowSizePixel(aLayoutItemSize)); -DisplayModeToolbarMenu::DisplayModeToolbarMenu( DisplayModeController& rController, vcl::Window* pParent ) -: svtools::ToolbarMenu( rController.getFrameInterface(), pParent, WB_CLIPCHILDREN ) -, mrControlle
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/pageformatpanel.hrc | 38 +-- sd/source/ui/sidebar/SlideBackground.cxx | 15 ++-- 2 files changed, 35 insertions(+), 18 deletions(-) New commits: commit b26f29a976838247175576f17fb4a3087e1bb922 Author: Caolán McNamara AuthorDate: Tue Dec 10 17:10:24 2019 + Commit: Caolán McNamara CommitDate: Wed Dec 11 11:27:32 2019 +0100 Related: tdf#129267 format numbers with the UI locale Change-Id: I70d8cc48869073596c101eec6a6d3a79db044a78 Reviewed-on: https://gerrit.libreoffice.org/84883 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc index 732f39e19c53..6d45a7957e87 100644 --- a/sd/inc/pageformatpanel.hrc +++ b/sd/inc/pageformatpanel.hrc @@ -16,27 +16,33 @@ namespace sd { // To translators: this is a listbox labelled by "Margins:", inch units -const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] = +const std::pair RID_PAGEFORMATPANEL_MARGINS_INCH[] = { -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"), -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75″)"), -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1″)"), -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25″)"), -NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"), +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), 0 }, +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), 0 }, +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"), 0 }, +// Normal (0.75") +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 75 }, +// Normal (1") +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 100 }, +// Normal (1.25") +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 125 }, +{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"), 0 } }; // To translators: this is a listbox labelled by "Margins:", cm units -const char* RID_PAGEFORMATPANEL_MARGINS_CM[] = +const std::pair RID_PAGEFORMATPANEL_MARGINS_CM[] = { -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"), -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (1.9 cm)"), -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (2.54 cm)"), -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (3.18 cm)"), -NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"), +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), 0 }, +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), 0 }, +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"), 0 }, +// Normal (1.9 cm) +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 190 }, +// Normal (2.54 cm) +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 254 }, +// Normal (3.18 cm) +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 318 }, +{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"), 0 } }; } diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index c28242b57a61..7a43a4c63161 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -190,15 +191,25 @@ void SlideBackground::SetMarginsFieldUnit() auto nSelected = mpMarginSelectBox->GetSelectedEntryPos(); mpMarginSelectBox->Clear(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); + if (IsInch(meFUnit)) { +OUString sSuffix = weld::MetricSpinButton::MetricToString(FieldUnit::INCH); for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_INCH); ++i) - mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i])); +{ +OUString sMeasurement = rLocaleData.getNum(RID_PAGEFORMATPANEL_MARGINS_INCH[i].second, 2, true, false) + sSuffix; + mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i].first).replaceFirst("%1", sMeasurement)); +} } else { +OUString sSuffix = " " + weld::MetricSpinButton::MetricToString(FieldUnit::CM); for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_CM); ++i) - mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_CM[i])); +{ +OUString sMeasurement = rLocaleData.getNum(RID_PAGEFORMATPANEL_MARGINS_CM[i].second, 2, true, false) + sSuffix; + mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_CM[i].first).replaceFirst("%1", sMeasurement)); +} } mpMarginSelectBox->SelectEntryPos(nSelected); ___ Libreoffice-commits mailing list libreoffice-comm..
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdabstdlg.hxx |2 +- sd/source/ui/inc/drawview.hxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 86f148afbb8b476d22f92632c619f1b94f0b2102 Author: Stephan Bergmann AuthorDate: Thu Dec 5 16:53:29 2019 +0100 Commit: Stephan Bergmann CommitDate: Thu Dec 5 21:01:37 2019 +0100 CppunitTest_sd_dialogs_test still needs some symbols as SD_DLLPUBLIC ...after e189a3f5b5c4f381dcf109eb9a2ee9b6d32d5551 "make some classes module private": > [LNK] CppunitTest/libtest_sd_dialogs_test.so > sd/qa/unit/dialogs-test.cxx:107: error: undefined reference to 'SdAbstractDialogFactory::Create()' > sd/qa/unit/dialogs-test.cxx:160: error: undefined reference to 'typeinfo for sd::DrawView' Change-Id: Ib173d576bfe3c59c31229bb76693d8ec9d57 Reviewed-on: https://gerrit.libreoffice.org/84575 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 3f77b5efd3b5..eebe5695748d 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -169,7 +169,7 @@ protected: class SdAbstractDialogFactory { public: -static SdAbstractDialogFactory* Create(); +SD_DLLPUBLIC static SdAbstractDialogFactory* Create(); virtual VclPtr CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx index 34360c61c772..2d41de1af250 100644 --- a/sd/source/ui/inc/drawview.hxx +++ b/sd/source/ui/inc/drawview.hxx @@ -30,7 +30,7 @@ class DrawViewShell; /** * Derivative of ::sd::View; contains also a pointer to the document */ -class DrawView : public ::sd::View +class SD_DLLPUBLIC DrawView : public ::sd::View { public: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 + sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |6 -- 2 files changed, 5 insertions(+), 2 deletions(-) New commits: commit f943dd99ce7dfab222edaafbc7e5d3711781f89c Author: Muhammet Kara AuthorDate: Wed Oct 30 12:01:11 2019 +0300 Commit: Muhammet Kara CommitDate: Wed Oct 30 15:06:06 2019 +0100 tdf#114175: Set proper title for page rename dialog in Draw Change-Id: I014a4a654b9f6f4f330e61d1436d2a7aceead0c1 Reviewed-on: https://gerrit.libreoffice.org/81738 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 2a08bee0da7f..514275a4de20 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -232,6 +232,7 @@ #define STR_HTMLEXP_ERROR_COPY_FILE NC_("STR_HTMLEXP_ERROR_COPY_FILE", "The file $(URL1) could not be copied to $(URL2)") #define STR_STATUSBAR_MASTERPAGE NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list and double-click for dialog.") #define STR_TITLE_RENAMESLIDE NC_("STR_TITLE_RENAMESLIDE", "Rename Slide") +#define STR_TITLE_RENAMEPAGE NC_("STR_TITLE_RENAMEPAGE", "Rename Page") #define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name") #define STR_TITLE_RENAMEMASTER NC_("STR_TITLE_RENAMEMASTER", "Rename Master Slide") #define STR_PLACEHOLDER_DESCRIPTION_TITLE NC_("STR_PLACEHOLDER_DESCRIPTION_TITLE", "Title Area for AutoLayouts" ) diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index cd43dd1b467f..ba1152da21b6 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -886,6 +886,8 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) OUString aTitle; if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE ) aTitle = SdResId( STR_TITLE_RENAMEMASTER ); +else if (pDrView && pDrView->GetDoc().GetDocumentType() == DocumentType::Draw) +aTitle = SdResId( STR_TITLE_RENAMEPAGE ); else aTitle = SdResId( STR_TITLE_RENAMESLIDE ); @@ -897,7 +899,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) OUString aName = rRequest.GetArgs()->GetItem(SID_RENAMEPAGE)->GetValue(); bool bResult = RenameSlideFromDrawViewShell(pSelectedPage->GetPageNum()/2, aName ); - DBG_ASSERT( bResult, "Couldn't rename slide" ); + DBG_ASSERT( bResult, "Couldn't rename slide or page" ); } else { @@ -921,7 +923,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) bool bResult = RenameSlideFromDrawViewShell( pSelectedPage->GetPageNum()/2, aNewName ); -DBG_ASSERT( bResult, "Couldn't rename slide" ); +DBG_ASSERT( bResult, "Couldn't rename slide or page" ); } } OUString aNewName; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 + sd/source/ui/view/viewshe3.cxx |6 +- 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 3701a8a8197f94551a0080ca7db102c0317b2133 Author: Muhammet Kara AuthorDate: Wed Oct 30 11:47:36 2019 +0300 Commit: Muhammet Kara CommitDate: Wed Oct 30 14:25:10 2019 +0100 tdf#114175: Proper naming for 'Insert Page' undo action in Draw Change-Id: Ia22b4ee8cde95dac936715ef89ca5ef9811ede12 Reviewed-on: https://gerrit.libreoffice.org/81735 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 10717e37f12c..2a08bee0da7f 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -313,6 +313,7 @@ #define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" ) #define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) #define STR_INSERT_PAGES NC_("STR_INSERT_PAGES", "Insert Pages" ) +#define STR_INSERT_PAGE_DRAW NC_("STR_INSERT_PAGE_DRAW", "Insert Page" ) #define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) #define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 4ffa985b0ed5..cad902ed86db 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -278,9 +278,13 @@ SdPage* ViewShell::CreateOrDuplicatePage ( // 2. Create a new page or duplicate an existing one. View* pDrView = GetView(); const bool bUndo = pDrView && pDrView->IsUndoEnabled(); -if( bUndo ) +if( bUndo && GetDoc()->GetDocumentType() == DocumentType::Draw) +pDrView->BegUndo(SdResId(STR_INSERT_PAGE_DRAW)); +else if (bUndo) pDrView->BegUndo(SdResId(STR_INSERTPAGE)); + + sal_uInt16 nNewPageIndex = 0x; switch (nSId) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |2 ++ sd/source/ui/dlg/inspagob.cxx |2 ++ sd/source/ui/docshell/docshel2.cxx |7 ++- 3 files changed, 10 insertions(+), 1 deletion(-) New commits: commit 25506d15222e583ce5d62b016cf598a9aef65d09 Author: Muhammet Kara AuthorDate: Tue Oct 29 01:16:03 2019 +0300 Commit: Muhammet Kara CommitDate: Tue Oct 29 01:14:22 2019 +0100 tdf#108202: Correct Draw page naming in insert pages, and page naming dialogs Change-Id: I2485bc29d6286cc30436fa9ecfb29e724578db41 Reviewed-on: https://gerrit.libreoffice.org/81631 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 26956a1fb751..10717e37f12c 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -74,6 +74,7 @@ #define STR_TITLE_NAMEGROUP NC_("STR_TITLE_NAMEGROUP", "Name Object") #define STR_DESC_NAMEGROUP NC_("STR_DESC_NAMEGROUP", "Name") #define STR_WARN_PAGE_EXISTS NC_("STR_WARN_PAGE_EXISTS", "The slide name already exists or is invalid. Please enter another name.") +#define STR_WARN_PAGE_EXISTS_DRAW NC_("STR_WARN_PAGE_EXISTS_DRAW", "The page name already exists or is invalid. Please enter another name.") #define STR_SNAPDLG_SETLINE NC_("STR_SNAPDLG_SETLINE", "Edit Snap Line") #define STR_SNAPDLG_SETPOINT NC_("STR_SNAPDLG_SETPOINT", "Edit Snap Point") #define STR_POPUP_EDIT_SNAPLINE NC_("STR_POPUP_EDIT_SNAPLINE", "Edit Snap Line...") @@ -311,6 +312,7 @@ #define STR_LAYOUT_DEFAULT_TITLE_NAME NC_("STR_LAYOUT_DEFAULT_TITLE_NAME", "Title" ) #define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" ) #define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) +#define STR_INSERT_PAGES NC_("STR_INSERT_PAGES", "Insert Pages" ) #define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) #define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index bab9494acb3e..37fa11ece19c 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -49,6 +49,8 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg( // insert text if (!m_pMedium) m_xDialog->set_title(SdResId(STR_INSERT_TEXT)); +else if (m_pDoc && m_pDoc->GetDocumentType() == DocumentType::Draw) +m_xDialog->set_title(SdResId(STR_INSERT_PAGES)); Reset(); } diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 92e1024158fd..084c0d313359 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -279,9 +279,14 @@ bool DrawDocShell::CheckPageName(weld::Window* pWin, OUString& rName) if( ! bIsNameValid ) { -OUString aDesc( SdResId( STR_WARN_PAGE_EXISTS ) ); +OUString aDesc; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); +if (GetDocumentType() == DocumentType::Draw) +aDesc = SdResId( STR_WARN_PAGE_EXISTS_DRAW ); +else +aDesc = SdResId( STR_WARN_PAGE_EXISTS ); + ScopedVclPtr aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc)); aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|2 - sd/inc/anminfo.hxx |2 - sd/inc/drawdoc.hxx | 14 sd/inc/sdpage.hxx |2 - sd/inc/textapi.hxx |2 - sd/source/core/PageListWatcher.cxx |2 - sd/source/core/PageListWatcher.hxx |2 - sd/source/core/anminfo.cxx |2 - sd/source/core/drawdoc.cxx |2 - sd/source/core/drawdoc2.cxx|2 - sd/source/core/text/textapi.cxx|6 +-- sd/source/filter/eppt/epptbase.hxx |2 - sd/source/filter/eppt/pptx-animations.cxx | 10 +++--- sd/source/filter/eppt/pptx-text.cxx|2 - sd/source/filter/eppt/text.hxx |2 - sd/source/filter/html/pubdlg.cxx |4 +- sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx |2 - sd/source/ui/animations/CustomAnimationPane.cxx|2 - sd/source/ui/animations/CustomAnimationPane.hxx|2 - sd/source/ui/annotations/annotationwindow.hxx |2 - sd/source/ui/dlg/BulletAndPositionDlg.cxx |6 +-- sd/source/ui/dlg/dlgfield.cxx |2 - sd/source/ui/dlg/filedlg.cxx |2 - sd/source/ui/dlg/inspagob.cxx |2 - sd/source/ui/dlg/navigatr.cxx |2 - sd/source/ui/dlg/sdtreelb.cxx |4 +- sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |2 - sd/source/ui/framework/configuration/ConfigurationUpdater.hxx |2 - sd/source/ui/framework/tools/FrameworkHelper.cxx |2 - sd/source/ui/func/fuconbez.cxx |2 - sd/source/ui/func/fuconrec.cxx |2 - sd/source/ui/func/fudraw.cxx |4 +- sd/source/ui/func/fupage.cxx |2 - sd/source/ui/func/fusel.cxx|2 - sd/source/ui/inc/AccessibleSlideSorterObject.hxx |2 - sd/source/ui/inc/BulletAndPositionDlg.hxx |6 +-- sd/source/ui/inc/DrawViewShell.hxx | 14 sd/source/ui/inc/FrameView.hxx | 16 +- sd/source/ui/inc/OutlineView.hxx |2 - sd/source/ui/inc/SdUnoDrawView.hxx |2 - sd/source/ui/inc/View.hxx |2 - sd/source/ui/inc/ViewShell.hxx |6 +-- sd/source/ui/inc/ViewShellBase.hxx |4 +- sd/source/ui/inc/ViewShellImplementation.hxx |2 - sd/source/ui/inc/ViewTabBar.hxx|2 - sd/source/ui/inc/Window.hxx| 16 +- sd/source/ui/inc/dlgfield.hxx |2 - sd/source/ui/inc/drawview.hxx |2 - sd/source/ui/inc/filedlg.hxx |2 - sd/source/ui/inc/framework/FrameworkHelper.hxx |2 - sd/source/ui/inc/framework/ViewShellWrapper.hxx|2 - sd/source/ui/inc/fuconbez.hxx |2 - sd/source/ui/inc/fudraw.hxx|4 +- sd/source/ui/inc/fupage.hxx|2 - sd/source/ui/inc/fusel.hxx |4 +- sd/source/ui/inc/inspagob.hxx |2 - sd/source/ui/inc/navigatr.hxx |6 +-- sd/source/ui/inc/sdtreelb.hxx |6 +-- sd/source/ui/inc/slideshow.hxx |6 +-- sd/source/ui/inc/unopage.hxx |2 - sd/source/ui/sidebar/LayoutMenu.cxx|2 - sd/source/ui/sidebar/LayoutMenu.hxx|2 - sd/source/ui/slideshow/slideshow.cxx |6 +-- sd/source/ui/slideshow/slideshowimpl.cxx |2 - sd/sou
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/TransitionPreset.hxx |4 ++- sd/source/core/TransitionPreset.cxx | 44 +++- 2 files changed, 22 insertions(+), 26 deletions(-) New commits: commit 3fa4f52ad52a1db53c2336eac8053502b03681e3 Author: Ashod Nakashian AuthorDate: Mon Jan 28 20:39:17 2019 -0500 Commit: Noel Grandin CommitDate: Thu Jul 25 11:24:37 2019 +0200 sd: LOK: support localization of slide transition presets Reviewed-on: https://gerrit.libreoffice.org/68264 Reviewed-by: Andras Timar Tested-by: Andras Timar (cherry picked from commit 312346531dde33cd000a1d3c95c7b7829b656438) Change-Id: Ic3ea57e537e118e10d155203921574967154c234 Reviewed-on: https://gerrit.libreoffice.org/76283 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx index 14518e51b661..c8b266338631 100644 --- a/sd/inc/TransitionPreset.hxx +++ b/sd/inc/TransitionPreset.hxx @@ -42,7 +42,6 @@ class TransitionPreset { public: static const TransitionPresetList& getTransitionPresetList(); -static bool importTransitionPresetList( TransitionPresetList& rList ); sal_Int16 getTransition() const { return mnTransition; } sal_Int16 getSubtype() const { return mnSubtype; } @@ -57,6 +56,9 @@ public: private: TransitionPreset( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); +static bool importTransitionPresetList(TransitionPresetList& rList); +static std::map mPresetsMap; + sal_Int16 mnTransition; sal_Int16 mnSubtype; bool mbDirection; diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 4dc21cd8afcf..a654072132a4 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -27,11 +27,15 @@ #include #include #include +#include +#include +#include #include #include #include #include +#include #include #include @@ -227,34 +231,24 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList ) return bRet; } -namespace -{ -class ImportedTransitionPresetList -{ -private: -sd::TransitionPresetList m_aTransitionPresetList; -public: -ImportedTransitionPresetList() -{ -sd::TransitionPreset::importTransitionPresetList( -m_aTransitionPresetList); -} -const sd::TransitionPresetList& getList() const -{ -return m_aTransitionPresetList; -} -}; - -class theTransitionPresetList : -public rtl::Static -{ -}; -} +std::map sd::TransitionPreset::mPresetsMap; const TransitionPresetList& TransitionPreset::getTransitionPresetList() { -return theTransitionPresetList::get().getList(); +// Support localization per-view. Currently not useful for Desktop +// but very much critical for LOK. The cache now is per-language. +const OUString aLang = comphelper::LibreOfficeKit::isActive() + ? comphelper::LibreOfficeKit::getLanguageTag().getLanguage() + : SvtSysLocaleOptions().GetLanguageTag().getLanguage(); + +SolarMutexGuard aGuard; +const auto it = mPresetsMap.find(aLang); +if (it != mPresetsMap.end()) +return it->second; + +TransitionPresetList& rList = mPresetsMap[aLang]; +sd::TransitionPreset::importTransitionPresetList(rList); +return rList; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationPreset.hxx|6 +++- sd/source/core/CustomAnimationPreset.cxx| 34 ++-- sd/source/ui/animations/CustomAnimationPane.cxx | 20 -- sd/source/ui/animations/CustomAnimationPane.hxx | 12 +--- 4 files changed, 34 insertions(+), 38 deletions(-) New commits: commit 3b55741586883d4fbb7f3e4c5368b5382c3ce5f8 Author: Ashod Nakashian AuthorDate: Mon Jan 28 10:03:39 2019 -0500 Commit: Noel Grandin CommitDate: Wed Jul 24 21:01:51 2019 +0200 sd: LOK: support per-user localization of CustomAnimationPreset This only fixes the caching in CustomAnimationPreset and CustomAnimationPane. Other cached labels will be done separately. Reviewed-on: https://gerrit.libreoffice.org/68263 Reviewed-by: Andras Timar Tested-by: Andras Timar (cherry picked from commit b44679e47211a27f4fe22d05762d9d48c8f88935) Change-Id: Iaf511168d26b3a5567ca53556e242d3c071d2623 Reviewed-on: https://gerrit.libreoffice.org/76241 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx index ac55ad77..57669734014b 100644 --- a/sd/inc/CustomAnimationPreset.hxx +++ b/sd/inc/CustomAnimationPreset.hxx @@ -88,6 +88,9 @@ public: SAL_DLLPRIVATE CustomAnimationPresets(); SAL_DLLPRIVATE ~CustomAnimationPresets(); +/** This method gets presets instance, which is localized + * for the current user's locale. +*/ static const CustomAnimationPresets& getCustomAnimationPresets(); SAL_DLLPRIVATE css::uno::Reference< css::animations::XAnimationNode > getRandomPreset( sal_Int16 nPresetClass ) const; @@ -125,7 +128,8 @@ private: PresetCategoryList maMotionPathsPresets; PresetCategoryList maMiscPresets; -SAL_DLLPRIVATE static CustomAnimationPresets* mpCustomAnimationPresets; +//! Maps per-language the animation presets. +SAL_DLLPRIVATE static std::map mpCustomAnimationPresetsMap; }; diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 1f2066e6af9c..4c02acc25d6c 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -35,6 +35,9 @@ #include #include #include +#include +#include +#include #include #include @@ -521,22 +524,27 @@ void CustomAnimationPresets::changePresetSubType( const CustomAnimationEffectPtr } } -CustomAnimationPresets* CustomAnimationPresets::mpCustomAnimationPresets = nullptr; +std::map CustomAnimationPresets::mpCustomAnimationPresetsMap; const CustomAnimationPresets& CustomAnimationPresets::getCustomAnimationPresets() { -if( !mpCustomAnimationPresets ) -{ -SolarMutexGuard aGuard; - -if( !mpCustomAnimationPresets ) -{ -mpCustomAnimationPresets = new sd::CustomAnimationPresets(); -mpCustomAnimationPresets->importResources(); -} -} - -return *mpCustomAnimationPresets; +// Support localization per-view. Currently not useful for Desktop +// but very much critical for LOK. The cache now is per-language. +const OUString aLang = comphelper::LibreOfficeKit::isActive() + ? comphelper::LibreOfficeKit::getLanguageTag().getLanguage() + : SvtSysLocaleOptions().GetLanguageTag().getLanguage(); + +SolarMutexGuard aGuard; +const auto it = mpCustomAnimationPresetsMap.find(aLang); +if (it != mpCustomAnimationPresetsMap.end()) +return *it->second; + +// Note: we are invoked recursively(!), so we must set the instance pointer +// in the cache map before we importResources, lest we get in infinite loop. +sd::CustomAnimationPresets* pCustomAnimationPresets = new sd::CustomAnimationPresets(); +mpCustomAnimationPresetsMap[aLang] = pCustomAnimationPresets; +pCustomAnimationPresets->importResources(); +return *pCustomAnimationPresets; } Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 nPresetClass ) const diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 6971328837e8..ee1807187fbd 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -124,7 +124,6 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase, const css::uno::Reference& rxFrame ) : PanelLayout( pParent, "CustomAnimationsPanel", "modules/simpress/ui/customanimationspanel.ui", rxFrame ), mrBase( rBase ), -mpCustomAnimationPresets(nullptr), mnPropertyType( nPropertyTypeNone ), mnCurvePathPos( LISTBOX_ENTRY_NOTFOUND ), mnPolygonPathPos( LISTBOX_ENTRY_NOTFOUND ), @@ -532,7 +531,7 @@ void CustomAnimationPane::updateControls() { CustomAnimati
[Libreoffice-commits] core.git: sd/inc sd/source sd/xml
sd/inc/strings.hrc |1 + sd/source/ui/animations/CustomAnimationList.cxx |2 ++ sd/xml/effects.xml |6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) New commits: commit df8629e14f522d9116d81bdc09dad4b438e4e2cf Author: Mark Hung AuthorDate: Sun Feb 24 13:09:28 2019 +0800 Commit: Mark Hung CommitDate: Mon Feb 25 01:30:19 2019 +0100 sd: fix preset class for media call effects. Change-Id: I2a2a72a3a19beb9911fa694e983945480029ae0d Reviewed-on: https://gerrit.libreoffice.org/68276 Tested-by: Jenkins Reviewed-by: Mark Hung diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index c0d6631d5b19..02f709408d72 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -442,6 +442,7 @@ #define STR_CUSTOMANIMATION_EMPHASIS NC_("STR_CUSTOMANIMATION_EMPHASIS", "Emphasis: %1") #define STR_CUSTOMANIMATION_EXIT NC_("STR_CUSTOMANIMATION_EXIT", "Exit: %1") #define STR_CUSTOMANIMATION_MOTION_PATHS NC_("STR_CUSTOMANIMATION_MOTION_PATHS", "Motion Paths: %1") +#define STR_CUSTOMANIMATION_MISC NC_("STR_CUSTOMANIMATION_MISC", "Misc: %1") #define STR_SLIDETRANSITION_NONE NC_("STR_SLIDETRANSITION_NONE", "None") #define STR_ANNOTATION_TODAY NC_("STR_ANNOTATION_TODAY", "Today," ) diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index d3f88d483f1d..a3c210d55013 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -253,6 +253,8 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDes msEffectName = SdResId(STR_CUSTOMANIMATION_EMPHASIS); break; case EffectPresetClass::MOTIONPATH: msEffectName = SdResId(STR_CUSTOMANIMATION_MOTION_PATHS); break; +default: +msEffectName = SdResId(STR_CUSTOMANIMATION_MISC); break; } msEffectName = msEffectName.replaceFirst( "%1" , CustomAnimationPresets::getCustomAnimationPresets().getUINameForPresetId(mpEffect->getPresetId())); } diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml index b7789383ed27..393ad5d50263 100644 --- a/sd/xml/effects.xml +++ b/sd/xml/effects.xml @@ -2641,21 +2641,21 @@ - + - + - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 + sd/source/ui/slideshow/slideshow.cxx |6 ++ 2 files changed, 7 insertions(+) New commits: commit 7373581b52ef3870e463585f53a798acb544d9a7 Author: Sumit Chauhan AuthorDate: Fri Jan 25 17:15:35 2019 +0530 Commit: Mike Kaganski CommitDate: Thu Jan 31 02:17:21 2019 +0100 tdf#98143 ,Providing title for the fullscreen slideshow . The bug is solved by calling SystemWindow::SetText(). Change-Id: If069adaded88e32a23847d519c4177643ac2acfd Reviewed-on: https://gerrit.libreoffice.org/66919 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 16a35da20e35..22f10372f2ab 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -147,6 +147,7 @@ #define STR_EFFECTDLG_DOCUMENT NC_("STR_EFFECTDLG_DOCUMENT", "Document") #define STR_EFFECTDLG_PROGRAM NC_("STR_EFFECTDLG_PROGRAM", "Program") #define STR_EFFECTDLG_MACRO NC_("STR_EFFECTDLG_MACRO", "Macro") +#define STR_FULLSCREEN_SLIDESHOW NC_("STR_FULLSCREEN_SLIDESHOW", "Presenting: %s") // Strings for animation effects #define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", "Insert Text") #define STR_SLIDE_SINGULAR NC_("STR_SLIDE_SINGULAR", " Slide") diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 5bf3202dd0e2..864cc4a8b2bb 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -57,6 +57,8 @@ #include #include #include +#include +#include using ::com::sun::star::presentation::XSlideShowController; using ::sd::framework::FrameworkHelper; @@ -,6 +1113,10 @@ void SlideShow::StartFullscreenPresentation( ) const sal_Int32 nDisplay (GetDisplay()); VclPtr pWorkWindow = VclPtr::Create(this, mpCurrentViewShellBase); pWorkWindow->SetBackground(Wallpaper(COL_BLACK)); +OUString Title(SdResId(STR_FULLSCREEN_SLIDESHOW)); +Title = Title.replaceFirst("%s", + mpCurrentViewShellBase->GetDocShell()->GetTitle(SFX_TITLE_DETECT)); +pWorkWindow->SetText(Title); pWorkWindow->StartPresentationMode( true, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PresentationFlags::HideAllApps : PresentationFlags::NONE, nDisplay); //pWorkWindow->ShowFullScreenMode(sal_False, nDisplay); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig
sd/inc/pageformatpanel.hrc| 41 ++ sd/source/ui/sidebar/SlideBackground.cxx | 21 +++ sd/uiconfig/simpress/ui/sidebarslidebackground.ui |9 3 files changed, 62 insertions(+), 9 deletions(-) New commits: commit cc797cd31e99d47db5b2815a0a86c96204a65e62 Author: Xisco Fauli AuthorDate: Wed Dec 5 18:54:22 2018 +0100 Commit: Xisco Faulí CommitDate: Thu Dec 6 13:19:42 2018 +0100 tdf#121926: Take metrics into account Similar to 6d9a2557a0f0366fff169f3c3581414b3cec80bd Change-Id: Ifecc3f86a3da8fdd4b0535cb67c6315e0d418f5a Reviewed-on: https://gerrit.libreoffice.org/64645 Reviewed-by: Caolán McNamara Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc new file mode 100644 index ..23325e26ac2f --- /dev/null +++ b/sd/inc/pageformatpanel.hrc @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#ifndef INCLUDED_SD_INC_PAGEFORMATPANEL_HRC +#define INCLUDED_SD_INC_PAGEFORMATPANEL_HRC + +#define NC_(Context, String) reinterpret_cast(Context "\004" u8##String) + +// To translators: this is a listbox labelled by "Margins:", inch units +const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] = +{ +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"), +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75\")"), +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1\")"), +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25\")"), +NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"), +}; + +// To translators: this is a listbox labelled by "Margins:", cm units +const char* RID_PAGEFORMATPANEL_MARGINS_CM[] = +{ +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"), +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (1.9cm)"), +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (2.54cm)"), +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (3.18cm)"), +NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"), +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index f3ba7365cbfe..e1958c1927ad 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -29,8 +29,11 @@ #include #include #include +#include +#include #include "PageMarginUtils.hxx" #include +#include #include "DocumentHelper.hxx" #include "MasterPagesSelector.hxx" #include @@ -152,6 +155,24 @@ SlideBackground::SlideBackground( get(mpMasterLabel, "masterlabel"); get(mpMarginSelectBox, "marginLB"); +::sd::DrawDocShell* pDocSh = dynamic_cast<::sd::DrawDocShell*>( SfxObjectShell::Current() ); +SdDrawDocument* pDoc = pDocSh ? pDocSh->GetDoc() : nullptr; +SdOptions* pOptions = SD_MOD()->GetSdOptions(pDoc->GetDocumentType()); +if (pOptions) +{ +FieldUnit eMetric = static_cast(pOptions->GetMetric()); +if (IsInch(eMetric)) +{ +for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_INCH); ++i) + mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i])); +} +else +{ +for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_CM); ++i) + mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_CM[i])); +} +} + maCustomEntry = get("customlabel")->GetText(); addListener(); diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui index aa9183067e8d..256f06935ee4 100644 --- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui +++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui @@ -244,15 +244,6 @@ True False - - None - Narrow - Moderate - Normal 0.75" - Normal 1" - Normal 1.25" - Wide - 1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdfilter.hxx |5 + sd/source/filter/cgm/sdcgmfilter.cxx |7 - sd/source/filter/sdfilter.cxx| 37 -- sd/source/filter/sdpptwrp.cxx| 126 ++- sd/source/ui/app/sddll.cxx |2 5 files changed, 93 insertions(+), 84 deletions(-) New commits: commit 7b34fb18a4d60bfc4e32b7c382ac596cbc2e776f Author: Michael Meeks AuthorDate: Wed Nov 21 19:07:41 2018 + Commit: Michael Meeks CommitDate: Thu Nov 22 10:27:50 2018 +0100 Re-factor internal filter logic, and impl. preload properly. Change-Id: I4c55ceb19d5db2c1e4756901d0d8b14878641a99 Reviewed-on: https://gerrit.libreoffice.org/63761 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx index 17ce09d3647b..fb184ff10626 100644 --- a/sd/inc/sdfilter.hxx +++ b/sd/inc/sdfilter.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SD_INC_SDFILTER_HXX #define INCLUDED_SD_INC_SDFILTER_HXX +#include #include #include #include @@ -42,7 +43,9 @@ public: virtual boolExport() = 0; #ifndef DISABLE_DYNLOADING -static ::osl::Module* OpenLibrary( const OUString& rLibraryName ); +static void Preload(); +/// Open library @rLibraryName and lookup symbol @rFnSymbol +static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol ); #endif protected: diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx index 73e4cc9392d2..c8841c42fdb5 100644 --- a/sd/source/filter/cgm/sdcgmfilter.cxx +++ b/sd/source/filter/cgm/sdcgmfilter.cxx @@ -61,17 +61,14 @@ namespace class CGMPointer { ImportCGMPointer m_pPointer; -#ifndef DISABLE_DYNLOADING -std::unique_ptr m_xLibrary; -#endif public: CGMPointer() { #ifdef DISABLE_DYNLOADING m_pPointer = ImportCGM; #else -m_xLibrary.reset(SdFilter::OpenLibrary("icg")); -m_pPointer = m_xLibrary ? reinterpret_cast(m_xLibrary->getFunctionSymbol("ImportCGM")) : nullptr; +m_pPointer = reinterpret_cast( +SdFilter::GetLibrarySymbol("icg", "ImportCGM")); #endif } ImportCGMPointer get() { return m_pPointer; } diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index b822baa21c5c..fbffe2cf5ed9 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -58,14 +58,41 @@ OUString SdFilter::ImplGetFullLibraryName( const OUString& rLibraryName ) } #ifndef DISABLE_DYNLOADING + +typedef std::map> SdModuleMap; +static SdModuleMap g_SdModuleMap; + extern "C" { static void thisModule() {} } -::osl::Module* SdFilter::OpenLibrary( const OUString& rLibraryName ) +oslGenericFunction SdFilter::GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol ) +{ +osl::Module *pMod = nullptr; +auto it = g_SdModuleMap.find(rLibraryName); +if (it != g_SdModuleMap.end()) +pMod = it->second.get(); + +if (!pMod) +{ +pMod = new osl::Module; +if (pMod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName), + SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY)) +g_SdModuleMap[rLibraryName] = std::unique_ptr(pMod); +else +{ +delete pMod; +pMod = nullptr; +} +} +if (!pMod) +return nullptr; +else +return pMod->getFunctionSymbol(rFnSymbol); +} + +void SdFilter::Preload() { -std::unique_ptr< osl::Module > mod(new osl::Module); -return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName), - SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY) -? mod.release() : nullptr; +(void)GetLibrarySymbol("sdfilt", "ImportPPT"); +(void)GetLibrarySymbol("icg", "ImportCGM"); } #endif diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index df3f4da8d010..0eaf9934a22b 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -74,7 +74,7 @@ SdPPTFilter::~SdPPTFilter() bool SdPPTFilter::Import() { -boolbRet = false; +bool bRet = false; tools::SvRef pStorage = new SotStorage( mrMedium.GetInStream(), false ); if( !pStorage->GetError() ) { @@ -97,24 +97,18 @@ bool SdPPTFilter::Import() mrMedium.SetError(ERRCODE_SVX_READ_FILTER_PPOINT); else { -#ifndef DISABLE_DYNLOADING -::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); -if ( pLibrary ) -{ -ImportPPTPointer PPTImport = reinterpret_cast< ImportPPTPointer >( pLibrary->getFunctionSymbol( "ImportPPT" ) ); -if ( PPTImport ) -bRet = PPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium ); - -
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationEffect.hxx|1 sd/source/core/CustomAnimationEffect.cxx| 14 + sd/source/ui/animations/CustomAnimationList.cxx | 212 +++- sd/source/ui/animations/CustomAnimationList.hxx | 16 + sd/source/ui/animations/CustomAnimationPane.cxx | 33 +++ sd/source/ui/animations/CustomAnimationPane.hxx |1 6 files changed, 269 insertions(+), 8 deletions(-) New commits: commit 759ee18f4cbadd1f4fbdccbc599c04a183066788 Author: Brian Fraser AuthorDate: Thu Oct 25 00:37:09 2018 -0700 Commit: Thorsten Behrens CommitDate: Fri Nov 16 01:37:31 2018 +0100 tdf#37483 Add drag'n'drop to reorder custom Impress animations - Support drag'n'drop of single items. If the animation is collapsed, it will move its collapsed sub-animations as well. - Sub-lists remain expanded when its parent animation is moved, or a sub animation becomes the new parent of the text group (due to moving). - Maintain the cursor between custom animation list redraws. - Don't change selection on collapse after custom animation list rebuild. Change-Id: I92d96e9a01c6884ef739612e456cc541218b6ebb Reviewed-on: https://gerrit.libreoffice.org/62342 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx index b70bbdd07f91..0319e9ea8669 100644 --- a/sd/inc/CustomAnimationEffect.hxx +++ b/sd/inc/CustomAnimationEffect.hxx @@ -277,6 +277,7 @@ public: SAL_DLLPRIVATE void replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pDescriptor, double fDuration ); SAL_DLLPRIVATE void replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pDescriptor, const OUString& rPresetSubType, double fDuration ); SAL_DLLPRIVATE void remove( const CustomAnimationEffectPtr& pEffect ); +SAL_DLLPRIVATE void moveToBeforeEffect( const CustomAnimationEffectPtr& pEffect, const CustomAnimationEffectPtr& pInsertBefore); SAL_DLLPRIVATE void create( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); SAL_DLLPRIVATE void createEffectsequence( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index d695ef8c2dcc..230f2811db8c 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1790,6 +1790,20 @@ void EffectSequenceHelper::remove( const CustomAnimationEffectPtr& pEffect ) rebuild(); } +void EffectSequenceHelper::moveToBeforeEffect( const CustomAnimationEffectPtr& pEffect, const CustomAnimationEffectPtr& pInsertBefore) +{ +if ( pEffect.get() ) +{ +maEffects.remove( pEffect ); +EffectSequence::iterator aInsertIter( find( pInsertBefore ) ); + +// aInsertIter being end() is OK: pInsertBefore could be null, so put at end. +maEffects.insert( aInsertIter, pEffect ); + +rebuild(); +} +} + void EffectSequenceHelper::rebuild() { implRebuild(); diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 909ea4d21bdf..0bc6f9f119be 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -440,11 +440,180 @@ CustomAnimationList::CustomAnimationList( vcl::Window* pParent ) , mpController(nullptr) , mnLastGroupId(0) , mpLastParentEntry(nullptr) +, mpDndEffectDragging(nullptr) +, mpDndEffectInsertBefore(nullptr) { EnableContextMenuHandling(); SetSelectionMode( SelectionMode::Multiple ); SetOptimalImageIndent(); SetNodeDefaultImages(); + +SetDragDropMode(DragDropMode::CTRL_MOVE); +} + +// D'n'D #1: Prepare selected element for moving. +DragDropMode CustomAnimationList::NotifyStartDrag( TransferDataContainer& /*rData*/, SvTreeListEntry* pEntry ) +{ +mpDndEffectDragging = pEntry; +mpDndEffectInsertBefore = pEntry; + +return DragDropMode::CTRL_MOVE; +} + +// D'n'D #2: Called each time mouse moves during drag +sal_Int8 CustomAnimationList::AcceptDrop( const AcceptDropEvent& rEvt ) +{ +/* +Don't call SvTreeListBox::AcceptDrop because it puts an unnecessary +highlight via ImplShowTargetEmphasis() +*/ + +sal_Int8 ret = DND_ACTION_NONE; +const bool bIsMove = ( DND_ACTION_MOVE == rEvt.mnAction ); + +if( mpDndEffectDragging && !rEvt.mbLeaving && bIsMove ) +{ +SvTreeListEntry* pEntry = GetDropTarget( rEvt.maPosPixel ); + +const bool bNotOverSelf = ( pEntry != mpDndEffectDragging ); +if( pEntry && bNotOverSelf ) +{ +/* +If dragged effect has visible children then we must re-parent the children +first so that they are not dragged with the parent. Re-parenting (only
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/cusshow.hxx|2 + sd/inc/customshowlist.hxx | 34 ++ sd/source/core/cusshow.cxx|6 sd/source/core/drawdoc.cxx| 14 -- sd/source/core/drawdoc3.cxx |1 sd/source/core/drawdoc_animations.cxx |2 - sd/source/filter/ppt/pptin.cxx|6 +--- sd/source/ui/dlg/custsdlg.cxx | 44 ++ sd/source/ui/dlg/sdtreelb.cxx |2 - sd/source/ui/inc/custsdlg.hxx |5 +-- sd/source/ui/unoidl/unocpres.cxx |8 +++--- 11 files changed, 58 insertions(+), 66 deletions(-) New commits: commit b6df5604e2eafbe5857efcf9a5cb6440c47ffd16 Author: Noel Grandin AuthorDate: Tue Oct 30 14:22:23 2018 +0200 Commit: Noel Grandin CommitDate: Fri Nov 2 08:14:10 2018 +0100 loplugin:useuniqueptr in SdCustomShowList Change-Id: I604f4cd616ec6eb31198806456a660e7a1e915ca Reviewed-on: https://gerrit.libreoffice.org/62662 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index 612798bdc473..b8dafdd373aa 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -47,6 +47,8 @@ public: // @@@ copy ctor, but no copy assignment? @@@ SdCustomShow( const SdCustomShow& rShow ); +SdCustomShow& operator=( const SdCustomShow& rShow ) = delete; + /** Provides a direct access to the collection of the SdPage objects. */ PageVec& PagesVector() { return maPages;} /** diff --git a/sd/inc/customshowlist.hxx b/sd/inc/customshowlist.hxx index 1d30473e5050..5c70f8a63522 100644 --- a/sd/inc/customshowlist.hxx +++ b/sd/inc/customshowlist.hxx @@ -20,14 +20,15 @@ #ifndef INCLUDED_SD_INC_CUSTOMSHOWLIST_HXX #define INCLUDED_SD_INC_CUSTOMSHOWLIST_HXX +#include "sddllapi.h" #include class SdCustomShow; -class SdCustomShowList +class SD_DLLPUBLIC SdCustomShowList { private: -std::vector mShows; +std::vector> mShows; sal_uInt16 mnCurPos; public: SdCustomShowList() @@ -35,17 +36,20 @@ public: { } +SdCustomShowList& operator=( SdCustomShowList const & ) = delete; // MSVC2017 workaround +SdCustomShowList( SdCustomShowList const & ) = delete; // MSVC2017 workaround + bool empty() const {return mShows.empty();} size_t size() const {return mShows.size();} -SdCustomShow* &operator[](size_t i) {return mShows[i];} +std::unique_ptr& operator[](size_t i) {return mShows[i];} -std::vector::iterator begin() {return mShows.begin();} +std::vector>::iterator begin() {return mShows.begin();} -void erase(std::vector::iterator it) {mShows.erase(it);} +void erase(std::vector>::iterator it); -void push_back(SdCustomShow* p) {mShows.push_back(p);} +void push_back(std::unique_ptr p) {mShows.push_back(std::move(p));} sal_uInt16 GetCurPos() const { return mnCurPos; } void Seek(sal_uInt16 nNewPos) { mnCurPos = nNewPos; } @@ -55,12 +59,12 @@ public: if( mShows.empty() ) return nullptr; mnCurPos = 0; -return mShows[mnCurPos]; +return mShows[mnCurPos].get(); } SdCustomShow* Next() { ++mnCurPos; -return mnCurPos >= mShows.size() ? nullptr : mShows[mnCurPos]; +return mnCurPos >= mShows.size() ? nullptr : mShows[mnCurPos].get(); } void Last() { @@ -69,15 +73,15 @@ public: } SdCustomShow* GetCurObject() { -return mShows.empty() ? nullptr : mShows[mnCurPos]; +return mShows.empty() ? nullptr : mShows[mnCurPos].get(); } -SdCustomShow* Remove(SdCustomShow* p) +void erase(SdCustomShow* p) { -std::vector::iterator it = std::find(mShows.begin(), mShows.end(), p); -if( it == mShows.end() ) -return nullptr; -mShows.erase(it); -return p; +auto it = std::find_if(mShows.begin(), mShows.end(), +[&] (std::unique_ptr const &i) { return i.get() == p; }); +assert( it != mShows.end() ); +if( it != mShows.end() ) +mShows.erase(it); } }; diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx index 48424999c79c..83b569617354 100644 --- a/sd/source/core/cusshow.cxx +++ b/sd/source/core/cusshow.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -99,4 +100,9 @@ void SdCustomShow::SetName(const OUString& rName) aName = rName; } +void SdCustomShowList::erase(std::vector>::iterator it) +{ +mShows.erase(it); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 3376b022de84..8580d9982b4b 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -380,19 +380,7 @@ SdDrawDocument::~SdDrawDocument() } maFrameViewList.clear(); - -if (mpCustomShowList) -{ -for (sal_uLong j = 0; j
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationEffect.hxx |3 ++- sd/source/core/CustomAnimationEffect.cxx | 18 +- 2 files changed, 11 insertions(+), 10 deletions(-) New commits: commit f3961ea18cf4f80d231f6bc63320af1454d1e7e9 Author: Caolán McNamara AuthorDate: Tue Oct 16 09:20:42 2018 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 16 12:24:07 2018 +0200 tdf#120626 'rewind' doesn't stick when effect duration is changed Change-Id: I1c65168b68bba2928030f89836d2b127655d6066 Reviewed-on: https://gerrit.libreoffice.org/61814 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx index c18d1437e730..b70bbdd07f91 100644 --- a/sd/inc/CustomAnimationEffect.hxx +++ b/sd/inc/CustomAnimationEffect.hxx @@ -81,7 +81,7 @@ public: SAL_DLLPRIVATE css::uno::Any getEnd() const; SAL_DLLPRIVATE voidsetEnd( const css::uno::Any& rEnd ); -SAL_DLLPRIVATE sal_Int16 getFill() const; +SAL_DLLPRIVATE sal_Int16 getFill() const { return mnFill; } SAL_DLLPRIVATE voidsetFill( sal_Int16 nFill ); SAL_DLLPRIVATE double getBegin() const { return mfBegin; } @@ -176,6 +176,7 @@ private: OUStringmaPresetSubType; OUStringmaProperty; sal_Int16 mnPresetClass; +sal_Int16 mnFill; double mfBegin; double mfDuration; // this is the maximum duration of the subeffects double mfAbsoluteDuration; // this is the maximum duration of the subeffects including possible iterations diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index e7890a5780d2..8835e7feabb4 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -129,6 +129,7 @@ private: CustomAnimationEffect::CustomAnimationEffect( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) : mnNodeType(-1), mnPresetClass(-1), +mnFill(AnimationFill::HOLD), mfBegin(-1.0), mfDuration(-1.0), mfAbsoluteDuration(-1.0), @@ -195,6 +196,8 @@ void CustomAnimationEffect::setNode( const css::uno::Reference< css::animations: mfDecelerate = mxNode->getDecelerate(); mbAutoReverse = mxNode->getAutoReverse(); +mnFill = mxNode->getFill(); + // get iteration data Reference< XIterateContainer > xIter( mxNode, UNO_QUERY ); if( xIter.is() ) @@ -819,6 +822,7 @@ void CustomAnimationEffect::replaceNode( const css::uno::Reference< css::animati sal_Int16 nNodeType = mnNodeType; Any aTarget = maTarget; +sal_Int16 nFill = mnFill; double fBegin = mfBegin; double fDuration = mfDuration; double fAcceleration = mfAcceleration; @@ -837,6 +841,7 @@ void CustomAnimationEffect::replaceNode( const css::uno::Reference< css::animati setTargetSubItem( nSubItem ); setDuration( fDuration ); setBegin( fBegin ); +setFill( nFill ); setAcceleration( fAcceleration ); setDecelerate( fDecelerate ); @@ -889,14 +894,6 @@ Any CustomAnimationEffect::getEnd() const } } -sal_Int16 CustomAnimationEffect::getFill() const -{ -if( mxNode.is() ) -return mxNode->getFill(); -else -return 0; -} - void CustomAnimationEffect::setRepeatCount( const Any& rRepeatCount ) { if( mxNode.is() ) @@ -916,8 +913,11 @@ void CustomAnimationEffect::setEnd( const Any& rEnd ) void CustomAnimationEffect::setFill( sal_Int16 nFill ) { -if( mxNode.is() ) +if (mxNode.is()) +{ +mnFill = nFill; mxNode->setFill( nFill ); +} } Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/app.hrc | 19 +- sd/inc/strings.hrc | 18 +- sd/source/core/drawdoc4.cxx | 386 ++-- sd/source/core/stlpool.cxx | 18 +- sd/source/core/stlsheet.cxx | 23 ++ 5 files changed, 291 insertions(+), 173 deletions(-) New commits: commit 99102d4263189d347c7a7d0df8fd782e8c4c8ad5 Author: heiko tietze AuthorDate: Thu Sep 13 19:31:49 2018 +0200 Commit: Heiko Tietze CommitDate: Tue Sep 18 08:51:32 2018 +0200 tdf#94369 - Default set of Impress graphic styles Several drawing styles added Change-Id: I3c0efcdc5c0462844f84f5dbb355cfa800a70898 Reviewed-on: https://gerrit.libreoffice.org/60444 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 40b36b26f41c..391371e35206 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -24,12 +24,19 @@ // Helper IDs for templates #define HID_STANDARD_STYLESHEET_NAME(HID_SD_START + 70) -#define HID_POOLSHEET_TEXT (HID_SD_START + 71) -#define HID_POOLSHEET_TITLE (HID_SD_START + 72) #define HID_POOLSHEET_OBJWITHOUTFILL(HID_SD_START + 73) #define HID_POOLSHEET_OBJNOLINENOFILL (HID_SD_START + 74) -#define HID_POOLSHEET_HEADLINE (HID_SD_START + 75) -#define HID_POOLSHEET_MEASURE (HID_SD_START + 76) +#define HID_POOLSHEET_TEXT (HID_SD_START + 71) +#define HID_POOLSHEET_A4(HID_SD_START + 104) +#define HID_POOLSHEET_A4_TITLE (HID_SD_START + 72) +#define HID_POOLSHEET_A4_HEADLINE (HID_SD_START + 75) +#define HID_POOLSHEET_A4_TEXT (HID_SD_START + 105) +#define HID_POOLSHEET_A0(HID_SD_START + 109) +#define HID_POOLSHEET_A0_TITLE (HID_SD_START + 110) +#define HID_POOLSHEET_A0_HEADLINE (HID_SD_START + 111) +#define HID_POOLSHEET_A0_TEXT (HID_SD_START + 112) +#define HID_POOLSHEET_GRAPHIC (HID_SD_START + 106) +#define HID_POOLSHEET_SHAPES(HID_SD_START + 107) #define HID_POOLSHEET_FILLED(HID_SD_START + 77) #define HID_POOLSHEET_FILLED_BLUE (HID_SD_START + 78) #define HID_POOLSHEET_FILLED_GREEN (HID_SD_START + 79) @@ -40,6 +47,10 @@ #define HID_POOLSHEET_OUTLINE_GREEN (HID_SD_START + 84) #define HID_POOLSHEET_OUTLINE_RED (HID_SD_START + 102) #define HID_POOLSHEET_OUTLINE_YELLOW(HID_SD_START + 103) +#define HID_POOLSHEET_LINES (HID_SD_START + 108) +#define HID_POOLSHEET_MEASURE (HID_SD_START + 76) +#define HID_POOLSHEET_LINES_DASHED (HID_SD_START + 113) //dummy +#define HID_POOLSHEET_LAST (HID_SD_START + 114) //dummy #define HID_PSEUDOSHEET_TITLE (HID_SD_START + 85) #define HID_PSEUDOSHEET_OUTLINE (HID_SD_START + 86) diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index c076da9895a4..986b318f4628 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -313,12 +313,22 @@ #define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" ) #define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) -#define STR_POOLSHEET_MEASURE NC_("STR_POOLSHEET_MEASURE", "Dimension Line" ) -#define STR_POOLSHEET_TEXT NC_("STR_POOLSHEET_TEXT", "Text" ) -#define STR_POOLSHEET_TITLE NC_("STR_POOLSHEET_TITLE", "Title" ) -#define STR_POOLSHEET_HEADLINE NC_("STR_POOLSHEET_HEADLINE", "Heading" ) #define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) #define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) +#define STR_POOLSHEET_TEXT NC_("STR_POOLSHEET_TEXT", "Text" ) +#define STR_POOLSHEET_A4 NC_("STR_POOLSHEET_A4", "A4" ) +#define STR_POOLSHEET_A4_TITLE NC_("STR_POOLSHEET_A4_TITLE", "Title A4" ) +#define STR_POOLSHEET_A4_HEADLINE NC_("STR_POOLSHEET_A4_HEADLINE", "Heading A4" ) +#define STR_POOLSHEET_A4_TEXT NC_("STR_POOLSHEET_A4_TEXT", "Text A4" ) +#define STR_POOLSHEET_A0 NC_("STR_POOLSHEET_A0", "A0" ) +#define STR_POOLSHEET_A0_TITLE NC_("STR_POOLSHEET_A0_TITLE", "Title A0" ) +#define STR_POOLSHEET_A0_HEADLINE NC_("STR_POOLSHEET_A0_HEADLINE", "Heading A0" ) +#define STR_POOLSHEET_A0_TEXT NC_("STR_POOLSHEET_A0_TEXT", "Text A0" ) +#define STR_POOLSHEET_GRAPHIC NC_("STR_POOLSHEET_GRAPHIC", "Graphic" ) +#define STR_POOLSHEET_SHAPES NC_("STR_P
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx|9 - sd/source/ui/view/Outliner.cxx | 27 --- 2 files changed, 16 insertions(+), 20 deletions(-) New commits: commit 50c9ed67d29d6105f3907cb7a2fe3322685af53c Author: Caolán McNamara AuthorDate: Wed Aug 22 16:11:02 2018 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 22 18:29:59 2018 +0200 Resolves: tdf#118799 use spelling/search dialog as message dialog parent when visible Change-Id: Id4d6df2a85aebd6887949f285e1a5ec1046dbf64 Reviewed-on: https://gerrit.libreoffice.org/59456 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index adbf0c31ab1a..0dfe8890ee00 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -519,12 +519,11 @@ private: */ virtual bool SpellNextDocument() override; -/** Show the given message box and make it modal. It is assumed that -the parent of the given dialog is NULL, i.e. the application -window. This function makes sure that the otherwise non-modal -search dialog, if visible, is locked, too. +/** Find the right parent to use for a message. This function makes sure +that the otherwise non-modal search or spell dialogs, if visible, are +locked, too. */ -sal_uInt16 ShowModalMessageBox(weld::MessageDialog& rMessageBox); +VclPtr GetMessageBoxParent(); }; #endif diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 4209c7ae90cf..52d482b1a95f 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1203,11 +1203,11 @@ void SdOutliner::ShowEndOfSearchDialog() else aString = SdResId(STR_END_SPELLING); -// Show the message in an info box that is modal with respect to the -// whole application. -std::unique_ptr xInfoBox(Application::CreateMessageDialog(nullptr, +// Show the message in an info box that is modal with respect to the whole application. +VclPtr xParent(GetMessageBoxParent()); +std::unique_ptr xInfoBox(Application::CreateMessageDialog(xParent ? xParent->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, aString)); -ShowModalMessageBox(*xInfoBox.get()); +xInfoBox->run(); } bool SdOutliner::ShowWrapArroundDialog() @@ -1245,9 +1245,10 @@ bool SdOutliner::ShowWrapArroundDialog() // Pop up question box that asks the user whether to wrap around. // The dialog is made modal with respect to the whole application. -std::unique_ptr xQueryBox(Application::CreateMessageDialog(nullptr, +VclPtr xParent(GetMessageBoxParent()); +std::unique_ptr xQueryBox(Application::CreateMessageDialog(xParent ? xParent->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, SdResId(pStringId))); -sal_uInt16 nBoxResult = ShowModalMessageBox(*xQueryBox.get()); +sal_uInt16 nBoxResult = xQueryBox->run(); return (nBoxResult == RET_YES); } @@ -1683,7 +1684,7 @@ bool SdOutliner::ConvertNextDocument() return !mbEndOfSearch; } -sal_uInt16 SdOutliner::ShowModalMessageBox(weld::MessageDialog& rMessageBox) +VclPtr SdOutliner::GetMessageBoxParent() { // We assume that the parent of the given message box is NULL, i.e. it is // modal with respect to the top application window. However, this @@ -1713,16 +1714,12 @@ sal_uInt16 SdOutliner::ShowModalMessageBox(weld::MessageDialog& rMessageBox) if (pChildWindow != nullptr) pSearchDialog = pChildWindow->GetWindow(); -if (pSearchDialog != nullptr) -pSearchDialog->EnableInput(false); -sal_uInt16 nResult = rMessageBox.run(); +if (pSearchDialog) +return pSearchDialog; -// Unlock the search dialog. -if (pSearchDialog != nullptr) -pSearchDialog->EnableInput(); - -return nResult; +std::shared_ptr pViewShell (mpWeakViewShell.lock()); +return pViewShell->GetActiveWindow(); } //= SdOutliner::Implementation == ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlpool.hxx | 10 +++ sd/inc/stlsheet.hxx | 13 + sd/source/core/drawdoc.cxx |2 - sd/source/core/drawdoc3.cxx | 42 +++- sd/source/core/stlpool.cxx | 26 +-- sd/source/ui/app/sdxfer.cxx |2 - sd/source/ui/func/unmovss.cxx | 23 ++--- sd/source/ui/inc/unmovss.hxx|4 +-- sd/source/ui/sidebar/DocumentHelper.cxx |2 - 9 files changed, 75 insertions(+), 49 deletions(-) New commits: commit 27fb6f228271637070e0e0a69d7df503250d8bde Author: Caolán McNamara AuthorDate: Wed Aug 22 10:08:42 2018 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 22 17:38:28 2018 +0200 Resolves: tdf#119259 reused in-use SdStyleSheet removed by undo since... commit a4cd841541a729d7b8126d27d91fa28e30b01403 Date: Thu Feb 13 16:10:47 2014 +0530 n#757432: Styles (rename &) copy to different decks. While copying slides to different slide decks, styles were not being copied if there is already one with the same name. This patch renames and copies those to keep the formatting intact. if a SdStyleSheet is not freshly created, but reused, it ends up in the rCreatedSheets list, and so when the copy is undone (via SdMoveStyleSheetsUndoAction), the SdStyleSheet is unconditionally remove from the StylePool and so its ref count hits 0 and is removed, even though there are still objects depending on it. the problem becames more common since... bash-4.4$ git show 57db6e24b5ad43d447c30e44a112c74c7e75b46b commit 57db6e24b5ad43d447c30e44a112c74c7e75b46b Date: Tue Aug 15 02:51:07 2017 +0530 Removing old SfxItemSet::getHash usage improves the SfxItemSet comparison. Assuming that its correct to leave SdStyleSheetPool::CopySheets with those reused SdStyleSheets in the list, change things so that a flag is passed around to indicate if the SdStyleSheet should be removed or not by undo Change-Id: I82b5bd93183fd1ff9e67957ccfb5babef81fd36d Reviewed-on: https://gerrit.libreoffice.org/59432 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index cfe639038f9a..f4cf930d26e3 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -70,12 +70,12 @@ public: SD_DLLPUBLIC voidCreateLayoutStyleSheets(const OUString& rLayoutName, bool bCheck = false ); static void CreateLayoutSheetNames(const OUString& rLayoutName, std::vector &aNameList); voidCreateLayoutSheetList(const OUString& rLayoutName, SdStyleSheetVector& rLayoutSheets); -voidCopyLayoutSheets(const OUString& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets ); +voidCopyLayoutSheets(const OUString& rLayoutName, SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets); voidCopyGraphicSheets(SdStyleSheetPool& rSourcePool); voidCopyCellSheets(SdStyleSheetPool& rSourcePool); voidCopyTableStyles(SdStyleSheetPool const & rSourcePool); -voidCopyCellSheets(SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets); -voidRenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets, OUString const &rRenameSuffix); +voidCopyCellSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets); +voidRenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, OUString const &rRenameSuffix); voidCreatePseudosIfNecessary(); voidUpdateStdNames(); @@ -117,8 +117,8 @@ public: private: void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily ); -void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets ); -void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets, const OUString &rRenameSuffix ); +void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets ); +void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets, const OUString &rRenameSuffix ); virtual SfxStyleSheetBase* Create(const OUString& rName, SfxStyleFamily eFamily, SfxStyleSearchBits nMask) override; diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index ae21105070a8..e8e0842e00c7 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -155,6 +155,19 @@ private: typedef std::v
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/textapi.hxx |2 +- sd/source/core/text/textapi.cxx |9 + 2 files changed, 6 insertions(+), 5 deletions(-) New commits: commit 85a90158d69db1926feb3e2af0712502bb77f6ee Author: Noel Grandin AuthorDate: Mon Aug 20 16:57:37 2018 +0200 Commit: Noel Grandin CommitDate: Tue Aug 21 12:11:58 2018 +0200 loplugin:useuniqueptr in TextApiObject Change-Id: I57c6f91ff034f06f947dd8498aa10a2e61a5ff9e Reviewed-on: https://gerrit.libreoffice.org/59366 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx index 00a60d13791d..05cc7ee27e41 100644 --- a/sd/inc/textapi.hxx +++ b/sd/inc/textapi.hxx @@ -48,7 +48,7 @@ public: private: std::unique_ptr mpSource; -TextApiObject( TextAPIEditSource* pEditSource ); +TextApiObject( std::unique_ptr pEditSource ); }; } // namespace sd diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx index ec968c510f6e..9cfc8dfcdb47 100644 --- a/sd/source/core/text/textapi.cxx +++ b/sd/source/core/text/textapi.cxx @@ -32,6 +32,7 @@ #include #include #include +#include using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; @@ -123,9 +124,9 @@ const SvxItemPropertySet* ImplGetSdTextPortionPropertyMap() return &aSdTextPortionPropertyMap; } -TextApiObject::TextApiObject( TextAPIEditSource* pEditSource ) -: SvxUnoText( pEditSource, ImplGetSdTextPortionPropertyMap(), Reference < XText >() ) -, mpSource(pEditSource) +TextApiObject::TextApiObject( std::unique_ptr pEditSource ) +: SvxUnoText( pEditSource.get(), ImplGetSdTextPortionPropertyMap(), Reference < XText >() ) +, mpSource(std::move(pEditSource)) { } @@ -136,7 +137,7 @@ TextApiObject::~TextApiObject() throw() rtl::Reference< TextApiObject > TextApiObject::create( SdDrawDocument* pDoc ) { -rtl::Reference< TextApiObject > xRet( new TextApiObject( new TextAPIEditSource( pDoc ) ) ); +rtl::Reference< TextApiObject > xRet( new TextApiObject( o3tl::make_unique( pDoc ) ) ); return xRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdpage.hxx|3 +++ sd/source/core/sdpage_animations.cxx | 12 sd/source/ui/view/drviews2.cxx |4 3 files changed, 19 insertions(+) New commits: commit 3e768ce8260ed442b02c884c5a6bfac421dbcec9 Author: Mark Hung Date: Mon Jun 18 23:16:12 2018 +0800 tdf#45178 notify object rename and update effect description. Change-Id: Ib63147a9f4dceb35e21bcf0ca5c1afebf5263721 Reviewed-on: https://gerrit.libreoffice.org/56048 Tested-by: Jenkins Reviewed-by: Mark Hung diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 932643014f4a..e8d0d639a01c 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -314,6 +314,9 @@ public: /** removes all custom animations for the given shape */ void removeAnimations( const SdrObject* pObj ); +/** Notify that the object has been renamed and the animation effects has to update. */ +void notifyObjectRenamed(const SdrObject* pObj); + /** Set the name of the page and broadcast a model change. */ void SetName (const OUString& rName); diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx index cdd16e9cb968..c7e35d05dffb 100644 --- a/sd/source/core/sdpage_animations.cxx +++ b/sd/source/core/sdpage_animations.cxx @@ -81,6 +81,18 @@ void SdPage::removeAnimations( const SdrObject* pObj ) } } +/** Notify that the object has been renamed and the animation effect has to update. */ +void SdPage::notifyObjectRenamed(const SdrObject* pObj) +{ +if (pObj && hasAnimationNode()) +{ +Reference xShape(const_cast(pObj)->getUnoShape(), UNO_QUERY); + +if (xShape.is() && getMainSequence()->hasEffect(xShape)) +getMainSequence()->notify_change(); +} +} + bool SdPage::hasAnimationNode() const { return mxAnimationNode.is(); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index c9879eec60ae..c7bd428a3a10 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2506,6 +2506,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { pDlg->GetName(aName); pSelected->SetName(aName); + +SdPage* pPage = GetActualPage(); +if (pPage) +pPage->notifyObjectRenamed(pSelected); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |6 -- sd/source/core/drawdoc4.cxx | 11 --- 2 files changed, 8 insertions(+), 9 deletions(-) New commits: commit 370a30b6acc5b99b6046440f6b5f4f3f5f9f4b1a Author: Noel Grandin Date: Mon Jun 11 15:53:29 2018 +0200 loplugin:useuniqueptr in SdDrawDocument Change-Id: Id67b08d8d8a08d7e19ef8534b7bb9d689a571e06 Reviewed-on: https://gerrit.libreoffice.org/56105 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 625c2289c3b4..e576aa749eaa 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -143,8 +143,10 @@ private: std::unique_ptr mpInternalOutliner; ///< internal outliner for creation of text objects std::unique_ptr mpWorkStartupTimer; -Idle* mpOnlineSpellingIdle; -sd::ShapeList* mpOnlineSpellingList; +std::unique_ptr +mpOnlineSpellingIdle; +std::unique_ptr +mpOnlineSpellingList; std::unique_ptr mpOnlineSearchItem; std::vector> diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 21561130de0a..b938697eba50 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -736,11 +736,8 @@ void SdDrawDocument::StopOnlineSpelling() mpOnlineSpellingIdle->Stop(); } -delete mpOnlineSpellingIdle; -mpOnlineSpellingIdle = nullptr; - -delete mpOnlineSpellingList; -mpOnlineSpellingList = nullptr; +mpOnlineSpellingIdle.reset(); +mpOnlineSpellingList.reset(); } // Start OnlineSpelling in the background @@ -763,7 +760,7 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling) pOutl->SetDefaultLanguage( meLanguage ); -mpOnlineSpellingList = new ShapeList; +mpOnlineSpellingList.reset(new ShapeList); sal_uInt16 nPage; for ( nPage = 0; nPage < GetPageCount(); nPage++ ) @@ -779,7 +776,7 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling) } mpOnlineSpellingList->seekShape(0); -mpOnlineSpellingIdle = new Idle("OnlineSpelling"); +mpOnlineSpellingIdle.reset(new Idle("OnlineSpelling")); mpOnlineSpellingIdle->SetInvokeHandler( LINK(this, SdDrawDocument, OnlineSpellingHdl) ); mpOnlineSpellingIdle->SetPriority(TaskPriority::LOWEST); mpOnlineSpellingIdle->Start(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/textapi.hxx |2 +- sd/source/core/text/textapi.cxx |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit f59d33a5302f20f98b0596c284116d1e30a17bd6 Author: Noel Grandin Date: Mon May 21 16:37:56 2018 +0200 loplugin:useuniqueptr in TextApiObject Change-Id: I418f18a1e090dab2923395963b2a003df58890ae Reviewed-on: https://gerrit.libreoffice.org/54859 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx index df771dc55e50..d81ecf4b4ce2 100644 --- a/sd/inc/textapi.hxx +++ b/sd/inc/textapi.hxx @@ -47,7 +47,7 @@ public: static TextApiObject* getImplementation( const css::uno::Reference< css::text::XText >& ); private: -TextAPIEditSource* mpSource; +std::unique_ptr mpSource; TextApiObject( TextAPIEditSource* pEditSource ); }; diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx index a4bdb23e46bc..69462124ce27 100644 --- a/sd/source/core/text/textapi.cxx +++ b/sd/source/core/text/textapi.cxx @@ -144,8 +144,7 @@ void TextApiObject::dispose() if( mpSource ) { mpSource->Dispose(); -delete mpSource; -mpSource = nullptr; +mpSource.reset(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/app.hrc | 30 ++-- sd/inc/strings.hrc | 27 ++- sd/source/core/drawdoc4.cxx | 327 +++- sd/source/core/stlpool.cxx | 19 +- sd/source/core/stlsheet.cxx | 21 +- 5 files changed, 226 insertions(+), 198 deletions(-) New commits: commit d30867653af6fa59a9221a2430c064a9ea903cc1 Author: heiko tietze Date: Sun May 13 12:16:35 2018 +0200 tdf#117455 - New drawing styles Clean-up of existing styles, some filled styles added Change-Id: If15c3645d273b83c51deb5132acb20bddb89fa4d Reviewed-on: https://gerrit.libreoffice.org/54188 Tested-by: Jenkins Reviewed-by: Regina Henschel Reviewed-by: Heiko Tietze diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 8571af94c10c..eb5940c042db 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -24,20 +24,23 @@ // Helper IDs for templates #define HID_STANDARD_STYLESHEET_NAME(HID_SD_START + 70) -#define HID_POOLSHEET_OBJWITHARROW (HID_SD_START + 71) -#define HID_POOLSHEET_OBJWITHSHADOW (HID_SD_START + 72) +#define HID_POOLSHEET_TEXT (HID_SD_START + 71) +#define HID_POOLSHEET_TITLE (HID_SD_START + 72) #define HID_POOLSHEET_OBJWITHOUTFILL(HID_SD_START + 73) -#define HID_POOLSHEET_TEXT (HID_SD_START + 74) -#define HID_POOLSHEET_TEXTBODY (HID_SD_START + 75) -#define HID_POOLSHEET_TEXTBODY_JUSTIFY (HID_SD_START + 76) -#define HID_POOLSHEET_TEXTBODY_INDENT (HID_SD_START + 77) -#define HID_POOLSHEET_TITLE (HID_SD_START + 78) -#define HID_POOLSHEET_TITLE1(HID_SD_START + 79) -#define HID_POOLSHEET_TITLE2(HID_SD_START + 80) -#define HID_POOLSHEET_HEADLINE (HID_SD_START + 81) -#define HID_POOLSHEET_HEADLINE1 (HID_SD_START + 82) -#define HID_POOLSHEET_HEADLINE2 (HID_SD_START + 83) -#define HID_POOLSHEET_MEASURE (HID_SD_START + 84) +#define HID_POOLSHEET_OBJNOLINENOFILL (HID_SD_START + 74) +#define HID_POOLSHEET_HEADLINE (HID_SD_START + 75) +#define HID_POOLSHEET_MEASURE (HID_SD_START + 76) +#define HID_POOLSHEET_FILLED(HID_SD_START + 77) +#define HID_POOLSHEET_FILLED_BLUE (HID_SD_START + 78) +#define HID_POOLSHEET_FILLED_GREEN (HID_SD_START + 79) +#define HID_POOLSHEET_FILLED_RED(HID_SD_START + 80) +#define HID_POOLSHEET_FILLED_YELLOW (HID_SD_START + 81) +#define HID_POOLSHEET_OUTLINE (HID_SD_START + 82) +#define HID_POOLSHEET_OUTLINE_BLUE (HID_SD_START + 83) +#define HID_POOLSHEET_OUTLINE_GREEN (HID_SD_START + 84) +#define HID_POOLSHEET_OUTLINE_RED (HID_SD_START + 102) +#define HID_POOLSHEET_OUTLINE_YELLOW(HID_SD_START + 103) + #define HID_PSEUDOSHEET_TITLE (HID_SD_START + 85) #define HID_PSEUDOSHEET_OUTLINE (HID_SD_START + 86) #define HID_PSEUDOSHEET_OUTLINE1(HID_SD_START + 87) @@ -53,7 +56,6 @@ #define HID_PSEUDOSHEET_BACKGROUND (HID_SD_START + 97) #define HID_PSEUDOSHEET_NOTES (HID_SD_START + 98) #define HID_PSEUDOSHEET_SUBTITLE(HID_SD_START + 101) -#define HID_POOLSHEET_OBJNOLINENOFILL (HID_SD_START + 102) #define HID_SD_CELL_STYLE_DEFAULT (HID_SD_START + 194) #define HID_SD_CELL_STYLE_BANDED(HID_SD_START + 195) diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 67eef104a6de..c076da9895a4 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -312,21 +312,26 @@ #define STR_LAYOUT_DEFAULT_TITLE_NAME NC_("STR_LAYOUT_DEFAULT_TITLE_NAME", "Title" ) #define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" ) #define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) + #define STR_POOLSHEET_MEASURE NC_("STR_POOLSHEET_MEASURE", "Dimension Line" ) -#define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) -#define STR_POOLSHEET_OBJWITHARROW NC_("STR_POOLSHEET_OBJWITHARROW", "Object with arrow" ) -#define STR_POOLSHEET_OBJWITHSHADOW NC_("STR_POOLSHEET_OBJWITHSHADOW", "Object with shadow" ) -#define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) #define STR_POOLSHEET_TEXT NC_("STR_POOLSHEET_TEXT", "Text" ) -#define STR_POOLSHEET_TEXTBODY NC_("STR_POOLSHEET_TEXTBODY", "Text body" ) -#define STR_POOLSHEET_TEXTBODY_JUSTIFY NC_("STR_POOLSHEET_TEXTBODY_JUSTIFY", "Text body justified" ) -#define STR_POOLSHEET_TEXTBODY_INDENT NC_("STR_POOLSHEET_TEXTBODY_INDENT", "First line indent" ) #defi
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |3 +++ sd/source/ui/func/fudraw.cxx | 26 +- 2 files changed, 28 insertions(+), 1 deletion(-) New commits: commit 0310815de2a75d4bbbd34d97e2592dccddcad812 Author: Vasily Melenchuk Date: Tue Apr 10 15:18:59 2018 +0300 sd: update tooltips on hyperlink hover Show "Ctrl-click to open..." or "Click to open..." depending on security options. Change-Id: I93024a894967ddd378cc436efffb22302f6034d7 Reviewed-on: https://gerrit.libreoffice.org/52672 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 61af7e91c616..67eef104a6de 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -469,6 +469,9 @@ #define STR_SD_NONE NC_("STR_SD_NONE", "- None -") +#define STR_CTRLCLICKHYPERLINK NC_("STR_CTRLCLICKHYPERLINK", "%s-click to follow hyperlink: ") +#define STR_CLICKHYPERLINK NC_("STR_CLICKHYPERLINK", "Click to open hyperlink: ") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index f25836ae459d..cfc73674c678 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -61,6 +61,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -902,7 +903,30 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE /** * URL-Field **/ -aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DecodeMechanism::WithCharset ); +OUString aURL = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DecodeMechanism::WithCharset ); + +SvtSecurityOptions aSecOpt; +if (aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink)) +{ +// Hint about Ctrl-click to open hyperlink +// But need to detect "Ctrl" key for MacOs +vcl::KeyCode aCode(KEY_SPACE); +vcl::KeyCode aModifiedCode(KEY_SPACE, KEY_MOD1); +OUString aModStr(aModifiedCode.GetName()); +aModStr = aModStr.replaceFirst(aCode.GetName(), ""); +aModStr = aModStr.replaceAll("+", ""); + +OUString aCtrlClickHlinkStr = SdResId(STR_CTRLCLICKHYPERLINK); + +aCtrlClickHlinkStr = aCtrlClickHlinkStr.replaceAll("%s", aModStr); + +aHelpText = aCtrlClickHlinkStr + aURL; +} +else +{ +// Hint about just clicking hyperlink +aHelpText = SdResId(STR_CLICKHYPERLINK) + aURL; +} } if (!aHelpText.isEmpty()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx|2 sd/source/ui/dlg/brkdlg.cxx | 106 +--- sd/source/ui/dlg/sddlgfact.cxx | 14 sd/source/ui/dlg/sddlgfact.hxx | 11 +++ sd/source/ui/inc/BreakDlg.hxx | 53 ++ sd/source/ui/view/drviews2.cxx |2 sd/uiconfig/sdraw/ui/breakdialog.ui | 33 --- 7 files changed, 97 insertions(+), 124 deletions(-) New commits: commit 50d9f1508709e0849e8ecabfe04ac9281160d9e0 Author: Caolán McNamara Date: Mon Apr 2 12:29:05 2018 +0100 weld Break dialog Change-Id: I1657a02c775cf08e0888ba4cc9f9ae3b06550020 Reviewed-on: https://gerrit.libreoffice.org/52256 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 9582ea377530..35b7233eea73 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -178,7 +178,7 @@ class SdAbstractDialogFactory public: SD_DLLPUBLIC static SdAbstractDialogFactory* Create(); -virtual VclPtr CreateBreakDlg(vcl::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; +virtual VclPtr CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; virtual VclPtrCreateCopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; virtual VclPtr CreateSdCustomShowDlg(vcl::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; virtual VclPtr CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx index 724df7d201cb..80e8fb8f6a8f 100644 --- a/sd/source/ui/dlg/brkdlg.cxx +++ b/sd/source/ui/dlg/brkdlg.cxx @@ -38,59 +38,34 @@ namespace sd { * dialog to split metafiles */ -BreakDlg::BreakDlg( -vcl::Window* pWindow, -DrawView* _pDrView, -DrawDocShell* pShell, -sal_uLong nSumActionCount, -sal_uLong nObjCount ) -: SfxModalDialog(pWindow, "BreakDialog", "modules/sdraw/ui/breakdialog.ui") -, mpProgress( nullptr ) +BreakDlg::BreakDlg(weld::Window* pWindow, DrawView* pDrView, DrawDocShell* pShell, +sal_uLong nSumActionCount, sal_uLong nObjCount) +: GenericDialogController(pWindow, "modules/sdraw/ui/breakdialog.ui", "BreakDialog") +, m_xFiObjInfo(m_xBuilder->weld_label("metafiles")) +, m_xFiActInfo(m_xBuilder->weld_label("metaobjects")) +, m_xFiInsInfo(m_xBuilder->weld_label("drawingobjects")) +, m_xBtnCancel(m_xBuilder->weld_button("cancel")) +, m_pDrView(pDrView) +, m_bCancel(false) { m_aUpdateIdle.SetPriority( TaskPriority::REPAINT ); m_aUpdateIdle.SetInvokeHandler( LINK( this, BreakDlg, InitialUpdate ) ); m_aUpdateIdle.SetDebugName( "sd::BreakDlg m_aUpdateIdle" ); -get(m_pFiObjInfo, "metafiles"); -get(m_pFiActInfo, "metaobjects"); -get(m_pFiInsInfo, "drawingobjects"); -get(m_pBtnCancel, "cancel"); +m_xBtnCancel->connect_clicked(LINK(this, BreakDlg, CancelButtonHdl)); -m_pBtnCancel->SetClickHdl( LINK( this, BreakDlg, CancelButtonHdl)); +m_xProgress.reset(new SfxProgress(pShell, SdResId(STR_BREAK_METAFILE), nSumActionCount*3)); -mpProgress = new SfxProgress( pShell, SdResId(STR_BREAK_METAFILE), nSumActionCount*3 ); - -pProgrInfo = new SvdProgressInfo( LINK(this, BreakDlg, UpDate) ); +m_xProgrInfo.reset(new SvdProgressInfo(LINK(this, BreakDlg, UpDate))); // every action is edited 3 times in DoImport() -pProgrInfo->Init( nObjCount ); - -pDrView = _pDrView; -bCancel = false; -} - -BreakDlg::~BreakDlg() -{ -disposeOnce(); -} - -void BreakDlg::dispose() -{ -delete mpProgress; -mpProgress = nullptr; -delete pProgrInfo; -pProgrInfo = nullptr; -m_pFiObjInfo.clear(); -m_pFiActInfo.clear(); -m_pFiInsInfo.clear(); -m_pBtnCancel.clear(); -SfxModalDialog::dispose(); +m_xProgrInfo->Init( nObjCount ); } // Control-Handler for cancel button -IMPL_LINK_NOARG(BreakDlg, CancelButtonHdl, Button*, void) +IMPL_LINK_NOARG(BreakDlg, CancelButtonHdl, weld::Button&, void) { -bCancel = true; -m_pBtnCancel->Disable(); +m_bCancel = true; +m_xBtnCancel->set_sensitive(false); } /** @@ -101,73 +76,72 @@ IMPL_LINK_NOARG(BreakDlg, CancelButtonHdl, Button*, void) */ IMPL_LINK( BreakDlg, UpDate, void*, nInit, bool ) { -if(pProgrInfo == nullptr) +if (!m_xProgrInfo) return true; // update status bar or show a error message? if(nInit == reinterpret_cast(1)) { -std::unique_ptr xErrBox(Application::CreateMessageDialog(GetFrameWeld(), +std::unique_ptr xErrBox(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdmod.hxx | 10 +- sd/source/ui/app/sdmod.cxx | 21 - sd/source/ui/docshell/docshel3.cxx | 12 ++-- 3 files changed, 19 insertions(+), 24 deletions(-) New commits: commit a98465920f0c82759d3e74b437c4fb4dd9f2c4c6 Author: Noel Grandin Date: Thu Mar 15 10:54:44 2018 +0200 loplugin:useuniqueptr in SdModule Change-Id: I3b79696f06b33703cf61b73867014e4fd86ee9c7 Reviewed-on: https://gerrit.libreoffice.org/51313 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 409745422ddf..1c5e3848711a 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -96,8 +96,8 @@ public: boolGetWaterCan() const { return bWaterCan; } voidSetWaterCan( bool bWC ) { bWaterCan = bWC; } -SvxSearchItem* GetSearchItem() { return pSearchItem; } -voidSetSearchItem(SvxSearchItem* pItem) { pSearchItem = pItem; } +SvxSearchItem* GetSearchItem() { return pSearchItem.get(); } +voidSetSearchItem(std::unique_ptr pItem); /** Return the virtual device that can be used for printer independent layout. @@ -125,11 +125,11 @@ private: SdOptions* pImpressOptions; SdOptions* pDrawOptions; -SvxSearchItem* pSearchItem; -SvNumberFormatter* pNumberFormatter; +std::unique_ptr pSearchItem; +std::unique_ptr pNumberFormatter; tools::SvRefxOptionStorage; boolbWaterCan; -SfxErrorHandler*mpErrorHdl; +std::unique_ptr mpErrorHdl; /** This device is used for printer independent layout. It is virtual in the sense that it does not represent a printer. The pointer may be NULL when the virtual device could not be created. diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index d442e6c50357..c519302a8fa5 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -71,18 +71,16 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 ) pTransferSelection(nullptr), pImpressOptions(nullptr), pDrawOptions(nullptr), -pSearchItem(nullptr), -pNumberFormatter( nullptr ), bWaterCan(false), mbEventListenerAdded(false), mpColorConfig(new svtools::ColorConfig) { SetName( "StarDraw" ); // Do not translate! -pSearchItem = new SvxSearchItem(SID_SEARCH_ITEM); +pSearchItem.reset( new SvxSearchItem(SID_SEARCH_ITEM) ); pSearchItem->SetAppFlag(SvxSearchApp::DRAW); StartListening( *SfxGetpApp() ); SvxErrorHandler::ensure(); -mpErrorHdl = new SfxErrorHandler(RID_SD_ERRHDL, ErrCodeArea::Sd, ErrCodeArea::Sd, GetResLocale()); +mpErrorHdl.reset( new SfxErrorHandler(RID_SD_ERRHDL, ErrCodeArea::Sd, ErrCodeArea::Sd, GetResLocale()) ); // Create a new ref device and (by calling SetReferenceDevice()) // set its resolution to 600 DPI. This leads to a visually better @@ -100,18 +98,23 @@ OUString SdResId(const char* pId) // Dtor SdModule::~SdModule() { -delete pSearchItem; -delete pNumberFormatter; +pSearchItem.reset(); +pNumberFormatter.reset(); if (mbEventListenerAdded) { Application::RemoveEventListener( LINK( this, SdModule, EventListenerHdl ) ); } -delete mpErrorHdl; +mpErrorHdl.reset(); mpVirtualRefDevice.disposeAndClear(); } +void SdModule::SetSearchItem(std::unique_ptr pItem) +{ +pSearchItem = std::move(pItem); +} + /// get notifications void SdModule::Notify( SfxBroadcaster&, const SfxHint& rHint ) { @@ -205,9 +208,9 @@ tools::SvRef SdModule::GetOptionStream( const OUString& rOptio SvNumberFormatter* SdModule::GetNumberFormatter() { if( !pNumberFormatter ) -pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessComponentContext(), LANGUAGE_SYSTEM ); +pNumberFormatter.reset( new SvNumberFormatter( ::comphelper::getProcessComponentContext(), LANGUAGE_SYSTEM ) ); -return pNumberFormatter; +return pNumberFormatter.get(); } svtools::ColorConfig& SdModule::GetColorConfig() diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index e65d0729b009..c49841bcb969 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -147,11 +147,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) { const SvxSearchItem* pSearchItem = static_cast( &pReqArgs->Get(SID_SEARCH_ITEM) ); -// would be nice to have an assign operation at SearchItem -SvxSearchItem* pAppSearchItem = SD_MOD()->GetSearchItem(); -delete pAppSearchItem; -pAppSearchItem = static_cast( pSearchItem->Clone() ); -SD_MOD()->SetSearchItem(pAppSearchItem); + SD_MOD()
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/undo/undoobjects.hxx |6 +++--- sd/source/core/undo/undoobjects.cxx | 12 +++- 2 files changed, 6 insertions(+), 12 deletions(-) New commits: commit c7395735777f674bdd40efdfcbf56f488226e633 Author: Noel Grandin Date: Thu Mar 15 10:47:41 2018 +0200 loplugin:useuniqueptr in UndoRemovePresObjectImpl Change-Id: Ieaaedf6d5815c9dd49dc2f992cfaef7f74c43428 Reviewed-on: https://gerrit.libreoffice.org/51312 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/undo/undoobjects.hxx b/sd/inc/undo/undoobjects.hxx index 2e0023246e10..59c120816415 100644 --- a/sd/inc/undo/undoobjects.hxx +++ b/sd/inc/undo/undoobjects.hxx @@ -42,9 +42,9 @@ protected: virtual void Redo(); private: -SfxUndoAction* mpUndoUsercall; -SfxUndoAction* mpUndoAnimation; -SfxUndoAction* mpUndoPresObj; +std::unique_ptr mpUndoUsercall; +std::unique_ptr mpUndoAnimation; +std::unique_ptr mpUndoPresObj; }; class UndoRemoveObject : public SdrUndoRemoveObj, public UndoRemovePresObjectImpl diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx index bd3589c2af98..6b3a4e80876e 100644 --- a/sd/source/core/undo/undoobjects.cxx +++ b/sd/source/core/undo/undoobjects.cxx @@ -44,24 +44,21 @@ ViewShellId SdUndoAction::GetViewShellId() const } UndoRemovePresObjectImpl::UndoRemovePresObjectImpl( SdrObject& rObject ) -: mpUndoUsercall(nullptr) -, mpUndoAnimation(nullptr) -, mpUndoPresObj(nullptr) { SdPage* pPage = dynamic_cast< SdPage* >( rObject.GetPage() ); if( pPage ) { if( pPage->IsPresObj(&rObject) ) -mpUndoPresObj = new UndoObjectPresentationKind( rObject ); +mpUndoPresObj.reset( new UndoObjectPresentationKind( rObject ) ); if( rObject.GetUserCall() ) -mpUndoUsercall = new UndoObjectUserCall(rObject); +mpUndoUsercall.reset( new UndoObjectUserCall(rObject) ); if( pPage->hasAnimationNode() ) { css::uno::Reference< css::drawing::XShape > xShape( rObject.getUnoShape(), css::uno::UNO_QUERY ); if( pPage->getMainSequence()->hasEffect( xShape ) ) { -mpUndoAnimation = new UndoAnimation( static_cast< SdDrawDocument* >( pPage->GetModel() ), pPage ); +mpUndoAnimation.reset( new UndoAnimation( static_cast< SdDrawDocument* >( pPage->GetModel() ), pPage ) ); } } } @@ -69,9 +66,6 @@ UndoRemovePresObjectImpl::UndoRemovePresObjectImpl( SdrObject& rObject ) UndoRemovePresObjectImpl::~UndoRemovePresObjectImpl() { -delete mpUndoAnimation; -delete mpUndoPresObj; -delete mpUndoUsercall; } void UndoRemovePresObjectImpl::Undo() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |4 ++-- sd/source/core/drawdoc.cxx |6 ++ sd/source/core/drawdoc2.cxx |5 ++--- sd/source/core/drawdoc3.cxx |4 ++-- 4 files changed, 8 insertions(+), 11 deletions(-) New commits: commit 2d4988070b06567ce145403294dd402ac0f996d5 Author: Noel Grandin Date: Tue Mar 13 13:11:19 2018 +0200 loplugin:useuniqueptr in SdDrawDocument Change-Id: Ia207c25b091923738811aad4f367a76e9e026283 Reviewed-on: https://gerrit.libreoffice.org/51207 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 1b6425dc795c..5ddb69a9b451 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -142,14 +142,14 @@ private: mpOutliner; ///< local outliner for outline mode std::unique_ptr mpInternalOutliner; ///< internal outliner for creation of text objects -Timer* mpWorkStartupTimer; +std::unique_ptr mpWorkStartupTimer; Idle* mpOnlineSpellingIdle; sd::ShapeList* mpOnlineSpellingList; std::unique_ptr mpOnlineSearchItem; std::vector> maFrameViewList; -SdCustomShowList* mpCustomShowList; +std::unique_ptr mpCustomShowList; ::sd::DrawDocShell* mpDocSh; SdTransferable *mpCreatingTransferable; boolmbHasOnlineSpellErrors; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index d0f6506804ac..d6335e3671d3 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -351,8 +351,7 @@ SdDrawDocument::~SdDrawDocument() if ( mpWorkStartupTimer->IsActive() ) mpWorkStartupTimer->Stop(); -delete mpWorkStartupTimer; -mpWorkStartupTimer = nullptr; +mpWorkStartupTimer.reset(); } StopOnlineSpelling(); @@ -386,8 +385,7 @@ SdDrawDocument::~SdDrawDocument() delete pCustomShow; } -delete mpCustomShowList; -mpCustomShowList = nullptr; +mpCustomShowList.reset(); } mpOutliner.reset(); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 3da22f3dfb3b..0652a9aa812d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -681,7 +681,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const * pRefDocument /* = if( !pRefPage && (meDocType != DocumentType::Draw) ) pPage->SetAutoLayout( AUTOLAYOUT_TITLE, true, true ); -mpWorkStartupTimer = new Timer("DrawWorkStartupTimer"); +mpWorkStartupTimer.reset( new Timer("DrawWorkStartupTimer") ); mpWorkStartupTimer->SetInvokeHandler( LINK(this, SdDrawDocument, WorkStartupHdl) ); mpWorkStartupTimer->SetTimeout(2000); mpWorkStartupTimer->Start(); @@ -968,8 +968,7 @@ void SdDrawDocument::StopWorkStartupDelay() WorkStartupHdl(nullptr); } -delete mpWorkStartupTimer; -mpWorkStartupTimer = nullptr; +mpWorkStartupTimer.reset(); } } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index bd731f255465..5df4c3d2b930 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1181,10 +1181,10 @@ SdCustomShowList* SdDrawDocument::GetCustomShowList(bool bCreate) { if (!mpCustomShowList && bCreate) { -mpCustomShowList = new SdCustomShowList; +mpCustomShowList.reset(new SdCustomShowList); } -return mpCustomShowList; +return mpCustomShowList.get(); } // Remove unused master pages and layouts ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/OutlinerIterator.hxx |2 +- sd/source/ui/inc/OutlinerIteratorImpl.hxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit ab5d6166beca20503cd57b8707b814305f92267a Author: Jochen Nitschke Date: Wed Dec 27 13:16:22 2017 +0100 delete operators properly Change-Id: Ia917b70712717387aa8d7a17334efd41931bdb88 Reviewed-on: https://gerrit.libreoffice.org/47087 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx index 0696fbffc265..8271916d8b0a 100644 --- a/sd/inc/OutlinerIterator.hxx +++ b/sd/inc/OutlinerIterator.hxx @@ -274,7 +274,7 @@ private: // Do not allow default constructor and copying of outliner containers. OutlinerContainer (const OutlinerContainer&) = delete; -OutlinerContainer& operator= (const OutlinerContainer&) {return *this;}; +OutlinerContainer& operator= (const OutlinerContainer&) = delete; }; /** Data collection specifying a SdrObject and its position in diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx index e09950899f1b..82d9432e79db 100644 --- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx +++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx @@ -206,7 +206,7 @@ private: SdrObjListIter* mpObjectIterator; // Don't use this operator. -ViewIteratorImpl& operator= (const ViewIteratorImpl&){return *this;}; +ViewIteratorImpl& operator= (const ViewIteratorImpl&) = delete; }; /** Iterator for iteration over all objects in all views. It automatically @@ -235,7 +235,7 @@ private: sal_Int32 mnPageCount; // Don't use this operator. -DocumentIteratorImpl& operator= (const DocumentIteratorImpl& ){return *this;}; +DocumentIteratorImpl& operator= (const DocumentIteratorImpl& ) = delete; }; } } // end of namespace ::sd::outliner ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdmod.hxx |3 ++- sd/source/ui/unoidl/unoobj.cxx |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit 065852f4eb5943074749ffb06c3d21e2f8931f98 Author: Noel Grandin Date: Fri Dec 15 11:11:16 2017 +0200 sal_uIntPtr->SfxItemPropertyMapEntry* in SdExtPropertySetInfoCache Change-Id: I65d284cc1fbc013a17d4bb2f0dd7d7d8d3ccf56f Reviewed-on: https://gerrit.libreoffice.org/46507 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index fa13ef05032b..409745422ddf 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -41,6 +41,7 @@ class SdTransferable; class SvNumberFormatter; class SfxErrorHandler; class SfxFrame; +struct SfxItemPropertyMapEntry; namespace svtools { class ColorConfig; } namespace com { namespace sun { namespace star { namespace frame { @@ -53,7 +54,7 @@ enum SdOptionStreamMode SD_OPTION_STORE = 1 }; -typedef std::map< sal_uIntPtr, css::uno::Reference > SdExtPropertySetInfoCache; +typedef std::map< SfxItemPropertyMapEntry const * , css::uno::Reference > SdExtPropertySetInfoCache; typedef std::map< sal_uInt32, css::uno::Sequence< css::uno::Type> > SdTypesCache; /* diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index d85ac8a473f6..754aa3782080 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -406,7 +406,7 @@ uno::Any SAL_CALL SdXShape::getPropertyDefault( const OUString& aPropertyName ) //XPropertySet css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL SdXShape::getPropertySetInfo() { -sal_uIntPtr nObjId = reinterpret_cast(mpShape->getPropertyMapEntries()); +SfxItemPropertyMapEntry const * nObjId = mpShape->getPropertyMapEntries(); css::uno::Reference pInfo; SdExtPropertySetInfoCache& rCache = (mpModel && mpModel->IsImpressDocument()) ? ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig
sd/inc/strings.hrc|2 ++ sd/source/ui/sidebar/SlideBackground.cxx |6 +++--- sd/uiconfig/simpress/ui/sidebarslidebackground.ui |6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) New commits: commit c5505f5a22917c339af4e4c840a6a1ae20e2503f Author: Yousuf Philips Date: Wed Dec 6 18:01:03 2017 +0400 tdf#89466 Fix minor localization bugs Change-Id: I1ee93f81dcd83b5a9277ea444ec8e10db7d790df Reviewed-on: https://gerrit.libreoffice.org/45958 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 924bc5acdc42..52b5d6796cdd 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -280,7 +280,9 @@ #define STR_PAGE_NAME NC_("STR_PAGE_NAME", "Page" ) #define STR_SLIDE_NAME NC_("STR_SLIDE_NAME", "Slide" ) #define STR_MASTERSLIDE_NAME NC_("STR_MASTERSLIDE_NAME", "Master Slide") +#define STR_MASTERSLIDE_LABEL NC_("STR_MASTERSLIDE_LABEL", "Master Slide:") #define STR_MASTERPAGE_NAME NC_("STR_MASTERPAGE_NAME", "Master Page") +#define STR_MASTERPAGE_LABEL NC_("STR_MASTERPAGE_LABEL", "Master Page:") #define STR_NOTES NC_("STR_NOTES", "(Notes)" ) #define STR_HANDOUT NC_("STR_HANDOUT", "Handouts" ) #define STR_PRESOBJ_MPTITLE NC_("STR_PRESOBJ_MPTITLE", "Click to edit the title text format" ) diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 8b2e15dc7671..9c94a208b2cb 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -239,7 +239,7 @@ void SlideBackground::HandleContextChange( if ( IsImpress() ) { -mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME)); +mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_LABEL)); mpMarginSelectBox->Hide(); if ( maContext == maImpressMasterContext ) @@ -294,7 +294,7 @@ void SlideBackground::HandleContextChange( } else if ( IsDraw() ) { -mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_NAME)); +mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_LABEL)); } } @@ -558,7 +558,7 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, } else if ( maContext == maImpressNotesContext ) { -mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME)); +mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_LABEL)); ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); if (pMainViewShell) diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui index 70bccb25c7c8..55783273dfe7 100644 --- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui +++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui @@ -194,7 +194,7 @@ True False end -Orientation: +Orientation: 0 @@ -209,7 +209,7 @@ True -Master Slide +Master View True True True @@ -264,7 +264,7 @@ True False end -Margin: +Margin: 0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source uitest/impress_tests
sd/inc/strings.hrc |2 sd/source/ui/func/fupage.cxx| 98 +--- uitest/impress_tests/backgrounds.py | 10 --- 3 files changed, 16 insertions(+), 94 deletions(-) New commits: commit e21f7f7ef043d4fd7ecda92a513e37f720c52ba8 Author: heiko tietze Date: Mon Nov 20 21:17:17 2017 +0100 tdf#112650 Disable 'background settings for all pages' Code removed to set images as background Change-Id: I3bad649b503420e2561483fbce1775e4aebdd3a3 Reviewed-on: https://gerrit.libreoffice.org/45001 Tested-by: Jenkins Reviewed-by: Yousuf Philips Tested-by: Yousuf Philips Reviewed-by: Heiko Tietze diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index c8630fd892ab..4850e5d63b2d 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -228,8 +228,6 @@ #define STR_HTMLEXP_ERROR_CREATE_FILE NC_("STR_HTMLEXP_ERROR_CREATE_FILE", "Cannot create the file $(URL1).") #define STR_HTMLEXP_ERROR_OPEN_FILE NC_("STR_HTMLEXP_ERROR_OPEN_FILE", "Could not open the file $(URL1).") #define STR_HTMLEXP_ERROR_COPY_FILE NC_("STR_HTMLEXP_ERROR_COPY_FILE", "The file $(URL1) could not be copied to $(URL2)") -#define STR_PAGE_BACKGROUND_TITLE NC_("STR_PAGE_BACKGROUND_TITLE", "Page Settings" ) -#define STR_PAGE_BACKGROUND_TXT NC_("STR_PAGE_BACKGROUND_TXT", "Background settings for all pages?" ) #define STR_STATUSBAR_MASTERPAGE NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list and double-click for dialog.") #define STR_TITLE_RENAMESLIDE NC_("STR_TITLE_RENAMESLIDE", "Rename Slide") #define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name") diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 040701cfc286..8f05c7b90727 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -208,8 +208,6 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) if (!mpDrawViewShell) return nullptr; -PageKind ePageKind = mpDrawViewShell->GetPageKind(); - SfxItemSet aNewAttr(mpDoc->GetPool(), {{mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE), mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE)}, @@ -363,38 +361,23 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) ( aMergedAttr.GetItem( XATTR_FILLSTYLE )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; -bool bSetToAllPages = false; - -// Ask, whether the setting are for the background-page or for the current page -if( !mbMasterPage && bChanges ) +if( !mbMasterPage && bChanges && mbPageBckgrdDeleted ) { -// But don't ask in notice-view, because we can't change the background of -// notice-masterpage (at the moment) -if( ePageKind != PageKind::Notes ) -{ -ScopedVclPtrInstance aQuestionBox( -pParent, SdResId(STR_PAGE_BACKGROUND_TXT), -VclMessageType::Question, VclButtonsType::YesNo); -aQuestionBox->SetText(SdResId(STR_PAGE_BACKGROUND_TITLE)); -bSetToAllPages = ( RET_YES == aQuestionBox->Execute() ); -} - -if( mbPageBckgrdDeleted ) -{ -mpBackgroundObjUndoAction.reset( new SdBackgroundObjUndoAction( -*mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet()) ); - -if(!mpPage->IsMasterPage()) -{ -// on normal pages, switch off fill attribute usage -SdrPageProperties& rPageProperties = mpPage->getSdrPageProperties(); -rPageProperties.ClearItem( XATTR_FILLBITMAP ); -rPageProperties.ClearItem( XATTR_FILLGRADIENT ); -rPageProperties.ClearItem( XATTR_FILLHATCH ); - rPageProperties.PutItem(XFillStyleItem(drawing::FillStyle_NONE)); -} -} + mpBackgroundObjUndoAction.reset( new SdBackgroundObjUndoAction( + *mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet()) ); + + if(!mpPage->IsMasterPage()) + { + // on normal pages, switch off fill attribute usage + SdrPageProperties& rPageProperties = mpPage->getSdrPageProperties(); + rPageProperties.ClearItem( XATTR_FILLBITMAP ); + rPageProperties.ClearItem( XATTR_FILLGRADIENT ); + rPageProperties.ClearItem( XATTR_FILLHATCH ); +
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationEffect.hxx|7 +- sd/source/core/CustomAnimationEffect.cxx| 71 ++-- sd/source/ui/animations/CustomAnimationList.cxx |8 +- sd/source/ui/animations/CustomAnimationPane.cxx | 12 +--- 4 files changed, 43 insertions(+), 55 deletions(-) New commits: commit 582182ad2ad9c399fd41bff2446507eb954730f7 Author: Julien Nabet Date: Sat Nov 11 21:07:56 2017 +0100 Replace list by vector for InteractiveSequence (sd) + use for range loops (there's still work about this) Change-Id: Ib1d1584f3f4456dfa79834f89c51b4528b776096 Reviewed-on: https://gerrit.libreoffice.org/44642 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx index e54644d13158..6322d365b293 100644 --- a/sd/inc/CustomAnimationEffect.hxx +++ b/sd/inc/CustomAnimationEffect.hxx @@ -31,6 +31,7 @@ #include "sddllapi.h" #include +#include #include #include @@ -362,7 +363,7 @@ private: }; typedef std::shared_ptr< InteractiveSequence > InteractiveSequencePtr; -typedef std::list< InteractiveSequencePtr > InteractiveSequenceList; +typedef std::vector< InteractiveSequencePtr > InteractiveSequenceVector; class MainSequence : public EffectSequenceHelper, public ISequenceListener { @@ -389,7 +390,7 @@ public: virtual bool hasEffect( const css::uno::Reference< css::drawing::XShape >& xShape ) override; virtual void onTextChanged( const css::uno::Reference< css::drawing::XShape >& xShape ) override; -const InteractiveSequenceList& getInteractiveSequenceList() const { return maInteractiveSequenceList; } +const InteractiveSequenceVector& getInteractiveSequenceVector() const { return maInteractiveSequenceVector; } virtual void notify_change() override; @@ -421,7 +422,7 @@ protected: InteractiveSequencePtr createInteractiveSequence( const css::uno::Reference< css::drawing::XShape >& xShape ); -InteractiveSequenceList maInteractiveSequenceList; +InteractiveSequenceVector maInteractiveSequenceVector; css::uno::Reference< css::util::XChangesListener > mxChangesListener; css::uno::Reference< css::animations::XTimeContainer > mxTimingRootNode; diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 33c7f895025d..1d6fe19dec82 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -3009,7 +3009,7 @@ void MainSequence::createMainSequence() Reference< XTimeContainer > xInteractiveRoot( xChildNode, UNO_QUERY_THROW ); InteractiveSequencePtr pIS( new InteractiveSequence( xInteractiveRoot, this ) ); pIS->addListener( this ); -maInteractiveSequenceList.push_back( pIS ); +maInteractiveSequenceVector.push_back( pIS ); } } @@ -3052,10 +3052,9 @@ void MainSequence::reset() { EffectSequenceHelper::reset(); -InteractiveSequenceList::iterator aIter; -for( aIter = maInteractiveSequenceList.begin(); aIter != maInteractiveSequenceList.end(); ++aIter ) -(*aIter)->reset(); -maInteractiveSequenceList.clear(); +for (auto const& interactiveSequence : maInteractiveSequenceVector) +interactiveSequence->reset(); +maInteractiveSequenceVector.clear(); try { @@ -3087,7 +3086,7 @@ InteractiveSequencePtr MainSequence::createInteractiveSequence( const css::uno:: pIS.reset( new InteractiveSequence( xISRoot, this) ); pIS->setTriggerShape( xShape ); pIS->addListener( this ); -maInteractiveSequenceList.push_back( pIS ); +maInteractiveSequenceVector.push_back( pIS ); return pIS; } @@ -3097,10 +3096,11 @@ CustomAnimationEffectPtr MainSequence::findEffect( const css::uno::Reference< cs if( pEffect.get() == nullptr ) { -InteractiveSequenceList::const_iterator aIter; -for( aIter = maInteractiveSequenceList.begin(); (aIter != maInteractiveSequenceList.end()) && (pEffect.get() == nullptr); ++aIter ) +for (auto const& interactiveSequence : maInteractiveSequenceVector) { -pEffect = (*aIter)->findEffect( xNode ); +pEffect = interactiveSequence->findEffect( xNode ); +if (pEffect.get()) +break; } } return pEffect; @@ -3115,14 +3115,13 @@ sal_Int32 MainSequence::getOffsetFromEffect( const CustomAnimationEffectPtr& pEf nOffset = EffectSequenceHelper::getCount(); -InteractiveSequenceList::const_iterator aIter; -for( aIter = maInteractiveSequenceList.begin(); aIter != maInteractiveSequenceList.end(); ++aIter ) +for (auto const& interactiveSequence : maInteractiveSequenceVector) { -sal_Int32 nTemp = (*aIter)->getOffsetFromEffect( pEffect ); +sal_Int32 nTemp = interactiveSequence->getOffsetFromEffect( pEffect );
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sddll.hxx |3 - sd/inc/sdmod.hxx |5 +- sd/inc/sdpage.hxx|3 - sd/inc/stlpool.hxx |5 +- sd/inc/stlsheet.hxx |5 +- sd/inc/undo/undoobjects.hxx | 20 +- sd/source/filter/eppt/eppt.hxx |4 +- sd/source/filter/eppt/epptooxml.hxx |5 +- sd/source/filter/eppt/text.hxx |4 -- sd/source/filter/html/htmlattr.hxx |4 -- sd/source/filter/ppt/propread.hxx|4 -- sd/source/ui/animations/motionpathtag.hxx|5 +- sd/source/ui/annotations/annotationtag.hxx |5 +- sd/source/ui/inc/AccessibleDrawDocumentView.hxx |8 +--- sd/source/ui/inc/AccessibleOutlineView.hxx |6 +-- sd/source/ui/inc/AccessibleViewForwarder.hxx |5 +- sd/source/ui/inc/BezierObjectBar.hxx | 12 ++ sd/source/ui/inc/DrawController.hxx |5 +- sd/source/ui/inc/GraphicObjectBar.hxx| 12 ++ sd/source/ui/inc/GraphicViewShell.hxx| 12 ++ sd/source/ui/inc/LayerTabBar.hxx |4 +- sd/source/ui/inc/MediaObjectBar.hxx | 13 ++ sd/source/ui/inc/Ruler.hxx |5 +- sd/source/ui/inc/SdUnoDrawView.hxx | 20 -- sd/source/ui/inc/TabControl.hxx | 11 ++--- sd/source/ui/inc/docprev.hxx |3 - sd/source/ui/inc/fuconarc.hxx|4 +- sd/source/ui/inc/fuconbez.hxx|7 +-- sd/source/ui/inc/fuconcs.hxx |5 +- sd/source/ui/inc/fuconrec.hxx|4 +- sd/source/ui/inc/fuconuno.hxx|8 +--- sd/source/ui/inc/fudspord.hxx|5 +- sd/source/ui/inc/fuediglu.hxx|7 ++- sd/source/ui/inc/fuhhconv.hxx|5 +- sd/source/ui/inc/fuoltext.hxx|4 +- sd/source/ui/inc/fusearch.hxx|5 +- sd/source/ui/inc/fusel.hxx |6 +-- sd/source/ui/inc/fuzoom.hxx |5 +- sd/source/ui/inc/sdtreelb.hxx|7 +-- sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx |4 +- sd/source/ui/inc/unosrch.hxx |3 - sd/source/ui/sidebar/RecentMasterPagesSelector.hxx |5 +- sd/source/ui/slideshow/slideshowviewimpl.hxx |4 +- sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx |5 +- sd/source/ui/table/tableobjectbar.hxx| 13 ++ sd/source/ui/unoidl/unopback.hxx |3 - 46 files changed, 124 insertions(+), 173 deletions(-) New commits: commit b4e235a925b5c73a2220f57cdb8b85379fb3bac1 Author: Noel Grandin Date: Wed Oct 25 15:53:56 2017 +0200 loplugin:finalclasses in sd Change-Id: I0947aa295ba1859ebc1e7ce9ce2e621f02d399ce Reviewed-on: https://gerrit.libreoffice.org/43846 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sddll.hxx b/sd/inc/sddll.hxx index 8b05dc5270c4..8fa1f6247f95 100644 --- a/sd/inc/sddll.hxx +++ b/sd/inc/sddll.hxx @@ -35,9 +35,8 @@ class SdModule; |* \/ -class SD_DLLPUBLIC SdDLL +class SD_DLLPUBLIC SdDLL final { -protected: #ifdef ENABLE_SDREMOTE static void RegisterRemotes(); #endif diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 397bfc292fb3..fa13ef05032b 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -68,7 +68,7 @@ typedef std::map< sal_uInt32, css::uno::Sequence< css::uno::Type> > SdTypesCache */ -class SdModule : public SfxModule, public SfxListener +class SdModule final : public SfxModule, public SfxListener { public: SFX_DECL_INTERFACE(SD_IF_SDAPP) @@ -120,7 +120,7 @@ public: svtools::ColorConfig& GetColorConfig(); -protected: +private: SdOptions* pImpressOptions; SdOptions* pDrawOptions; @@ -137,7 +137,6 @@ protected: virtual void
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx | 21 + sd/source/core/drawdoc.cxx | 28 ++-- sd/source/core/drawdoc4.cxx|8 +++- sd/source/filter/ppt/pptin.cxx |4 ++-- sd/source/ui/docshell/docshel2.cxx |4 ++-- sd/source/ui/docshell/docshell.cxx | 11 --- sd/source/ui/unoidl/unomodel.cxx | 16 +--- 7 files changed, 39 insertions(+), 53 deletions(-) New commits: commit d54e58616600330e8eb9ba7d5f4598f3b674d643 Author: Noel Grandin Date: Thu Oct 19 11:33:14 2017 +0200 use std::unique_ptr in SdDrawDocument Change-Id: Id02cf2615b7697df589f612d21219200d3fab082 Reviewed-on: https://gerrit.libreoffice.org/43542 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index fc04e2ce2b30..703c3ef8c467 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -139,13 +139,17 @@ public: SAL_DLLPRIVATE bool getDocReadOnly() const { return bReadOnly; } private: OUStringmsDocAccTitle; -SdOutliner* mpOutliner; ///< local outliner for outline mode -SdOutliner* mpInternalOutliner; ///< internal outliner for creation of text objects +std::unique_ptr +mpOutliner; ///< local outliner for outline mode +std::unique_ptr +mpInternalOutliner; ///< internal outliner for creation of text objects Timer* mpWorkStartupTimer; Idle* mpOnlineSpellingIdle; sd::ShapeList* mpOnlineSpellingList; -SvxSearchItem* mpOnlineSearchItem; -std::vector maFrameViewList; +std::unique_ptr +mpOnlineSearchItem; +std::vector> +maFrameViewList; SdCustomShowList* mpCustomShowList; ::sd::DrawDocShell* mpDocSh; SdTransferable *mpCreatingTransferable; @@ -171,7 +175,8 @@ private: ::sd::DrawDocShellRef mxAllocedDocShRef; // => AllocModel() boolmbAllocDocSh; // => AllocModel() DocumentTypemeDocType; -CharClass* mpCharClass; +std::unique_ptr +mpCharClass; ::std::unique_ptr mpDrawPageListWatcher; ::std::unique_ptr mpMasterPageListWatcher; @@ -415,7 +420,7 @@ public: SAL_DLLPRIVATE sal_uLong GetLinkCount(); -SAL_DLLPRIVATE std::vector& GetFrameViewList() { return maFrameViewList; } +SAL_DLLPRIVATE std::vector>& GetFrameViewList() { return maFrameViewList; } SdCustomShowList* GetCustomShowList(bool bCreate = false); SAL_DLLPRIVATE voidNbcSetChanged(bool bFlag); @@ -434,7 +439,7 @@ public: SAL_DLLPRIVATE boolIsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; } SAL_DLLPRIVATE ::sd::FrameView* GetFrameView(sal_uLong nPos) { -return nPos < maFrameViewList.size() ? maFrameViewList[nPos] : nullptr; } +return nPos < maFrameViewList.size() ? maFrameViewList[nPos].get() : nullptr; } /** deprecated*/ SAL_DLLPRIVATE static SdAnimationInfo* GetAnimationInfo(SdrObject* pObject); @@ -444,7 +449,7 @@ public: SAL_DLLPRIVATE static SdIMapInfo* GetIMapInfo( SdrObject const * pObject ); SAL_DLLPRIVATE static IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint ); -SAL_DLLPRIVATE CharClass* GetCharClass() const { return mpCharClass; } +SAL_DLLPRIVATE CharClass* GetCharClass() const { return mpCharClass.get(); } SAL_DLLPRIVATE voidRestoreLayerNames(); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 54b2474008b9..18a94687b7c9 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -233,7 +233,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage ); LanguageTag aLanguageTag( eRealLanguage); -mpCharClass = new CharClass( aLanguageTag ); +mpCharClass.reset(new CharClass( aLanguageTag )); // If the current application language is a language that uses right-to-left text... LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); @@ -373,8 +373,7 @@ SdDrawDocument::~SdDrawDocument() } StopOnlineSpelling(); -delete mpOnlineSearchItem; -mpOnlineSearchItem = nullptr; +mpOnlineSearchItem.reset(); CloseBookmarkDoc(); SetAllocDocSh(false); @@ -393,9 +392,7 @@ SdDrawDocument::~SdDrawDocument() pLinkManager = nullptr; } -std::vector::iterator pIter; -for ( pIter = maFrameViewList.begin(); pIter != maFrameViewList.end(); ++pIter ) -delete *pIter; +maFrameViewList.clear(); if (mpCustomShowList) { @@ -410,14 +407,9 @@ SdDrawDocument::~SdDrawDocument() mpCustomShowLi
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdattr.hrc |7 +++ sd/source/ui/app/optsitem.cxx | 24 sd/source/ui/app/sdmod2.cxx |3 --- sd/source/ui/inc/optsitem.hxx | 13 - 4 files changed, 3 insertions(+), 44 deletions(-) New commits: commit fabafcfc1861646c7e39810d262777010200dbd1 Author: Jochen Nitschke Date: Mon Aug 21 08:48:43 2017 +0200 drop unused SdOptionsContentsItem unused since commit e933538779d29a472c92252f14660c245aa8622e Date: Mon Nov 26 13:34:57 2007 + INTEGRATION: CWS aw053 (1.23.124); FILE MERGED Change-Id: I67db5558e0a125273c4d5647329e9cecf70cf581 Reviewed-on: https://gerrit.libreoffice.org/41380 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc index dc1131a43f40..8c7629460a4c 100644 --- a/sd/inc/sdattr.hrc +++ b/sd/inc/sdattr.hrc @@ -94,10 +94,9 @@ #define ATTR_OPTIONS_START ATTR_SNAPLINE_END + 1 #define ATTR_OPTIONS_LAYOUT ATTR_OPTIONS_START + 1 -#define ATTR_OPTIONS_CONTENTS ATTR_OPTIONS_START + 2 -#define ATTR_OPTIONS_MISC ATTR_OPTIONS_START + 3 -#define ATTR_OPTIONS_SNAP ATTR_OPTIONS_START + 4 -#define ATTR_OPTIONS_PRINT ATTR_OPTIONS_START + 5 +#define ATTR_OPTIONS_MISC ATTR_OPTIONS_START + 2 +#define ATTR_OPTIONS_SNAP ATTR_OPTIONS_START + 3 +#define ATTR_OPTIONS_PRINT ATTR_OPTIONS_START + 4 #define ATTR_OPTIONS_ENDATTR_OPTIONS_PRINT #define ATTR_OPTIONS_SCALE_STARTATTR_OPTIONS_END + 1 diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 3e38c6e963a8..0f67b818113d 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -382,30 +382,6 @@ bool SdOptionsContents::WriteData( Any* pValues ) const return true; } - -/* -|* -|* SdOptionsContentsItem -|* -\/ - -SdOptionsContentsItem::SdOptionsContentsItem() -: SfxPoolItem ( ATTR_OPTIONS_CONTENTS ) -, maOptionsContents ( false, false ) -{ -} - -SfxPoolItem* SdOptionsContentsItem::Clone( SfxItemPool* ) const -{ -return new SdOptionsContentsItem( *this ); -} - -bool SdOptionsContentsItem::operator==( const SfxPoolItem& rAttr ) const -{ -assert(SfxPoolItem::operator==(rAttr)); -return maOptionsContents == static_cast(rAttr).maOptionsContents; -} - /* |* |* SdOptionsMisc diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 1e95727d4a64..3f025fec1f8d 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -470,9 +470,6 @@ std::unique_ptr SdModule::CreateItemSet( sal_uInt16 nSlot ) pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nMetric ) ); -// TP_OPTIONS_CONTENTS: -pRet->Put( SdOptionsContentsItem() ); - // TP_OPTIONS_MISC: SdOptionsMiscItem aSdOptionsMiscItem( pOptions, pFrameView ); if ( pFrameView ) diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index bf1e3aabd903..1eb581b6f65c 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -176,19 +176,6 @@ public: booloperator==( const SdOptionsContents& rOpt ) const; }; -class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem -{ -public: - -SdOptionsContentsItem(); - -virtual SfxPoolItem*Clone( SfxItemPool *pPool = nullptr ) const override; -virtual booloperator==( const SfxPoolItem& ) const override; - -private: -SdOptionsContents maOptionsContents; -}; - class SD_DLLPUBLIC SdOptionsMisc : public SdOptionsGeneric { private: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 + sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 13 ++--- sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx |2 +- 3 files changed, 12 insertions(+), 4 deletions(-) New commits: commit 793246e1ae1266e8bd4261aa45dad40f5da16785 Author: Gabor Kelemen Date: Fri Aug 18 21:57:35 2017 +0200 tdf#107183 Set different dialog title for renaming master slide Change-Id: I351e6db782cce8ece78083e5a79e4c2baaa414ee Reviewed-on: https://gerrit.libreoffice.org/41310 Tested-by: Jenkins Reviewed-by: Tamás Zolnai diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 76ff0a0e060d..7d049670373f 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -233,6 +233,7 @@ #define STR_STATUSBAR_MASTERPAGE NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list and double-click for dialog.") #define STR_TITLE_RENAMESLIDE NC_("STR_TITLE_RENAMESLIDE", "Rename Slide") #define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name") +#define STR_TITLE_RENAMEMASTER NC_("STR_TITLE_RENAMEMASTER", "Rename Master Slide") #define STR_PLACEHOLDER_DESCRIPTION_TITLE NC_("STR_PLACEHOLDER_DESCRIPTION_TITLE", "Title Area for AutoLayouts" ) #define STR_PLACEHOLDER_DESCRIPTION_OUTLINE NC_("STR_PLACEHOLDER_DESCRIPTION_OUTLINE", "Object Area for AutoLayouts" ) #define STR_PLACEHOLDER_DESCRIPTION_FOOTER NC_("STR_PLACEHOLDER_DESCRIPTION_FOOTER", "Footer Area" ) diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index ce146a969ddc..9cf3a557e4a0 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -241,7 +241,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) case SID_RENAMEPAGE: case SID_RENAME_MASTER_PAGE: -RenameSlide (); +RenameSlide (rRequest); rRequest.Done (); break; @@ -851,7 +851,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) } } -void SlotManager::RenameSlide() +void SlotManager::RenameSlide(SfxRequest& rRequest) { View* pDrView = &mrSlideSorter.GetView(); @@ -868,7 +868,14 @@ void SlotManager::RenameSlide() pSelectedPage = aSelectedPages.GetNextElement()->GetPage(); if (pSelectedPage != nullptr) { -OUString aTitle( SdResId( STR_TITLE_RENAMESLIDE ) ); +// tdf#107183 Set different dialog titles when renaming +// master slides or normal ones +OUString aTitle; +if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE ) +aTitle = SdResId( STR_TITLE_RENAMEMASTER ); +else +aTitle = SdResId( STR_TITLE_RENAMESLIDE ); + OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) ); OUString aPageName = pSelectedPage->GetName(); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx index 41bb97e56c2f..1ca42fcd6cb6 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx @@ -81,7 +81,7 @@ private: /** The implementation is a copy of the code for SID_RENAMEPAGE in drviews2.cxx. */ -void RenameSlide(); +void RenameSlide( SfxRequest& rRequest ); DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog&, bool); bool RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUString& rName); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/strings.hrc |1 + sd/source/ui/func/fuinsfil.cxx |8 +--- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 99f3d9895f63ed19496bbe47bd36899b0f39dbce Author: Takeshi Abe Date: Mon Aug 7 22:31:58 2017 +0900 tdf#95309 Add a filter to show all files for "Insert > File" in Draw and Impress. Change-Id: Ia6721f4a25af9fe8b6edd143ecb7ba3f5f3e8a89 Reviewed-on: https://gerrit.libreoffice.org/40834 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index e3d350063c0a..76ff0a0e060d 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -96,6 +96,7 @@ #define STR_SD_PAGE NC_("STR_SD_PAGE", "Slide") #define STR_SD_PAGE_COUNT NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2") #define STR_SD_PAGE_COUNT_CUSTOM NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)") +#define STR_ALL_SUPPORTED_FORMATS NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats") #define STR_ALL_FILES NC_("STR_ALL_FILES", "All files") #define STR_UNDO_INSERT_TEXTFRAME NC_("STR_UNDO_INSERT_TEXTFRAME", "Insert text frame") #define STR_ACTION_NOTPOSSIBLE NC_("STR_ACTION_NOTPOSSIBLE", "This function cannot be run \nwith the selected objects.") diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 3bcbc78db3dc..d72701c527e9 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -214,15 +214,15 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) ++aOtherIter; } -// set default-filter () -OUString aAllSpec( SdResId( STR_ALL_FILES ) ); +// set "All supported formats" as the default filter +OUString aAllSpec( SdResId( STR_ALL_SUPPORTED_FORMATS ) ); OUString aExtensions = lcl_GetExtensionsList( aFilterVector ); OUString aGUIName = aAllSpec + " (" + aExtensions + ")"; xFilterManager->appendFilter( aGUIName, aExtensions ); xFilterManager->setCurrentFilter( aAllSpec ); -// add filters to filter manager finally +// append individual filters ::std::vector< ::std::pair < OUString, OUString > >::const_iterator aIter( aFilterVector.begin() ); while( aIter != aFilterVector.end() ) @@ -231,6 +231,8 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) ++aIter; } +// end with "All files" as fallback +xFilterManager->appendFilter( SdResId( STR_ALL_FILES ), "*.*" ); } catch (const IllegalArgumentException&) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |1 - sd/source/ui/inc/View.hxx |1 - sd/source/ui/inc/fuinsfil.hxx |1 - sd/source/ui/inc/futext.hxx|1 - sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx |4 +--- 5 files changed, 1 insertion(+), 7 deletions(-) New commits: commit d9ae08845df86c1945e73e9506f92d13221ac98c Author: Takeshi Abe Date: Tue Jun 27 23:28:10 2017 +0900 sd: Kill forward declaration of non-existent RequestData Change-Id: I0feef07e46b0056408d75abed631646e0520e4c1 Reviewed-on: https://gerrit.libreoffice.org/39306 Tested-by: Jenkins Reviewed-by: Takeshi Abe diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 2a72855698fd..a6f9845269c5 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -74,7 +74,6 @@ class Point; namespace vcl { class Window; } class SdTransferable; struct SpellCallbackInfo; -struct StyleRequestData; class SdDrawDocument; class SdCustomShow; class SdCustomShowList; diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index d1fda4c1d417..f98f263a4438 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -44,7 +44,6 @@ class Point; class Graphic; class SdrOutliner; class TransferableDataHelper; -struct StyleRequestData; class Outliner; namespace sd { diff --git a/sd/source/ui/inc/fuinsfil.hxx b/sd/source/ui/inc/fuinsfil.hxx index a15d612b5c1d..6a4fa1930e2e 100644 --- a/sd/source/ui/inc/fuinsfil.hxx +++ b/sd/source/ui/inc/fuinsfil.hxx @@ -24,7 +24,6 @@ #include class SfxMedium; -struct StyleRequestData; namespace sd { diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx index 281af763e1ec..f9d9fb56df6a 100644 --- a/sd/source/ui/inc/futext.hxx +++ b/sd/source/ui/inc/futext.hxx @@ -24,7 +24,6 @@ #include "fuconstr.hxx" #include -struct StyleRequestData; class SdrTextObj; class FontList; class OutlinerView; diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx index 7f3946be4954..e4f760ca6c41 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx @@ -30,9 +30,7 @@ namespace sd { namespace slidesorter { namespace cache { -class RequestData; - -/** The request queue stores requests that are described by the RequestData +/** The request queue stores requests that are described by the Request sorted according to priority class and then priority. */ class RequestQueue : public sdr::PageUser ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/CustomAnimationPreset.hxx |1 sd/inc/Outliner.hxx | 11 - sd/inc/drawdoc.hxx |1 sd/source/core/CustomAnimationPreset.cxx |1 sd/source/core/drawdoc.cxx |5 sd/source/filter/eppt/eppt.cxx |4 --- sd/source/filter/eppt/eppt.hxx |1 sd/source/filter/eppt/epptso.cxx |5 sd/source/ui/dlg/dlgchar.cxx |2 - sd/source/ui/docshell/docshel4.cxx |6 - sd/source/ui/docshell/docshell.cxx |9 ++- sd/source/ui/docshell/sdclient.cxx |3 -- sd/source/ui/framework/factories/BasicToolBarFactory.cxx | 11 - sd/source/ui/framework/factories/BasicToolBarFactory.hxx |1 sd/source/ui/func/fudraw.cxx | 11 - sd/source/ui/func/fupoor.cxx | 17 --- sd/source/ui/inc/Client.hxx |2 - sd/source/ui/inc/DrawDocShell.hxx|1 sd/source/ui/inc/FrameView.hxx |3 -- sd/source/ui/inc/dlg_char.hxx|1 sd/source/ui/inc/fupoor.hxx |1 sd/source/ui/slideshow/slideshow.cxx |1 sd/source/ui/view/Outliner.cxx |6 - sd/source/ui/view/drviews1.cxx |5 sd/source/ui/view/frmview.cxx|1 25 files changed, 8 insertions(+), 102 deletions(-) New commits: commit 60f3e9b67e688e6f7f304cc7fb14fc28af83f351 Author: Noel Grandin Date: Wed Jun 21 14:42:23 2017 +0200 loplugin:unusedfields in sd part3 Change-Id: Id8277e4b3dc9776715a7bd85e1a4f6610aad9b19 Reviewed-on: https://gerrit.libreoffice.org/39061 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx index e9f46362a58b..530a6e7a990c 100644 --- a/sd/inc/CustomAnimationPreset.hxx +++ b/sd/inc/CustomAnimationPreset.hxx @@ -61,7 +61,6 @@ public: private: OUString maPresetId; OUString maProperty; -sal_Int16 mnPresetClass; OUString maLabel; OUString maDefaultSubTyp; double mfDuration; diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 874bc3952668..917639125d0f 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -320,17 +320,6 @@ private: */ ::sd::outliner::IteratorPosition maLastValidPosition; -/** This flag indicates whether a selection change event is expected due -to a programatical change of the selection. -*/ -bool mbExpectingSelectionChangeEvent; - -/** This flag is set to true when the whole document has been -processed once 'officially', i.e. a message box has been shown -that tells the user so. -*/ -bool mbWholeDocumentProcessed; - /** When this flag is true then a PrepareSpelling() is executed when StartSearchAndReplace() is called the next time. */ diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index a22259f58db4..2a72855698fd 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -173,7 +173,6 @@ private: boolmbAllocDocSh; // => AllocModel() DocumentTypemeDocType; CharClass* mpCharClass; -css::lang::Locale* mpLocale; ::std::unique_ptr mpDrawPageListWatcher; ::std::unique_ptr mpMasterPageListWatcher; diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 7291f88c619b..35bb383dfbe6 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -127,7 +127,6 @@ CustomAnimationPreset::CustomAnimationPreset( const CustomAnimationEffectPtr& pE { maPresetId = pEffect->getPresetId(); maProperty = pEffect->getProperty(); -mnPresetClass = pEffect->getPresetClass(); add( pEffect ); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index fba824d42a94..727b7d0b29af 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -172,7 +172,6 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) , mbAllocDocSh(false) , meDocType(eType) , mpCharClass(nullptr) -, mpLocale(nullptr) , mbUseEmbedFonts(false) { mpDrawPageListWatcher.reset(new ImpDrawPageListWatcher(*this)); @@ -236,7 +235,6 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage ); LanguageTag aLanguageTag( eRealLanguage); -mpLocale = new css::lang::Locale( aLanguageTag.getLocale()); mpCharClass
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlsheet.hxx |2 +- sd/source/core/stlsheet.cxx |9 - 2 files changed, 1 insertion(+), 10 deletions(-) New commits: commit 80759b5871093bc9fde2f03b88678c82e97bc381 Author: Takeshi Abe Date: Tue Jun 20 00:34:38 2017 +0900 sd: Do not copy SdStyleSheet Anyway copy assignment operator has been deleted already. Change-Id: Ie9ee9d8a9434b41b3b36d2483424776829572837 Reviewed-on: https://gerrit.libreoffice.org/38973 Tested-by: Jenkins Reviewed-by: Takeshi Abe diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 41b94338e183..29e6f4a4698b 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -54,7 +54,6 @@ class SdStyleSheet : public SdStyleSheetBase, private ::cppu::BaseMutex { public: SdStyleSheet( const OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, sal_uInt16 nMask ); -SdStyleSheet( const SdStyleSheet& ); virtual boolSetParent (const OUString& rParentName) override; virtual SfxItemSet& GetItemSet() override; @@ -149,6 +148,7 @@ protected: std::unique_ptr< ModifyListenerForewarder > mpModifyListenerForewarder; private: +SdStyleSheet( const SdStyleSheet& ) = delete; SdStyleSheet& operator=( const SdStyleSheet& ) = delete; }; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 5fabb740dbd2..0cfc22087dbe 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -138,15 +138,6 @@ SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& { } -SdStyleSheet::SdStyleSheet( const SdStyleSheet & r ) -: SdStyleSheetBase( r ) -, ::cppu::BaseMutex() -, msApiName( r.msApiName ) -, mxPool( r.mxPool ) -, mrBHelper( m_aMutex ) -{ -} - SdStyleSheet::~SdStyleSheet() { delete pSet; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdpage.hxx |2 +- sd/source/core/sdpage.cxx |2 -- sd/source/core/sdpage2.cxx |6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) New commits: commit 02d306a23acf842e62dfc317396296425b31c964 Author: Stephan Bergmann Date: Wed Jun 14 11:47:28 2017 +0200 Use unique_ptr for SdPage::mpItems Change-Id: I28025e8896331926d30e748f7c945973b978cb32 diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 45d3b0e78262..4fef9099de04 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -134,7 +134,7 @@ protected: virtual css::uno::Reference< css::uno::XInterface > createUnoPage() override; -SfxItemSet* mpItems; +std::unique_ptr mpItems; SfxItemSet* getOrCreateItems(); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 6cb7963bcacd..dd4f403344a2 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -185,8 +185,6 @@ SdPage::~SdPage() clearChildNodes(mxAnimationNode); -delete mpItems; - Clear(); } diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 977038901c9a..c8c5b946776c 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -19,7 +19,7 @@ #include #include - +#include #include #include #include @@ -479,9 +479,9 @@ SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const SfxItemSet* SdPage::getOrCreateItems() { if( mpItems == nullptr ) -mpItems = new SfxItemSet( pModel->GetItemPool(), SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES ); +mpItems = o3tl::make_unique( pModel->GetItemPool(), SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES ); -return mpItems; +return mpItems.get(); } bool SdPage::setAlienAttributes( const css::uno::Any& rAttributes ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Annotation.hxx |2 ++ sd/source/core/annotations/Annotation.cxx | 21 ++--- sd/source/ui/annotations/annotationmanager.cxx | 12 ++-- 3 files changed, 30 insertions(+), 5 deletions(-) New commits: commit 42ecf7b5f62ed4faabdce80722d1d3f43ca4fb9a Author: Marco Cecchetti Date: Sat May 20 11:55:44 2017 +0200 lok: impress: add support for undoing comment editing Conflicts: sd/source/ui/annotations/annotationmanager.cxx Change-Id: I735dd68d658f007ddd44d6acf692ee9b4555eb53 Reviewed-on: https://gerrit.libreoffice.org/37816 Tested-by: Jenkins Reviewed-by: Marco Cecchetti diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx index a4203575a732..d13496cbdcc9 100644 --- a/sd/inc/Annotation.hxx +++ b/sd/inc/Annotation.hxx @@ -39,6 +39,8 @@ void createAnnotation( css::uno::Reference< css::office::XAnnotation >& xAnnotat SdrUndoAction* CreateUndoInsertOrRemoveAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, bool bInsert ); +void CreateChangeUndo(const css::uno::Reference< css::office::XAnnotation >& xAnnotation); + sal_uInt32 getAnnotationId(const css::uno::Reference & xAnnotation); const SdPage* getAnnotationPage(const css::uno::Reference& xAnnotation); diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx index be6ecf1b44fe..50ff84fbba1c 100644 --- a/sd/source/core/annotations/Annotation.cxx +++ b/sd/source/core/annotations/Annotation.cxx @@ -102,11 +102,11 @@ public: virtual void SAL_CALL setDateTime(const util::DateTime & the_value) override; virtual Reference< XText > SAL_CALL getTextRange() override; +void createChangeUndo(); + private: // destructor is private and will be called indirectly by the release call virtual ~Annotation() {} -void createChangeUndo(); - // override WeakComponentImplHelperBase::disposing() // This function is called upon disposing the component, // if your component needs special work when it becomes @@ -144,6 +144,7 @@ struct AnnotationData OUString m_Author; OUString m_Initials; util::DateTime m_DateTime; +OUString m_Text; void get( const rtl::Reference< Annotation >& xAnnotation ) { @@ -152,6 +153,8 @@ struct AnnotationData m_Author = xAnnotation->getAuthor(); m_Initials = xAnnotation->getInitials(); m_DateTime = xAnnotation->getDateTime(); +Reference xText(xAnnotation->getTextRange()); +m_Text = xText->getString(); } void set( const rtl::Reference< Annotation >& xAnnotation ) @@ -161,6 +164,8 @@ struct AnnotationData xAnnotation->setAuthor(m_Author); xAnnotation->setInitials(m_Initials); xAnnotation->setDateTime(m_DateTime); +Reference xText(xAnnotation->getTextRange()); +xText->setString(m_Text); } }; @@ -381,6 +386,13 @@ SdrUndoAction* CreateUndoInsertOrRemoveAnnotation( const Reference< XAnnotation } } +void CreateChangeUndo(const css::uno::Reference< css::office::XAnnotation >& xAnnotation) +{ +Annotation* pAnnotation = dynamic_cast(xAnnotation.get()); +if (pAnnotation) +pAnnotation->createChangeUndo(); +} + sal_uInt32 getAnnotationId(const Reference& xAnnotation) { Annotation* pAnnotation = dynamic_cast(xAnnotation.get()); @@ -398,7 +410,6 @@ const SdPage* getAnnotationPage(const Reference& xAnnotation) return nullptr; } - namespace { std::string lcl_LOKGetCommentPayload(CommentNotificationType nType, Reference& rxAnnotation) @@ -526,12 +537,16 @@ void UndoAnnotation::Undo() { maRedoData.get( mxAnnotation ); maUndoData.set( mxAnnotation ); +Reference< XAnnotation > xAnnotation( mxAnnotation.get() ); +LOKCommentNotifyAll( CommentNotificationType::Modify, xAnnotation ); } void UndoAnnotation::Redo() { maUndoData.get( mxAnnotation ); maRedoData.set( mxAnnotation ); +Reference< XAnnotation > xAnnotation( mxAnnotation.get() ); +LOKCommentNotifyAll( CommentNotificationType::Modify, xAnnotation ); } } // namespace sd diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 6e61ee2dd5f7..854e6cf226a2 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -406,6 +406,9 @@ void AnnotationManagerImpl::ExecuteEditAnnotation(SfxRequest& rReq) OUString sText; if (pArgs) { +if (mpDoc->IsUndoEnabled()) +mpDoc->BegUndo(SdResId(STR_ANNOTATION_UNDO_EDIT)); + const SfxPoolItem* pPoolItem = nullptr; if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_POSTIT_ID, true, &pPoolItem)) { @@ -417,15 +420,20 @@ void AnnotationManagerImpl::ExecuteEditAnnotation(SfxRequest& rReq) if (xAnnotation.is() && !sText.isEmpty())
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Annotation.hxx |9 +++ sd/source/core/annotations/Annotation.cxx | 69 + sd/source/ui/annotations/annotationmanager.cxx | 62 +- 3 files changed, 82 insertions(+), 58 deletions(-) New commits: commit b29363a2ec4509b79fca57842a529b4ce460516e Author: Marco Cecchetti Date: Fri May 19 13:01:25 2017 +0200 lok: impress: undoing comment deletion doesn't work Change-Id: I3399ea4131acde42bdd307a8438a9129a83817f2 Reviewed-on: https://gerrit.libreoffice.org/37815 Tested-by: Jenkins Reviewed-by: Marco Cecchetti diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx index 27f1d51c969d..a4203575a732 100644 --- a/sd/inc/Annotation.hxx +++ b/sd/inc/Annotation.hxx @@ -29,8 +29,12 @@ namespace com { namespace sun { namespace star { namespace office { class XAnnotation; } } } } +class SfxViewShell; + namespace sd { +enum class CommentNotificationType { Add, Modify, Remove }; + void createAnnotation( css::uno::Reference< css::office::XAnnotation >& xAnnotation, SdPage* pPage ); SdrUndoAction* CreateUndoInsertOrRemoveAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, bool bInsert ); @@ -39,6 +43,11 @@ sal_uInt32 getAnnotationId(const css::uno::Reference & const SdPage* getAnnotationPage(const css::uno::Reference& xAnnotation); +void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell* pViewShell, +css::uno::Reference& rxAnnotation); + +void LOKCommentNotifyAll(CommentNotificationType nType, +css::uno::Reference& rxAnnotation); } #endif diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx index cf1eeb41e703..be6ecf1b44fe 100644 --- a/sd/source/core/annotations/Annotation.cxx +++ b/sd/source/core/annotations/Annotation.cxx @@ -21,15 +21,26 @@ #include "osl/time.h" +#include + #include #include #include #include +#include +#include #include #include #include +#include +#include + +#include + +#include + #include "Annotation.hxx" #include "drawdoc.hxx" #include "notifydocumentevent.hxx" @@ -387,6 +398,62 @@ const SdPage* getAnnotationPage(const Reference& xAnnotation) return nullptr; } + +namespace +{ +std::string lcl_LOKGetCommentPayload(CommentNotificationType nType, Reference& rxAnnotation) +{ +boost::property_tree::ptree aAnnotation; +aAnnotation.put("action", (nType == CommentNotificationType::Add ? "Add" : + (nType == CommentNotificationType::Remove ? "Remove" : +(nType == CommentNotificationType::Modify ? "Modify" : "???"; +aAnnotation.put("id", sd::getAnnotationId(rxAnnotation)); +if (nType != CommentNotificationType::Remove && rxAnnotation.is()) +{ +aAnnotation.put("id", sd::getAnnotationId(rxAnnotation)); +aAnnotation.put("author", rxAnnotation->getAuthor()); +aAnnotation.put("dateTime", utl::toISO8601(rxAnnotation->getDateTime())); +uno::Reference xText(rxAnnotation->getTextRange()); +aAnnotation.put("text", xText->getString()); +const SdPage* pPage = sd::getAnnotationPage(rxAnnotation); +aAnnotation.put("parthash", pPage ? OString::number(pPage->GetHashCode()) : OString()); +} + +boost::property_tree::ptree aTree; +aTree.add_child("comment", aAnnotation); +std::stringstream aStream; +boost::property_tree::write_json(aStream, aTree); + +return aStream.str(); +} +} // unonymous ns + +void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell* pViewShell, Reference& rxAnnotation) +{ +// callbacks only if tiled annotations are explicitly turned off by LOK client +if (!comphelper::LibreOfficeKit::isActive() || comphelper::LibreOfficeKit::isTiledAnnotations()) +return ; + +std::string aPayload = lcl_LOKGetCommentPayload(nType, rxAnnotation); +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_COMMENT, aPayload.c_str()); +} + +void LOKCommentNotifyAll(CommentNotificationType nType, Reference& rxAnnotation) +{ +// callbacks only if tiled annotations are explicitly turned off by LOK client +if (!comphelper::LibreOfficeKit::isActive() || comphelper::LibreOfficeKit::isTiledAnnotations()) +return ; + +std::string aPayload = lcl_LOKGetCommentPayload(nType, rxAnnotation); + +const SfxViewShell* pViewShell = SfxViewShell::GetFirst(); +while (pViewShell) +{ +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_COMMENT, aPayload.c_str()); +pViewShell = SfxViewShell::GetNext(*pViewShell); +} +} + UndoInsertOrRemoveAnnotation::UndoInsertOrRemoveAnnotation( Annotation& rAnnotation, bool bInsert ) : SdrUndoAction( *rAnnotation.GetModel() ) , mxAnnotation( &rAnnotation ) @@ -423,6 +490,7 @@ void UndoInsertOrRemoveAnnotation::Undo() else { pPag
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdabstdlg.hxx |2 +- sd/source/ui/dlg/prltempl.cxx |4 ++-- sd/source/ui/dlg/sddlgfact.cxx |4 ++-- sd/source/ui/dlg/sddlgfact.hxx |2 +- sd/source/ui/func/fuprobjs.cxx |2 +- sd/source/ui/func/futempl.cxx |2 +- sd/source/ui/inc/prltempl.hxx |2 +- 7 files changed, 9 insertions(+), 9 deletions(-) New commits: commit d7f89eef8bf46b67a730cffa38e954db3c9cda0a Author: Caolán McNamara Date: Fri May 19 11:56:18 2017 +0100 SdResId used just for its id Change-Id: Ic9a762c23a356ea5cb67d03e679292d440311da8 diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 7f763c690346..5372a83252d5 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -194,7 +194,7 @@ public: virtual VclPtr CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) = 0; virtual VclPtr CreateRemoteDialog( vcl::Window* pWindow ) = 0; -virtual VclPtr CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; +virtual VclPtr CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; virtual VclPtrCreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; virtual VclPtr CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; virtual VclPtr CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 70d437ba8e40..71ab78a7acff 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -50,7 +50,7 @@ */ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, -SdResId DlgId, +sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects _ePO, SfxStyleSheetBasePool* pSSPool ) : @@ -155,7 +155,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, if( !aCJKOptions.IsAsianTypographyEnabled() ) RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" ); -if (DlgId.GetId() == TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND) +if (nDlgId == TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND) { RemoveTabPage( "RID_SVXPAGE_LINE"); diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 23289ab93810..853d6cbcae7c 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -381,9 +381,9 @@ VclPtr SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl: return VclPtr::Create( VclPtr<::sd::RemoteDialog>::Create( pParent ) ); } -VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) +VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) { -return VclPtr::Create( VclPtr::Create( pDocSh, pParent, DlgId, rStyleBase, ePO, pSSPool ) ); +return VclPtr::Create( VclPtr::Create( pDocSh, pParent, nDlgId, rStyleBase, ePO, pSSPool ) ); } VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 87c245b601c7..4c1c9332b91c 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -228,7 +228,7 @@ public: virtual VclPtr CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) override; virtual VclPtr CreateRemoteDialog( vcl::Window* pWindow ) override; // ad for RemoteDialog -virtual VclPtr CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) override; +virtual VclPtr CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyl
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdmod.hxx |8 +--- sd/source/filter/eppt/epptbase.hxx |8 ++-- sd/source/ui/inc/slideshow.hxx |2 -- 3 files changed, 3 insertions(+), 15 deletions(-) New commits: commit 0025fc13d805751f8eeb14febbdd0033e0a6d91e Author: Jochen Nitschke Date: Wed May 3 14:53:00 2017 +0200 include cleanup after latest loplugin:checkunusedparams in sd Change-Id: I9f35343ed3e7ec2e709d7d910297eb0a63945a34 Reviewed-on: https://gerrit.libreoffice.org/37202 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index ffd1660a2c9e..6ba30070212f 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -25,9 +25,8 @@ #include #include "sddllapi.h" -#include #include -#include +#include #include #include #include @@ -41,14 +40,9 @@ class EditFieldInfo; class SdTransferable; class SvNumberFormatter; class SfxErrorHandler; -class SdDrawDocument; class SfxFrame; namespace svtools { class ColorConfig; } -namespace sd { -class DrawDocShell; -} - namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } } diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index cd5c58609c42..8213a6c4a560 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -30,13 +30,11 @@ #include #include #include -#include #include -#include #include -#include +#include #include -#include +#include #include "grouptable.hxx" @@ -66,8 +64,6 @@ enum class EppLayout #define EPP_LAYOUT_SIZE 25 -class PptEscherEx; - struct PHLayout { EppLayout nLayout; diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index b276da8e03df..ce60b88c9d6e 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -48,7 +48,6 @@ class SdDrawDocument; class KeyEvent; class OutputDevice; class Size; -namespace tools { class Rectangle; } namespace vcl { class Window; } class SfxRequest; class WorkWindow; @@ -65,7 +64,6 @@ namespace sd { class SlideshowImpl; -class Window; class View; class ViewShell; class ViewShellBase; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |8 +- sd/inc/sdmod.hxx |6 -- sd/inc/sdpage.hxx|2 sd/source/core/drawdoc.cxx |4 - sd/source/core/drawdoc3.cxx |3 - sd/source/core/drawdoc4.cxx |4 - sd/source/core/sdpage.cxx| 21 +++ sd/source/filter/eppt/eppt.cxx |7 -- sd/source/filter/eppt/eppt.hxx |2 sd/source/filter/eppt/epptbase.hxx |4 - sd/source/filter/eppt/epptso.cxx | 20 +++ sd/source/filter/eppt/pptexanimations.cxx| 42 +++ sd/source/filter/eppt/pptexanimations.hxx| 11 +-- sd/source/filter/eppt/pptx-stylesheet.cxx|4 - sd/source/filter/html/htmlex.cxx |9 +-- sd/source/filter/html/htmlex.hxx |2 sd/source/filter/ppt/pptin.cxx |2 sd/source/ui/app/optsitem.cxx|2 sd/source/ui/app/sdmod.cxx |8 -- sd/source/ui/app/sdmod2.cxx |2 sd/source/ui/dlg/docprev.cxx |4 - sd/source/ui/dlg/sdtreelb.cxx|4 - sd/source/ui/framework/factories/BasicViewFactory.cxx|5 - sd/source/ui/func/fuexpand.cxx |2 sd/source/ui/func/fuinsfil.cxx |6 +- sd/source/ui/func/fupoor.cxx |4 - sd/source/ui/func/fusumry.cxx|2 sd/source/ui/inc/DrawViewShell.hxx | 19 +- sd/source/ui/inc/FrameView.hxx |4 - sd/source/ui/inc/GraphicViewShell.hxx|1 sd/source/ui/inc/OutlineView.hxx |2 sd/source/ui/inc/OutlineViewShell.hxx|2 sd/source/ui/inc/PresentationViewShell.hxx |2 sd/source/ui/inc/SlideSorter.hxx |2 sd/source/ui/inc/TabControl.hxx |2 sd/source/ui/inc/View.hxx|6 +- sd/source/ui/inc/ViewShell.hxx | 22 ++- sd/source/ui/inc/optsitem.hxx|2 sd/source/ui/inc/sdtreelb.hxx|2 sd/source/ui/inc/slideshow.hxx |4 - sd/source/ui/sidebar/MasterPagesSelector.cxx |2 sd/source/ui/sidebar/PreviewValueSet.cxx |2 sd/source/ui/sidebar/PreviewValueSet.hxx |2 sd/source/ui/slideshow/showwin.cxx |2 sd/source/ui/slideshow/slideshow.cxx |6 +- sd/source/ui/slideshow/slideshowimpl.cxx |8 +- sd/source/ui/slideshow/slideshowimpl.hxx |4 - sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx |5 - sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx |3 - sd/source/ui/slidesorter/controller/SlsClipboard.cxx |6 +- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |4 - sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx |2 sd/source/ui/slidesorter/shell/SlideSorter.cxx | 10 +-- sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |4 - sd/source/ui/unoidl/unomodel.cxx |4 - sd/source/ui/unoidl/unopage.cxx |2 sd/source/ui/view/Outliner.cxx |8 +- sd/source/ui/view/ViewShellBase.cxx |8 +- sd/source/ui/view/drawview.cxx |2 sd/source/ui/view/drviews8.cxx |2 sd/source/ui/view/drviewsa.cxx | 10 +-- sd/source/ui/view/drviewse.cxx |8 +- sd/source/ui/view/frmview.cxx|4 - sd/source/ui/view/grviewsh.cxx |2 sd/source/ui/view/outlnvsh.cxx | 14 ++--- sd/source/ui/view/outlview.cxx |4 - sd/source/ui/view/presvish.cxx |8 +- sd/source/ui/view/sdview2.cxx|8 +- sd/source/ui/view/sdwindow.cxx |2 sd/source/ui/view/tabcontr.cxx |6 +- sd/source/ui/view/viewshe2.cxx | 14 ++--- sd/source/ui/view/viewshel.cxx | 10 +-- 72 files changed, 188 insertions(+), 248 deletions(-) New commits: commit 87661a7ab3275195ca251188ce4d7825fd038de6 Author: Noel G
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/app.hrc |1 sd/source/ui/animations/CustomAnimationPane.cxx | 105 +--- sd/source/ui/animations/CustomAnimationPane.hxx |2 sd/source/ui/func/fuconbez.cxx | 13 ++ sd/source/ui/inc/fuconbez.hxx |1 5 files changed, 113 insertions(+), 9 deletions(-) New commits: commit 17495047e53885a224c2180c10ec7ecece35135d Author: Katarina Behrens Date: Mon May 1 16:43:46 2017 +0200 tdf#105703: Restore user-defined motion paths for animations Yet another fallback from Google Summer of Regressions. The rest of the functionality has been removed by loplugin and other hyperactive code cleaners, so I've restored it, mostly unmodified. Change-Id: If0576abe9ce86c6f939d54bcf8f872dfce131e68 Reviewed-on: https://gerrit.libreoffice.org/37138 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 4dfb5122295e..58f0d0bf7afe 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -445,6 +445,7 @@ // Add companion for the SID_HIDE_SLIDE (that is defined in svx) #define SID_SHOW_SLIDE (SID_SD_START+441) +#define SID_ADD_MOTION_PATH (SID_SD_START+442) // FREE #define SID_ZOOM_MODE (SID_SD_START+447) diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 86c77ac79387..20bd4c1f23fa 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1988,6 +1988,63 @@ double CustomAnimationPane::getDuration() return fDuration; } +PathKind CustomAnimationPane::getCreatePathKind() const +{ +PathKind eKind = PathKind::NONE; + +if( mpLBAnimation->GetSelectEntryCount() == 1 ) +{ +const sal_Int32 nPos = mpLBAnimation->GetSelectEntryPos(); +if( nPos == mnCurvePathPos ) +{ +eKind = PathKind::CURVE; +} +else if( nPos == mnPolygonPathPos ) +{ +eKind = PathKind::POLYGON; +} +else if( nPos == mnFreeformPathPos ) +{ +eKind = PathKind::FREEFORM; +} +} + +return eKind; +} + +void CustomAnimationPane::createPath( PathKind eKind, std::vector< Any >& rTargets, double fDuration) +{ +sal_uInt16 nSID = 0; + +switch( eKind ) +{ +case PathKind::CURVE: nSID = SID_DRAW_BEZIER_NOFILL; break; +case PathKind::POLYGON: nSID = SID_DRAW_POLYGON_NOFILL; break; +case PathKind::FREEFORM: nSID = SID_DRAW_FREELINE_NOFILL; break; +default: break; +} + +if( nSID ) +{ +DrawViewShell* pViewShell = dynamic_cast< DrawViewShell* >( + FrameworkHelper::Instance(mrBase)->GetViewShell(FrameworkHelper::msCenterPaneURL).get()); + +if( pViewShell ) +{ +DrawView* pView = pViewShell->GetDrawView(); +if( pView ) +pView->UnmarkAllObj(); + +std::vector< Any > aTargets( 1, Any( fDuration ) ); +aTargets.insert( aTargets.end(), rTargets.begin(), rTargets.end() ); +Sequence< Any > aTargetSequence( comphelper::containerToSequence( aTargets ) ); +const SfxUnoAnyItem aItem( SID_ADD_MOTION_PATH, Any( aTargetSequence ) ); +pViewShell->GetViewFrame()->GetDispatcher()->ExecuteList( nSID, SfxCallMode::ASYNCHRON, {&aItem} ); +} +} +} + + /// this link is called when the property box is modified by the user IMPL_LINK_NOARG(CustomAnimationPane, implPropertyHdl, LinkParamNone*, void) { @@ -2054,17 +2111,45 @@ IMPL_LINK_NOARG(CustomAnimationPane, AnimationSelectHdl, ListBox&, void) if( maListSelection.size() == 1 ) { CustomAnimationPresetPtr* pPreset = static_cast< CustomAnimationPresetPtr* >(mpLBAnimation->GetSelectEntryData()); +PathKind ePathKind = getCreatePathKind(); + // tdf#99137, the selected entry may also be a subcategory title, so not an effect // just leave in this case -if (!pPreset) +if ( !pPreset && ( ePathKind == PathKind::NONE ) ) return; -const double fDuration = (*pPreset)->getDuration(); + +EffectSequence::iterator aIter( maListSelection.begin() ); +const EffectSequence::iterator aEnd( maListSelection.end() ); + +if ( ePathKind != PathKind::NONE ) +{ +std::vector< Any > aTargets; +MainSequenceRebuildGuard aGuard( mpMainSequence ); + +while( aIter != aEnd ) +{ +aTargets.push_back( (*aIter)->getTarget() ); +CustomAnimationEffectPtr pEffect = (*aIter++); + +EffectSequenceHelper* pEffectSequence = pEffect->getEffectSequence(); +if( !pEffectSequence ) +pEffectSequence = mpMainSequence.get(); + +// delete the
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/stlfamily.hxx |2 +- sd/source/core/stlfamily.cxx |8 +--- 2 files changed, 2 insertions(+), 8 deletions(-) New commits: commit 71eab1c4b0f7516b57c2bd863335522885fa81f8 Author: Arnold Dumas Date: Fri Feb 10 20:10:11 2017 +0100 tdf#89329: Use unique_ptr for pImpl in stlfamily Change-Id: I0c9df5809a906dbc761f9a51c3424cebb215d0bc Reviewed-on: https://gerrit.libreoffice.org/34132 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/stlfamily.hxx b/sd/inc/stlfamily.hxx index 3d6e624..264a318 100644 --- a/sd/inc/stlfamily.hxx +++ b/sd/inc/stlfamily.hxx @@ -112,7 +112,7 @@ private: SfxStyleFamily mnFamily; rtl::Reference< SfxStyleSheetPool > mxPool; -SdStyleFamilyImpl* mpImpl; +std::unique_ptr mpImpl; }; typedef rtl::Reference< SdStyleFamily > SdStyleFamilyRef; diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index fb80874..2099abc 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -95,7 +95,6 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets() SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, SfxStyleFamily nFamily ) : mnFamily( nFamily ) , mxPool( xPool ) -, mpImpl( nullptr ) { } @@ -111,7 +110,6 @@ SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, SdStyleFamily::~SdStyleFamily() { DBG_ASSERT( !mxPool.is(), "SdStyleFamily::~SdStyleFamily(), dispose me first!" ); -delete mpImpl; } void SdStyleFamily::throwIfDisposed() const @@ -462,11 +460,7 @@ void SAL_CALL SdStyleFamily::dispose( ) if( mxPool.is() ) mxPool.clear(); -if( mpImpl ) -{ -delete mpImpl; -mpImpl = nullptr; -} +mpImpl.reset(); } void SAL_CALL SdStyleFamily::addEventListener( const Reference< XEventListener >& ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/undo/undoobjects.hxx |2 +- sd/source/core/undo/undoobjects.cxx |3 +-- sd/source/filter/eppt/eppt.hxx |7 +-- sd/source/filter/eppt/epptbase.hxx |3 ++- sd/source/filter/eppt/epptso.cxx| 13 +++-- sd/source/filter/ppt/pptin.cxx |3 +-- sd/source/filter/ppt/pptin.hxx |2 +- sd/source/filter/ppt/propread.cxx | 13 ++--- sd/source/filter/ppt/propread.hxx |8 sd/source/ui/func/fupage.cxx| 12 +--- sd/source/ui/inc/fupage.hxx |3 ++- sd/source/ui/inc/unosrch.hxx|2 +- sd/source/ui/unoidl/unosrch.cxx |3 +-- 13 files changed, 33 insertions(+), 41 deletions(-) New commits: commit f3a90d13056ca23708cc4fd9562c99d0b41a4b6f Author: Noel Grandin Date: Tue Jan 17 10:12:10 2017 +0200 new loplugin: useuniqueptr: sd Change-Id: I2fc8a2fa57cc00edf2edab9e3722c824e75cb7e5 Reviewed-on: https://gerrit.libreoffice.org/33204 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/inc/undo/undoobjects.hxx b/sd/inc/undo/undoobjects.hxx index ee2d3bf..a1d208c 100644 --- a/sd/inc/undo/undoobjects.hxx +++ b/sd/inc/undo/undoobjects.hxx @@ -92,7 +92,7 @@ public: virtual void Redo() override; private: -SfxUndoAction* mpUndoAnimation; +std::unique_ptr mpUndoAnimation; boolmbNewEmptyPresObj; SdrObjectWeakRef mxSdrObject; }; diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx index d4e7d63..101fd27 100644 --- a/sd/source/core/undo/undoobjects.cxx +++ b/sd/source/core/undo/undoobjects.cxx @@ -186,14 +186,13 @@ UndoObjectSetText::UndoObjectSetText( SdrObject& rObject, sal_Int32 nText ) css::uno::Reference< css::drawing::XShape > xShape( rObject.getUnoShape(), css::uno::UNO_QUERY ); if( pPage->getMainSequence()->hasEffect( xShape ) ) { -mpUndoAnimation = new UndoAnimation( static_cast< SdDrawDocument* >( pPage->GetModel() ), pPage ); +mpUndoAnimation.reset( new UndoAnimation( static_cast< SdDrawDocument* >( pPage->GetModel() ), pPage ) ); } } } UndoObjectSetText::~UndoObjectSetText() { -delete mpUndoAnimation; } void UndoObjectSetText::Undo() diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 98718fe..0447c25 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -135,12 +135,7 @@ struct PPTExOleObjEntry struct TextRuleEntry { -SvMemoryStream* pOut; - -explicit TextRuleEntry() : -pOut ( nullptr ){}; - -~TextRuleEntry() { delete pOut; }; +std::unique_ptr pOut; }; class TextObjBinary : public TextObj diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index af03a99..8925ff2 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -120,7 +120,8 @@ class PPTExBulletProvider SvMemoryStream aBuExOutlineStream; SvMemoryStream aBuExMasterStream; -EscherGraphicProvider* pGraphicProv; +std::unique_ptr +pGraphicProv; public: diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index aa1ffcb0..8be0b03 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -97,13 +97,12 @@ using namespace ::com::sun::star; #define FIXED_PITCH 0x01 PPTExBulletProvider::PPTExBulletProvider() +: pGraphicProv( new EscherGraphicProvider( EscherGraphicProviderFlags::UseInstances ) ) { -pGraphicProv = new EscherGraphicProvider( EscherGraphicProviderFlags::UseInstances ); } PPTExBulletProvider::~PPTExBulletProvider() { -delete pGraphicProv; } sal_uInt16 PPTExBulletProvider::GetId( const OString& rUniqueId, Size& rGraphicSize ) @@ -1266,7 +1265,10 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u { SvStream* pRuleOut = &rOut; if ( pTextRule ) -pRuleOut = pTextRule->pOut = new SvMemoryStream( 0x100, 0x100 ); +{ +pTextRule->pOut.reset( new SvMemoryStream( 0x100, 0x100 ) ); +pRuleOut = pTextRule->pOut.get(); +} sal_uInt32 nRulePos = pRuleOut->Tell(); pRuleOut->WriteUInt32( EPP_TextRulerAtom << 16 ).WriteUInt32( 0 ); @@ -2763,12 +2765,11 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplGetText(); ImplWriteTextStyleAtom( *pClientTextBox, nTextType, nPObjects, &aTextRule, aExtBu, nullptr ); ImplWriteExtParaHeader( aExtBu, nPObjects++, nTextType, nPageNumber + 0x100 ); -SvMemoryStream* pOut = aTextRule.pOut; +SvMemorySt
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/sdmod.hxx |5 -- sd/source/ui/app/sdmod.cxx |4 - sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx |2 sd/source/ui/tools/SdGlobalResourceContainer.cxx | 41 --- 4 files changed, 29 insertions(+), 23 deletions(-) New commits: commit 983ac87793a891855c7d25c42fe795908543716c Author: Michael Stahl Date: Fri Jan 13 00:16:02 2017 +0100 tdf#105188 sd: fix shutdown crash after accessing master pages The problem here is that the destructor of SdModule does a lot of things, including destroying an SdXImpressDocument that is referenced from some SdGlobalResourceContainer. This calls SD_MOD() to get the SdModule to get some resource, but at that point SfxApplication::GetModule() returns null, because the sequence was changed from first deleting the SfxModules, then clearing the pointer in ~SfxModule to null, to unique_ptr::reset(), which, at least in libstdc++, is implemented via std::swap, so it clears the pointer before deleting the SfxModule. It appears rather brittle to rely on such a subtle detail, so refactor things so that SdGlobalResourceContainer is no longer owned by SdModule but has its own pet XTerminationListener, which means it will be destroyed earlier, while the SdModule is still fully alive. (regression from f7b1cd66167050afecf487e3d89ea12de74200b5) Change-Id: I7f03f3adf431be8728ef3d65a078b536cb96f959 diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 6a8f735..c96a1b1 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -47,7 +47,6 @@ namespace svtools { class ColorConfig; } namespace sd { class DrawDocShell; -class SdGlobalResourceContainer; } namespace com { namespace sun { namespace star { namespace frame { @@ -156,10 +155,6 @@ private: static SfxFrame* CreateEmptyDocument( const css::uno::Reference< css::frame::XFrame >& i_rFrame ); static SfxFrame* CreateFromTemplate( const OUString& rTemplatePath, const css::uno::Reference< css::frame::XFrame >& i_rFrame ); -/** The resource container controls the lifetime of some singletons. -*/ -::std::unique_ptr< ::sd::SdGlobalResourceContainer> mpResourceContainer; - bool mbEventListenerAdded; /** Take an outline from a text document and create a new impress diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index ebef895..bd02499 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -53,7 +53,6 @@ #include "strings.hrc" #include "res_bmp.hrc" #include "cfgids.hxx" -#include "tools/SdGlobalResourceContainer.hxx" #define SdModule @@ -77,7 +76,6 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 ) pSearchItem(nullptr), pNumberFormatter( nullptr ), bWaterCan(false), -mpResourceContainer(new ::sd::SdGlobalResourceContainer()), mbEventListenerAdded(false), mpColorConfig(new svtools::ColorConfig) { @@ -110,8 +108,6 @@ SdModule::~SdModule() Application::RemoveEventListener( LINK( this, SdModule, EventListenerHdl ) ); } -mpResourceContainer.reset(); - delete mpErrorHdl; mpVirtualRefDevice.disposeAndClear(); } diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx index e1c483e..c8afe89 100644 --- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx +++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx @@ -82,7 +82,7 @@ public: void AddResource (const css::uno::Reference& rxResource); protected: -friend class ::SdModule; +friend class SdGlobalResourceContainerInstance; friend struct ::std::default_delete; class Implementation; diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx index a7f0d54..1465355 100644 --- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx +++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx @@ -19,6 +19,13 @@ #include "tools/SdGlobalResourceContainer.hxx" +#include +#include + +#include + +#include + #include #include @@ -27,13 +34,30 @@ using namespace ::com::sun::star::uno; namespace sd { +class SdGlobalResourceContainerInstance +: public comphelper::unique_disposing_solar_mutex_reset_ptr +{ +public: +SdGlobalResourceContainerInstance() +: comphelper::unique_disposing_solar_mutex_reset_ptr( + uno::Reference(frame::Desktop::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW), +new SdGlobalResourceContainer, true) +{ +} +}; + +namespace { + +struct theSdGlobalResourceContainerInstance : public rtl::Static {}; + +} // namespace + //= SdGlobalResourceContainer::Implementation = class SdGlobalResourceContainer::Implementation { private: friend class SdGlobalResourceCo
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |7 +++ sd/source/core/drawdoc2.cxx | 37 +++ sd/source/ui/docshell/docshel2.cxx |5 ++ sd/source/ui/inc/DrawDocShell.hxx|8 sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 17 5 files changed, 74 insertions(+) New commits: commit 14d05c9b852a0f94c6cbace7cd7887523a89d7d1 Author: Justin Luth Date: Wed Dec 28 22:04:43 2016 +0300 tdf#64588 - prevent loss of non-uniquely-named slide Although the UI prevents someone from renaming slides so that two have the same name, it is still possible to have such non-uniquely named pages apparently. Since drag/drop uses the name to add a slide to the clipboard, it resulted in duplicates of the first found instance of the slidename, and loss of the similarly-named slides when they were dragged to a new location. Change-Id: I2986a7c6c3360162adf9430f645d0dfc73f1d4e2 Reviewed-on: https://gerrit.libreoffice.org/32481 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Thorsten Behrens diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 8c491cd..23a42ac 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -355,6 +355,13 @@ public: SDRPAGE_NOTFOUND (=0x) when such a page does not exist. */ SAL_DLLPRIVATE sal_uInt16 GetPageByName(const OUString& rPgName, bool& rbIsMasterPage ) const; +/** checks, if the given name is a *unique* name for an *existing* slide + +@param rPageName the name of an existing slide + +@return true, if the name is unique and the slide exists +*/ +bool IsPageNameUnique( const OUString& rPageName ) const; SdPage*GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const; sal_uInt16 GetSdPageCount(PageKind ePgKind) const; diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 747d316..190f5c0 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -184,6 +184,43 @@ sal_uInt16 SdDrawDocument::GetPageByName(const OUString& rPgName, bool& rbIsMast return nPageNum; } +bool SdDrawDocument::IsPageNameUnique( const OUString& rPgName ) const +{ +sal_uInt16 nCount = 0; +SdPage* pPage = nullptr; + +// Search all regular pages and all notes pages (handout pages are ignored) +sal_uInt16 nPage = 0; +sal_uInt16 nMaxPages = GetPageCount(); +while (nPage < nMaxPages) +{ +pPage = const_cast(static_cast(GetPage(nPage))); + +if (pPage && pPage->GetName() == rPgName && pPage->GetPageKind() != PageKind::Handout) +nCount++; + +nPage++; +} + +// Search all master pages +nPage = 0; +nMaxPages = GetMasterPageCount(); +while (nPage < nMaxPages) +{ +pPage = const_cast(static_cast(GetMasterPage(nPage))); + +if (pPage && pPage->GetName() == rPgName) +nCount++;; + +nPage++; +} + +if (nCount == 1) +return true; +else +return false; +} + SdPage* SdDrawDocument::GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const { return mpDrawPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum)); diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index ecb95ba..af8320e 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -406,6 +406,11 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr return bCanUseNewName; } +bool DrawDocShell::IsPageNameUnique( const OUString & rPageName ) const +{ +return mpDoc->IsPageNameUnique(rPageName); +} + IMPL_LINK( DrawDocShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool ) { OUString aNewName; diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 8d1ad05..ccb1395 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -183,6 +183,14 @@ public: */ boolIsNewPageNameValid( OUString & rInOutPageName, bool bResetStringIfStandardName = false ); +/** checks, if the given name is a *unique* name for an *existing* slide + +@param rPageName the name of an existing slide + +@return true, if the name is unique and the slide exists +*/ +boolIsPageNameUnique(const OUString& rPagName) const; + /** Return the reference device for the current document. When the inherited implementation returns a device then this is passed to the caller. Otherwise the returned value depends on the printer diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index cb73c3d..5014da6 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -3
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/cusshow.hxx |2 sd/inc/stlpool.hxx |1 sd/source/core/cusshow.cxx |9 sd/source/core/stlpool.cxx |7 sd/source/filter/ppt/pptinanimations.cxx |8 sd/source/filter/ppt/pptinanimations.hxx |2 sd/source/filter/ppt/propread.cxx |7 sd/source/filter/ppt/propread.hxx |4 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx |7 sd/source/ui/animations/CustomAnimationPane.cxx| 138 -- sd/source/ui/animations/CustomAnimationPane.hxx|3 sd/source/ui/animations/SlideTransitionPane.cxx| 12 sd/source/ui/annotations/annotationmanager.cxx | 24 - sd/source/ui/annotations/annotationmanagerimpl.hxx |2 sd/source/ui/annotations/annotationwindow.cxx |7 sd/source/ui/annotations/annotationwindow.hxx |2 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |8 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx |7 sd/source/ui/framework/module/ModuleController.cxx | 35 +- sd/source/ui/framework/module/ResourceManager.cxx | 23 - sd/source/ui/framework/module/ResourceManager.hxx |1 sd/source/ui/inc/AccessibleSlideSorterView.hxx |8 sd/source/ui/inc/DrawViewShell.hxx |1 sd/source/ui/inc/OutlineViewShell.hxx |1 sd/source/ui/inc/SlideSorter.hxx |6 sd/source/ui/inc/SlideTransitionPane.hxx |1 sd/source/ui/inc/drawview.hxx |2 sd/source/ui/inc/framework/ModuleController.hxx|7 sd/source/ui/inc/slideshow.hxx |1 sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx |1 sd/source/ui/inc/uiobject.hxx |2 sd/source/ui/presenter/PresenterTextView.cxx |9 sd/source/ui/sidebar/MasterPagesSelector.cxx |9 sd/source/ui/sidebar/MasterPagesSelector.hxx |1 sd/source/ui/slideshow/slideshow.cxx |8 sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx |8 sd/source/ui/slidesorter/controller/SlsListener.cxx| 16 - sd/source/ui/slidesorter/controller/SlsListener.hxx|6 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |7 sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx |1 sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx |4 sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx |6 sd/source/ui/slidesorter/shell/SlideSorter.cxx |7 sd/source/ui/slidesorter/view/SlsToolTip.cxx | 13 sd/source/ui/tools/EventMultiplexer.cxx| 24 - sd/source/ui/tools/TimerBasedTaskExecution.cxx | 10 sd/source/ui/uitest/uiobject.cxx |7 sd/source/ui/view/drawview.cxx | 18 - sd/source/ui/view/drviewse.cxx |7 sd/source/ui/view/outlnvs2.cxx |7 50 files changed, 139 insertions(+), 368 deletions(-) New commits: commit 89687d651eabcf64816c1b25defe38c7b68dd468 Author: Noel Grandin Date: Thu Oct 27 14:49:43 2016 +0200 loplugin:expandablemethods in sd Change-Id: I87a537928bdf42285448bba7cb50c497f2637c3c Reviewed-on: https://gerrit.libreoffice.org/30330 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index 006a050..a6edd30 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -59,8 +59,6 @@ public: * If pNewPage is 0 then removes all occurrences of pOldPage. */ void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ); -/** Removes all occurrences of pPage. */ -void RemovePage( const SdPage* pPage ); void SetName(const OUString& rName); const OUString& GetName() const { return aName;} diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index c1a8bcb..b016db6 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -121,7 +121,6 @@ public: virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) throw (css:
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/Outliner.hxx | 21 - sd/inc/OutlinerIterator.hxx | 10 sd/inc/drawdoc.hxx | 10 sd/source/core/drawdoc.cxx | 10 sd/source/core/drawdoc4.cxx |4 sd/source/core/sdpage.cxx |4 sd/source/core/text/textapi.cxx |4 sd/source/filter/xml/sdxmlwrp.cxx |2 sd/source/ui/app/sdmod2.cxx |6 sd/source/ui/dlg/SpellDialogChildWindow.cxx |2 sd/source/ui/docshell/docshel4.cxx |4 sd/source/ui/func/fuexpand.cxx |4 sd/source/ui/func/fuhhconv.cxx |4 sd/source/ui/func/fuinsfil.cxx |2 sd/source/ui/func/fusearch.cxx |4 sd/source/ui/func/fusumry.cxx |4 sd/source/ui/inc/SpellDialogChildWindow.hxx |6 sd/source/ui/inc/fuhhconv.hxx |6 sd/source/ui/inc/fusearch.hxx |5 sd/source/ui/unoidl/UnoDocumentSettings.cxx |6 sd/source/ui/unoidl/unoobj.cxx |2 sd/source/ui/view/Outliner.cxx | 311 ++-- sd/source/ui/view/OutlinerIterator.cxx |2 sd/source/ui/view/outlview.cxx |8 24 files changed, 221 insertions(+), 220 deletions(-) New commits: commit 04e544dd51d9a0d3a1d19c42e1ec5dc63f7284cb Author: Noel Grandin Date: Fri Oct 14 10:10:44 2016 +0200 rename sd::Outliner to SdOutliner having a top level data structure share a name with one of its supertypes makes it very hard to grep Change-Id: Id5145c12c8fd9e8c8fb09897896eae0da7bfdefe diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 98249bd..aef606b 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -57,6 +57,9 @@ struct SearchSelection } }; +} // end of namespace sd + + /** The main purpose of this class is searching and replacing as well as spelling of impress documents. The main part of both tasks lies in iterating over the pages and view modes of a document and apply the @@ -109,7 +112,7 @@ struct SearchSelection queried. This is only sufficient for searching the outline view. */ -class Outliner +class SdOutliner : public SdrOutliner { public: @@ -126,11 +129,11 @@ public: OutlinerMode::OutlineView are defined in editeng/outliner.hxx. */ -Outliner( SdDrawDocument* pDoc, OutlinerMode nMode ); -virtual ~Outliner() override; +SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode ); +virtual ~SdOutliner() override; /// Forbid copy construction and copy assignment -Outliner(const Outliner&) = delete; -Outliner& operator=(const Outliner&) = delete; +SdOutliner(const Outliner&) = delete; +SdOutliner& operator=(const Outliner&) = delete; /** Despite the name this method is called prior to spell checking *and* searching and replacing. The position of current view @@ -202,7 +205,7 @@ private: pointer to avoid keeping it alive when the view is changed during searching. */ -std::weak_ptr mpWeakViewShell; +std::weak_ptr<::sd::ViewShell> mpWeakViewShell; /// This window contains the view. VclPtr< ::sd::Window> mpWindow; /// The document on whose objects and pages this class operates. @@ -363,7 +366,7 @@ private: The return value specifies whether the search ended () or another call to this method is required (). */ -bool SearchAndReplaceOnce(std::vector* pSelections = nullptr); +bool SearchAndReplaceOnce(std::vector<::sd::SearchSelection>* pSelections = nullptr); /** Detect changes of the document or view and react accordingly. Such changes may occur because different calls to @@ -511,7 +514,7 @@ private: It handles i.e. registering at the associated view as selection change listener. */ -void SetViewShell (const std::shared_ptr& rpViewShell); +void SetViewShell (const std::shared_ptr<::sd::ViewShell>& rpViewShell); /** Activate or deactivate the search in the current selection. Call this method whenever the selection has changed. This method creates @@ -538,8 +541,6 @@ private: sal_uInt16 ShowModalMessageBox (Dialog& rMessageBox); }; -} // end of namespace sd - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx index 9adac49..0bb838b 100644 --- a/sd/inc/OutlinerIterator.hxx +++ b/sd/inc/OutlinerIterator.hxx @@ -28,11 +28,11 @@ #include class SdDrawDocument; +class SdOutliner; namespace sd { class ViewShell; -class Outliner; namespace outliner { @@ -141,14 +141,14 @@ private: std::unique_ptr mxIterator; }; -/** This class wraps the Outliner class and represents it as +/** This class wraps the SdOutliner class and represents it
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |2 +- sd/source/core/drawdoc2.cxx |3 +-- sd/source/ui/func/fudraw.cxx |4 ++-- sd/source/ui/func/fusel.cxx |2 +- 4 files changed, 5 insertions(+), 6 deletions(-) New commits: commit ff2a399b61f34f7920e594e8cbb6c19045b24956 Author: Stephan Bergmann Date: Fri Oct 7 18:52:00 2016 +0200 SdDrawDocument::GetHitIMapObject rCmpWnd param is unused ...ever since 8a6861a404c082226b52df335e3b0046164e6432 "initial import" Change-Id: Id048d7ae1a1aa855b33e2490154ee449f16c9b2f diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index fadb16d..1bb0467 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -438,7 +438,7 @@ public: static SdAnimationInfo* GetShapeUserData(SdrObject& rObject, bool bCreate = false ); SAL_DLLPRIVATE static SdIMapInfo* GetIMapInfo( SdrObject* pObject ); -SAL_DLLPRIVATE static IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const vcl::Window& rCmpWnd ); +SAL_DLLPRIVATE static IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint ); SAL_DLLPRIVATE CharClass* GetCharClass() const { return mpCharClass; } diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 530d0d6..6171e19 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1000,8 +1000,7 @@ SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) } IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj, - const Point& rWinPoint, - const vcl::Window& /* rCmpWnd */ ) + const Point& rWinPoint ) { SdIMapInfo* pIMapInfo = GetIMapInfo( pObj ); IMapObject* pIMapObj = nullptr; diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index f3d7575..b8d44f1 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -659,7 +659,7 @@ bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos) } } else if (bImageMapInfo && - SdDrawDocument::GetHitIMapObject(pObj, rPos, *mpWindow)) + SdDrawDocument::GetHitIMapObject(pObj, rPos)) { /** * ImageMap @@ -783,7 +783,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // URL for IMapObject underneath pointer is help text if ( SdDrawDocument::GetIMapInfo(pObj) ) { -IMapObject* pIMapObj = SdDrawDocument::GetHitIMapObject(pObj, aPos, *mpWindow ); +IMapObject* pIMapObj = SdDrawDocument::GetHitIMapObject(pObj, aPos); if ( pIMapObj ) { diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index e8f3b6e6..90df8c9 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1222,7 +1222,7 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) { if ( SdDrawDocument::GetIMapInfo( pObj ) ) { -const IMapObject* pIMapObj = SdDrawDocument::GetHitIMapObject( pObj, rPos, *mpWindow ); +const IMapObject* pIMapObj = SdDrawDocument::GetHitIMapObject( pObj, rPos ); if ( pIMapObj && !pIMapObj->GetURL().isEmpty() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source starmath/inc starmath/source
sd/inc/stlsheet.hxx |1 - sd/source/core/stlsheet.cxx |5 - sd/source/ui/dlg/PhotoAlbumDialog.cxx |5 - sd/source/ui/dlg/PhotoAlbumDialog.hxx |2 -- sd/source/ui/dlg/animobjs.cxx |5 - sd/source/ui/docshell/docshel2.cxx|5 - sd/source/ui/func/fuconstr.cxx|5 - sd/source/ui/func/fusel.cxx |5 - sd/source/ui/inc/ClientView.hxx |2 -- sd/source/ui/inc/DrawDocShell.hxx |1 - sd/source/ui/inc/DrawViewShell.hxx|2 -- sd/source/ui/inc/Ruler.hxx|1 - sd/source/ui/inc/View.hxx |7 --- sd/source/ui/inc/animobjs.hxx |1 - sd/source/ui/inc/drawview.hxx |1 - sd/source/ui/inc/fuconstr.hxx |2 -- sd/source/ui/inc/fusel.hxx|1 - sd/source/ui/slideshow/showwin.cxx| 11 --- sd/source/ui/slideshow/showwindow.hxx |2 -- sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx |3 --- sd/source/ui/slidesorter/view/SlideSorterView.cxx |5 - sd/source/ui/view/clview.cxx |5 - sd/source/ui/view/drawview.cxx| 10 -- sd/source/ui/view/drviews1.cxx|9 - sd/source/ui/view/sdruler.cxx |5 - sd/source/ui/view/sdview.cxx |6 -- sd/source/ui/view/sdview2.cxx | 11 --- starmath/inc/dialog.hxx |5 + starmath/source/dialog.cxx|5 - starmath/source/uiobject.cxx |6 -- starmath/source/uiobject.hxx |3 --- 31 files changed, 1 insertion(+), 136 deletions(-) New commits: commit 7618302b9c15580c1e00af042c586837f6f0bb0f Author: Noel Grandin Date: Wed Oct 5 12:06:47 2016 +0200 loplugin:unnecessaryoverride in sd/starmath Change-Id: I5a9d776af761fcaed7a6961e151feb38fc6353ed diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 6b919e5..a57f3fe 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -62,7 +62,6 @@ public: virtual boolHasFollowSupport() const override; virtual boolHasParentSupport() const override; virtual boolHasClearParentSupport() const override; -virtual boolSetName(const OUString& rNewName, bool bReindexNow = true) override; virtual voidSetHelpId( const OUString& r, sal_uLong nId ) override; voidAdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems = true); diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index a6652f7..9e34cbd 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -611,11 +611,6 @@ bool SdStyleSheet::HasClearParentSupport() const return true; } -bool SdStyleSheet::SetName(const OUString& rName, bool bReindexNow) -{ -return SfxStyleSheet::SetName(rName, bReindexNow); -} - void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId ) { SfxStyleSheet::SetHelpId( r, nId ); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 94a8632..ee87843 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -807,11 +807,6 @@ Reference< graphic::XGraphic> SdPhotoAlbumDialog::createXGraphicFromUrl(const OU return xGraphic; } -short SdPhotoAlbumDialog::Execute() -{ -return ModalDialog::Execute(); -} - void SdPhotoAlbumDialog::EnableDisableButtons() { pRemoveBtn->Enable(pImagesLst->GetSelectEntryCount() > 0); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx index 19f8e95..122380c0 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.hxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.hxx @@ -48,8 +48,6 @@ public: virtual ~SdPhotoAlbumDialog() override; virtual void dispose() override; -virtual short Execute() override; - private: static OUString sDirUrl; VclPtr pCancelBtn; diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index b40f032..1bf21f2 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -699,11 +699,6 @@ bool AnimationWindow::Close() } } -void AnimationWindow::FillInfo( SfxChildWinInfo& rInfo ) const -{ -SfxDockingWindow::FillInfo( rInfo ) ; -} - void AnimationWindow::AddObj (::sd::View& rView ) { // finish text entry mode to ensure that bitmap is identical with object diff --git a/sd/source/ui/docshell/docshel2.cxx b/s
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/createunocustomshow.hxx |3 ++- sd/inc/createunopageimpl.hxx |5 - sd/source/core/sdpage.cxx |3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 290b25af222124051cc611061de9caf8f1efe966 Author: Jochen Nitschke Date: Sun Aug 7 21:46:15 2016 +0200 tdf#95416 remove ../ style include Change-Id: Ie3228d4cdaabfcc6034ee3ac6dd2295a33021e71 Reviewed-on: https://gerrit.libreoffice.org/27942 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sd/inc/createunocustomshow.hxx b/sd/inc/createunocustomshow.hxx index 501f863..a101959 100644 --- a/sd/inc/createunocustomshow.hxx +++ b/sd/inc/createunocustomshow.hxx @@ -20,8 +20,9 @@ #ifndef INCLUDED_SD_INC_CREATEUNOCUSTOMSHOW_HXX #define INCLUDED_SD_INC_CREATEUNOCUSTOMSHOW_HXX -#include +#include +namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } } class SdCustomShow; css::uno::Reference createUnoCustomShow( diff --git a/sd/inc/createunopageimpl.hxx b/sd/inc/createunopageimpl.hxx index 75702bc..222c0a8 100644 --- a/sd/inc/createunopageimpl.hxx +++ b/sd/inc/createunopageimpl.hxx @@ -20,7 +20,10 @@ #ifndef INCLUDED_SD_INC_CREATEUNOPAGEIMPL_HXX #define INCLUDED_SD_INC_CREATEUNOPAGEIMPL_HXX -#include +#include + +namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } } +class SdPage; css::uno::Reference< css::uno::XInterface > createUnoPageImpl( SdPage* pPage ); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 34dd2ef..d794cff 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -54,11 +55,11 @@ #include #include -#include "../ui/inc/DrawDocShell.hxx" #include "Outliner.hxx" #include "app.hrc" #include "createunopageimpl.hxx" #include "drawdoc.hxx" +#include "sdmod.hxx" #include "sdpage.hxx" #include "pglink.hxx" #include "sdresid.hxx" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits