[Libreoffice-commits] core.git: sd/source svx/source sw/source
sd/source/ui/annotations/annotationwindow.cxx |4 +--- svx/source/dialog/weldeditview.cxx|4 +--- sw/source/uibase/docvw/SidebarTxtControl.cxx |2 -- 3 files changed, 2 insertions(+), 8 deletions(-) New commits: commit cfa5489982a84f847d86b8bf8ce49b25e033ed48 Author: Michael Weghorn AuthorDate: Fri Mar 18 14:17:28 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 18 15:28:44 2022 +0100 WeldEditView: Just pass new Size object as param Just pass `aOutputSize` as parameter instead of assigning that to `aSize` again and then passing that one as parameter in `WeldEditView::SetDrawingArea` and overrides in derived classes. `aSize.setHeight(aSize.Height())` can just be dropped as an overly complicated way of keeping the height as it is. In `SidebarTextControl::SetDrawingArea`, `aOutputSize` was already passed as param, so the new value of `aSize` was ignored anyway. Change-Id: I23192d3c5c85e4371a48774b3b8f854beb751b82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131741 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 42ebe77c306f..6c1210575915 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -188,14 +188,12 @@ void AnnotationTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(aBgColor); Size aOutputSize(rDevice.PixelToLogic(aSize)); -aSize = aOutputSize; -aSize.setHeight(aSize.Height()); EditView* pEditView = GetEditView(); pEditView->setEditViewCallbacks(this); EditEngine* pEditEngine = GetEditEngine(); -pEditEngine->SetPaperSize(aSize); +pEditEngine->SetPaperSize(aOutputSize); pEditEngine->SetRefDevice(&rDevice); pEditView->SetOutputArea(::tools::Rectangle(Point(0, 0), aOutputSize)); diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index d3f3c3f79c9e..42eb22c12223 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -1554,11 +1554,9 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(aBgColor); Size aOutputSize(rDevice.PixelToLogic(aSize)); -aSize = aOutputSize; -aSize.setHeight(aSize.Height()); makeEditEngine(); -m_xEditEngine->SetPaperSize(aSize); +m_xEditEngine->SetPaperSize(aOutputSize); m_xEditEngine->SetRefDevice(&rDevice); m_xEditEngine->SetControlWord(m_xEditEngine->GetControlWord() | EEControlBits::MARKFIELDS); diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index fecaf6aafef3..8502601e8b1e 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -107,8 +107,6 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(aBgColor); Size aOutputSize(rDevice.PixelToLogic(aSize)); -aSize = aOutputSize; -aSize.setHeight(aSize.Height()); EditView* pEditView = GetEditView(); pEditView->setEditViewCallbacks(this);
[Libreoffice-commits] core.git: sd/source svx/source sw/source
sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx|1 - sd/source/ui/view/clview.cxx |3 +-- svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |4 +++- sw/source/core/doc/DocumentDrawModelManager.cxx |1 - 4 files changed, 4 insertions(+), 5 deletions(-) New commits: commit 7ac9973da65d80832069afa76fd7325cf53c9293 Author: Noel Grandin Date: Fri Apr 15 13:20:14 2016 +0200 clang-tidy misc-forward-declaration-namespace Change-Id: I0566e9992e0d96ee710c8bce2ae6f44a9e83b4e4 diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index 0925b0f..3c9cebc 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx @@ -75,7 +75,6 @@ private: // compactor. bool mbIsPrecious; }; -class CacheEntry; class CacheHash { public: diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx index 9fff091..b885d3b 100644 --- a/sd/source/ui/view/clview.cxx +++ b/sd/source/ui/view/clview.cxx @@ -23,10 +23,9 @@ #include "drawview.hxx" #include "sdpage.hxx" -class DrawDocShell; - namespace sd { +class DrawDocShell; class DrawViewShell; /** diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index afe99c3..bc27dbc 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -46,7 +46,6 @@ #include -class TransparencePrimitive2D; using namespace com::sun::star; @@ -54,6 +53,9 @@ namespace drawinglayer { namespace primitive2d { + +class TransparencePrimitive2D; + Primitive2DReference createPolyPolygonFillPrimitive( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::SdrFillAttribute& rFill, diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index b889b8c..dfc542d 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -49,7 +49,6 @@ #include class SdrOutliner; -class XSpellChecker1; namespace sw { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source svx/source sw/source
sd/source/core/stlpool.cxx |5 - svx/source/unodraw/unopool.cxx |5 - sw/source/core/unocore/SwXTextDefaults.cxx |7 +-- 3 files changed, 13 insertions(+), 4 deletions(-) New commits: commit bcb1f81668d9b6a6d807ae32d60ccfce0b36ceb5 Author: Michael Stahl Date: Wed Jul 15 18:38:38 2015 +0200 svx, sd, sw: GetPoolDefaultItem() can actually return nullptr ...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall. Change-Id: I409484c172fb5843270aee2425844076a008b4df diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index f4eee39..a45bbaa 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1127,7 +1127,10 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, case HID_PSEUDOSHEET_SUBTITLE : { // Subtitle template -SvxNumRule* pDefaultRule = static_cast( rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule(); +SvxNumBulletItem const*const pItem( +static_cast( + rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))); +SvxNumRule *const pDefaultRule = (pItem) ? pItem->GetNumRule() : nullptr; DBG_ASSERT( pDefaultRule, "Where is my default template? [CL]" ); if(pDefaultRule) diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index bc4f253..dccdbad 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -321,7 +321,10 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry SfxItemPool* pPool = getModelPool( true ); const sal_uInt16 nWhich = pPool->GetWhich( (sal_uInt16)pEntry->mnHandle ); const SfxPoolItem *pItem = pPool->GetPoolDefaultItem ( nWhich ); -pItem->QueryValue( aAny, pEntry->mnMemberId ); +if (pItem) +{ +pItem->QueryValue( aAny, pEntry->mnMemberId ); +} return aAny; } diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 9955b44..5c6e256 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -219,8 +219,11 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); Any aRet; SfxItemPool& rSet (m_pDoc->GetAttrPool()); -const SfxPoolItem *pItem = rSet.GetPoolDefaultItem ( pMap->nWID ); -pItem->QueryValue( aRet, pMap->nMemberId ); +SfxPoolItem const*const pItem = rSet.GetPoolDefaultItem(pMap->nWID); +if (pItem) +{ +pItem->QueryValue( aRet, pMap->nMemberId ); +} return aRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits