[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/filter/graphicfilter.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 3b69a91bf7b3ccf665c55373121f78f921408009 Author: Caolán McNamara AuthorDate: Sat Apr 27 11:52:11 2019 +0100 Commit: Michael Stahl CommitDate: Mon Apr 29 11:47:04 2019 +0200 ofz#14469 null deref since... commit af84fc9d906626255aaf136eefc5e55236e0e8a6 Date: Tue Apr 23 15:48:41 2019 +0200 lazy image loading shouldn't read the entire .xls file (tdf#124828) nLength is just an unchecked value in the dff stream, it might not be sane so limit it to the max len of the stream Change-Id: Ia8a2830478952afe1317b5cd795f35059d9b380a Reviewed-on: https://gerrit.libreoffice.org/71414 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index cad4d4ae1fd5..654393238eba 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1454,7 +1454,9 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size ErrCode nStatus = ImpTestOrFindFormat("", rIStream, nFormat); rIStream.Seek(nStreamBegin); -const sal_uInt32 nStreamLength( sizeLimit ? sizeLimit : rIStream.Seek(STREAM_SEEK_TO_END) - nStreamBegin); +sal_uInt32 nStreamLength(rIStream.remainingSize()); +if (sizeLimit && sizeLimit < nStreamLength) +nStreamLength = sizeLimit; OUString aFilterName = pConfig->GetImportFilterName(nFormat); OUString aExternalFilterName = pConfig->GetExternalFilterName(nFormat, false); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/app/salvtables.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit b3b23df6ffdfefab7b2369c8330ed7fd8ac85424 Author: Caolán McNamara AuthorDate: Mon Apr 1 12:09:43 2019 +0100 Commit: Xisco Faulí CommitDate: Mon Apr 1 23:35:52 2019 +0200 Resolves: tdf#124440 nospin has no subedit Change-Id: I4e801ec234e86be935a79c9e29f0e5091904f12e Reviewed-on: https://gerrit.libreoffice.org/70055 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 20198f7f556d..88258f1a76dc 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1656,7 +1656,10 @@ public: m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl)); m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl)); -m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); +if (Edit* pEdit = m_xButton->GetSubEdit()) +pEdit->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); +else +m_xButton->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); } virtual int get_value() const override @@ -1713,6 +1716,8 @@ public: { if (Edit* pEdit = m_xButton->GetSubEdit()) pEdit->SetActivateHdl(Link()); +else +m_xButton->SetActivateHdl(Link()); m_xButton->SetInputHdl(Link()); m_xButton->SetOutputHdl(Link()); m_xButton->SetLoseFocusHdl(Link()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/edit/textundo.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit e10083d6daef5fadc53734ef3dc85f4cce563640 Author: Noel Grandin AuthorDate: Mon Apr 1 14:38:01 2019 +0200 Commit: Noel Grandin CommitDate: Mon Apr 1 22:20:40 2019 +0200 tdf#124413 Crash on undo / redo in Basic IDE regression from commit 3a9d3f271c445641bebd057c4c91279f9b3cd7d5 Date: Mon Apr 23 09:38:41 2018 +0200 loplugin:useuniqueptr in TextDoc Change-Id: I51ab5de7571e4ec358442e54d590adf88fbeb12d Reviewed-on: https://gerrit.libreoffice.org/70061 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 3ebdb97a305ada182af045ea6438432adfe74e80) Reviewed-on: https://gerrit.libreoffice.org/70072 Reviewed-by: Michael Stahl diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index e5b3d0165517..5c99f30d94b0 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -162,14 +162,19 @@ void TextUndoDelPara::Undo() void TextUndoDelPara::Redo() { +auto & rDocNodes = GetDoc()->GetNodes(); // pNode is not valid anymore in case an Undo joined paragraphs -mpNode = GetDoc()->GetNodes()[ mnPara ].get(); +mpNode = rDocNodes[ mnPara ].get(); GetTEParaPortions()->Remove( mnPara ); // do not delete Node because of Undo! -GetDoc()->GetNodes().erase( ::std::find_if( GetDoc()->GetNodes().begin(), GetDoc()->GetNodes().end(), -[&] (std::unique_ptr const & p) { return p.get() == mpNode; } ) ); +auto it = ::std::find_if( rDocNodes.begin(), rDocNodes.end(), + [&] (std::unique_ptr const & p) { return p.get() == mpNode; } ); +assert(it != rDocNodes.end()); +it->release(); +GetDoc()->GetNodes().erase( it ); + GetTextEngine()->ImpParagraphRemoved( mnPara ); mbDelObject = true; // belongs again to the Undo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/gdi/bitmapex.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e051b74e274c78d91ce69b37d896861816f5b6ea Author: Luboš Luňák AuthorDate: Wed Mar 13 17:23:42 2019 +0100 Commit: Xisco Faulí CommitDate: Thu Mar 28 14:49:41 2019 +0100 fix transparency handling in BitmapEx::GetPixelColor() Apparently the Color class uses transparency as the opposite of the normally used meaning of opacity, so transparency 255 means transparent. Change-Id: I3a76c2c93d98ad3c850017d3fd569b04dc6c19c8 Reviewed-on: https://gerrit.libreoffice.org/69211 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl Reviewed-on: https://gerrit.libreoffice.org/69884 Reviewed-by: Xisco Faulí diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index c81b8b0fd446..5642beba0c4d 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -762,7 +762,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) const aColor.SetTransparency( pAlphaReadAccess->GetPixel( nY, nX ).GetIndex() ); } else -aColor.SetTransparency(255); +aColor.SetTransparency(0); return aColor; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/app/salvtables.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 154c72769d39258c5efbc35175824d08706a9314 Author: Caolán McNamara AuthorDate: Wed Jan 9 13:05:16 2019 + Commit: Caolán McNamara CommitDate: Fri Jan 11 18:43:23 2019 +0100 Resolves: tdf#122348 make return in spinbutton signal value change before going on to close the dialog afterwards Change-Id: I9764512a944e52b0d2bff2d11c8cf74c057e2623 Reviewed-on: https://gerrit.libreoffice.org/66083 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index baf21c15532c..20198f7f556d 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1644,6 +1644,7 @@ private: DECL_LINK(LoseFocusHdl, Control&, void); DECL_LINK(OutputHdl, Edit&, bool); DECL_LINK(InputHdl, sal_Int64*, TriState); +DECL_LINK(ActivateHdl, Edit&, void); public: SalInstanceSpinButton(NumericField* pButton, bool bTakeOwnership) @@ -1655,6 +1656,7 @@ public: m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl)); m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl)); +m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); } virtual int get_value() const override @@ -1709,6 +1711,8 @@ public: virtual ~SalInstanceSpinButton() override { +if (Edit* pEdit = m_xButton->GetSubEdit()) +pEdit->SetActivateHdl(Link()); m_xButton->SetInputHdl(Link()); m_xButton->SetOutputHdl(Link()); m_xButton->SetLoseFocusHdl(Link()); @@ -1717,6 +1721,12 @@ public: } }; +IMPL_LINK_NOARG(SalInstanceSpinButton, ActivateHdl, Edit&, void) +{ +// tdf#122348 return pressed to end dialog +signal_value_changed(); +} + IMPL_LINK_NOARG(SalInstanceSpinButton, UpDownHdl, SpinField&, void) { signal_value_changed(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/menufloatingwindow.cxx | 12 +++- vcl/source/window/menufloatingwindow.hxx |2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) New commits: commit 74f07d85d37b9a90b625f33bbf4dbd268f78b2a4 Author: Caolán McNamara AuthorDate: Thu Jan 10 14:26:43 2019 + Commit: Caolán McNamara CommitDate: Fri Jan 11 11:57:02 2019 +0100 Resolves: tdf#120632 consider submenus on restoring focus from menu additionally to the menu having focus, if a submenu of that menu has focus, then restore the focus when the whole hierarchy execution ends return focus to the toplevel menu's saved focus widget Change-Id: Iefd467fb1ba67ffd0a303505a893d2453e0ffbb3 Reviewed-on: https://gerrit.libreoffice.org/66132 Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index ea4cb3bae3ca..5ba39b535ed5 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -401,6 +401,16 @@ void MenuFloatingWindow::Start() GetParent()->IncModalCount(); } +bool MenuFloatingWindow::MenuInHierarchyHasFocus() const +{ +if (HasChildPathFocus()) +return true; +PopupMenu* pSub = GetActivePopup(); +if (!pSub) +return false; +return pSub->ImplGetFloatingWindow()->HasChildPathFocus(); +} + void MenuFloatingWindow::End() { if (!bInExecute) @@ -412,7 +422,7 @@ void MenuFloatingWindow::End() // restore focus to previous window if we still have the focus VclPtr xFocusId(xSaveFocusId); xSaveFocusId = nullptr; -if (HasChildPathFocus() && xFocusId != nullptr) +if (xFocusId != nullptr && MenuInHierarchyHasFocus()) { ImplGetSVData()->maWinData.mbNoDeactivate = false; Window::EndSaveFocus(xFocusId); diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index 9888cd220687..c091b46add4f 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -121,6 +121,8 @@ public: void SetPosInParent( sal_uInt16 nPos ) { nPosInParent = nPos; } +bool MenuInHierarchyHasFocus() const; + virtual css::uno::Reference CreateAccessible() override; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/builder.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 07542b44e7f86efacbe9427802b2fd4829ffbb49 Author: Caolán McNamara AuthorDate: Thu Nov 8 11:52:43 2018 + Commit: Christian Lohmaier CommitDate: Tue Nov 27 12:47:28 2018 +0100 Resolves: tdf#121238 format welded metricspinbuttons the same as historically i.e. not with the UI Language, but with the Locale setting. Change-Id: I5146ece3356fdb67c3c715c6d17e608ec92e739a Reviewed-on: https://gerrit.libreoffice.org/63089 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Christian Lohmaier diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index f45d2cd2aff5..8aa9d46f876d 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -216,7 +216,7 @@ namespace weld { OUString aStr; -const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); unsigned int nDecimalDigits = m_xSpinButton->get_digits(); //pawn percent off to icu to decide whether percent is separated from its number for this locale @@ -245,7 +245,7 @@ namespace weld IMPL_LINK(MetricSpinButton, spin_button_input, int*, result, bool) { -const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); double fResult(0.0); bool bRet = MetricFormatter::TextToValue(get_text(), fResult, 0, m_xSpinButton->get_digits(), rLocaleData, m_eSrcUnit); if (bRet) @@ -258,7 +258,7 @@ namespace weld int nStartPos, nEndPos; m_xSpinButton->get_selection_bounds(nStartPos, nEndPos); -const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); const int nTimeArea = TimeFormatter::GetTimeArea(m_eFormat, m_xSpinButton->get_text(), nEndPos, rLocaleData); @@ -292,7 +292,7 @@ namespace weld int nStartPos, nEndPos; m_xSpinButton->get_selection_bounds(nStartPos, nEndPos); -const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); tools::Time aResult(0); bool bRet = TimeFormatter::TextToTime(m_xSpinButton->get_text(), aResult, m_eFormat, true, rLocaleData); if (bRet) @@ -324,7 +324,7 @@ namespace weld OUString TimeSpinButton::format_number(int nValue) const { -const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); return TimeFormatter::FormatTime(ConvertValue(nValue), m_eFormat, TimeFormat::Hour24, true, rLocaleData); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/font/fontcharmap.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit c9adae998cb1132716874a98972a3d07d9dabd32 Author: Xisco Fauli AuthorDate: Mon Nov 26 13:16:08 2018 +0100 Commit: Xisco Faulí CommitDate: Mon Nov 26 23:03:58 2018 +0100 tdf#121647: fix regression from 85b3c799ede62a3d7ad0493fc80b629214956601 the pCP = pCodePairs statement was left behind in - std::vector::const_iterator itInt = aSupportedRanges.begin(); - for( pCP = pCodePairs; itInt != aSupportedRanges.end(); ++itInt ) - *(pCP++) = *itInt; + for (auto const& supportedRange : aSupportedRanges) + *(pCP++) = supportedRange; Change-Id: Icedf7a4dae224f6b328f924691ec4c6767495389 Reviewed-on: https://gerrit.libreoffice.org/64049 Reviewed-by: Julien Nabet Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index bafa613b764d..4064dd1e86e3 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -356,6 +356,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult ) if( nRangeCount <= 0 ) return false; pCodePairs = new sal_UCS4[ nRangeCount * 2 ]; +pCP = pCodePairs; for (auto const& supportedRange : aSupportedRanges) *(pCP++) = supportedRange; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/layout.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit bcacc66e2d1331767da77b24b3d933d4e46533a6 Author: Caolán McNamara AuthorDate: Wed Nov 21 11:04:41 2018 + Commit: Adolfo Jayme Barrientos CommitDate: Wed Nov 21 20:33:43 2018 +0100 Resolves: tdf#121547 do normal dialog layout first then, if still too small, re-layout with the bigger size Change-Id: I1425e7a55dced4bd93e365a38383eda07fb16d16 Reviewed-on: https://gerrit.libreoffice.org/63708 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 5b29ff125307..7ee56d5158ab 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2494,6 +2494,7 @@ void MessageDialog::set_secondary_text(const OUString ) void MessageDialog::StateChanged(StateChangedType nType) { +Dialog::StateChanged(nType); if (nType == StateChangedType::InitShow) { // MessageBox should be at least as wide as to see the title @@ -2501,9 +2502,11 @@ void MessageDialog::StateChanged(StateChangedType nType) // Extra-Width for Close button nTitleWidth += mpWindowImpl->mnTopBorder; if (get_preferred_size().Width() < nTitleWidth) +{ set_width_request(nTitleWidth); +DoInitialLayout(); +} } -Dialog::StateChanged(nType); } VclVPaned::VclVPaned(vcl::Window *pParent) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/builder.cxx | 52 ++ 1 file changed, 28 insertions(+), 24 deletions(-) New commits: commit 22f4a98bae32dedb0b1c24e9b86876041532168c Author: Caolán McNamara AuthorDate: Thu Nov 15 16:35:31 2018 + Commit: Caolán McNamara CommitDate: Sat Nov 17 17:43:15 2018 +0100 Resolves: tdf#121432 don't insert an extra page when parent is tabcontrol but the new child is a toplevel widget Change-Id: Ib794e076e2626485b9d9231daf914db6dd9b5e2f Reviewed-on: https://gerrit.libreoffice.org/63439 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index efa62401f876..f45d2cd2aff5 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1395,30 +1395,34 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & if (pParent && pParent->GetType() == WindowType::TABCONTROL) { -//We have to add a page - -//make default pageid == position -TabControl *pTabControl = static_cast(pParent); -sal_uInt16 nNewPageCount = pTabControl->GetPageCount()+1; -sal_uInt16 nNewPageId = nNewPageCount; -pTabControl->InsertPage(nNewPageId, OUString()); -pTabControl->SetCurPageId(nNewPageId); -SAL_WARN_IF(bIsPlaceHolder, "vcl.layout", "we should have no placeholders for tabpages"); -if (!bIsPlaceHolder) -{ -VclPtrInstance pPage(pTabControl); -pPage->Show(); - -//Make up a name for it -OString sTabPageId = get_by_window(pParent) + -OString("-page") + -OString::number(nNewPageCount); -m_aChildren.emplace_back(sTabPageId, pPage, false); -pPage->SetHelpId(m_sHelpRoot + sTabPageId); - -pParent = pPage; - -pTabControl->SetTabPage(nNewPageId, pPage); +bool bTopLevel(name == "GtkDialog" || name == "GtkMessageDialog" || + name == "GtkWindow" || name == "GtkPopover"); +if (!bTopLevel) +{ +//We have to add a page +//make default pageid == position +TabControl *pTabControl = static_cast(pParent); +sal_uInt16 nNewPageCount = pTabControl->GetPageCount()+1; +sal_uInt16 nNewPageId = nNewPageCount; +pTabControl->InsertPage(nNewPageId, OUString()); +pTabControl->SetCurPageId(nNewPageId); +SAL_WARN_IF(bIsPlaceHolder, "vcl.layout", "we should have no placeholders for tabpages"); +if (!bIsPlaceHolder) +{ +VclPtrInstance pPage(pTabControl); +pPage->Show(); + +//Make up a name for it +OString sTabPageId = get_by_window(pParent) + +OString("-page") + +OString::number(nNewPageCount); +m_aChildren.emplace_back(sTabPageId, pPage, false); +pPage->SetHelpId(m_sHelpRoot + sTabPageId); + +pParent = pPage; + +pTabControl->SetTabPage(nNewPageId, pPage); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/dialog.cxx |8 ++-- vcl/source/window/layout.cxx |4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) New commits: commit 2cf23c31dd0cc9a9311770c00cf8525240d98fe7 Author: Caolán McNamara AuthorDate: Wed Nov 14 09:19:57 2018 + Commit: Caolán McNamara CommitDate: Thu Nov 15 14:29:50 2018 +0100 Resolves: tdf#121229 ignore internal children of VclScrolledWindow Reviewed-on: https://gerrit.libreoffice.org/63357 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 20b2903354138f8ab19261fab74658fcf6af70e3) Change-Id: Iecc474db8093520ba2d90aedfc5da66507f3033b Reviewed-on: https://gerrit.libreoffice.org/63359 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 2d34490b523b..b20ac608762a 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -132,7 +132,9 @@ vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi { vcl::Window *pLastChild = pChild; -if (isContainerWindow(*pChild)) +if (pChild->GetType() == WindowType::SCROLLWINDOW) +pChild = static_cast(pChild)->get_child(); +else if (isContainerWindow(*pChild)) pChild = pChild->GetWindow(GetWindowType::FirstChild); else pChild = pChild->GetWindow(GetWindowType::Next); @@ -158,7 +160,9 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi { vcl::Window *pLastChild = pChild; -if (isContainerWindow(*pChild)) +if (pChild->GetType() == WindowType::SCROLLWINDOW) +pChild = static_cast(pChild)->get_child(); +else if (isContainerWindow(*pChild)) pChild = pChild->GetWindow(GetWindowType::LastChild); else pChild = pChild->GetWindow(GetWindowType::Prev); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 6b7e13b63e00..5b29ff125307 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1578,9 +1578,9 @@ vcl::Window *VclFrame::get_label_widget() const vcl::Window *VclFrame::get_child() const { -assert(GetChildCount() == 2); //The child widget is the normally the last (of two) children const WindowImpl* pWindowImpl = ImplGetWindowImpl(); +assert(GetChildCount() == 2 || pWindowImpl->mbInDispose); if (!m_pLabel) return pWindowImpl->mpLastChild; if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //only label exists @@ -1858,8 +1858,8 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl, ScrollBar*, void) const vcl::Window *VclScrolledWindow::get_child() const { -assert(GetChildCount() == 4); const WindowImpl* pWindowImpl = ImplGetWindowImpl(); +assert(GetChildCount() == 4 || pWindowImpl->mbInDispose); return pWindowImpl->mpLastChild; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/builder.cxx | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) New commits: commit 7a6e6d027ad41350ae1334d3e60dc1a6ce96c508 Author: Caolán McNamara AuthorDate: Sun Oct 28 20:52:37 2018 + Commit: Adolfo Jayme Barrientos CommitDate: Tue Oct 30 00:28:35 2018 +0100 Resolves: tdf#120988 mismatch of in/out locale formatting Change-Id: I9def43c111adc877aeec9f1990f5dd76fabdbf8f Reviewed-on: https://gerrit.libreoffice.org/62486 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 63e459a0becb..efa62401f876 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -216,18 +216,18 @@ namespace weld { OUString aStr; +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); + unsigned int nDecimalDigits = m_xSpinButton->get_digits(); //pawn percent off to icu to decide whether percent is separated from its number for this locale if (m_eSrcUnit == FUNIT_PERCENT) { double fValue = nValue; fValue /= SpinButton::Power10(nDecimalDigits); -aStr = unicode::formatPercent(fValue, Application::GetSettings().GetUILanguageTag()); +aStr = unicode::formatPercent(fValue, rLocaleData.getLanguageTag()); } else { -const SvtSysLocale aSysLocale; -const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); aStr = rLocaleData.getNum(nValue, nDecimalDigits, true, true); if (m_eSrcUnit != FUNIT_NONE && m_eSrcUnit != FUNIT_DEGREE) aStr += " "; @@ -245,8 +245,7 @@ namespace weld IMPL_LINK(MetricSpinButton, spin_button_input, int*, result, bool) { -const SvtSysLocale aSysLocale; -const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); double fResult(0.0); bool bRet = MetricFormatter::TextToValue(get_text(), fResult, 0, m_xSpinButton->get_digits(), rLocaleData, m_eSrcUnit); if (bRet) @@ -259,8 +258,7 @@ namespace weld int nStartPos, nEndPos; m_xSpinButton->get_selection_bounds(nStartPos, nEndPos); -const SvtSysLocale aSysLocale; -const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); const int nTimeArea = TimeFormatter::GetTimeArea(m_eFormat, m_xSpinButton->get_text(), nEndPos, rLocaleData); @@ -294,8 +292,7 @@ namespace weld int nStartPos, nEndPos; m_xSpinButton->get_selection_bounds(nStartPos, nEndPos); -const SvtSysLocale aSysLocale; -const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); tools::Time aResult(0); bool bRet = TimeFormatter::TextToTime(m_xSpinButton->get_text(), aResult, m_eFormat, true, rLocaleData); if (bRet) @@ -327,8 +324,7 @@ namespace weld OUString TimeSpinButton::format_number(int nValue) const { -const SvtSysLocale aSysLocale; -const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); +const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); return TimeFormatter::FormatTime(ConvertValue(nValue), m_eFormat, TimeFormat::Hour24, true, rLocaleData); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/winproc.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 564aee79143b62889e5b201b97982db9386671da Author: Jan-Marek Glogowski AuthorDate: Tue Oct 23 19:42:54 2018 + Commit: Michael Stahl CommitDate: Fri Oct 26 20:51:46 2018 +0200 tdf#120807 check for valid ImplGetWindowImpl() Change-Id: Ia1135d11990abc303849bd1b6a549c82008c79de Reviewed-on: https://gerrit.libreoffice.org/62260 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit db0051744330d82986e8f2629a027bc4a5dc1b4a) Reviewed-on: https://gerrit.libreoffice.org/62278 Reviewed-by: Michael Stahl diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 77e11cb58097..45b01a01f8fa 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1076,7 +1076,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, } // #105591# send keyinput to parent if we are a floating window and the key was not processed yet -if( !bRet && pWindow->ImplGetWindowImpl()->mbFloatWin && pWindow->GetParent() && (pWindow->ImplGetWindowImpl()->mpFrame != pWindow->GetParent()->ImplGetWindowImpl()->mpFrame) ) +if( !bRet && pWindow->ImplGetWindowImpl() && pWindow->ImplGetWindowImpl()->mbFloatWin && pWindow->GetParent() && (pWindow->ImplGetWindowImpl()->mpFrame != pWindow->GetParent()->ImplGetWindowImpl()->mpFrame) ) { pChild = pWindow->GetParent(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/menu.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f6d13aa7e1f0dd3baafc70795008722b46867b76 Author: Caolán McNamara AuthorDate: Fri Oct 19 12:55:00 2018 +0100 Commit: Michael Stahl CommitDate: Tue Oct 23 10:44:53 2018 +0200 wrong pointer check since... commit 2636ab883adbcb1f6593787934c6d6d3fff67c21 Date: Mon Sep 15 20:13:54 2014 +0200 vcl menu: Rename CloseStartedFrom() to ClosePopup() + adapt code. Change-Id: Ie30f6d907907551e23e592b8502107e75c333f2e Reviewed-on: https://gerrit.libreoffice.org/62045 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 62739890e3aa..a2d6083c234f 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2700,7 +2700,7 @@ void PopupMenu::ClosePopup(Menu* pMenu) { MenuFloatingWindow* p = dynamic_cast(ImplGetWindow()); PopupMenu *pPopup = dynamic_cast(pMenu); -if (p && pMenu) +if (p && pPopup) p->KillActivePopup(pPopup); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/control/field.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 5239c649ead0344f6a8fc1bcee44a2ec9fd6ae56 Author: Caolán McNamara AuthorDate: Thu Oct 4 14:36:24 2018 +0100 Commit: Mike Kaganski CommitDate: Fri Oct 12 12:09:32 2018 +0200 Resolves: tdf#120031 skip min/max for empty string in GetSavedIntValue so "" turns into 0, which is which we want for the single use case here in 6-1 Change-Id: I3e28b09e2ed99ab90583b087b4100efe4935414a Reviewed-on: https://gerrit.libreoffice.org/61378 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 5401e0300244..afa412a28b20 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -612,7 +612,12 @@ sal_Int64 NumericFormatter::GetValue() const sal_Int64 NumericFormatter::GetSavedIntValue() const { -return GetField() ? GetValueFromString(GetField()->GetSavedValue()) : 0; +if (!GetField()) +return 0; +const OUString& rStr = GetField()->GetSavedValue(); +if (rStr.isEmpty()) +return 0; +return GetValueFromString(rStr); } bool NumericFormatter::IsValueModified() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/dockmgr.cxx | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) New commits: commit e3a745f7604b084a7bb5fb6f18d5b50b5e137a98 Author: Jan-Marek Glogowski AuthorDate: Sat Aug 25 02:35:26 2018 +0200 Commit: Caolán McNamara CommitDate: Thu Sep 20 17:44:22 2018 +0200 tdf#90376 revert the dock windows' Idles to Timers The dock windows' Timers were converted to Idles in commit eef25e0e7c03 ("changed timers to idles"). Since the Idles poll the mouse buttons, they starve all lower priority events. From the comment in ImplDockFloatWin2::Move, this is a hack to get the mouse release event from the window decorations in X11. Change-Id: Ibba3c58dd8b3d95dbd9296cc111ab32968bee230 Reviewed-on: https://gerrit.libreoffice.org/59590 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit afd49c198769b5e7fc01a68ce7a6847aa0d0ddd8) Reviewed-on: https://gerrit.libreoffice.org/60720 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index eb27e3e18c05..9846bc45549b 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -42,8 +42,8 @@ class ImplDockFloatWin2 : public FloatingWindow private: ImplDockingWindowWrapper* mpDockWin; sal_uInt64 mnLastTicks; -IdlemaDockIdle; -IdlemaEndDockIdle; +Timer m_aDockTimer; +Timer m_aEndDockTimer; Point maDockPos; tools::Rectangle maDockRect; boolmbInMove; @@ -86,13 +86,15 @@ ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits, SetBackground( GetSettings().GetStyleSettings().GetFaceColor() ); -maDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin2, DockTimerHdl ) ); -maDockIdle.SetPriority( TaskPriority::HIGH_IDLE ); -maDockIdle.SetDebugName( "vcl::ImplDockFloatWin2 maDockIdle" ); +m_aDockTimer.SetInvokeHandler( LINK( this, ImplDockFloatWin2, DockTimerHdl ) ); +m_aDockTimer.SetPriority( TaskPriority::HIGH_IDLE ); +m_aDockTimer.SetTimeout( 50 ); +m_aDockTimer.SetDebugName( "vcl::ImplDockFloatWin2 m_aDockTimer" ); -maEndDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin2, EndDockTimerHdl ) ); -maEndDockIdle.SetPriority( TaskPriority::HIGH_IDLE ); -maEndDockIdle.SetDebugName( "vcl::ImplDockFloatWin2 maEndDockIdle" ); +m_aEndDockTimer.SetInvokeHandler( LINK( this, ImplDockFloatWin2, EndDockTimerHdl ) ); +m_aEndDockTimer.SetPriority( TaskPriority::HIGH_IDLE ); +m_aEndDockTimer.SetTimeout( 50 ); +m_aEndDockTimer.SetDebugName( "vcl::ImplDockFloatWin2 m_aEndDockTimer" ); } ImplDockFloatWin2::~ImplDockFloatWin2() @@ -111,7 +113,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void) { SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "docktimer called but not floating" ); -maDockIdle.Stop(); PointerState aState = GetPointerState(); if( aState.mnState & KEY_MOD1 ) @@ -119,7 +120,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void) // i43499 CTRL disables docking now mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); if( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) -maDockIdle.Start(); +m_aDockTimer.Start(); } else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { @@ -129,7 +130,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void) else { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow ); -maDockIdle.Start(); +m_aDockTimer.Start(); } } @@ -137,7 +138,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl, Timer *, void) { SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "enddocktimer called but not floating" ); -maEndDockIdle.Stop(); PointerState aState = GetPointerState(); if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { @@ -145,9 +145,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl, Timer *, void) mpDockWin->EndDocking( maDockRect, true ); } else -{ -maEndDockIdle.Start(); -} +m_aEndDockTimer.Start(); } IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void) @@ -204,14 +202,14 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void) maDockRect.SetPos( mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ScreenToOutputPixel( maDockRect.TopLeft() ) ); mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow ); -
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/bitmap/BitmapEmbossGreyFilter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 13ebc1b15a61d2607096c37b03f986a017ea Author: Caolán McNamara AuthorDate: Tue Sep 18 10:08:47 2018 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Wed Sep 19 12:08:32 2018 +0200 emboss filter broken since... commit 4b183ae94821ed6d08708b43e4d719ffb4540843 Author: Chris Sherlock Date: Fri Apr 20 21:00:46 2018 +1000 vcl: ImplEmbossGrey() -> BitmapEmbossGreyFilter Change-Id: I6e541e9ca9cf61dfa8df9638a4ba4b8bd1d3ad71 Reviewed-on: https://gerrit.libreoffice.org/53204 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl Change-Id: If1a96d2165a3c003b9f3cb5a922d08c12156fd29 Reviewed-on: https://gerrit.libreoffice.org/60670 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx index f64126ac978a..e238cbc15306 100644 --- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx +++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx @@ -145,7 +145,7 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) } if (bRet) -return rBitmapEx; +return BitmapEx(aBitmap); return BitmapEx(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/control/imp_listbox.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit b8bf10d8123276cd9b9cb73f4fc595bba8d29c2f Author: Jan-Marek Glogowski AuthorDate: Thu Aug 23 10:12:45 2018 +0200 Commit: Caolán McNamara CommitDate: Wed Aug 29 16:46:11 2018 +0200 tdf#119477 fix list box focused text color This ignores the rollover state for text colors if the list box has the focus and just uses the highlight text color. The normal text color is a result from commit 9897fd1c4715 ("Fix list box focused text color"), which makes the highlighted list box text "invisible" (black on dark blue) in the "gen" VCL plugin and on Windows, e.g. when the focus is in the Math symbol list box. Reviewed-on: https://gerrit.libreoffice.org/59488 Reviewed-on: https://gerrit.libreoffice.org/59549 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 7a14326fea2cc317b8be57d45be7ca57aebd8bdd) (cherry picked from commit 9897fd1c4715e7dbbe99fae2b82c2eda1d2b6f7e) Change-Id: I751a811f2e2bbca112b8f9e0de2fffb04c437ba4 Reviewed-on: https://gerrit.libreoffice.org/59564 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 32a82b1ac2cf..b2e002a05ef5 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2683,18 +2683,16 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout) if (bHasFocus && !ImplGetSVData()->maNWFData.mbDDListBoxNoTextArea) { if ( !ImplGetSVData()->maNWFData.mbNoFocusRects ) +{ rRenderContext.SetFillColor( rStyleSettings.GetHighlightColor() ); +rRenderContext.SetTextColor( rStyleSettings.GetHighlightTextColor() ); +} else { rRenderContext.SetLineColor(); rRenderContext.SetFillColor(); +rRenderContext.SetTextColor( rStyleSettings.GetFieldTextColor() ); } -Color aColor; -if( bNativeOK && (nState & ControlState::ROLLOVER) ) -aColor = rStyleSettings.GetFieldRolloverTextColor(); -else -aColor = rStyleSettings.GetFieldTextColor(); -rRenderContext.SetTextColor( aColor ); rRenderContext.DrawRect( maFocusRect ); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/control/imp_listbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit db55d2a53af04a88ba070e619760f573e89e12fd Author: Alex McMurchy1917 AuthorDate: Tue Jun 12 08:09:49 2018 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 29 16:44:48 2018 +0200 tdf#109353 - Base: Listbox doesn't show a value. This is because text in box is same colour as the background. This is only an issue for Linux/KDE. This change fixes this issue. Change-Id: Icb908ace25c69fd2fb51f8f44082ca6b00f55c43 Reviewed-on: https://gerrit.libreoffice.org/55660 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 3f31455fdd10309ab85fc3d324096698d3f38e5b) Reviewed-on: https://gerrit.libreoffice.org/59563 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index f4100e13089d..32a82b1ac2cf 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2693,7 +2693,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout) if( bNativeOK && (nState & ControlState::ROLLOVER) ) aColor = rStyleSettings.GetFieldRolloverTextColor(); else -aColor = rStyleSettings.GetHighlightTextColor(); +aColor = rStyleSettings.GetFieldTextColor(); rRenderContext.SetTextColor( aColor ); rRenderContext.DrawRect( maFocusRect ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/filter/graphicfilter.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit eaa1396573e25e8c52cb452e2b2471b9bdbd3c0f Author: Caolán McNamara AuthorDate: Thu Aug 23 14:10:57 2018 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Thu Aug 23 19:07:37 2018 +0200 Resolves: tdf#118659 eps not shown since... commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb Date: Sat Apr 14 15:13:05 2018 +0900 Function to load graphic swapped out (loaded on demand) new function doesn't load the eps, so supposed to fall back to the old function, but the new function didn't leave the stream at its original position on failing to attempt the load Change-Id: I960574722687cf5ad8c78be7339d2ce6b74397a9 Reviewed-on: https://gerrit.libreoffice.org/59504 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 870c5586ea82..072c1c31e5c8 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1667,11 +1667,10 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream) } // Set error code or try to set native buffer -if(nStatus != ERRCODE_NONE) -{ +if (nStatus != ERRCODE_NONE) ImplSetError(nStatus, ); +if (nStatus != ERRCODE_NONE || eLinkType == GfxLinkType::NONE) rIStream.Seek(nStreamBegin); -} return aGraphic; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/gdi/impgraph.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 22dbd5904f4f69d98530fecdd9e4383dd088f76f Author: Tomaž Vajngerl AuthorDate: Thu Aug 16 16:46:57 2018 +0200 Commit: Caolán McNamara CommitDate: Wed Aug 22 09:22:47 2018 +0200 tdf#117797 guard access to mpSwapFile as it may not be set Change-Id: If45257293e997bc4540b97fbbe5f1f4b77a48b69 Reviewed-on: https://gerrit.libreoffice.org/59202 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 3cd264bb09c6c14bf9eb769d508d7015c4bdc83b) Reviewed-on: https://gerrit.libreoffice.org/59235 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index c718f9673610..5fd1bd9ae7f1 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1576,7 +1576,8 @@ bool ImpGraphic::ImplSwapIn() bRet = ImplSwapIn( xIStm.get() ); xIStm.reset(); -setOriginURL(mpSwapFile->maOriginURL); +if (mpSwapFile) +setOriginURL(mpSwapFile->maOriginURL); mpSwapFile.reset(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/bitmap/BitmapTools.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1410cefdb5f6048bb62eb7d141d4d2cfc0018cd7 Author: Caolán McNamara AuthorDate: Tue Aug 21 15:54:02 2018 +0100 Commit: Caolán McNamara CommitDate: Tue Aug 21 22:14:27 2018 +0200 Resolves: tdf#115937 virtual device leak windows runs out much sooner than the other platforms Change-Id: I8ffbe32babf8854580150edfe741b03fd43e4326 Reviewed-on: https://gerrit.libreoffice.org/59407 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index eab36e467ac5..63135baa55ed 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -549,7 +549,7 @@ void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparen void DrawAndClipBitmap(const Point& rPos, const Size& rSize, const BitmapEx& rBitmap, BitmapEx & aBmpEx, basegfx::B2DPolyPolygon const & rClipPath) { -VclPtrInstance< VirtualDevice > pVDev; +ScopedVclPtrInstance< VirtualDevice > pVDev; MapMode aMapMode( MapUnit::Map100thMM ); aMapMode.SetOrigin( Point( -rPos.X(), -rPos.Y() ) ); const Size aOutputSizePixel( pVDev->LogicToPixel( rSize, aMapMode ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/control/fixed.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 1835e0c82fca788aef823d91bda4fedef26cd712 Author: Caolán McNamara AuthorDate: Wed Aug 1 10:10:16 2018 +0100 Commit: Michael Stahl CommitDate: Tue Aug 7 18:37:14 2018 +0200 Resolves: rhbz#1610692 rectangles ctor takes topleft, bottomright points so pass arguments in the topleft, bottomright order to avoid eventual... Gtk-CRITICAL **: 09:43:33.896: gtk_widget_queue_draw_area: assertion 'height >= 0' failed Change-Id: I2396f49470274331c49275a5e6d707f59277be4a Reviewed-on: https://gerrit.libreoffice.org/58392 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index dac10a896278..eeba87afab05 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -531,11 +531,11 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext) rRenderContext.DrawText(aTextPt, aText, 0, aText.getLength()); rRenderContext.Pop(); if (aOutSize.Height() - aStartPt.Y() > FIXEDLINE_TEXT_BORDER) -aDecoView.DrawSeparator(Point(aStartPt.X(), aOutSize.Height() - 1), -Point(aStartPt.X(), aStartPt.Y() + FIXEDLINE_TEXT_BORDER)); +aDecoView.DrawSeparator(Point(aStartPt.X(), aStartPt.Y() + FIXEDLINE_TEXT_BORDER), +Point(aStartPt.X(), aOutSize.Height() - 1)); if (aStartPt.Y() - nWidth - FIXEDLINE_TEXT_BORDER > 0) -aDecoView.DrawSeparator(Point(aStartPt.X(), aStartPt.Y() - nWidth - FIXEDLINE_TEXT_BORDER), -Point(aStartPt.X(), 0)); +aDecoView.DrawSeparator(Point(aStartPt.X(), 0), +Point(aStartPt.X(), aStartPt.Y() - nWidth - FIXEDLINE_TEXT_BORDER)); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/filter/ipdf/pdfdocument.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 79e5f8a1f875c169759dc45d93d2b521ec9368f6 Author: Caolán McNamara AuthorDate: Wed Aug 1 19:25:27 2018 +0100 Commit: Michael Stahl CommitDate: Fri Aug 3 11:11:37 2018 +0200 forcepoint#66 make sure we don't get stuck endlessly reparsing Change-Id: Ie2733e8d7f73e5f6a072604c477e949cd944189a Reviewed-on: https://gerrit.libreoffice.org/58450 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 3d9008a22943..c74bcbbade84 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -2212,9 +2212,14 @@ size_t PDFDictionaryElement::Parse(const std::vector else if (!pDictionary->alreadyParsing()) { // Nested dictionary. -i = PDFDictionaryElement::Parse(rElements, pDictionary, pDictionary->m_aItems); -rDictionary[aName] = pDictionary; -aName.clear(); +const size_t nexti += PDFDictionaryElement::Parse(rElements, pDictionary, pDictionary->m_aItems); +if (nexti >= i) // ensure we go forwards and not endlessly loop +{ +i = nexti; +rDictionary[aName] = pDictionary; +aName.clear(); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/decoview.cxx | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) New commits: commit 47b820d17c5fcab61e8db0f19b9b9b357c29f97c Author: Thorsten Wagner AuthorDate: Mon Jun 25 23:53:58 2018 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Jul 30 19:31:46 2018 +0200 Inaccurate symbol signs fixed (tdf#118381) Change-Id: I2af1d3e4c924acd2ae601f0b40fcf1b2be17c397 Reviewed-on: https://gerrit.libreoffice.org/56426 Tested-by: Christian Lohmaier Reviewed-by: Adolfo Jayme Barrientos Reviewed-on: https://gerrit.libreoffice.org/58328 Tested-by: Jenkins diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index e44eba19e727..f1dbc388162c 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -68,6 +68,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp const long n2 = nSide/2; const long n4 = (n2+1)/2; const long n8 = (n4+1)/2; +const long n16 = (n8+1)/2; const Point aCenter = nRect.Center(); switch ( eType ) @@ -79,6 +80,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustTop( 1 ); pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ), Point( aCenter.X()+i, nRect.Top() ) ); +pDev->DrawPixel( Point( aCenter.X()-i, nRect.Top() ) ); +pDev->DrawPixel( Point( aCenter.X()+i, nRect.Top() ) ); } pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top()+1, aCenter.X()+n8, nRect.Bottom() ) ); @@ -91,6 +94,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustBottom( -1 ); pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ), Point( aCenter.X()+i, nRect.Bottom() ) ); +pDev->DrawPixel( Point( aCenter.X()-i, nRect.Bottom() ) ); +pDev->DrawPixel( Point( aCenter.X()+i, nRect.Bottom() ) ); } pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top(), aCenter.X()+n8, nRect.Bottom()-1 ) ); @@ -103,6 +108,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustLeft( 1 ); pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ), Point( nRect.Left(), aCenter.Y()+i ) ); +pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()-i ) ); +pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()+i ) ); } pDev->DrawRect( tools::Rectangle( nRect.Left()+1, aCenter.Y()-n8, nRect.Right(), aCenter.Y()+n8 ) ); @@ -115,6 +122,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustRight( -1 ); pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ), Point( nRect.Right(), aCenter.Y()+i ) ); +pDev->DrawPixel( Point( nRect.Right(), aCenter.Y()-i ) ); +pDev->DrawPixel( Point( nRect.Right(), aCenter.Y()+i ) ); } pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8, nRect.Right()-1, aCenter.Y()+n8 ) ); @@ -128,6 +137,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustTop( 1 ); pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ), Point( aCenter.X()+i, nRect.Top() ) ); +pDev->DrawPixel( Point( aCenter.X()-i, nRect.Top() ) ); +pDev->DrawPixel( Point( aCenter.X()+i, nRect.Top() ) ); } break; @@ -139,6 +150,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustBottom( -1 ); pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ), Point( aCenter.X()+i, nRect.Bottom() ) ); +pDev->DrawPixel( Point( aCenter.X()-i, nRect.Bottom() ) ); +pDev->DrawPixel( Point( aCenter.X()+i, nRect.Bottom() ) ); } break; @@ -158,6 +171,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp nRect.AdjustLeft( 1 ); pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ), Point( nRect.Left(), aCenter.Y()+i ) ); +pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()-i ) ); +pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()+i ) ); } break; @@ -178,6 +193,8 @@
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/control/ctrl.cxx | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) New commits: commit 5906980ed16d99a2872a7b90c9a55dc339430f63 Author: Armin Le Grand AuthorDate: Thu Jul 12 10:22:33 2018 +0200 Commit: Thorsten Behrens CommitDate: Fri Jul 27 08:25:57 2018 +0200 tdf#118377 Do not use disposed OutputDevice Change-Id: I7e085f69ce18e8e3c47fde690a939948454d4d15 Reviewed-on: https://gerrit.libreoffice.org/57319 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit 3debc8c6eded517f7401c2e7ad45f73854c32e57) Reviewed-on: https://gerrit.libreoffice.org/57581 Reviewed-by: Michael Meeks Reviewed-by: Xisco Faulí Tested-by: Xisco Faulí Reviewed-by: Thorsten Behrens diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 8febfb02975d..775e6aa1c51c 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -385,6 +385,20 @@ void Control::SetReferenceDevice( OutputDevice* _referenceDevice ) OutputDevice* Control::GetReferenceDevice() const { +// tdf#118377 It can happen that mpReferenceDevice is already disposed and +// stays disposed (see task, even when Dialog is closed). I have no idea if +// this may be very bad - someone who knows more about lifetime of OutputDevice's +// will have to decide. +// To secure this, I changed all accesses to mpControlData->mpReferenceDevice to +// use Control::GetReferenceDevice() - only use mpControlData->mpReferenceDevice +// inside Control::SetReferenceDevice and Control::GetReferenceDevice(). +// Control::GetReferenceDevice() will now reset mpReferenceDevice if it is already +// disposed. This way all usages will do a kind of 'test-and-get' call. +if(nullptr != mpControlData->mpReferenceDevice && mpControlData->mpReferenceDevice->isDisposed()) +{ +const_cast(this)->SetReferenceDevice(nullptr); +} + return mpControlData->mpReferenceDevice; } @@ -428,14 +442,14 @@ tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const t nPStyle &= ~DrawTextFlags::HideMnemonic; } -if ( !mpControlData->mpReferenceDevice || ( mpControlData->mpReferenceDevice == &_rTargetDevice ) ) +if( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) ) { const tools::Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle); _rTargetDevice.DrawText(aRet, rPStr, nPStyle, _pVector, _pDisplayText); return aRet; } -ControlTextRenderer aRenderer( *this, _rTargetDevice, *mpControlData->mpReferenceDevice ); +ControlTextRenderer aRenderer( *this, _rTargetDevice, *GetReferenceDevice() ); return aRenderer.DrawText(rRect, rPStr, nPStyle, _pVector, _pDisplayText, i_pDeviceSize); } @@ -454,7 +468,7 @@ tools::Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, cons nPStyle &= ~DrawTextFlags::HideMnemonic; } -if ( !mpControlData->mpReferenceDevice || ( mpControlData->mpReferenceDevice == &_rTargetDevice ) ) +if ( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) ) { tools::Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle ); if (o_pDeviceSize) @@ -464,7 +478,7 @@ tools::Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, cons return aRet; } -ControlTextRenderer aRenderer( *this, _rTargetDevice, *mpControlData->mpReferenceDevice ); +ControlTextRenderer aRenderer( *this, _rTargetDevice, *GetReferenceDevice() ); return aRenderer.GetTextRect(rRect, rPStr, nPStyle, o_pDeviceSize); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/gdi/CommonSalLayout.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit df887728db94a008554ebf7caac30a7ae4fdb1d0 Author: Caolán McNamara AuthorDate: Tue Jul 24 14:47:14 2018 +0100 Commit: Eike Rathke CommitDate: Thu Jul 26 00:16:10 2018 +0200 forcepoint#53 restrict to expected index range Change-Id: I22f01e5a3e3cf51b014ac841cd14071dce5baf0f Reviewed-on: https://gerrit.libreoffice.org/57921 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 546bd2f25ca2..8dcdc06a1ce8 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -585,13 +585,18 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs) bool GenericSalLayout::GetCharWidths(DeviceCoordinate* pCharWidths) const { -int nCharCount = mnEndCharPos - mnMinCharPos; +const int nCharCount = mnEndCharPos - mnMinCharPos; for (int i = 0; i < nCharCount; ++i) pCharWidths[i] = 0; for (auto const& aGlyphItem : m_GlyphItems) -pCharWidths[aGlyphItem.mnCharPos - mnMinCharPos] += aGlyphItem.mnNewWidth; +{ +const int nIndex = aGlyphItem.mnCharPos - mnMinCharPos; +if (nIndex >= nCharCount) +continue; +pCharWidths[nIndex] += aGlyphItem.mnNewWidth; +} return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/brdwin.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 4b848a51e9b8bc59aeb327d5c8349a29b26c31dc Author: Kshitij Pathania Date: Thu May 31 14:35:32 2018 +0530 tdf#107266 made background continous for menubar and notebookbar Change-Id: Ieed538741f2a252c8acf1e751bb2ddbe6361b2fa Reviewed-on: https://gerrit.libreoffice.org/55118 Tested-by: Jenkins Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos (cherry picked from commit 09cc173d59c0b79dca1ea11b37c858e8716062d3) Reviewed-on: https://gerrit.libreoffice.org/56991 Tested-by: Jenkins diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 594b7471d038..c28b6ff4cd5a 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1781,6 +1781,21 @@ void ImplBorderWindow::Resize() if (mpNotebookBar) { long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height(); + +const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); +const BitmapEx aPersona = rStyleSettings.GetPersonaHeader(); +// since size of notebookbar changes, to make common persona for menubar +// and notebookbar persona should be set again with changed coordinates +if (!aPersona.IsEmpty()) +{ +Wallpaper aWallpaper(aPersona); +aWallpaper.SetStyle(WallpaperStyle::TopRight); +aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder), + Size(aSize.Width() - nLeftBorder - nRightBorder, +nNotebookBarHeight + nTopBorder))); +mpNotebookBar->SetBackground(aWallpaper); +} + mpNotebookBar->setPosSizePixel( nLeftBorder, nTopBorder, aSize.Width() - nLeftBorder - nRightBorder, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/status.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit dd93dcc1f4bc7d7fb95c0cbd28157b67ea7a97f8 Author: Miklos Vajna Date: Fri Jun 22 17:03:30 2018 +0200 tdf#116208 vcl opengl: fix lack of updates in status bar Commit f0821f9a347c7752a3c741c3451a2f1630173720 (Cache text layout of statusbar items, 2017-06-08) was a performance improvement of not laying out the text of status bar text during each & every paint. One of these places didn't work correctly with Chinese text, so commit a4ed3d9a1ffa1b51ba4352a955c950235f099fdc (tdf#115353 Status bar: no cache in settext, 2018-03-01) attempted to disable the caching at that particular place by removing the update of the cache. This resulted in lack of updates, e.g. during typing into Writer and checking the word count part of the status bar. Fix this (and at the same time keep the original problem fixed) by still not using the layout cache and that problematic place, but instead of just not updating the cache actually invalidate it -- probably that was the intention in the force place already. (cherry picked from commit 0ad7226aee21cc6dbb30d061d76491b01e39de66) Change-Id: Ib7b91e5f24bc68d2f8cae2efea64340585ad9bd5 Reviewed-on: https://gerrit.libreoffice.org/56371 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 357dc6166be4..57f881cfbd48 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1155,6 +1155,9 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText ) std::unique_ptr pSalLayout = ImplLayout(pItem->maText,0,-1); long nWidth = GetTextWidth( pItem->maText,0,-1,nullptr,pSalLayout.get() ) + nFudge; +// Invalidate cache. +pItem->mxLayoutCache.reset(); + if( (nWidth > pItem->mnWidth + STATUSBAR_OFFSET) || ((nWidth < pItem->mnWidth) && (mnDX - STATUSBAR_OFFSET) < mnItemsWidth )) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/window/builder.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 65a9e32b0ff3b2128d5381344f08ddacf758cece Author: Kshitij Pathania Date: Wed Jun 13 15:51:13 2018 +0530 Icons in menubutton are visible now Change-Id: Icccf8ebfafcb556327def38bc37d1d25a1b6e58d Reviewed-on: https://gerrit.libreoffice.org/55744 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky (cherry picked from commit 51b72278b3c64978d0219f406ed5ab194cac2e0c) Reviewed-on: https://gerrit.libreoffice.org/55821 diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 4f070fcb5e77..935ffc0eacfe 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2962,7 +2962,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, PopupMenu *pSubMenu, const { OUString sLabel(BuilderUtils::convertMnemonicMarkup(extractLabel(rProps))); OUString aCommand(extractActionName(rProps)); -pParent->InsertItem(nNewId, sLabel, MenuItemBits::TEXT, rID); +pParent->InsertItem(nNewId, sLabel, MenuItemBits::NONE , rID); pParent->SetItemCommand(nNewId, aCommand); if (pSubMenu) pParent->SetPopupMenu(nNewId, pSubMenu); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/filter/FilterConfigItem.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 43df64affb71e9cd17cfaf936d142dad95b280f7 Author: Matteo Casalin Date: Wed May 16 23:26:44 2018 +0200 Fix tdf#117410 - UI: Settings in PDF Options not remembered... for next export Change-Id: I6f066c81d96595a4560f5bb9e148001b004b38f0 (cherry picked from commit 85613aa81a885488f99ed038f2254ddb0c8a1037) Reviewed-on: https://gerrit.libreoffice.org/55647 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index 170e4b956046..0eedb63b408d 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -68,7 +68,8 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory > const & rXCfgP } if ( xReadAccess.is() ) { -while (bAvailable && nIdx>=0 ) +const sal_Int32 nEnd {rTree.getLength()}; +while (bAvailable && nIdx>=0 && nIdx xHierarchicalNameAccess ( xReadAccess, UNO_QUERY ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/app/salvtables.cxx |3 +++ vcl/source/window/builder.cxx |3 +++ 2 files changed, 6 insertions(+) New commits: commit e15f7b3f670a5146516beeb05269227c0dde75cf Author: Caolán McNamara Date: Fri Jun 8 11:32:38 2018 +0100 sync tristate/inconsistent feature Change-Id: Id1107f4fb1f51f377ad546f9b673f9037fee1538 Reviewed-on: https://gerrit.libreoffice.org/55469 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 590d0acefa8d..8e9689c7c2c1 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1130,6 +1130,7 @@ public: virtual void set_active(bool active) override { m_bBlockNotify = true; +m_xCheckButton->EnableTriState(false); m_xCheckButton->Check(active); m_bBlockNotify = false; } @@ -1142,6 +1143,7 @@ public: virtual void set_inconsistent(bool inconsistent) override { m_bBlockNotify = true; +m_xCheckButton->EnableTriState(true); m_xCheckButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE); m_bBlockNotify = false; } @@ -1161,6 +1163,7 @@ IMPL_LINK_NOARG(SalInstanceCheckButton, ToggleHdl, CheckBox&, void) { if (m_bBlockNotify) return; +m_xCheckButton->EnableTriState(false); signal_toggled(); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 72f41efad638..8ba726cfdfed 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1550,7 +1550,10 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & else xCheckBox = VclPtr::Create(pParent, nBits); if (bIsTriState) +{ +xCheckBox->EnableTriState(true); xCheckBox->SetState(TRISTATE_INDET); +} xCheckBox->SetImageAlign(ImageAlign::Left); //default to left xWindow = xCheckBox; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/font/fontcache.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 508411a4eb17174beb255972659d38c3cd85b4e2 Author: Caolán McNamara Date: Fri Jun 1 13:25:46 2018 +0100 fix dubious cache comparison check in... commit 083b7ca26bbf4b9bad2922520caaf5c0227dac5e Date: Tue Dec 26 15:58:21 2017 +0100 Move PhysicalFontFace member of FontSelectPattern this went from... if ( (rA.mpFontData && rA.mpFontData->IsSymbolFont()) || (rB.mpFontData && rB.mpFontData->IsSymbolFont()) ) to ... if (rA.IsSymbolFont() && rB.IsSymbolFont()) { Change-Id: I1407573dfa73ac843b790ff3bc4ac0d5f66ab42c Reviewed-on: https://gerrit.libreoffice.org/55184 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index 3e4945505144..205b49ada4e0 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -60,7 +60,7 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo // Symbol fonts may recode from one type to another So they are only // safely equivalent for equal targets -if (rA.IsSymbolFont() && rB.IsSymbolFont()) +if (rA.IsSymbolFont() || rB.IsSymbolFont()) { if (rA.maTargetName != rB.maTargetName) return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
vcl/source/app/salvtables.cxx | 22 ++ 1 file changed, 22 insertions(+) New commits: commit 096692d397b086775d68a29a905d8883184b70a4 Author: Caolán McNamara Date: Mon May 28 17:29:17 2018 +0100 toggle should trigger only through ui Change-Id: I15619dad2189f81a074f8b9649c4e8b756120f2c Reviewed-on: https://gerrit.libreoffice.org/54971 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 2c6fdac648ae..1579aae20222 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -991,6 +991,7 @@ class SalInstanceRadioButton : public SalInstanceButton, public virtual weld::Ra { private: VclPtr<::RadioButton> m_xRadioButton; +bool m_bBlockNotify; DECL_LINK(ToggleHdl, ::RadioButton&, void); @@ -998,13 +999,16 @@ public: SalInstanceRadioButton(::RadioButton* pButton, bool bTakeOwnership) : SalInstanceButton(pButton, bTakeOwnership) , m_xRadioButton(pButton) +, m_bBlockNotify(false) { m_xRadioButton->SetToggleHdl(LINK(this, SalInstanceRadioButton, ToggleHdl)); } virtual void set_active(bool active) override { +m_bBlockNotify = true; m_xRadioButton->Check(active); +m_bBlockNotify = false; } virtual bool get_active() const override @@ -1030,6 +1034,8 @@ public: IMPL_LINK_NOARG(SalInstanceRadioButton, ToggleHdl, ::RadioButton&, void) { +if (m_bBlockNotify) +return; signal_toggled(); } @@ -1037,6 +1043,7 @@ class SalInstanceToggleButton : public SalInstanceButton, public virtual weld::T { private: VclPtr m_xToggleButton; +bool m_bBlockNotify; DECL_LINK(ToggleListener, VclWindowEvent&, void); @@ -1044,6 +1051,7 @@ public: SalInstanceToggleButton(PushButton* pButton, bool bTakeOwnership) : SalInstanceButton(pButton, bTakeOwnership) , m_xToggleButton(pButton) +, m_bBlockNotify(false) { } @@ -1056,7 +1064,9 @@ public: virtual void set_active(bool active) override { +m_bBlockNotify = true; m_xToggleButton->Check(active); +m_bBlockNotify = false; } virtual bool get_active() const override @@ -1066,7 +1076,9 @@ public: virtual void set_inconsistent(bool inconsistent) override { +m_bBlockNotify = false; m_xToggleButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE); +m_bBlockNotify = true; } virtual bool get_inconsistent() const override @@ -1083,6 +1095,8 @@ public: IMPL_LINK(SalInstanceToggleButton, ToggleListener, VclWindowEvent&, rEvent, void) { +if (m_bBlockNotify) +return; if (rEvent.GetId() == VclEventId::PushbuttonToggle) signal_toggled(); } @@ -1091,19 +1105,23 @@ class SalInstanceCheckButton : public SalInstanceButton, public virtual weld::Ch { private: VclPtr m_xCheckButton; +bool m_bBlockNotify; DECL_LINK(ToggleHdl, CheckBox&, void); public: SalInstanceCheckButton(CheckBox* pButton, bool bTakeOwnership) : SalInstanceButton(pButton, bTakeOwnership) , m_xCheckButton(pButton) +, m_bBlockNotify(false) { m_xCheckButton->SetToggleHdl(LINK(this, SalInstanceCheckButton, ToggleHdl)); } virtual void set_active(bool active) override { +m_bBlockNotify = true; m_xCheckButton->Check(active); +m_bBlockNotify = false; } virtual bool get_active() const override @@ -1113,7 +1131,9 @@ public: virtual void set_inconsistent(bool inconsistent) override { +m_bBlockNotify = true; m_xCheckButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE); +m_bBlockNotify = false; } virtual bool get_inconsistent() const override @@ -1129,6 +1149,8 @@ public: IMPL_LINK_NOARG(SalInstanceCheckButton, ToggleHdl, CheckBox&, void) { +if (m_bBlockNotify) +return; signal_toggled(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits