[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/core/data/sortparam.cxx |1 + sd/source/ui/view/drviewsk.cxx| 18 ++ 2 files changed, 11 insertions(+), 8 deletions(-) New commits: commit 439a78496a9a45c6e412fa93edb537727ab7862a Author: Caolán McNamara AuthorDate: Fri May 12 21:17:57 2023 +0100 Commit: Caolán McNamara CommitDate: Sat May 13 11:38:42 2023 +0200 cid#1530046 Unchecked dynamic_cast Change-Id: Iaeec0f90e6faae8f7c5ab8e1745c8bdb62925ca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151714 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx index 673416aff4f7..607b59d25111 100644 --- a/sd/source/ui/view/drviewsk.cxx +++ b/sd/source/ui/view/drviewsk.cxx @@ -23,19 +23,21 @@ void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, Co { svtools::ColorConfig *pColorConfig = dynamic_cast(pCb); ConfigureAppBackgroundColor(pColorConfig); -SfxViewShell* pCurrentShell = SfxViewShell::Current(); -if (comphelper::LibreOfficeKit::isActive() && pCurrentShell) +if (comphelper::LibreOfficeKit::isActive()) { -DrawViewShell* pCurrentDrawShell = nullptr; +SfxViewShell* pCurrentShell = SfxViewShell::Current(); ViewShellBase* pShellBase = dynamic_cast(pCurrentShell); -if(pShellBase) -pCurrentDrawShell = dynamic_cast(pShellBase->GetMainViewShell().get()); -pCurrentDrawShell->maViewOptions.mnDocBackgroundColor = pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor; -pCurrentDrawShell->maViewOptions.msColorSchemeName = pColorConfig->GetCurrentSchemeName(); +if (!pShellBase) +return; +if (DrawViewShell* pCurrentDrawShell = dynamic_cast(pShellBase->GetMainViewShell().get())) +{ +pCurrentDrawShell->maViewOptions.mnDocBackgroundColor = pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor; +pCurrentDrawShell->maViewOptions.msColorSchemeName = pColorConfig->GetCurrentSchemeName(); +} SdXImpressDocument* pDoc = comphelper::getFromUnoTunnel(pCurrentShell->GetCurrentDocument()); SfxLokHelper::notifyViewRenderState(pCurrentShell, pDoc); Color aFillColor(pColorConfig->GetColorValue(svtools::APPBACKGROUND).nColor); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR, + pCurrentShell->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR, aFillColor.AsRGBHexString().toUtf8()); } } commit 2ac8bf040be16eea79b1386a9466a058deee330f Author: Caolán McNamara AuthorDate: Fri May 12 21:10:50 2023 +0100 Commit: Caolán McNamara CommitDate: Sat May 13 11:38:35 2023 +0200 cid#1529965 Uninitialized scalar variable Change-Id: I8a4ca8ad47086d19b6714d9846775afd5e81fda8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151713 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx index 66b8c4f33db6..3e1506dbad7c 100644 --- a/sc/source/core/data/sortparam.cxx +++ b/sc/source/core/data/sortparam.cxx @@ -198,6 +198,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld ) key.bDoSort = true; key.nField = nThisField; key.bAscending = rOld.maKeyState[i].bAscending; +key.aColorSortMode = ScColorSortMode::None; maKeyState.push_back(key); } }
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/app/inputhdl.cxx|6 +- sd/source/ui/unoidl/unocpres.cxx |4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit ee7b7acba288d265001237e3d81a1791e322ed28 Author: Caolán McNamara AuthorDate: Wed Aug 24 13:04:28 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 24 17:12:51 2022 +0200 cid#1509194 Dereference after null check Change-Id: Idb290b2780af402f8573c8231e63b2598b34ba43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138768 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index bfbb446e1364..f16e52af8fb6 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3458,10 +3458,14 @@ void ScInputHandler::CancelHandler() eMode = SC_INPUT_NONE; StopInputWinEngine( true ); +SCCOL nMaxCol(MAXCOL); if (pExecuteSh) +{ pExecuteSh->StopEditShell(); +nMaxCol = pExecuteSh->GetViewData().GetDocument().MaxCol(); +} -aCursorPos.Set(pExecuteSh->GetViewData().GetDocument().MaxCol()+1,0,0); // Invalid flag +aCursorPos.Set(nMaxCol+1,0,0); // Invalid flag mpEditEngine->SetTextCurrentDefaults(OUString()); if ( !pLastState && pExecuteSh ) commit 2f05a65a4eafcbda3438e50bd0b6518248c04d5d Author: Caolán McNamara AuthorDate: Wed Aug 24 12:56:43 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 24 17:12:36 2022 +0200 cid#1509207 Dereference after null check remove useless null checks left behind after commit bb674aa5503ff40a5619d1fb4c9f310da5f5c983 Date: Thu Nov 17 13:16:30 2016 +0200 loplugin:unusedfields showed they weren't consumed anyway Change-Id: Ia32ee9458e01a995692ab961e52512872b1c415c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138767 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index cc57b1e7941a..1f9bde3b98da 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -98,10 +98,10 @@ void SAL_CALL SdXCustomPresentation::insertByIndex( sal_Int32 Index, const uno:: if(pPage) { -if( nullptr == mpModel ) +if (!mpModel) mpModel = pPage->GetModel(); -if( nullptr != mpModel && nullptr == mpSdCustomShow && mpModel->GetDoc() ) +if (!mpSdCustomShow) mpSdCustomShow = new SdCustomShow; mpSdCustomShow->PagesVector().insert(mpSdCustomShow->PagesVector().begin() + Index,
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source svx/source sw/source
sc/source/ui/view/tabvwsh2.cxx |2 ++ sd/source/ui/view/drviewse.cxx |4 svx/source/svdraw/svddrgv.cxx| 13 + sw/source/uibase/uiview/viewdraw.cxx |3 +++ 4 files changed, 18 insertions(+), 4 deletions(-) New commits: commit 2a91d96591001c83cac56e924fc6748c7900f7e5 Author: merttumer AuthorDate: Wed Mar 24 12:06:08 2021 +0300 Commit: Mert Tumer CommitDate: Tue Apr 20 04:32:22 2021 +0200 LOK: Fix Moving drag handles calculates wrong offset When dragging the shape handles for resizing, the handle's grid offset must be the shapes grid offset. In small numbered row orders, it is not visible much since the difference is very little but as the number gets greater, the difference becomes more visible. Change-Id: I44d03cc67a239c8b7758206930def331ed8e5e42 Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113028 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114026 Tested-by: Jenkins diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 9807a53bd99e..6cbba5494070 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -36,6 +36,7 @@ #include #include #include +#include using namespace sdr; @@ -206,10 +207,12 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl // Coordinate maybe affected by GridOffset, so we may need to // adapt to Model-coordinates here -if(getPossibleGridOffsetForPosition( +if((comphelper::LibreOfficeKit::isActive() && mpMarkedObj +&& getPossibleGridOffsetForSdrObject(aGridOffset, GetMarkedObjectByIndex(0), GetSdrPageView())) +|| (getPossibleGridOffsetForPosition( aGridOffset, basegfx::B2DPoint(aPnt.X(), aPnt.Y()), -GetSdrPageView())) +GetSdrPageView( { aPnt.AdjustX(basegfx::fround(-aGridOffset.getX())); aPnt.AdjustY(basegfx::fround(-aGridOffset.getY())); @@ -508,10 +511,12 @@ void SdrDragView::MovDragObj(const Point& rPnt) // Coordinate maybe affected by GridOffset, so we may need to // adapt to Model-coordinates here -if(getPossibleGridOffsetForPosition( +if((comphelper::LibreOfficeKit::isActive() && mpMarkedObj +&& getPossibleGridOffsetForSdrObject(aGridOffset, GetMarkedObjectByIndex(0), GetSdrPageView())) +|| (getPossibleGridOffsetForPosition( aGridOffset, basegfx::B2DPoint(aPnt.X(), aPnt.Y()), -GetSdrPageView())) +GetSdrPageView( { aPnt.AdjustX(basegfx::fround(-aGridOffset.getX())); aPnt.AdjustY(basegfx::fround(-aGridOffset.getY())); commit c853d446a7cd8a8436cb5f43bbf81a723bd86c99 Author: merttumer AuthorDate: Fri Mar 19 12:31:42 2021 +0300 Commit: Mert Tumer CommitDate: Tue Apr 20 04:32:00 2021 +0200 Fix Line and Connectors enable interactive drawing We add them directly for LOK case and have no functionality for interactive drawing. Noticed that in Writer we didnt even add them directly I also implemented that as well. Change-Id: If90bfc8d2cdf84f200bc7963ae4126ef789524ff Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112703 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114025 Tested-by: Jenkins diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index f213c5b822ef..652482ec5d6f 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -231,6 +231,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) case SID_DRAW_ELLIPSE: case SID_DRAW_MEASURELINE: pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, pDoc, aNewReq)); +bCreateDirectly = comphelper::LibreOfficeKit::isActive(); break; case SID_DRAW_CAPTION: @@ -332,6 +333,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) } else { +GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON); ScViewData& rViewData = GetViewData(); aInsertPos = rViewData.getLOKVisibleArea().Center(); if (comphelper::LibreOfficeKit::isCompatFlagSet( diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index b833b1d3b719..2247294cfaba 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -605,6 +605,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if(!(HasCurrentFunction() && ((rReq.GetModifier() & KEY_MOD1) || bCreateDirectly))) return; +// disable interactive drawing for LOK +if (bCreateDirectly) +
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/inc/navipi.hxx |4 ++-- sc/source/ui/navipi/scenwnd.cxx |2 +- sd/source/ui/annotations/annotationwindow.cxx |3 +-- sd/source/ui/annotations/annotationwindow.hxx |4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) New commits: commit 5a94413d27d8b799b43bc6d7b44d4b01cc98dc9b Author: Caolán McNamara AuthorDate: Mon Feb 17 20:47:17 2020 + Commit: Caolán McNamara CommitDate: Tue Feb 18 09:55:02 2020 +0100 VclMultiLineEdit is sufficient here Change-Id: I636eb7bfd0c1d523751661a35edaa30181491de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/9 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 6c566287cd41..828045c6b2da 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -269,7 +268,7 @@ void AnnotationWindow::InitControls() mpTextWindow->SetPointer(PointerStyle::Text); // window control for author and date -mpMeta = VclPtr::Create(this,0); +mpMeta = VclPtr::Create(this,0); mpMeta->SetReadOnly(); mpMeta->SetRightToLeft(AllSettings::GetLayoutRTL()); mpMeta->AlwaysDisableInput(true); diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index 9b95dcc34039..d069aa541528 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -81,7 +81,7 @@ class AnnotationWindow : public FloatingWindow boolmbProtected; boolmbMouseOverButton; VclPtr mpTextWindow; -VclPtr mpMeta; +VclPtr mpMeta; ::tools::Rectangle maRectMetaButton; basegfx::B2DPolygon maPopupTriangle; commit 26e5875d7cd082ccb118720ab17bfa9ea52f9d0c Author: Caolán McNamara AuthorDate: Mon Feb 17 20:45:56 2020 + Commit: Caolán McNamara CommitDate: Tue Feb 18 09:54:48 2020 +0100 VclMultiLineEdit is sufficient here Change-Id: I0f8d8ae81776f92637880f8ad1a82fcf948c9e5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/8 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index ed8313791ada..44d3c5ad1060 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -29,7 +29,7 @@ #include #include #include "content.hxx" -#include +#include class SfxPoolItem; class ScTabViewShell; @@ -103,7 +103,7 @@ protected: private: VclPtr aLbScenario; -VclPtr aEdComment; +VclPtraEdComment; }; class ColumnEdit : public SpinField diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index d9de448fb0af..74ac7b069bb1 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -202,7 +202,7 @@ ScScenarioWindow::ScScenarioWindow( vcl::Window* pParent, const OUString& aQH_Li const OUString& aQH_Comment) : Window ( pParent, WB_TABSTOP | WB_DIALOGCONTROL ), aLbScenario ( VclPtr::Create(*this) ), -aEdComment ( VclPtr::Create(this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP) ) +aEdComment ( VclPtr::Create(this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP) ) { vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/drawfunc/drawsh2.cxx | 63 ++ sd/source/ui/view/drviewsf.cxx| 62 + 2 files changed, 125 insertions(+) New commits: commit 2269225b81c2c2ee176db91d25fe1533b40b5e5e Author: Szymon Kłos AuthorDate: Thu Nov 21 12:59:17 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 27 09:21:36 2019 +0100 jsdialogs: send .uno:FillStyle updates in Impress Change-Id: I9b266d9134678e98a5540ec3681d24b3ea43506a Reviewed-on: https://gerrit.libreoffice.org/83382 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/83778 Tested-by: Jenkins diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 565283ce1c3a..4943effb2416 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -60,10 +60,68 @@ #include #include #include +#include +#include +#include +#include + +using namespace com::sun::star::drawing; using namespace svx::sidebar; using namespace ::com::sun::star; +namespace { +OUString lcl_fillStyleEnumToString(FillStyle eStyle) +{ +switch (eStyle) +{ +case FillStyle_NONE: +return "NONE"; + +case FillStyle_SOLID: +return "SOLID"; + +case FillStyle_GRADIENT: +return "GRADIENT"; + +case FillStyle_HATCH: +return "HATCH"; + +case FillStyle_BITMAP: +return "BITMAP"; + +default: +return ""; +} +} + +void lcl_sendAttrUpdatesForLOK(SfxViewShell* pShell, const SfxItemSet& rSet) +{ +if (!pShell) +return; + +OUString sPayload; +const SfxPoolItem* pItem = rSet.GetItem(SID_ATTR_FILL_STYLE); + +if (pItem) +{ +const XFillStyleItem* pFillStyleItem = static_cast(pItem); +FillStyle eStyle; +css::uno::Any aAny; + +pFillStyleItem->QueryValue(aAny); +aAny >>= eStyle; +sPayload = ".uno:FillStyle=" + lcl_fillStyleEnumToString(eStyle); +} + +if (!sPayload.isEmpty()) +{ +pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, +OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); +} +} +} + namespace sd { /** @@ -726,6 +784,10 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) rSet.DisableItem( nWhich ); } nWhich = aNewIter.NextWhich(); + +SfxViewShell* pViewShell = GetDrawView()->GetSfxViewShell(); +if (pViewShell && comphelper::LibreOfficeKit::isActive()) +lcl_sendAttrUpdatesForLOK( pViewShell, *pSet ); } } commit aa5b9c86e20dddac55f73d241bb030b1ca51d786 Author: Szymon Kłos AuthorDate: Thu Nov 21 13:31:35 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 27 09:21:31 2019 +0100 jsdialogs: send .uno:FillStyle updates in Calc Change-Id: I51682546a3c8fd4ee6d97cf8bf79d066e571addf Reviewed-on: https://gerrit.libreoffice.org/83386 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/83780 Tested-by: Jenkins diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index a3da77fd7296..118412c24822 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -46,9 +46,68 @@ #include #include #include +#include +#include +#include +#include +#include + +using namespace com::sun::star::drawing; using namespace com::sun::star; +namespace { +OUString lcl_fillStyleEnumToString(FillStyle eStyle) +{ +switch (eStyle) +{ +case FillStyle_NONE: +return "NONE"; + +case FillStyle_SOLID: +return "SOLID"; + +case FillStyle_GRADIENT: +return "GRADIENT"; + +case FillStyle_HATCH: +return "HATCH"; + +case FillStyle_BITMAP: +return "BITMAP"; + +default: +return ""; +} +} + +void lcl_sendAttrUpdatesForLOK(SfxViewShell* pShell, const SfxItemSet& rSet) +{ +if (!pShell) +return; + +OUString sPayload; +const SfxPoolItem* pItem = rSet.GetItem(SID_ATTR_FILL_STYLE); + +if (pItem) +{ +const XFillStyleItem* pFillStyleItem = static_cast(pItem); +FillStyle eStyle; +css::uno::Any aAny; + +pFillStyleItem->QueryValue(aAny); +aAny >>= eStyle; +sPayload = ".uno:FillStyle=" + lcl_fillStyleEnumToString(eStyle); +} + +if (!sPayload.isEmpty()) +{ +
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/view/drawvie3.cxx |6 -- sd/source/ui/view/drviews7.cxx |6 +- 2 files changed, 9 insertions(+), 3 deletions(-) New commits: commit e1042be85252483dc33efb0f35ac267ac24ecf67 Author: Caolán McNamara AuthorDate: Mon Jul 22 11:33:19 2019 +0100 Commit: Caolán McNamara CommitDate: Mon Jul 22 16:25:39 2019 +0200 cid#1448269 Dereference null return value Change-Id: Ief2dfb8a87030d992a867a7a9014d3787e201831 Reviewed-on: https://gerrit.libreoffice.org/76111 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 801a70d2042a..f69c566021f2 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1698,7 +1698,11 @@ void DrawViewShell::GetPageProperties( SfxItemSet ) rSet.Put(aPageItem); const SfxItemSet = pPage->getSdrPageProperties().GetItemSet(); -drawing::FillStyle eXFS = rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue(); +const XFillStyleItem* pFillStyle = rPageAttr.GetItem(XATTR_FILLSTYLE); +if (!pFillStyle) +return; + +drawing::FillStyle eXFS = pFillStyle->GetValue(); XFillStyleItem aFillStyleItem( eXFS ); aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE ); rSet.Put(aFillStyleItem); commit 11a99e0efebe621691aa54ab07844aa22a2ad283 Author: Caolán McNamara AuthorDate: Mon Jul 22 11:47:19 2019 +0100 Commit: Caolán McNamara CommitDate: Mon Jul 22 16:25:26 2019 +0200 cid#1448325 Dereference after null check Change-Id: I7ca6b442f9aadaeb6debe7806e30693aa06b90ff Reviewed-on: https://gerrit.libreoffice.org/76114 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx index a1b02bdc265f..0753335864b7 100644 --- a/sc/source/ui/view/drawvie3.cxx +++ b/sc/source/ui/view/drawvie3.cxx @@ -101,10 +101,12 @@ void ScDrawView::SetCellAnchored(bool bResizeWithCell) EndUndo(); if ( pViewData ) +{ pViewData->GetDocShell()->SetDrawModified(); -// Set the anchor object. -AddCustomHdl(); +// Set the anchor object. +AddCustomHdl(); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/view/tabview3.cxx |2 ++ sd/source/ui/view/sdview4.cxx |7 --- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 00ece34fb7916b18053273e54fbe746170570d34 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:04:21 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:39:55 2019 +0200 cid#1448319 Use after free Change-Id: I45a4ea5c21707606b8853bb775a7d9eec595b88c Reviewed-on: https://gerrit.libreoffice.org/75912 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index cb50639b2593..93d88afb7028 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -270,9 +270,10 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, } else { -InsertObjectAtView(pNewGrafObj, *pPV, nOptions); - -if( pImageMap ) +bool bSuccess = InsertObjectAtView(pNewGrafObj, *pPV, nOptions); +if (!bSuccess) +pNewGrafObj = nullptr; +else if (pImageMap) pNewGrafObj->AppendUserData(std::unique_ptr(new SdIMapInfo(*pImageMap))); } } commit 7ec75e04da4b7ada7ba120fbc5a30f6d5152cc85 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:23:51 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:39:40 2019 +0200 cid#1448311 Dereference null return value Change-Id: Ie0ad350d48441dc6012dddc9fa3989acc4d4aab8 Reviewed-on: https://gerrit.libreoffice.org/75917 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index dd67d915e674..a40eb9374ee9 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2557,6 +2557,8 @@ void ScTabView::DoDPFieldPopup(OUString const & rPivotTableName, sal_Int32 nDime ScDPCollection* pDPCollection = rDocument.GetDPCollection(); ScDPObject* pDPObject = pDPCollection->GetByName(rPivotTableName); +if (!pDPObject) +return; pDPObject->BuildAllDimensionMembers(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/filter/xml/xmlexprt.cxx|3 +++ sd/source/filter/eppt/pptx-epptooxml.cxx |4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) New commits: commit d21298e3b108b0dfdb1515248068314757cf4dd7 Author: Caolán McNamara AuthorDate: Sat Aug 18 15:32:35 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 18 19:48:26 2018 +0200 coverity#1438401 assert nPrevIndex >= 0 Change-Id: I1b6e4428aa44163bd098517ed654ea115c10daf7 Reviewed-on: https://gerrit.libreoffice.org/59292 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 8d48be539110..c8e83c7c47d8 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -880,6 +880,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const ScRange& aColumnHe nColsRepeated = 1; } } +assert(nPrevIndex >= 0 && "coverity#1438402"); WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible); if (!bIsClosed) CloseHeaderColumn(); @@ -1486,6 +1487,7 @@ void ScXMLExport::OpenRow(const sal_Int32 nTable, const sal_Int32 nStartRow, con ++nEqualRows; else { +assert(nPrevIndex >= 0 && "coverity#1438402"); if (nRow < nEndRow) { ScRowFormatRanges* pTempRowFormatRanges = new ScRowFormatRanges(pRowFormatRanges.get()); @@ -1501,6 +1503,7 @@ void ScXMLExport::OpenRow(const sal_Int32 nTable, const sal_Int32 nStartRow, con } } } +assert(nPrevIndex >= 0 && "coverity#1438402"); OpenNewRow(nPrevIndex, nRow - nEqualRows, nEqualRows, bPrevHidden, bPrevFiltered); } else commit 289abd076af14eeb4504cd4e33b49ef95009dd93 Author: Caolán McNamara AuthorDate: Sat Aug 18 14:30:34 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 18 19:48:16 2018 +0200 coverity#1438403 Unchecked return value Change-Id: I7debe5eb1c366264cb94a52f63677f392cda647e Reviewed-on: https://gerrit.libreoffice.org/59291 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 69624d1c0752..d5b654e72b39 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1172,8 +1172,8 @@ void PowerPointExport::WriteAnimationNodeAnimate(const FSHelperPtr& pFS, const R { xMotion->getPath() >>= aPath; ::basegfx::B2DPolyPolygon aPolyPoly; -::basegfx::utils::importFromSvgD(aPolyPoly, aPath, true, nullptr); -aPath = ::basegfx::utils::exportToSvgD(aPolyPoly, false, false, true, true); +if (::basegfx::utils::importFromSvgD(aPolyPoly, aPath, true, nullptr)) +aPath = ::basegfx::utils::exportToSvgD(aPolyPoly, false, false, true, true); } pFS->startElementNS(XML_p, nXmlNodeType, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/core/data/drwlayer.cxx| 42 +++- sc/source/core/data/postit.cxx |2 sc/source/filter/excel/xlpage.cxx |7 ++- sc/source/ui/cctrl/cbuttonw.cxx |6 +- sc/source/ui/cctrl/tbzoomsliderctrl.cxx |2 sc/source/ui/docshell/docsh4.cxx| 24 ++- sc/source/ui/view/gridwin.cxx |2 sc/source/ui/view/notemark.cxx |2 sc/source/ui/view/output.cxx|2 sc/source/ui/view/output3.cxx |8 ++- sc/source/ui/view/preview.cxx |2 sc/source/ui/view/printfun.cxx |6 +- sc/source/ui/view/tabview5.cxx |4 - sd/source/ui/animations/CustomAnimationList.cxx |2 sd/source/ui/dlg/RemoteDialogClientBox.cxx |2 sd/source/ui/func/fusel.cxx |2 sd/source/ui/func/fuzoom.cxx|6 +- sd/source/ui/slideshow/slideshowviewimpl.cxx|2 sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx |2 sd/source/ui/view/DocumentRenderer.cxx | 34 sd/source/ui/view/viewoverlaymanager.cxx|8 +-- 21 files changed, 84 insertions(+), 83 deletions(-) New commits: commit be5af6cefea2fa43479ec6124e2c847956144a6d Author: Noel GrandinDate: Mon Feb 26 13:27:48 2018 +0200 drop old tools/gen.hxx methods in sd Change-Id: I8af9c5c0085f5e6f8e498c48bae69f8247ef88ed Reviewed-on: https://gerrit.libreoffice.org/50362 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 086162e99fdb..c2908041be6d 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -421,7 +421,7 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD aOutRect.AdjustLeft(nHorzBorder ); aOutRect.AdjustRight( -nHorzBorder ); -aOutRect.Top() += nVertBorder; +aOutRect.AdjustTop( nVertBorder ); aOutRect.AdjustBottom( -nVertBorder ); rRenderContext.DrawText(aOutRect, rRenderContext.GetEllipsisString(msDescription, aOutRect.GetWidth())); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index 1fbd88cef57f..f5618622d042 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -152,7 +152,7 @@ void ClientBox::CalcActiveHeight() if ( m_bHasScrollBar ) aSize.AdjustWidth( -(m_aScrollBar->GetSizePixel().Width()) ); -aSize.Width() -= ICON_OFFSET; +aSize.AdjustWidth( -ICON_OFFSET ); aSize = LogicToPixel( Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ), MapMode( MapUnit::MapAppFont ) ); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 3746ebacb4d6..968fde162a44 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) aHitPosR.AdjustX(n2HitLog ); aHitPosL.AdjustX( -n2HitLog ); -aHitPosT.Y() += n2HitLog; +aHitPosT.AdjustY( n2HitLog ); aHitPosB.AdjustY( -n2HitLog ); if ( !bClosed || diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx index a6d5011e1923..e71452847a9d 100644 --- a/sd/source/ui/func/fuzoom.cxx +++ b/sd/source/ui/func/fuzoom.cxx @@ -118,7 +118,7 @@ bool FuZoom::MouseMove(const MouseEvent& rMEvt) Size aWorkSize = mpView->GetWorkArea().GetSize(); Size aPageSize = mpView->GetSdrPageView()->GetPage()->GetSize(); aScroll.setX( aScroll.X() / ( aWorkSize.Width() / aPageSize.Width()) ); -aScroll.Y() /= aWorkSize.Height() / aPageSize.Height(); +aScroll.setY( aScroll.Y() / ( aWorkSize.Height() / aPageSize.Height()) ); mpViewShell->Scroll(aScroll.X(), aScroll.Y()); aBeginPosPix = aPosPix; } @@ -164,12 +164,12 @@ bool FuZoom::MouseButtonUp(const MouseEvent& rMEvt) if ( rMEvt.IsMod1() ) { aSize.setWidth( aSize.Width() * 2 ); -aSize.Height() *= 2; +aSize.setHeight( aSize.Height() * 2 ); } else { aSize.setWidth( aSize.Width() / 2 ); -aSize.Height() /= 2; +aSize.setHeight( aSize.Height() / 2 ); } aPos.AdjustX( -(aSize.Width() / 2) ); aPos.AdjustY( -(aSize.Height() / 2) ); diff --git
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/app/seltrans.cxx |1 - sc/source/ui/app/transobj.cxx |4 +--- sc/source/ui/view/viewfun4.cxx |3 +-- sc/source/ui/view/viewfun5.cxx |3 +-- sd/source/ui/func/fuinsert.cxx |1 - sd/source/ui/view/drviews7.cxx |1 - sd/source/ui/view/sdview2.cxx |3 +-- sd/source/ui/view/sdview3.cxx | 32 +--- 8 files changed, 5 insertions(+), 43 deletions(-) New commits: commit 8a8bcd65e8a0e177904f06fcd8a775456ff02eab Author: Varun DhallDate: Sun Jul 23 22:20:17 2017 +0530 EditEngine: Removing BIN format from sd Change-Id: Iafd88cdb0d0a84b611deda3bd276fb4b16604b92 Reviewed-on: https://gerrit.libreoffice.org/40331 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index e672179bb474..e1e4c1e42e8f 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -253,7 +253,6 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) pDlg->Insert( SotClipboardFormatId::HTML, OUString() ); pDlg->Insert( SotClipboardFormatId::RTF, OUString() ); pDlg->Insert( SotClipboardFormatId::RICHTEXT, OUString() ); -pDlg->Insert( SotClipboardFormatId::EDITENGINE, OUString() ); pDlg->Insert( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT, OUString() ); //TODO/MBA: testing diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 99f5bd398c48..ab318a97f436 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -167,7 +167,6 @@ using namespace ::com::sun::star::linguistic2; case SotClipboardFormatId::HTML: case SotClipboardFormatId::RTF: case SotClipboardFormatId::RICHTEXT: -case SotClipboardFormatId::EDITENGINE: case SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT: pResult->AddClipbrdFormat(nTestFormat); break; diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index ad13321ba146..22f248c3cef6 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -572,7 +572,6 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge if( !nRet ) { const bool bSBAFormat = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::SVX_FORMFIELDEXCH ); -const bool bEditEngine = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::EDITENGINE ); const bool bEditEngineODF = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT ); const bool bString = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::STRING ); const bool bRTF = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::RTF ); @@ -588,7 +587,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh && SlideShow::IsRunning(mpViewSh->GetViewShellBase()) ) bBookmark = false; -if( bDrawing || bGraphic || bMtf || bBitmap || bBookmark || bFile || bFileList || bXFillExchange || bSBAFormat || bEditEngine || bEditEngineODF || bString || bRTF ) +if( bDrawing || bGraphic || bMtf || bBitmap || bBookmark || bFile || bFileList || bXFillExchange || bSBAFormat || bEditEngineODF || bString || bRTF ) nRet = nDropAction; // For entries from the navigator, change action copy. diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 5f5d9f5f7c3c..de471ddca611 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -1392,9 +1392,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } -char* ODF_XML_Env = getenv ("ODF_TEXT_FLAT_XML_ENV"); - -if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT) && ODF_XML_Env == nullptr) +if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT)) { ::tools::SvRef xStm; if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT, xStm ) ) @@ -1422,34 +1420,6 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } -if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::EDITENGINE) ) -{ -::tools::SvRef xStm; -if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::EDITENGINE, xStm ) ) -{ -OutlinerView* pOLV = GetTextEditOutlinerView(); - -xStm->Seek( 0 ); - -
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/core/tool/autoform.cxx |6 +-- sc/source/core/tool/interpr1.cxx | 54 +++--- sc/source/filter/excel/excform.cxx| 26 +++--- sc/source/filter/excel/tokstack.cxx | 14 +++ sc/source/filter/inc/lotform.hxx |2 - sc/source/filter/lotus/lotform.cxx| 52 ++-- sc/source/filter/starcalc/scflt.cxx | 32 - sc/source/ui/view/viewfun7.cxx|4 +- sd/source/core/sdiocmpt.cxx |4 +- sd/source/filter/ppt/pptin.cxx| 10 ++--- sd/source/ui/animations/motionpathtag.cxx |4 +- sd/source/ui/func/futext.cxx |4 +- sd/source/ui/view/drviews2.cxx|6 +-- sd/source/ui/view/sdview2.cxx |6 +-- 14 files changed, 112 insertions(+), 112 deletions(-) New commits: commit 2213bd610f6522b8fea7ae2af7e973e29dbe25b6 Author: Noel GrandinDate: Thu Aug 3 15:39:01 2017 +0200 rename Anz->Cnt in sd Change-Id: If03e1e2e896ca7cd5783263b487eb313d80140c0 Reviewed-on: https://gerrit.libreoffice.org/40743 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx index 68b3fa8df94e..d1103f5d7485 100644 --- a/sd/source/core/sdiocmpt.cxx +++ b/sd/source/core/sdiocmpt.cxx @@ -70,8 +70,8 @@ void old_SdrDownCompat::CloseSubRecord() if(nMode == StreamMode::READ) { -sal_uInt32 nReadAnz(nAktPos - nSubRecPos); -if(nReadAnz != nSubRecSiz) +sal_uInt32 nReadCnt(nAktPos - nSubRecPos); +if(nReadCnt != nSubRecSiz) { rStream.Seek(nSubRecPos + nSubRecSiz); } diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index d2b0d7ceb0d5..7bec40a94c6c 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -573,9 +573,9 @@ bool ImplSdPPTImport::Import() sal_uInt32 nImportedPages = 0; { -sal_uInt16 nMasterAnz = GetPageCount( PPT_MASTERPAGE ); +sal_uInt16 nMasterCnt = GetPageCount( PPT_MASTERPAGE ); -for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterAnz; nMasterNum++ ) +for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterCnt; nMasterNum++ ) { SetPageNum( nMasterNum, PPT_MASTERPAGE ); SdPage* pPage = static_cast (MakeBlancPage( true )); @@ -911,10 +911,10 @@ bool ImplSdPPTImport::Import() pHandoutPage->SetPageKind( PageKind::Handout ); pSdrModel->InsertPage( pHandoutPage ); -sal_uInt16 nPageAnz = GetPageCount(); -if ( nPageAnz ) +sal_uInt16 nPageCnt = GetPageCount(); +if ( nPageCnt ) { -for ( sal_uInt16 nPage = 0; nPage < nPageAnz; nPage++ ) +for ( sal_uInt16 nPage = 0; nPage < nPageCnt; nPage++ ) { mePresChange = PRESCHANGE_SEMIAUTO; SetPageNum( nPage ); diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 90301c946242..7468dd549a22 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -920,8 +920,8 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) if( mrView.IsPlusHandlesAlwaysVisible() || bSelected ) { -sal_uInt32 nPlusAnz=mpPathObj->GetPlusHdlCount(*pSmartHdl); -for (sal_uInt32 nPlusNum=0; nPlusNum GetPlusHdlCount(*pSmartHdl); +for (sal_uInt32 nPlusNum=0; nPlusNum GetPlusHdl(*pSmartHdl,nPlusNum); if (pPlusHdl!=nullptr) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 5e2d82e1331e..1d65dd5d8fca 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1017,10 +1017,10 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) if (!GetTextObj()->GetOutlinerParaObject() && mpView->GetTextEditOutliner()) { ::Outliner* pOutl = mpView->GetTextEditOutliner(); -sal_Int32 nParaAnz = pOutl->GetParagraphCount(); +sal_Int32 nParagraphCnt = pOutl->GetParagraphCount(); Paragraph* p1stPara = pOutl->GetParagraph( 0 ); -if (nParaAnz==1 && p1stPara) +if (nParagraphCnt==1 && p1stPara) { // with only one paragraph if (pOutl->GetText(p1stPara).isEmpty()) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source sfx2/source svl/source svx/source sw/source ucbhelper/source ucb/source
sc/source/ui/cctrl/tbzoomsliderctrl.cxx |2 sd/source/ui/app/tmplctrl.cxx |2 sfx2/source/control/ctrlitem.cxx|2 sfx2/source/control/dispatch.cxx|4 sfx2/source/control/unoctitm.cxx|6 sfx2/source/doc/objxtor.cxx |2 sfx2/source/statbar/stbitem.cxx |2 sfx2/source/toolbox/tbxitem.cxx |2 svl/source/items/itemset.cxx|2 svx/source/stbctrls/zoomsliderctrl.cxx |2 svx/source/svdraw/svdibrow.cxx |2 sw/source/uibase/docvw/romenu.cxx |2 sw/source/uibase/utlui/bookctrl.cxx |2 sw/source/uibase/utlui/viewlayoutctrl.cxx |2 ucb/source/core/provprox.cxx|4 ucb/source/ucp/cmis/cmis_content.cxx|8 ucb/source/ucp/cmis/cmis_repo_content.cxx |4 ucb/source/ucp/file/filid.cxx | 13 - ucb/source/ucp/ftp/ftpcontent.cxx | 14 - ucb/source/ucp/ftp/ftpcontentidentifier.cxx | 13 - ucb/source/ucp/ftp/ftpcontentprovider.cxx | 14 - ucb/source/ucp/gio/gio_content.cxx |9 - ucb/source/ucp/hierarchy/hierarchycontent.cxx | 52 -- ucb/source/ucp/hierarchy/hierarchydatasource.cxx| 49 - ucb/source/ucp/package/pkgcontent.cxx | 52 -- ucb/source/ucp/tdoc/tdoc_content.cxx| 51 -- ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx| 14 - ucb/source/ucp/webdav-neon/webdavcontent.cxx| 51 -- ucb/source/ucp/webdav/webdavcontent.cxx | 51 -- ucbhelper/source/provider/contentidentifier.cxx | 15 - ucbhelper/source/provider/interactionrequest.cxx| 99 ++-- ucbhelper/source/provider/simplenameclashresolverequest.cxx | 14 - 32 files changed, 115 insertions(+), 446 deletions(-) New commits: commit cbcaff7510d557d345c15db97f52633c81939d41 Author: Jochen NitschkeDate: Tue Jun 6 11:02:09 2017 +0200 ucb: replace double checked locking patterns with thread safe local statics and prefix statics Change-Id: Iaa7c9056847f75612d6cf6c6e44d3896fca734de Reviewed-on: https://gerrit.libreoffice.org/38433 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index 1266576b17b3..271269a35feb 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -158,13 +158,13 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes() } else { -static cppu::OTypeCollection collection( +static cppu::OTypeCollection s_aCollection( CPPU_TYPE_REF( XTypeProvider ), CPPU_TYPE_REF( XServiceInfo ), CPPU_TYPE_REF( XContentProvider ), CPPU_TYPE_REF( XParameterizedContentProvider ), CPPU_TYPE_REF( XContentProviderSupplier ) ); -return collection.getTypes(); +return s_aCollection.getTypes(); } } diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index def0db069191..4a8e75c65837 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1946,7 +1946,7 @@ namespace cmis { if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) ) { -static cppu::OTypeCollection aFolderCollection +static cppu::OTypeCollection s_aFolderCollection (CPPU_TYPE_REF( lang::XTypeProvider ), CPPU_TYPE_REF( lang::XServiceInfo ), CPPU_TYPE_REF( lang::XComponent ), @@ -1958,7 +1958,7 @@ namespace cmis CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ), CPPU_TYPE_REF( container::XChild ), CPPU_TYPE_REF( ucb::XContentCreator ) ); -return aFolderCollection.getTypes(); +return s_aFolderCollection.getTypes(); } } catch (const uno::RuntimeException&) @@ -1973,7 +1973,7 @@ namespace cmis uno::Reference(), a); } -static cppu::OTypeCollection aFileCollection +static cppu::OTypeCollection s_aFileCollection (CPPU_TYPE_REF( lang::XTypeProvider ), CPPU_TYPE_REF( lang::XServiceInfo ), CPPU_TYPE_REF( lang::XComponent ), @@ -1985,7
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/inc/csvgrid.hxx|2 - sd/source/ui/inc/unopage.hxx|5 ++- sd/source/ui/unoidl/unopage.cxx | 57 +++- 3 files changed, 38 insertions(+), 26 deletions(-) New commits: commit b7b951a90b210bdec5215f2ad09f8a10757a1b2a Author: David TardonDate: Mon Aug 1 16:04:36 2016 +0200 tdf#100969 ensure proper update after model change Change-Id: I62836056aeda7497552d60d33fedd9490a6fe545 diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx index b2f5b67..ae5e2b6 100644 --- a/sd/source/ui/inc/unopage.hxx +++ b/sd/source/ui/inc/unopage.hxx @@ -60,8 +60,11 @@ class SdGenericDrawPage : public SvxFmDrawPage, private: SdXImpressDocument* mpModel; SdrModel* mpSdrModel; +bool mbIsImpressDocument; sal_Int16 mnTempPageNumber; // for printing handouts +void UpdateModel(); + protected: friend class SdXImpressDocument; @@ -81,7 +84,7 @@ protected: void SetWidth( sal_Int32 nWidth ); void SetHeight( sal_Int32 nHeight ); -bool mbIsImpressDocument; +bool IsImpressDocument() const; virtual void disposing() throw() override; diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 4ca21d0..7ca15d9 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -347,9 +347,9 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa SdUnoSearchReplaceShape(this), mpModel ( _pModel ), mpSdrModel(nullptr), +mbIsImpressDocument(false), mnTempPageNumber(0), -mpPropSet ( _pSet ), -mbIsImpressDocument(false) +mpPropSet ( _pSet ) { mpSdrModel = SvxFmDrawPage::mpModel; if( mpModel ) @@ -370,22 +370,31 @@ void SdGenericDrawPage::throwIfDisposed() const throw (css::uno::RuntimeExceptio SdXImpressDocument* SdGenericDrawPage::GetModel() const { if( mpSdrModel != SvxFmDrawPage::mpModel ) +const_cast (this)->UpdateModel(); +return mpModel; +} + +bool SdGenericDrawPage::IsImpressDocument() const +{ +if( mpSdrModel != SvxFmDrawPage::mpModel ) +const_cast (this)->UpdateModel(); +return mbIsImpressDocument; +} + + +void SdGenericDrawPage::UpdateModel() +{ +mpSdrModel = SvxFmDrawPage::mpModel; +if( mpSdrModel ) { -const_cast< SdGenericDrawPage* >(this)->mpSdrModel = SvxFmDrawPage::mpModel; -if( mpSdrModel ) -{ -uno::Reference< uno::XInterface > xModel( SvxFmDrawPage::mpModel->getUnoModel() ); -const_cast< SdGenericDrawPage*>(this)->mpModel = SdXImpressDocument::getImplementation( xModel ); -if( mpModel ) -const_cast< SdGenericDrawPage*>(this)->mbIsImpressDocument = mpModel->IsImpressDocument(); -} -else -{ -const_cast< SdGenericDrawPage* >(this)->mpModel = nullptr; -} +uno::Reference< uno::XInterface > xModel( SvxFmDrawPage::mpModel->getUnoModel() ); +mpModel = SdXImpressDocument::getImplementation( xModel ); } - -return mpModel; +else +{ +mpModel = nullptr; +} +mbIsImpressDocument = mpModel ? mpModel->IsImpressDocument() : false; } // this is called whenever a SdrObject must be created for a empty api shape wrapper @@ -573,7 +582,7 @@ Any SAL_CALL SdGenericDrawPage::queryInterface( const uno::Type & rType ) { aAny <<= Reference(this); } -else if (mbIsImpressDocument && rType == cppu::UnoType::get()) +else if (IsImpressDocument() && rType == cppu::UnoType::get()) { const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD; @@ -2071,7 +2080,7 @@ Any SAL_CALL SdDrawPage::queryInterface( const uno::Type & rType ) { return makeAny( Reference< drawing::XMasterPageTarget >( this ) ); } -else if( mbIsImpressDocument +else if( IsImpressDocument() && rType == cppu::UnoType::get() ) { SdPage * p = dynamic_cast(SvxDrawPage::mpPage); @@ -2106,7 +2115,7 @@ Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes() throw(uno::RuntimeExceptio if( maTypeSequence.getLength() == 0 ) { const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD; -bool bPresPage = mbIsImpressDocument && ePageKind != PK_HANDOUT; +bool bPresPage = IsImpressDocument() && ePageKind != PK_HANDOUT; // Collect the types of this class. ::std::vector aTypes; @@ -2258,7 +2267,7 @@ Sequence< OUString > SAL_CALL SdDrawPage::getSupportedServiceNames() throw(uno:: Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() ); comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.DrawPage"} ); -if( mbIsImpressDocument ) +if( IsImpressDocument() )
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 +- sd/source/ui/view/drviewsd.cxx | 13 ++--- 2 files changed, 3 insertions(+), 12 deletions(-) New commits: commit e0cba2a0a837b0d53e813abef3a379b737122c67 Author: Caolán McNamaraDate: Fri Feb 5 20:38:54 2016 + coverity#1351877 'Constant' variable guards dead code and coverity#1351882 Useless call sigh, silly me regression from commit 2ce227a7642647267c982909a8b3175d22c58b74 Author: Caolán McNamara Date: Thu Feb 4 09:17:42 2016 + coverity#1351755 Dereference null return value Change-Id: I6d6841d04f9bba68ec2077d874dcd24edbf4ab6c diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index d7982a9..fb00e3f 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -523,7 +523,7 @@ void ScPivotLayoutDialog::ApplyChanges() if ( ( ( rOldRange != aDestinationRange ) && !rOldRange.In( aDestinationRange ) ) || bToNewSheet ) { -mpDocument->GetDPAtCursor( maPivotParameters.nCol, maPivotParameters.nRow, maPivotParameters.nTab); +pDPObj = mpDocument->GetDPAtCursor( maPivotParameters.nCol, maPivotParameters.nRow, maPivotParameters.nTab); } if (pDPObj) { commit 57598da9fa348f09d681b334c8196feb7f23cdb9 Author: Caolán McNamara Date: Fri Feb 5 20:36:46 2016 + coverity#1351878 'Constant' variable guards dead code since commit 2503a1e99df463aef1bf87c94b7b4a8ee3554efe Author: Bryan Quigley Date: Wed Jan 27 12:19:28 2016 -0500 tdf#96414 Remove showing navigator during slideshow Change-Id: If3949c2527334107d1ca8af2bee50ec4b7b2947a diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx index 572378f..4ba0ab3 100644 --- a/sd/source/ui/view/drviewsd.cxx +++ b/sd/source/ui/view/drviewsd.cxx @@ -156,7 +156,6 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet ) sal_uInt16 nCurrentPage = 0; sal_uInt16 nFirstPage = 0; sal_uInt16 nLastPage; -bool bEndless = false; OUString aPageName; nState |= NAVTLB_UPDATE; @@ -172,11 +171,7 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet ) // first page / previous page if( nCurrentPage == nFirstPage ) { -nState |= NAVBTN_FIRST_DISABLED; -if( !bEndless ) -nState |= NAVBTN_PREV_DISABLED; -else -nState |= NAVBTN_PREV_ENABLED; +nState |= NAVBTN_FIRST_DISABLED | NAVBTN_PREV_DISABLED; } else { @@ -186,11 +181,7 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet ) // last page / next page if( nCurrentPage == nLastPage ) { -nState |= NAVBTN_LAST_DISABLED; -if( !bEndless ) -nState |= NAVBTN_NEXT_DISABLED; -else -nState |= NAVBTN_NEXT_ENABLED; +nState |= NAVBTN_LAST_DISABLED | NAVBTN_NEXT_DISABLED; } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/filter/excel/xestream.cxx |9 +++-- sd/source/filter/eppt/pptx-text.cxx |2 +- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 5bdaf82cce321d4a86914f1ee4e8abfea384b218 Author: Stephan BergmannDate: Tue Nov 17 10:40:53 2015 +0100 Don't assume sal_Unicode is unsigned short Change-Id: I508520556cd5755d81740b00c7815eebdef6576e diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 8eae702..c5f53c9a 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -249,7 +249,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe sal_Int16 nScriptType = SvtLanguageOptions::FromSvtScriptTypeToI18N( SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ) ); if ( mpText && mnTextSize && xPPTBreakIter.is() ) { -OUString sT( mpText, mnTextSize ); +OUString sT( reinterpret_cast(mpText), mnTextSize ); nScriptType = xPPTBreakIter->getScriptType( sT, 0 ); } if ( nScriptType != css::i18n::ScriptType::COMPLEX ) commit 7ab065c124e8110b14b6c91f210cea3c5f0d0c83 Author: Stephan Bergmann Date: Tue Nov 17 10:40:39 2015 +0100 Don't assume sal_Unicode is unsigned short Change-Id: I6125c2abe1dbfd0a5ecf020b8363fc277d195157 diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 26f8bbb..07564e3 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -730,7 +730,9 @@ OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer ) return OString(); const sal_uInt16* pBuffer = [0]; -return OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 ); +return OString( +reinterpret_cast(pBuffer), rBuffer.size(), +RTL_TEXTENCODING_UTF8); } OString XclXmlUtils::ToOString( const ScRange& rRange ) @@ -802,7 +804,10 @@ OUString XclXmlUtils::ToOUString( const ScfUInt16Vec& rBuf, sal_Int32 nStart, sa if( nLength == -1 || ( nLength > ((sal_Int32)rBuf.size() - nStart) ) ) nLength = (rBuf.size() - nStart); -return (nLength > 0) ? OUString( [nStart], nLength ) : OUString(); +return nLength > 0 +? OUString( +reinterpret_cast([nStart]), nLength) +: OUString(); } OUString XclXmlUtils::ToOUString( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source sw/source winaccessibility/source
sc/source/ui/Accessibility/AccessibleDocument.cxx |2 - sd/source/ui/slidesorter/controller/SlsFocusManager.cxx |2 - sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx |2 - sw/source/ui/fldui/fldfunc.cxx |2 - sw/source/ui/frmdlg/column.cxx |2 - sw/source/uibase/inc/wrtsh.hxx |2 - sw/source/uibase/uno/unotxvw.cxx|2 - winaccessibility/source/UAccCOM/AccHypertext.cxx| 14 ++-- winaccessibility/source/UAccCOM/AccText.cxx | 12 +- 9 files changed, 20 insertions(+), 20 deletions(-) New commits: commit 52d1de87e9a77fc7929309b0365bd786406ce022 Author: Julien Nabet serval2...@yahoo.fr Date: Tue Feb 3 21:40:51 2015 +0100 Typo accpet-accept Change-Id: Ib9a5c131701e8240779be43af015ff4943d68ae8 diff --git a/winaccessibility/source/UAccCOM/AccHypertext.cxx b/winaccessibility/source/UAccCOM/AccHypertext.cxx index a141699..3e16c6e 100644 --- a/winaccessibility/source/UAccCOM/AccHypertext.cxx +++ b/winaccessibility/source/UAccCOM/AccHypertext.cxx @@ -84,10 +84,10 @@ STDMETHODIMP CAccHypertext::get_characterCount(long * nCharacters) /** * Get character extents. * @param offset Offset. - * @param x Variant to accpet x position. - * @param y Variant to accpet y position. - * @param width Variant to accpet width. - * @param Height Variant to accpet height. + * @param x Variant to accept x position. + * @param y Variant to accept y position. + * @param width Variant to accept width. + * @param Height Variant to accept height. * @return Result. */ STDMETHODIMP CAccHypertext::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height) @@ -98,7 +98,7 @@ STDMETHODIMP CAccHypertext::get_characterExtents(long offset, IA2CoordinateType /** * Get selections count. - * @param nSelections Variant to accpet selections count. + * @param nSelections Variant to accept selections count. * @return Result. */ STDMETHODIMP CAccHypertext::get_nSelections(long * nSelections) @@ -273,7 +273,7 @@ STDMETHODIMP CAccHypertext::scrollSubstringTo(long startIndex, long endIndex,enu /** * Get hyperlink count. - * @param hyperlinkCount Variant to accpet hyperlink count. + * @param hyperlinkCount Variant to accept hyperlink count. * @return Result. */ STDMETHODIMP CAccHypertext::get_nHyperlinks(long *hyperlinkCount) diff --git a/winaccessibility/source/UAccCOM/AccText.cxx b/winaccessibility/source/UAccCOM/AccText.cxx index c854fed..a8cd871 100644 --- a/winaccessibility/source/UAccCOM/AccText.cxx +++ b/winaccessibility/source/UAccCOM/AccText.cxx @@ -76,10 +76,10 @@ STDMETHODIMP CAccText::get_characterCount(long * nCharacters) /** * Get character extents. * @param offset Offset. - * @param x Variant to accpet x position. - * @param y Variant to accpet y position. - * @param width Variant to accpet width. - * @param Height Variant to accpet height. + * @param x Variant to accept x position. + * @param y Variant to accept y position. + * @param width Variant to accept width. + * @param Height Variant to accept height. * @return Result. */ STDMETHODIMP CAccText::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height) @@ -90,7 +90,7 @@ STDMETHODIMP CAccText::get_characterExtents(long offset, IA2CoordinateType coord /** * Get selections count. - * @param nSelections Variant to accpet selections count. + * @param nSelections Variant to accept selections count. * @return Result. */ STDMETHODIMP CAccText::get_nSelections(long * nSelections) commit d7d0121a10c679fca2e0466fb54697f8433282aa Author: Julien Nabet serval2...@yahoo.fr Date: Tue Feb 3 21:31:28 2015 +0100 Typo: selction/slection - selection Change-Id: I3f405d9525d3afb6534166fd733cabf7779a2846 diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index ea2688e..fb17833 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -980,7 +980,7 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Referencedrawing::X { sal_Int8 nComp(0); if (aXShapesItr == aXShapesEndItr) -nComp = -1; // simulate that the Shape is lower, so the selction state will be removed +nComp = -1; // simulate that the Shape is lower, so the selection state will be removed else nComp = Compare(*aDataItr, *aXShapesItr); if (nComp == 0) diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx index 2147385..1b9a3dc 100644 ---
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source sfx2/source svx/source sw/source vcl/source
sc/source/ui/miscdlgs/autofmt.cxx|2 sc/source/ui/sidebar/CellAppearancePropertyPanel.src |1 sd/source/ui/sidebar/MasterPagesSelector.cxx |4 + sfx2/source/dialog/dinfdlg.cxx | 11 +++ sfx2/source/sidebar/DeckLayouter.cxx |8 +- sfx2/source/sidebar/SidebarChildWindow.cxx |2 sfx2/source/sidebar/SidebarController.cxx| 32 ++- sfx2/source/sidebar/TabBar.cxx | 25 +++- svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 29 ++ svx/source/tbxctrls/fontworkgallery.cxx |4 + svx/source/tbxctrls/tbcontrl.cxx | 13 sw/source/ui/table/tautofmt.cxx |2 vcl/source/window/toolbox2.cxx | 53 +-- 13 files changed, 146 insertions(+), 40 deletions(-) New commits: commit 0459682b4186b7522783e33cca3791420559817a Author: Jan Holesovsky ke...@collabora.com Date: Sat Jan 4 12:59:04 2014 +0100 hidpi: Blind fix - avoid double scaling by updating GetItemImage(). I guess some code uses GetItemImage(), and then SetItemImage() again. To make it work, scale the image down in the hidpi mode. Change-Id: I1ce9fdb28564b829253d7a9c7eabb46019e68876 diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 1f90219..0294e3d 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -622,9 +622,17 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image rImage, DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, ToolBox::InsertItem(): ItemId already exists ); -// Item anlegen und in die Liste einfuegen -mpData-m_aItems.insert( (nPos mpData-m_aItems.size()) ? mpData-m_aItems.begin()+nPos : mpData-m_aItems.end(), ImplToolItem( nItemId, rImage, nBits ) ); -SetItemImage(nItemId, rImage); +Image aImage(rImage); +if (GetDPIScaleFactor() 1) +{ +BitmapEx aBitmap(aImage.GetBitmapEx()); +aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST); +aImage = Image(aBitmap); +} + +mpData-m_aItems.insert((nPos mpData-m_aItems.size()) ? mpData-m_aItems.begin()+nPos : mpData-m_aItems.end(), +ImplToolItem(nItemId, aImage, nBits)); + mpData-ImplClearLayoutData(); ImplInvalidate( sal_True ); @@ -644,9 +652,17 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image rImage, DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, ToolBox::InsertItem(): ItemId already exists ); -// Item anlegen und in die Liste einfuegen -mpData-m_aItems.insert( (nPos mpData-m_aItems.size()) ? mpData-m_aItems.begin()+nPos : mpData-m_aItems.end(), ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) ); -SetItemImage(nItemId, rImage); +Image aImage(rImage); +if (GetDPIScaleFactor() 1) +{ +BitmapEx aBitmap(aImage.GetBitmapEx()); +aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST); +aImage = Image(aBitmap); +} + +mpData-m_aItems.insert((nPos mpData-m_aItems.size()) ? mpData-m_aItems.begin()+nPos : mpData-m_aItems.end(), +ImplToolItem(nItemId, aImage, ImplConvertMenuString(rText), nBits)); + mpData-ImplClearLayoutData(); ImplInvalidate( sal_True ); @@ -1353,17 +1369,11 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image rImage ) { Image aImage(rImage); -if ( GetDPIScaleFactor() 1) +if (GetDPIScaleFactor() 1) { BitmapEx aBitmap(aImage.GetBitmapEx()); - -// Some code calls this twice, so add a sanity check -// FIXME find out what that code is fix accordingly -if (aBitmap.GetSizePixel().Width() 32) -{ -aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST); -aImage = Image(aBitmap); -} +aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST); +aImage = Image(aBitmap); } ImplToolItem* pItem = mpData-m_aItems[nPos]; @@ -1487,7 +1497,20 @@ Image ToolBox::GetItemImage( sal_uInt16 nItemId ) const ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) -return pItem-maImage; +{ +Image aImage(pItem-maImage); + +if (GetDPIScaleFactor() 1) +{ +// we have scaled everything we have inserted, so scale it back to +// the original size +BitmapEx aBitmap(aImage.GetBitmapEx()); +aBitmap.Scale(1.0/GetDPIScaleFactor(), 1.0/GetDPIScaleFactor(), BMP_SCALE_FAST); +aImage = Image(aBitmap); +} + +return aImage; +} else return Image(); } commit ae37972cd25117d467d34ee8591c21dcbb5a0fec
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/unoobj/servuno.cxx |1 - sd/source/ui/unoidl/unomodel.cxx |2 -- 2 files changed, 3 deletions(-) New commits: commit 41856747c3ca40ca4d7282412cde1cd7411ccbb0 Author: Tor Lillqvist t...@collabora.com Date: Wed Oct 2 20:45:34 2013 +0300 WaE: unused variable Change-Id: If669e501382d2ea7ea09117a13baa48233f8f655 diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index c5af062..22cb2bf 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1452,8 +1452,6 @@ sal_Int32 SAL_CALL SdXImpressDocument::getRendererCount( const uno::Any rSelect if( NULL == mpDoc ) throw lang::DisposedException(); -uno::Sequence beans::PropertyValue aRenderer; - if( mpDocShell mpDoc ) { uno::Reference frame::XModel xModel; commit 7dd697f8815ff3fa81a8f6a9452286ced4f11487 Author: Tor Lillqvist t...@collabora.com Date: Wed Oct 2 20:33:40 2013 +0300 WaE: unused variable Change-Id: Ibed22b6d96da85684034f9c498aaed75ea48c883 diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 271cb7e..aa8eb5d 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -188,7 +188,6 @@ public: uno::Reference container::XIndexAccess xIndex( xSupplier-getDrawPages(), uno::UNO_QUERY_THROW ); sal_Int32 nLen = xIndex-getCount(); bool bMatched = false; -uno::Sequence script::ScriptEventDescriptor aFakeEvents; for ( sal_Int32 index = 0; index nLen; ++index ) { try ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/ui/sidebar/CellBorderStyleControl.cxx |3 --- sc/source/ui/sidebar/CellLineStyleValueSet.cxx |2 -- sd/source/ui/view/drviews2.cxx |2 +- 3 files changed, 1 insertion(+), 6 deletions(-) New commits: commit 66c315bcf2b78c4928d1e436d1a853f58f4cccdb Author: Tor Lillqvist t...@iki.fi Date: Tue May 21 17:05:42 2013 +0300 WaE: unused variables Change-Id: I52d43a35e621636175e6c56bc068837d3a84bec4 diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index 867d1c0..85ffd6f 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -137,7 +137,6 @@ void CellBorderStyleControl::Initialize() IMPL_LINK(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox) { sal_uInt16 nId = pToolBox-GetCurItemId(); -::Color aColBlack( COL_BLACK ); SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER ); editeng::SvxBorderLine theDefLine(NULL, 1); @@ -198,7 +197,6 @@ IMPL_LINK(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox) if( nId != TBI_BORDER2_BLTR nId != TBI_BORDER2_TLBR ) { -::Color aColBlack( COL_BLACK ); SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER ); editeng::SvxBorderLine theDefLine(NULL, 1); @@ -282,7 +280,6 @@ IMPL_LINK(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox) { sal_uInt16 nId = pToolBox-GetCurItemId(); -::Color aColBlack( COL_BLACK ); SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER ); editeng::SvxBorderLine *pTop = 0 , diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx index 4f823f0..fc8e5e5 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx @@ -95,8 +95,6 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent rUDEvt ) aSize.Height() = nRectHeight*3/5; aFont.SetSize( aSize ); -Point aLineStart(aBLPos.X() + 5,aBLPos.Y() + ( nRectHeight - nItemId )/2); -Point aLineEnd(aBLPos.X() + nRectWidth * 7 / 9 - 15, aBLPos.Y() + ( nRectHeight - nItemId )/2); long nTLX = aBLPos.X() + 5, nTLY = aBLPos.Y() + ( nRectHeight - nItemId )/2; long nTRX = aBLPos.X() + nRectWidth * 7 / 9 - 15, nTRY = aBLPos.Y() + ( nRectHeight - nItemId )/2; commit ce575889b9c46e98544c9f6f30372ac7e05e20c5 Author: Tor Lillqvist t...@iki.fi Date: Tue May 21 17:00:18 2013 +0300 Fix warning: statement aligned ... [loplugin] Change-Id: Ie092f3e1a6362089feec90f6aef6c73f23d13935 diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 4e44fb7..835cc93 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2876,7 +2876,7 @@ void DrawViewShell::ExecChar( SfxRequest rReq ) { SdDrawDocument* pDoc = GetDoc(); if (!pDoc || !mpDrawView) -return; +return; SfxItemSet aEditAttr( pDoc-GetPool() ); mpDrawView-GetAttributes( aEditAttr ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sd/source
sc/source/filter/orcus/interface.cxx |2 +- sd/source/filter/eppt/pptx-epptooxml.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit f1efc98b45fcf462a74b31790d4075f29cc0f8af Author: Tor Lillqvist t...@iki.fi Date: Fri Apr 19 00:30:10 2013 +0300 WaE: format specifies type 'int' but the argument has type 'sal_uInt32' Change-Id: I33f603df67db2caaeebec5fc6f5f6ee2341a0b8f diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index da791f3..ba04809 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1314,7 +1314,7 @@ bool PowerPointExport::WriteComments( sal_uInt32 nPageNum ) sal_Int32 nId = GetAuthorIdAndLastIndex ( xAnnotation-getAuthor(), nLastIndex ); char cDateTime[32]; -snprintf(cDateTime, 31, %02d-%02d-%02dT%02d:%02d:%02d.%09d, aDateTime.Year, aDateTime.Month, aDateTime.Day, aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); +snprintf(cDateTime, 31, %02d-%02d-%02dT%02d:%02d:%02d.%09 SAL_PRIuUINT32, aDateTime.Year, aDateTime.Month, aDateTime.Day, aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); pFS-startElementNS( XML_p, XML_cm, XML_authorId, I32S( nId ), commit 824caac79d983ad1aa93a6ec51558d7edb6f2a7d Author: Tor Lillqvist t...@iki.fi Date: Fri Apr 19 00:29:29 2013 +0300 No member named 'Get100Sec' in 'Time' any longer Change-Id: I6087cd51073529a5c2b636b04f60334a93ac4ecc diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 55b170a..e67c915 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -231,7 +231,7 @@ void ScOrcusSheet::set_date_time( long nDateDiff = aDate - aNullDate; double fTime = -static_castdouble(aTime.Get100Sec()) / 100.0 + +static_castdouble(aTime.GetNanoSec()) / 1e9 + aTime.GetSec() + aTime.GetMin() * 60.0 + aTime.GetHour() * 3600.0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits