[Libreoffice-commits] core.git: sc/source svx/source
sc/source/core/data/documen3.cxx | 12 svx/source/dialog/langbox.cxx|4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) New commits: commit da398ad3bb511e33451f9d3bf24b0c5abd55ce25 Author: Dr. David Alan Gilbert AuthorDate: Wed May 24 13:57:16 2023 +0100 Commit: Noel Grandin CommitDate: Mon May 29 14:48:04 2023 +0200 replace find_if by any_of A few cases where find_if is used just to test if there are any matches; use any_of as per tdf#153109 In document3 we can merge two identical loops. In langbox we can optimise the arg capture (Arkadiy's suggestion) Change-Id: I480b80ec1b859980b651c6d727e7fb5d01d390e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152201 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 72839483dae6..b1cf5fe81b8c 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -87,10 +87,6 @@ void sortAndRemoveDuplicates(std::vector& rStrings, bool bCaseSe std::vector::iterator it = std::unique(rStrings.begin(), rStrings.end(), ScTypedStrData::EqualCaseSensitive()); rStrings.erase(it, rStrings.end()); -if (std::find_if(rStrings.begin(), rStrings.end(), -[](ScTypedStrData& rString) { return rString.IsHiddenByFilter(); }) != rStrings.end()) { -std::stable_sort(rStrings.begin(), rStrings.end(), ScTypedStrData::LessHiddenRows()); -} } else { @@ -98,10 +94,10 @@ void sortAndRemoveDuplicates(std::vector& rStrings, bool bCaseSe std::vector::iterator it = std::unique(rStrings.begin(), rStrings.end(), ScTypedStrData::EqualCaseInsensitive()); rStrings.erase(it, rStrings.end()); -if (std::find_if(rStrings.begin(), rStrings.end(), -[](ScTypedStrData& rString) { return rString.IsHiddenByFilter(); }) != rStrings.end()) { -std::stable_sort(rStrings.begin(), rStrings.end(), ScTypedStrData::LessHiddenRows()); -} +} +if (std::any_of(rStrings.begin(), rStrings.end(), +[](ScTypedStrData& rString) { return rString.IsHiddenByFilter(); })) { +std::stable_sort(rStrings.begin(), rStrings.end(), ScTypedStrData::LessHiddenRows()); } } diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 76d9b3de1fe5..b489ea58a546 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -183,8 +183,8 @@ void SvxLanguageBox::AddLanguages(const std::vector< LanguageType >& rLanguageTy weld::ComboBoxEntry aNewEntry(BuildEntry(nLang)); if (aNewEntry.sString.isEmpty()) continue; -if (std::find_if(rEntries.begin(), rEntries.end(), - [=](const weld::ComboBoxEntry& rEntry){ return rEntry.sId == aNewEntry.sId; }) != rEntries.end()) +if (std::any_of(rEntries.begin(), rEntries.end(), + [&](const weld::ComboBoxEntry& rEntry){ return rEntry.sId == aNewEntry.sId; })) continue; rEntries.push_back(aNewEntry); }
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/view/gridwin.cxx| 11 --- svx/source/tbxctrls/tbcontrl.cxx |1 + 2 files changed, 9 insertions(+), 3 deletions(-) New commits: commit b5c22a9371e22162ff7305ffaa393ed908eee610 Author: Caolán McNamara AuthorDate: Wed Nov 17 17:07:49 2021 + Commit: Caolán McNamara CommitDate: Wed Nov 17 20:49:59 2021 +0100 use ListBoxPreview size for the color shown in autofilter color list it's used for a similar case in the color button, GetToolbarIconSizePixel is relatively narrow and we have a hectare of space available here. Draw a border around the color as we do for the similar color button case. Change-Id: If0b24a142d47038d02a977ed88281b2de0b529fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125418 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 3530e9d69d5a..acd2973075c1 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -950,10 +950,15 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode) } else { +// ColorListBox::ShowPreview is similar ScopedVclPtr xDev(pPopupParent->create_virtual_device()); - xDev->SetOutputSize(Application::GetSettings().GetStyleSettings().GetToolbarIconSizePixel()); -xDev->SetBackground(rColor); -xDev->Erase(); +const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); +Size aImageSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize()); +xDev->SetOutputSize(aImageSize); +const tools::Rectangle aRect(Point(0, 0), aImageSize); +xDev->SetFillColor(rColor); +xDev->SetLineColor(rStyleSettings.GetDisableColor()); +xDev->DrawRect(aRect); xColorMenu->insert(-1, OUString::number(i), OUString(), nullptr, xDev.get(), nullptr, TRISTATE_TRUE); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5a1239bdea77..04ae3e0ec4fa 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -4021,6 +4021,7 @@ void ColorListBox::LockWidthRequest() void ColorListBox::ShowPreview(const NamedColor ) { +// ScGridWindow::UpdateAutoFilterFromMenu is similar const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Size aImageSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
[Libreoffice-commits] core.git: sc/source svx/source sw/source
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |2 +- svx/source/sdr/contact/objectcontactofpageview.cxx |2 +- sw/source/core/text/txtfly.cxx |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 061c7e3994eb5288e95d7fb0ce7a1bc0f54205ed Author: Caolán McNamara AuthorDate: Tue Sep 21 08:53:28 2021 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 21 11:19:07 2021 +0200 fix !HAVE_FEATURE_DESKTOP build, IsOver->Overlaps and change some commented out cases Change-Id: Icc60b19de7d12a78e7d40e7aa94dae40dc8b60a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122378 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index b5e806e379dd..e2d0d011092d 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -693,7 +693,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint Rectangle aNewPos(aNewVisCells); -if (aNewVisCells.IsOver(maVisCells)) +if (aNewVisCells.Overlaps(maVisCells)) aNewPos.Union(maVisCells); else CommitTableModelChange(maVisCells.Top(), maVisCells.Left(), maVisCells.Bottom(), maVisCells.Right(), AccessibleTableModelChangeType::UPDATE); diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 1e8a95448d78..fca0d7c85a03 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -258,7 +258,7 @@ namespace sdr::contact for (sal_Int32 i = 0; i < nObjCount; ++i) { SdrObject* pObject = GetSdrPage()->GetObj(i); -if (rRedrawArea.IsOver(pObject->GetCurrentBoundRect())) +if (rRedrawArea.Overlaps(pObject->GetCurrentBoundRect())) { bGetHierarchy = true; break; diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 05ab2d873b86..f1b9886906e0 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -1123,7 +1123,7 @@ void SwTextFly::CalcRightMargin( SwRect , // and protrudes into the same line. // Flys with run-through are invisible for those below, i.e., they // are ignored for computing the margins of other Flys. -// 3301: pNext->getFrameArea().IsOver( rLine ) is necessary +// 3301: pNext->getFrameArea().Overlaps( rLine ) is necessary // #i68520# css::text::WrapTextMode eSurroundForTextWrap; @@ -1214,7 +1214,7 @@ void SwTextFly::CalcLeftMargin( SwRect , // and protrudes into the same line. // Flys with run-through are invisible for those below, i.e., they // are ignored for computing the margins of other Flys. -// 3301: pNext->getFrameArea().IsOver( rLine ) is necessary +// 3301: pNext->getFrameArea().Overlaps( rLine ) is necessary // #i68520# SwAnchoredObjList::size_type nMyPos = nFlyPos;
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/app/inputwin.cxx |1 - sc/source/ui/inc/inputwin.hxx |2 -- svx/source/dialog/weldeditview.cxx |3 --- 3 files changed, 6 deletions(-) New commits: commit 8ecfd2b84fddb37482539702208374d2af56a44d Author: Caolán McNamara AuthorDate: Thu Sep 9 10:28:57 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 9 12:42:22 2021 +0200 don't need to explicitly call GetFocus() if GrabFocus() succeeds the GetFocus() should be called anyway Change-Id: I2a448659acd990bf570fe56907ac826138cc9938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121840 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 1a0bcc828767..bee2461fa85d 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2172,7 +2172,6 @@ void ScTextWnd::StyleUpdated() void ScTextWnd::TextGrabFocus() { GrabFocus(); -GetFocus(); } // Position window diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 86cc6594910c..aa90dc7c4f3e 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -125,8 +125,6 @@ protected: virtual boolStartDrag() override; -//TODOvirtual OUString GetText() const override; - private: voidImplInitSettings(); voidUpdateAutoCorrFlag(); diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index a0f5e5e1cd03..513de53d89f8 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -260,10 +260,7 @@ bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt) CaptureMouse(); if (!HasFocus() && CanFocus()) -{ GrabFocus(); -GetFocus(); -} EditView* pEditView = GetEditView(); return pEditView && pEditView->MouseButtonDown(rMEvt);
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/core/data/postit.cxx | 11 --- svx/source/svdraw/svdotxat.cxx |7 +-- 2 files changed, 5 insertions(+), 13 deletions(-) New commits: commit 9c94bae963ef5019f6ca0394d076b1288969aa53 Author: Caolán McNamara AuthorDate: Tue Dec 1 09:09:45 2020 + Commit: Caolán McNamara CommitDate: Tue Dec 1 14:39:19 2020 +0100 Resolves: tdf#138549 use GetSpecialTextBoxShadow to identify ScPostIt instead of a 'special' name which causes undo-related causes side effects Change-Id: Id36b0b5360ddde3469721a7c837fe3942af08209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106924 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 7bb1b96eb2b4..bafd2e9e901b 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -382,17 +382,6 @@ void ScCaptionCreator::CreateCaption( bool bShown, bool bTailFront ) *mrDoc.GetDrawLayer(), // should ret a ref? aTextRect, aTailPos)); - -// tdf#114956 a way to recognize that this SdrCaption is for a ScPostit in -// SdrTextObj::AdjustTextFrameWidthAndHeight -SdrModel& rModel = mxCaption->getSdrModelFromSdrObject(); -const bool bUndoEnabled = rModel.IsUndoEnabled(); -if (bUndoEnabled) -rModel.EnableUndo(false); -mxCaption->SetName("ScPostIt"); -if (bUndoEnabled) -rModel.EnableUndo(true); - // basic caption settings ScCaptionUtil::SetBasicCaptionSettings( *mxCaption, bShown ); } diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 4b96bb04c12a..5ba5ec6a82cc 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -263,8 +263,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight() if (auto pRectObj = dynamic_cast(this)) { // this is a hack pRectObj->SetXPolyDirty(); } +bool bScPostIt = false; if (auto pCaptionObj = dynamic_cast(this)) { // this is a hack pCaptionObj->ImpRecalcTail(); +// tdf#114956, tdf#138549 use GetSpecialTextBoxShadow to recognize +// that this SdrCaption is for a ScPostit +bScPostIt = pCaptionObj->GetSpecialTextBoxShadow(); } // to not slow down EditView visualization on Overlay (see @@ -278,8 +282,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight() GetTextEditOutliner() && GetTextEditOutliner()->hasEditViewCallbacks()); -// tdf#114956 always broadcast change for ScPostIts -if (!bSuppressChangeWhenEditOnOverlay || GetName() == "ScPostIt") +if (!bSuppressChangeWhenEditOnOverlay || bScPostIt) { SetChanged(); BroadcastObjectChange(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/core/data/postit.cxx |3 +++ svx/source/svdraw/svdotxat.cxx |3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) New commits: commit 2f7b5634487ac3d2ab12a57089e71ea5216d Author: Caolán McNamara AuthorDate: Wed Nov 18 17:09:52 2020 + Commit: Caolán McNamara CommitDate: Thu Nov 19 09:49:48 2020 +0100 Resolves: tdf#114956 skip broadcast optimization for ScPostIts so we can resize the ScPostIt as was the case before commit f06b48a5dddab20fd1bbf9b5f3e8543593f5e590 Date: Fri Aug 4 18:56:43 2017 +0200 editviewoverlay: Allow EditView to run in Overlay Change-Id: Idd92716a9b38058f6f275769d4f2523eddac500c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106069 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index bafd2e9e901b..f826e1d66478 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -382,6 +382,9 @@ void ScCaptionCreator::CreateCaption( bool bShown, bool bTailFront ) *mrDoc.GetDrawLayer(), // should ret a ref? aTextRect, aTailPos)); +// tdf#114956 a way to recognize that this SdrCaption is for a ScPostit in +// SdrTextObj::AdjustTextFrameWidthAndHeight +mxCaption->SetName("ScPostIt"); // basic caption settings ScCaptionUtil::SetBasicCaptionSettings( *mxCaption, bShown ); } diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 7c4548a2ef8d..4b96bb04c12a 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -278,7 +278,8 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight() GetTextEditOutliner() && GetTextEditOutliner()->hasEditViewCallbacks()); -if (!bSuppressChangeWhenEditOnOverlay) +// tdf#114956 always broadcast change for ScPostIts +if (!bSuppressChangeWhenEditOnOverlay || GetName() == "ScPostIt") { SetChanged(); BroadcastObjectChange(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/drawfunc/fusel.cxx |3 - sc/source/ui/inc/viewdata.hxx|1 sc/source/ui/unoobj/docuno.cxx | 12 +++- sc/source/ui/view/drawview.cxx | 12 sc/source/ui/view/gridwin4.cxx | 70 ++- sc/source/ui/view/tabvwsh2.cxx |6 +- sc/source/ui/view/viewdata.cxx | 15 + svx/source/sdr/contact/viewobjectcontact.cxx |1 svx/source/svdraw/svdmrkv.cxx|3 - 9 files changed, 116 insertions(+), 7 deletions(-) New commits: commit a910703bcbd2d8a767aff3f50185233baf601a32 Author: Dennis Francis AuthorDate: Thu Jun 18 18:09:19 2020 +0530 Commit: Dennis Francis CommitDate: Sat Jul 11 07:34:10 2020 +0200 scPrintTwipsMsgs: Use print logical coordinates for draw objects as a result LOK_CALLBACK_GRAPHIC(_VIEW)_SELECTION messages will now be in print-twips. For tile-rendering, it needs the pixel-aligned coordinates of each object. The translation of print coordinates to pixel-aligned coordinates can be done behind the scenes by the ViewContact/ObjectContact/ViewObjectContact objects associated with the draw object which uses the cached "grid-offset" for each object (introduced in the patch "Refactor calc non-linear ViewToDevice transform"). For doing this, a subclass of FmFormView with a specialized "createViewSpecificObjectContact" method is used for tile-rendering. The createViewSpecificObjectContact creates a "proxy" object-contact object that delegates the grid-offsets queries to the actual ScDrawView generated ObjectContact. This is needed because currently there is no way to share the ObjectContact/ViewObjectContact instances between different SdrPaintWindow's without making changes ~everywhere. Change-Id: Ifdfb623c8d6dd81700ec4a5dfeeb6b2391a96154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98166 Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis (cherry picked from commit 345f9480618d0867f6b42a83a7ae1d62c8ef9c0c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98161 Tested-by: Jenkins diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index bb82aa3459bd..e3c306574a73 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -338,7 +338,8 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) } sal_uInt16 nDrgLog = sal_uInt16 ( pWindow->PixelToLogic(Size(SC_MINDRAGMOVE,0)).Width() ); -Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); +auto aLogicPosition = rMEvt.getLogicPosition(); +Point aPnt(aLogicPosition ? *aLogicPosition : pWindow->PixelToLogic(rMEvt.GetPosPixel())); bool bCopy = false; ScViewData& rViewData = rViewShell.GetViewData(); diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 286330adeaee..ab4196a46e82 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -606,6 +606,7 @@ public: Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const; /// returns the position (top-left corner) of the requested cell in print twips coordinates. Point GetPrintTwipsPos( SCCOL nCol, SCROW nRow ) const; +Point GetPrintTwipsPosFromTileTwips(const Point& rTileTwipsPos) const; /// return json for our cursor position. OString describeCellCursor() const { return describeCellCursorAt(GetCurX(), GetCurY()); } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 4f02c69ae818..a3e3f8c603b4 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -915,12 +915,20 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int if (!pViewData) return; -pViewData->SetZoom(Fraction(nTilePixelWidth_ * TWIPS_PER_PIXEL, nTileTwipWidth_), - Fraction(nTilePixelHeight_ * TWIPS_PER_PIXEL, nTileTwipHeight_), true); +const Fraction newZoomX(nTilePixelWidth_ * TWIPS_PER_PIXEL, nTileTwipWidth_); +const Fraction newZoomY(nTilePixelHeight_ * TWIPS_PER_PIXEL, nTileTwipHeight_); + +if (pViewData->GetZoomX() == newZoomX && pViewData->GetZoomY() == newZoomY) +return; + +pViewData->SetZoom(newZoomX, newZoomY, true); // refresh our view's take on other view's cursors & selections pViewData->GetActiveWin()->updateKitOtherCursors(); pViewData->GetActiveWin()->updateOtherKitSelections(); + +if (ScDrawView* pDrawView = pViewData->GetScDrawView()) +pDrawView->resetGridOffsetsForAllSdrPageViews(); } void ScModelObj::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::JsonWriter& rJsonWriter) diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 3fe21ca5dd33..f15b6c57c310
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/navipi/content.cxx | 14 ++ svx/source/svdraw/svdxcgv.cxx | 15 ++- 2 files changed, 20 insertions(+), 9 deletions(-) New commits: commit f9e2cfc0d2e244c1550a0e2cc8de960f82eaf9cf Author: Armin Le Grand AuthorDate: Tue Mar 10 16:15:45 2020 +0100 Commit: Armin Le Grand CommitDate: Tue Mar 10 20:06:59 2020 +0100 tdf#125520 create a persist correctly for OLE If the D described as in the task is an OLE object we need to create a Persist-object to copy the included EmbeddedObjectContainer Change-Id: Ib8b9677bbc3e6c5b3895abc55e6da5b0a96e33d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90263 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 49558c8c19b1..48b95d965767 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1137,7 +1137,21 @@ static bool lcl_DoDragObject( ScDocShell* pSrcShell, const OUString& rName, ScCo SdrPageView* pPV = aEditView.GetSdrPageView(); aEditView.MarkObj(pObject, pPV); +// tdf125520 this is a D potentially with an OLE object. If +// so, we need to do similar as e.g. in ScDrawView::BeginDrag so that +// the temporary SdrModel for transfer does have a GetPersist() so +// that the EmbeddedObjectContainer gets copied. We noeed no CheckOle +// here, test is simpler. +ScDocShellRef aDragShellRef; +if(OBJ_OLE2 == pObject->GetObjIdentifier()) +{ +aDragShellRef = new ScDocShell; // DocShell needs a Ref immediately +aDragShellRef->DoInitNew(); +} + +ScDrawLayer::SetGlobalDrawPersist(aDragShellRef.get()); std::unique_ptr pDragModel(aEditView.CreateMarkedObjModel()); +ScDrawLayer::SetGlobalDrawPersist(nullptr); TransferableObjectDescriptor aObjDesc; pSrcShell->FillTransferableObjectDescriptor( aObjDesc ); diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index c3fccab27d74..e8c8a3218a89 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -47,6 +47,7 @@ #include #include #include +#include using namespace com::sun::star; @@ -735,16 +736,12 @@ std::unique_ptr SdrExchangeView::CreateMarkedObjModel() const if(nullptr == pNewObj) { // not cloned yet -if (pObj->GetObjIdentifier() == OBJ_OLE2) +if(pObj->GetObjIdentifier() == OBJ_OLE2 && nullptr == mpModel->GetPersist()) { -// tdf#125520 - temp SdrModel will need a comphelper::IEmbeddedHelper -// to successfully clone the OLE content, use the one from source model -// in the temporary SdrModel - it gets not deleted in SdrModel destructor. -// As long as the temporary SdrModel is used temporarily (and does NOT get -// extended to a full document) this *should* work. There stay some -// concerns about what may happen in BG and if saved/loaded from clipboard, -// so this *might* need to be enhanced in the future. -pNewModel->SetPersist(mpModel->GetPersist()); +// tdf#125520 - former fix was wrong, the SdrModel +// has to have a GetPersist() already, see task. +// We can still warn here when this is not the case +SAL_WARN( "svx", "OLE gets cloned Persist, EmbeddedObjectContainer will not be copied" ); } // use default way ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source sw/source
sc/source/ui/formdlg/dwfunctr.cxx |1 - sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |4 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx |2 -- svx/source/sidebar/line/LinePropertyPanel.hxx |4 svx/source/sidebar/line/LinePropertyPanelBase.cxx |2 -- svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |2 -- sw/source/uibase/sidebar/PageStylesPanel.hxx|2 -- 7 files changed, 17 deletions(-) New commits: commit 9e224ed49b47efc0695647494f5ba6a6b866aa61 Author: Caolán McNamara AuthorDate: Tue Jan 14 09:35:39 2020 + Commit: Caolán McNamara CommitDate: Tue Jan 14 12:34:33 2020 +0100 remove some unneeded includes Change-Id: Ic7add88f04fb53960c4d76414fb655cb4e5040b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86745 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index dd7be33c9070..8897ba8583be 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index a1d3c4eb7461..98dd424f1a97 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -21,10 +21,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 2675016afabb..9709834ef5ec 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx index 5ad1c850cd26..c7296cab94e0 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.hxx +++ b/svx/source/sidebar/line/LinePropertyPanel.hxx @@ -20,13 +20,9 @@ #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANEL_HXX #include -#include #include #include #include -#include -#include -#include #include #include #include diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 743a74e453ad..75d84db0a6a5 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -41,8 +41,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index ebc6f2d9ce87..b14ca89aebdf 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx index a3b7efde6337..bed8786a37fd 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.hxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx @@ -28,8 +28,6 @@ #include -#include -#include #include #include #include ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/cctrl/tbzoomsliderctrl.cxx |2 +- svx/source/stbctrls/zoomsliderctrl.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit e7ce52acd75cf90ff90ed5fb6a809b5813337411 Author: Stephan Bergmann AuthorDate: Tue Feb 5 17:11:49 2019 +0100 Commit: Stephan Bergmann CommitDate: Tue Feb 5 17:11:49 2019 +0100 fix typo in comments Change-Id: I7defc08f6ce2a25f33839c5e8f76548d78443410 diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index af8b1b798191..3ccad9b2c189 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -347,7 +347,7 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ) aTmpSnappingPoints.insert( static_cast(nSnappingPoint) ); } - // remove snapping points that are to close to each other: + // remove snapping points that are too close to each other: long nLastOffset = 0; for ( const sal_uInt16 nCurrent : aTmpSnappingPoints ) diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 7cda81a5dd2c..1c973028dde2 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -202,7 +202,7 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat aTmpSnappingPoints.insert( static_cast(nSnappingPoint) ); } -// remove snapping points that are to close to each other: +// remove snapping points that are too close to each other: long nLastOffset = 0; for ( const sal_uInt16 nCurrent : aTmpSnappingPoints ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/view/viewfun7.cxx|2 +- svx/source/sdr/properties/attributeproperties.cxx |6 +++--- svx/source/svdraw/svdobj.cxx |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit a65d69179ee0a2b8035746a8e4c8000770758974 Author: Andrea GelminiDate: Sat Apr 7 14:04:34 2018 +0200 Fix typos Change-Id: I0c9d917b8673680dbd0729f7f9a4cf5a6e686908 Reviewed-on: https://gerrit.libreoffice.org/52543 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 36e9df26a0bd..e92cac423167 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -153,7 +153,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, const SdrMark* pM=aMark.GetMark(nm); const SdrObject* pObj=pM->GetMarkedSdrObj(); -// Directly Clone to taget SdrModel +// Directly Clone to target SdrModel SdrObject* pNewObj(pObj->Clone(pDrawModel)); if (pNewObj!=nullptr) diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index eab25a1526f8..7367abfbcb3d 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -238,7 +238,7 @@ namespace sdr const bool bHadSfxItemSet(HasSfxItemSet()); // call parent - this will then guarantee -// SfxItemSet existance +// SfxItemSet existence DefaultProperties::GetObjectItemSet(); if(!bHadSfxItemSet) @@ -249,7 +249,7 @@ namespace sdr // it's creation. See copy-constructor and how it remembers // the SfxStyleSheet there. // It is necessary to reset mpStyleSheet to nullptr to -// not trigger alarm insde ImpAddStyleSheet (!) +// not trigger alarm inside ImpAddStyleSheet (!) SfxStyleSheet* pNew(mpStyleSheet); const_cast< AttributeProperties* >(this)->mpStyleSheet = nullptr; const_cast< AttributeProperties* >(this)->ImpAddStyleSheet( @@ -357,7 +357,7 @@ namespace sdr void AttributeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { -// guarantee SfxItemSet existance here +// guarantee SfxItemSet existence here if(!HasSfxItemSet()) { GetObjectItemSet(); diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 5ec98ef00b9c..9351a676a5c7 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -227,7 +227,7 @@ sdr::properties::BaseProperties& SdrObject::GetProperties() const if(!mpProperties) { // CAUTION(!) Do *not* call this during SdrObject construction, -// that will lead to wrong type-casts (dependent on costructor-level) +// that will lead to wrong type-casts (dependent on constructor-level) // and thus eventually create the wrong sdr::properties (!). Is there // a way to check if on the stack is a SdrObject-constructor (?) const_cast< SdrObject* >(this)->mpProperties.reset( @@ -444,7 +444,7 @@ void SdrObject::SetPage(SdrPage* pNewPage) // good to think about if this is really needed - it *seems* to be intended // for a xShape being a on-demand-creatable resource - wit hthe argument that // the SdrPage/UnoPage used influences the SvxShape creation. This uses -// ressources and would be nice to get rid of anyways. +// resources and would be nice to get rid of anyways. if (pOldPage != pPage && !(pOldPage && pPage && pOldModel == ())) { SvxShape* const pShape(getSvxShape()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/ui/view/gridwin4.cxx | 11 +-- svx/source/sdr/contact/objectcontactofpageview.cxx | 33 +++-- 2 files changed, 14 insertions(+), 30 deletions(-) New commits: commit 4b1e2d09ffbab74c559340f947d6b80d63a2ace0 Author: Marco CecchettiDate: Mon Mar 13 11:42:31 2017 +0100 LOK: Calc - images are not painted below row 1000 The problem was not due to some missing tile invalidation: it was at the painting stage. There was no overlap btw the view range and the object range. Now images and shape are painted correctly. There is still problems with control forms and charts. Change-Id: Ib74e3bb79b444df21844086ae666fc206aa48906 Reviewed-on: https://gerrit.libreoffice.org/35215 Tested-by: Jenkins Reviewed-by: Jan Holesovsky diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 4d1121ee92f1..c8387a336bae 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -807,15 +807,9 @@ void ScGridWindow::DrawContent(OutputDevice , const ScTableInfo& rTableI const MapMode aOrig = pContentDev->GetMapMode(); if (bIsTiledRendering) { -MapMode aNew = aOrig; Point aOrigin = aOriginalMode.GetOrigin(); -aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX); -aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY); -static const double twipFactor = 15 * 1.7639; // 26.4585 -aOrigin = Point(aOrigin.getX() - aOrigin.getX() / twipFactor, -aOrigin.getY() - aOrigin.getY() / twipFactor); -aNew.SetOrigin(aOrigin); -pContentDev->SetMapMode(aNew); +Size aPixelOffset(aOrigin.getX() / TWIPS_PER_PIXEL, aOrigin.getY() / TWIPS_PER_PIXEL); +pContentDev->SetPixelOffset(aPixelOffset); comphelper::LibreOfficeKit::setLocalRendering(); } @@ -825,6 +819,7 @@ void ScGridWindow::DrawContent(OutputDevice , const ScTableInfo& rTableI if (bIsTiledRendering) { +pContentDev->SetPixelOffset(Size()); pContentDev->SetMapMode(aOrig); } diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 0e81e850a727..7720c5fa13d5 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -205,7 +205,6 @@ namespace sdr { // use visible pixels, but transform to world coordinates aViewRange = basegfx::B2DRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight()); - // if a clip region is set, use it if(!rDisplayInfo.GetRedrawArea().IsEmpty()) { @@ -230,16 +229,22 @@ namespace sdr aViewRange.intersect(aDiscreteClipRange); } +const MapMode aOrigMapMode = rTargetOutDev.GetMapMode(); +if (comphelper::LibreOfficeKit::isActive() && +comphelper::LibreOfficeKit::isLocalRendering()) +{ +MapMode aMapMode = aOrigMapMode; +aMapMode.SetOrigin(Point()); +rTargetOutDev.SetMapMode(aMapMode); +} + // transform to world coordinates aViewRange.transform(rTargetOutDev.GetInverseViewTransformation()); + if (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isLocalRendering()) { -const int TWIPS_PER_PIXEL = 15; -aViewRange = basegfx::B2DRange(aViewRange.getMinimum().getX(), - aViewRange.getMinimum().getY(), - aViewRange.getMaximum().getX() * TWIPS_PER_PIXEL, - aViewRange.getMaximum().getY() * TWIPS_PER_PIXEL); +rTargetOutDev.SetMapMode(aOrigMapMode); } } @@ -315,26 +320,10 @@ namespace sdr drawinglayer::processor2d::createProcessor2DFromOutputDevice( rTargetOutDev, getViewInformation2D())); -if (comphelper::LibreOfficeKit::isActive() && -comphelper::LibreOfficeKit::isLocalRendering()) -{ -// Restore the origin. -MapMode aMapMode = pOutDev->GetMapMode(); -aMapMode.SetOrigin(aOrigMapMode.GetOrigin()); -pOutDev->SetMapMode(aMapMode); -} - if(pProcessor2D) { pProcessor2D->process(xPrimitiveSequence); } - -if
[Libreoffice-commits] core.git: sc/source svx/source vcl/source
sc/source/ui/view/gridwin4.cxx |3 ++ svx/source/sdr/contact/objectcontactofpageview.cxx | 28 - vcl/source/outdev/bitmap.cxx | 15 +-- 3 files changed, 43 insertions(+), 3 deletions(-) New commits: commit 9d6f4cf26e59b846bcdf4139c6aeb76db5a554f7 Author: Ashod NakashianDate: Sat Jun 4 21:29:30 2016 -0400 LOK: fast tile rendering (graphics and buttons) Since embedded graphics and buttons use absolute coordinates, we set the origin to be the top-left corner of the tile. This includes the origin + ScrPos (see previous patch). Then, the coordinates of the graphic is shifted by this amount to make sure it renders in its relative position to the tile. This renders embedded graphics and buttons at their correct position, with some limitations. Tiles large enough to cover a graphic object show the graphic object where it should be. However, rendering a relatively small tile doesn't render the graphic. This seems to be an issue with moving the graphic's coordinate at a later stage than the 2D Processor decides what objects intersect with the 'view area' that is rendered. Another issue is that graphs don't render. What they seem to suffer is incorrect scale and a fix coordinates (they show up as tiny thumbnails at the top-left corner and grow in proportion to the real graph when resized). These shall be addressed in a separate patch. Reviewed-on: https://gerrit.libreoffice.org/26204 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 5f01d80f75dc86b393cc2fdb66b94aece964c674) Change-Id: I4b71bf5f2e357d1114d46022bc00905ceed0c2f9 Reviewed-on: https://gerrit.libreoffice.org/26376 Tested-by: Jenkins Reviewed-by: Ashod Nakashian diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 315fba7..fb2a9c1 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -821,6 +821,9 @@ void ScGridWindow::DrawContent(OutputDevice , const ScTableInfo& rTableI auto aOrigin = aOriginalMode.GetOrigin(); aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX); aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY); +static const double twipFactor = 15 * 1.7639; // 26.4585 +aOrigin = Point(aOrigin.getX() - aOrigin.getX() / twipFactor, +aOrigin.getY() - aOrigin.getY() / twipFactor); aNew.SetOrigin(aOrigin); pContentDev->SetMapMode(aNew); } diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 6dcd577..cead940 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include "eventhandler.hxx" #include @@ -168,7 +169,7 @@ namespace sdr bool bClipRegionPushed(false); const vcl::Region& rRedrawArea(rDisplayInfo.GetRedrawArea()); -if(!rRedrawArea.IsEmpty()) +if(!rRedrawArea.IsEmpty() && !comphelper::LibreOfficeKit::isActive()) { bClipRegionPushed = true; pOutDev->Push(PushFlags::CLIPREGION); @@ -231,6 +232,14 @@ namespace sdr // transform to world coordinates aViewRange.transform(rTargetOutDev.GetInverseViewTransformation()); +if (comphelper::LibreOfficeKit::isActive()) +{ +const int TWIPS_PER_PIXEL = 15; +aViewRange = basegfx::B2DRange(aViewRange.getMinimum().getX(), + aViewRange.getMinimum().getY(), + aViewRange.getMaximum().getX() * TWIPS_PER_PIXEL, + aViewRange.getMaximum().getY() * TWIPS_PER_PIXEL); +} } // update local ViewInformation2D @@ -292,15 +301,32 @@ namespace sdr rDisplayInfo.ClearGhostedDrawMode(); // reset, else the VCL-paint with the processor will not do the right thing pOutDev->SetLayoutMode(ComplexTextLayoutFlags::Default); // reset, default is no BiDi/RTL +// Save the map-mode since creating the 2D processor will replace it. +const MapMode aOrigMapMode = pOutDev->GetMapMode(); + // create renderer std::unique_ptr pProcessor2D( drawinglayer::processor2d::createProcessor2DFromOutputDevice( rTargetOutDev,
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/core/tool/chgviset.cxx |2 +- svx/source/dialog/ctredlin.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 732476f2e3c10edf1776171605d8ce6c6b22338f Author: Noel GrandinDate: Wed Mar 16 13:21:56 2016 +0200 fixes for "loplugin:constantparam in unotools/" which only compiled because bool converts to char in C++, sigh. Change-Id: I710bdd78bd93255635189da8e9751bff741a75a2 diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx index 920927f..50a784f 100644 --- a/sc/source/core/tool/chgviset.cxx +++ b/sc/source/core/tool/chgviset.cxx @@ -105,7 +105,7 @@ void ScChangeViewSettings::SetTheComment(const OUString& rString) if(!rString.isEmpty()) { utl::SearchParam aSearchParam( rString, -utl::SearchParam::SRCH_REGEXP,false,false,false ); +utl::SearchParam::SRCH_REGEXP,false ); pCommentSearcher = new utl::TextSearch( aSearchParam, *ScGlobal::pCharClass ); } diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index ba71974..839159e 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -985,7 +985,7 @@ void SvxTPFilter::DeactivatePage() pRedlinTable->SetFilterComment(IsComment()); utl::SearchParam aSearchParam( m_pEdComment->GetText(), -utl::SearchParam::SRCH_REGEXP,false,false,false ); +utl::SearchParam::SRCH_REGEXP,false ); pRedlinTable->SetCommentParams(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source svx/source
sc/source/core/data/patattr.cxx |2 +- svx/source/sdr/overlay/overlayselection.cxx |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit e966e9fae635afe6237738a83658baf7c86eea93 Author: Miklos Vajna vmik...@collabora.co.uk Date: Tue Jun 9 17:26:28 2015 +0200 More CppunitTest_sw_uiwriter fixes 1) Guard against nDPI == 0 in ImplLogicToPixel(), it's the caller's responsibility to ensure that the DPI value is in the expected range. 2) pOut in sdr::overlay::impCheckPossibleOverlayType() is seen as 0. Change-Id: Iab5ff10aa7953993161dcad2d49d99d80c588e01 diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index bef793e..7afa1d6 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -392,7 +392,7 @@ void ScPatternAttr::GetFont( Size aSize( 0, (long) nFontHeight ); MapMode aDestMode = pOutDev-GetMapMode(); MapMode aSrcMode( MAP_TWIP, Point(), aFraction, aFraction ); -if (aDestMode.GetMapUnit() == MAP_PIXEL) +if (aDestMode.GetMapUnit() == MAP_PIXEL pOutDev-GetDPIX() 0) aEffSize = pOutDev-LogicToPixel( aSize, aSrcMode ); else { diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index f230ff8..3c308af 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -72,9 +72,8 @@ namespace sdr // not possible when switched off by user return OVERLAY_INVERT; } -else +else if (const OutputDevice* pOut = Application::GetDefaultDevice()) { -const OutputDevice *pOut = Application::GetDefaultDevice(); if(pOut-GetSettings().GetStyleSettings().GetHighContrastMode()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits