[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optgdlg.cxx |1 - cui/uiconfig/ui/optviewpage.ui | 10 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) New commits: commit c217359b7b3583ae4156e4c2322fe7d867eb3306 Author: Caolán McNamara AuthorDate: Fri Feb 10 19:43:55 2023 + Commit: Caolán McNamara CommitDate: Sat Feb 11 07:44:36 2023 + set the image in the .ui instead of the .cxx Change-Id: Id6c30fa9cad6bbfbfb4e5c1363f637868884b345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146792 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 3b1f652adbcf..02801e9537c3 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -566,7 +566,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p m_xIconStyleLB->set_active(0); -m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); } diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui index a371f83e584a..5f0286a27531 100644 --- a/cui/uiconfig/ui/optviewpage.ui +++ b/cui/uiconfig/ui/optviewpage.ui @@ -9,6 +9,11 @@ 1 10 + +True +False +cmd/sc_additionsdialog.png + True @@ -450,9 +455,8 @@ True True Add more icon themes via extension - - - +image1 +True 2
[Libreoffice-commits] core.git: cui/uiconfig
cui/uiconfig/ui/optviewpage.ui |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 83eceff8e5136504106c2fd9de26543c3785 Author: Caolán McNamara AuthorDate: Fri Feb 10 09:14:14 2023 + Commit: Caolán McNamara CommitDate: Sat Feb 11 07:44:21 2023 + Related: tdf#153229 use 'System' instead of 'Automatic' in the macOS desktop settings "Automatic" is used to indicate that the theme changes automatically from light to dark over time, "System" does seem a little less ambigious as to its meaning here. Change-Id: I38f6007cca1e8942d77066db200208ca463368d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146743 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui index 92fa9be49851..a371f83e584a 100644 --- a/cui/uiconfig/ui/optviewpage.ui +++ b/cui/uiconfig/ui/optviewpage.ui @@ -500,7 +500,7 @@ True 0 - Automatic + System Light Dark
[Libreoffice-commits] core.git: hwpfilter/source
hwpfilter/source/hbox.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit d6b590feda1c61fd5ed14c0be66379b8e5de0c6a Author: Caolán McNamara AuthorDate: Fri Feb 10 15:02:52 2023 + Commit: Caolán McNamara CommitDate: Sat Feb 11 00:10:51 2023 + ofz: Use-of-uninitialized-value Change-Id: I033fab3ea016d3b57891a35602920b7de811ccb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146784 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index 3b740999b560..47d18e76fc1e 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -579,10 +579,11 @@ OUString Outline::GetUnicode() const case OLSTY_NUMS2: { OStringBuffer buf; -int i; - -for (i = 0; i <= level; i++) +for (unsigned int i = 0; i <= level; ++i) { +if (i >= std::size(number)) +break; + levelnum = ((number[i] < 1) ? 1 : number[i]); buf.append(OString::number(levelnum)); if (!(shape == OLSTY_NUMS2 && i && i == level))
Rafał Dobrakowski license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license.
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/options/optgdlg.cxx | 26 -- cui/source/options/optgdlg.hxx |3 +++ 2 files changed, 19 insertions(+), 10 deletions(-) New commits: commit 71a37d733cb81d478af61425859e4c80f0f1e2f0 Author: Caolán McNamara AuthorDate: Fri Feb 10 12:53:33 2023 + Commit: Adolfo Jayme Barrientos CommitDate: Fri Feb 10 22:55:21 2023 + Resolves: tdf#153497 update automatic icon-theme name on dark mode change Change-Id: I6b41d04ad902d5b123a110b52426ea2c2de79e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146774 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 88cee07ee023899ffd482bbe52bf0c02c58890d0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146794 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 4405fdb3e76b..eea8868a646c 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -546,6 +546,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle")) , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons")) , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) +, m_sAutoStr(m_xIconStyleLB->get_text(0)) { if (Application::GetToolkitName().startsWith("gtk")) m_xMenuIconBox->hide(); @@ -554,8 +555,18 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled)); +UpdateIconThemes(); + +m_xIconStyleLB->set_active(0); + +m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); +m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); +m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); +} + +void OfaViewTabPage::UpdateIconThemes() +{ // Set known icon themes -OUString sAutoStr( m_xIconStyleLB->get_text( 0 ) ); m_xIconStyleLB->clear(); StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings(); mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes(); @@ -565,9 +576,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme(); const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId); -OUString entryForAuto = sAutoStr + " (" + -autoIconTheme.GetDisplayName() + -")"; +OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() + ")"; m_xIconStyleLB->append("auto", entryForAuto); // index 0 means choose style automatically // separate auto and other icon themes @@ -575,12 +584,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p for (auto const& installIconTheme : mInstalledIconThemes) m_xIconStyleLB->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); - -m_xIconStyleLB->set_active(0); - -m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); -m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); -m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); } OfaViewTabPage::~OfaViewTabPage() @@ -899,6 +902,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_xNotebookbarIconSizeLB->set_active(nNotebookbarSizeLB_InitialSelection); m_xNotebookbarIconSizeLB->save_value(); +// tdf#153497 set name of automatic icon theme, it may have changed due to "Apply" while this page is visible +UpdateIconThemes(); + if (aMiscOptions.IconThemeWasSetAutomatically()) { nStyleLB_InitialSelection = 0; } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index a4c686cc2b27..0e0796e0db62 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -113,6 +113,8 @@ private: std::unique_ptr m_xMoreIcons; std::unique_ptr m_xRunGPTests; +OUString m_sAutoStr; + DECL_LINK(OnAntialiasingToggled, weld::Toggleable&, void); DECL_LINK(OnUseSkiaToggled, weld::Toggleable&, void); DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void); @@ -120,6 +122,7 @@ private: void UpdateSkiaStatus(); void HideSkiaWidgets(); void UpdateHardwareAccelStatus(); +void UpdateIconThemes(); public: OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 3 commits - desktop/source lingucomponent/config lingucomponent/source
desktop/source/lib/init.cxx| 190 ++ lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu |2 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx | 50 +- 3 files changed, 76 insertions(+), 166 deletions(-) New commits: commit 7fb089be113f3f95d9a13e3aafafc64107301d1d Author: Szymon Kłos AuthorDate: Fri Feb 10 14:56:06 2023 +0100 Commit: Andras Timar CommitDate: Fri Feb 10 21:55:58 2023 + lok: remove old hack for LanguageTool locales Change-Id: I1098c51f03b4cdd4f21a635f7b6aae8e90fd9f9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146779 Reviewed-by: Henry Castro Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2d79b7e57d3a..8c3e82ff0896 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5396,132 +5396,6 @@ static void doc_setGraphicSelection(LibreOfficeKitDocument* pThis, int nType, in pDoc->setGraphicSelection(nType, nX, nY); } -static uno::Any getDocLanguages(LibreOfficeKitDocument* pThis) -{ -SfxViewFrame* pViewFrame = SfxViewFrame::Current(); -if (!pViewFrame) -return uno::makeAny(Sequence()); - -SfxDispatcher* pDispatcher = pViewFrame->GetBindings().GetDispatcher(); -if (!pDispatcher) -return uno::makeAny(Sequence()); - -css::uno::Any aLangStatus; -pDispatcher->QueryState(SID_LANGUAGE_STATUS, aLangStatus); - -OUString sCurrent; -OUString sKeyboard; -OUString sGuessText; -SvtScriptType eScriptType = SvtScriptType::LATIN | SvtScriptType::ASIAN -| SvtScriptType::COMPLEX; - -Sequence aSeqLang; -if (aLangStatus >>= aSeqLang) -{ -if (aSeqLang.getLength() == 4) -{ -sCurrent = aSeqLang[0]; -eScriptType = static_cast(aSeqLang[1].toInt32()); -sKeyboard = aSeqLang[1]; -sGuessText = aSeqLang[2]; -} -} -else -{ -aLangStatus >>= sCurrent; -} - -LanguageType nLangType; -std::set aLangItems; - -if (!sCurrent.isEmpty()) -{ -nLangType = SvtLanguageTable::GetLanguageType(sCurrent); -if (nLangType != LANGUAGE_DONTKNOW) -{ -aLangItems.insert(nLangType); -} -} - -const AllSettings& rAllSettings = Application::GetSettings(); -nLangType = rAllSettings.GetLanguageTag().getLanguageType(); -if (nLangType != LANGUAGE_DONTKNOW && -(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType))) -{ -aLangItems.insert(nLangType); -} - -nLangType = rAllSettings.GetUILanguageTag().getLanguageType(); -if (nLangType != LANGUAGE_DONTKNOW && -(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType))) -{ -aLangItems.insert(nLangType); -} - -if (!sKeyboard.isEmpty()) -{ -nLangType = SvtLanguageTable::GetLanguageType(sKeyboard); -if (nLangType != LANGUAGE_DONTKNOW && -(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType))) -{ -aLangItems.insert(nLangType); -} -} - -if (!sGuessText.isEmpty()) -{ -Reference xLangGuesser; -try -{ -xLangGuesser = linguistic2::LanguageGuessing::create(xContext); -} -catch(...) -{ -} - -if (xLangGuesser.is()) -{ -lang::Locale aLocale = xLangGuesser->guessPrimaryLanguage(sGuessText, 0, - sGuessText.getLength()); -LanguageTag aLanguageTag(aLocale); -nLangType = aLanguageTag.getLanguageType(false); -if (nLangType != LANGUAGE_DONTKNOW && -(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType))) -{ -aLangItems.insert(nLangType); -} -} -} - -LibLODocument_Impl* pDocument = static_cast(pThis); -Reference xDocumentLanguages(pDocument->mxComponent, UNO_QUERY); -if (xDocumentLanguages.is()) -{ -const Sequence aLocales(xDocumentLanguages->getDocumentLanguages( - static_cast(eScriptType), 64)); - -for (const lang::Locale& aLocale : aLocales) -{ -nLangType = SvtLanguageTable::GetLanguageType(aLocale.Language); -if (nLangType != LANGUAGE_DONTKNOW && -(eScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType))) -{ -aLangItems.insert(nLangType); -} -} -} - -int nLocale = 0; -Sequence aLocales(aLangItems.size()); -auto pLocales = aLocales.getArray(); -for (const LanguageType& itLang : aLangItems) -{ -pLocales[nLocale++] = LanguageTag::convertToLocale(itLang); -} - -return uno::m
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/docvw/edtdd.cxx | 10 ++ sw/source/uibase/docvw/edtwin.cxx |2 +- sw/source/uibase/inc/edtwin.hxx |1 + sw/source/uibase/wrtsh/select.cxx |1 + 4 files changed, 13 insertions(+), 1 deletion(-) New commits: commit 9788a565b3241d1bd62394b9e29c322361d05f80 Author: Jim Raykowski AuthorDate: Thu Feb 9 08:57:56 2023 -0900 Commit: Jim Raykowski CommitDate: Fri Feb 10 21:28:01 2023 + tdf#153205 related: Improve selection mode control icon update This patch makes the status bar selection mode control icon change to adding selection when the mouse is used to select text while the ctrl key is pressed and the mouse is moving, which is the behaviour when the mouse is not moving and selection begins. It also makes the icon show the correct mode when doing DnD. Change-Id: I9aeb47301ab3c8b9be2159186bcc8c8ede7bf3de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146726 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 8f86aa1d310a..278030c1f5ec 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -121,6 +121,16 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) if ( !bStart || m_bIsInDrag ) return; +// If the add selection mode has been pushed in the MouseButtonDown handler it needs to be +// popped or it will remain active and noticable in the statusbar selection control until the +// next MouseButtonUp event after the DnD, since a MouseButtonUp event is not received by the +// edit window when DnD is done. +if (g_bModePushed) +{ +rSh.PopMode(); +g_bModePushed = false; +} + m_bMBPressed = false; ReleaseMouse(); g_bFrameDrag = false; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 744730d9942e..1729bbfdde8a 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -173,7 +173,7 @@ static bool g_bHoldSelection = false; bool g_bFrameDrag = false; static bool g_bValidCursorPos = false; -static bool g_bModePushed = false; +bool g_bModePushed = false; bool g_bDDTimerStarted= false; bool g_bDDINetAttr= false; static SdrHdlKind g_eSdrMoveHdl = SdrHdlKind::User; diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index e2a7ca97bcab..b5e09726a0b3 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -295,6 +295,7 @@ public: virtual FactoryFunction GetUITestFactory() const override; }; +extern bool g_bModePushed; extern bool g_bFrameDrag; extern bool g_bDDTimerStarted; extern bool g_bDDINetAttr; diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 4cf35eb7d992..c955a8bdd174 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -55,6 +55,7 @@ void SwWrtShell::Invalidate() // to avoid making the slot volatile, invalidate it every time if something could have been changed // this is still much cheaper than asking for the state every 200 ms (and avoid background processing) GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE ); +GetView().GetViewFrame()->GetBindings().Update(FN_STAT_SELMODE); // make selection mode control icon update immediatly SwWordCountWrapper *pWrdCnt = static_cast(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId())); if (pWrdCnt) pWrdCnt->UpdateCounts();
[Libreoffice-commits] core.git: configure.ac
configure.ac |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 44801e26e098cc1cf7f96e3b233c2b9e5084c9fd Author: Michael Weghorn AuthorDate: Fri Feb 10 15:13:45 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Feb 10 21:17:38 2023 + qt6 configure: Search for Qt 6 moc in more locations This e.g. makes this find the correct moc on Arch Linux, where the Qt 6 moc is provided under `/usr/lib/qt6/moc` by package `qt6-base`. Change-Id: Iefca23e6391a952eb79108260ae1417fc75ad0ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146781 Tested-by: Jenkins Reviewed-by: Heiko Tietze Reviewed-by: Michael Weghorn diff --git a/configure.ac b/configure.ac index 3dd1a3df366a..ad1caa71cd80 100644 --- a/configure.ac +++ b/configure.ac @@ -13116,7 +13116,7 @@ then qt6_libexec_dirs="$qt6_libexec_dirs:$lib_dir/libexec" fi done -AC_PATH_PROGS( MOC6, [moc-qt6 moc], no, [`dirname $qt6_libdir`/libexec:$QT6DIR/libexec:$qt6_libexec_dirs:$PATH]) +AC_PATH_PROGS( MOC6, [moc-qt6 moc], no, [`dirname $qt6_libdir`/libexec:$QT6DIR/libexec:$qt6_libexec_dirs:`echo $qt6_libdirs | $SED -e 's/ /:/g'`:$PATH]) if test "$MOC6" = "no"; then AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT6DIR before running "configure".])
[Libreoffice-commits] core.git: configure.ac
configure.ac |6 ++ 1 file changed, 6 insertions(+) New commits: commit 9fbcf60c51f9bc553c6e6e0204fac975a87ebf13 Author: Michael Weghorn AuthorDate: Fri Feb 10 15:12:36 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Feb 10 21:16:34 2023 + qt6 configure: Add moc version check This way, it is determined at configure time if the moc meant to be used for Qt 6 is actually a Qt 5 one, as happened e.g. on Arch Linux without upcoming Change-Id Iefca23e6391a952eb79108260ae1417fc75ad0ef ("qt6 configure: Search for Qt 6 moc in more locations"). Fail at configure rather than build time in such cases. Change-Id: I2ada2045f41f08bf339920d043226f9b36c335b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146780 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/configure.ac b/configure.ac index ed0e05d6a7b3..3dd1a3df366a 100644 --- a/configure.ac +++ b/configure.ac @@ -13120,6 +13120,12 @@ then if test "$MOC6" = "no"; then AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT6DIR before running "configure".]) +else +moc6_test_ver="`$MOC6 -v 2>&1 | $SED -n -e 's/^moc \(6.*\)/\1/p'`" +if test -z "$moc6_test_ver"; then +AC_MSG_ERROR([Wrong moc for Qt6 found.]) +fi +AC_MSG_NOTICE([Detected moc version: $moc_test_ver]) fi fi AC_SUBST(QT6_CFLAGS)
[Libreoffice-commits] core.git: Changes to 'distro/collabora/co-22.05-testflight'
New branch 'distro/collabora/co-22.05-testflight' available with the following commits:
Re: Extended ODF schema
Hi Regina, Le 10/02/2023 à 20:21, Regina Henschel a écrit : Hi Laurent, can you please give examples, what markup you want to achieve in the document file. Kind regards, Regina Here is an example of markup generated: number:min-decimal-places="2" number:min-integer-digits="2"/> fin For code 00.00_M"fin" The extension concerns only attribute loext:blank-width-char Best regards Laurent
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/data/xlsx/tdf139934.xlsx|binary sc/qa/unit/subsequent_filters_test.cxx | 15 +++ 2 files changed, 15 insertions(+) New commits: commit d367cefb0281767762b1671c03b3852cf3d1b7ab Author: Xisco Fauli AuthorDate: Fri Feb 10 16:11:25 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 10 19:50:43 2023 + tdf#139934: sc_subsequent_filters_test: Add unittest Change-Id: Ib1540bb7058606c7629ce0459fd18bd463e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146786 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/xlsx/tdf139934.xlsx b/sc/qa/unit/data/xlsx/tdf139934.xlsx new file mode 100644 index ..c4fcf6905df4 Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf139934.xlsx differ diff --git a/sc/qa/unit/subsequent_filters_test.cxx b/sc/qa/unit/subsequent_filters_test.cxx index fd0aa159467b..7749106a3883 100644 --- a/sc/qa/unit/subsequent_filters_test.cxx +++ b/sc/qa/unit/subsequent_filters_test.cxx @@ -88,6 +88,7 @@ public: void testContentXLS_XML(); void testContentGnumeric(); void testCondFormatOperatorsSameRangeXLSX(); +void testTdf139934(); void testTdf150452(); void testTdf119292(); void testTdf48731(); @@ -219,6 +220,7 @@ public: CPPUNIT_TEST(testContentXLS_XML); CPPUNIT_TEST(testContentGnumeric); CPPUNIT_TEST(testCondFormatOperatorsSameRangeXLSX); +CPPUNIT_TEST(testTdf139934); CPPUNIT_TEST(testTdf150452); CPPUNIT_TEST(testTdf119292); CPPUNIT_TEST(testTdf48731); @@ -563,6 +565,19 @@ void ScFiltersTest::testTdf119292() CPPUNIT_ASSERT_EQUAL(Point(114, 54), aPoly270Pos3); } +void ScFiltersTest::testTdf139934() +{ +createScDoc("xlsx/tdf139934.xlsx"); + +ScDocument* pDoc = getScDoc(); + +// Without the fix in place, this test would have failed with +// - Expected: 1/20/2021 +// - Actual : 44216 +CPPUNIT_ASSERT_EQUAL(OUString("1/20/2021"), pDoc->GetString(0, 2, 0)); +CPPUNIT_ASSERT_EQUAL(OUString("11/25/2020"), pDoc->GetString(0, 61, 0)); +} + void ScFiltersTest::testTdf150452() { // Without the fix in place, this test would have crashed
[Libreoffice-commits] core.git: cui/source
cui/source/options/optgdlg.cxx | 26 -- cui/source/options/optgdlg.hxx |3 +++ 2 files changed, 19 insertions(+), 10 deletions(-) New commits: commit 88cee07ee023899ffd482bbe52bf0c02c58890d0 Author: Caolán McNamara AuthorDate: Fri Feb 10 12:53:33 2023 + Commit: Caolán McNamara CommitDate: Fri Feb 10 19:37:08 2023 + Resolves: tdf#153497 update automatic icon-theme name on dark mode change Change-Id: I6b41d04ad902d5b123a110b52426ea2c2de79e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146774 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 5663d3912488..3b1f652adbcf 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -548,6 +548,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle")) , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons")) , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) +, m_sAutoStr(m_xIconStyleLB->get_text(0)) { OUString sToolKitName(Application::GetToolkitName()); if (sToolKitName.startsWith("gtk")) @@ -561,8 +562,18 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled)); +UpdateIconThemes(); + +m_xIconStyleLB->set_active(0); + +m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); +m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); +m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); +} + +void OfaViewTabPage::UpdateIconThemes() +{ // Set known icon themes -OUString sAutoStr( m_xIconStyleLB->get_text( 0 ) ); m_xIconStyleLB->clear(); StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings(); mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes(); @@ -572,9 +583,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme(); const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId); -OUString entryForAuto = sAutoStr + " (" + -autoIconTheme.GetDisplayName() + -")"; +OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() + ")"; m_xIconStyleLB->append("auto", entryForAuto); // index 0 means choose style automatically // separate auto and other icon themes @@ -582,12 +591,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p for (auto const& installIconTheme : mInstalledIconThemes) m_xIconStyleLB->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); - -m_xIconStyleLB->set_active(0); - -m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); -m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); -m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); } OfaViewTabPage::~OfaViewTabPage() @@ -921,6 +924,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_xNotebookbarIconSizeLB->set_active(nNotebookbarSizeLB_InitialSelection); m_xNotebookbarIconSizeLB->save_value(); +// tdf#153497 set name of automatic icon theme, it may have changed due to "Apply" while this page is visible +UpdateIconThemes(); + if (aMiscOptions.IconThemeWasSetAutomatically()) { nStyleLB_InitialSelection = 0; } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 870e3f39bccc..e13102270bdc 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -115,6 +115,8 @@ private: std::unique_ptr m_xMoreIcons; std::unique_ptr m_xRunGPTests; +OUString m_sAutoStr; + DECL_LINK(OnAntialiasingToggled, weld::Toggleable&, void); DECL_LINK(OnUseSkiaToggled, weld::Toggleable&, void); DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void); @@ -122,6 +124,7 @@ private: void UpdateSkiaStatus(); void HideSkiaWidgets(); void UpdateHardwareAccelStatus(); +void UpdateIconThemes(); public: OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
Re: Extended ODF schema
Hi Laurent, can you please give examples, what markup you want to achieve in the document file. Kind regards, Regina
Re: Extended ODF schema
Hello, Le 08/02/2023 à 14:09, Michael Stahl a écrit : if it should go on the numer:text element, it needs to be a child of its rng:element - currently it's not extensible (via "combine" feature): so you have to override it - at the start of the libreoffice schema there is an rng:include, paste the above into this include element and adapt it - this will override what is in the included file. Thanks for your feedback. I made some progress, but it does not yet work. I added in rng:include and define number-text-attlist outside rng:include Then I get the following errors: - /tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,9446]: Error: tag name "number:text" is not allowed. Possible tag names are: ,,, number:text loext:blank-width-char=")"> ^ /tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,10964]: Error: tag name "number:text" is not allowed. Possible tag names are: , number:text loext:blank-width-char=")"> < I do not understand what I made wrong. Why validator is expecting loext:blank-width-char with other tags than number:text? Best regards Laurent Balland
[Libreoffice-commits] core.git: hwpfilter/source
hwpfilter/source/hbox.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit e43062523b53f7c472f4c0183d333b34cf7adbdf Author: Caolán McNamara AuthorDate: Fri Feb 10 14:56:15 2023 + Commit: Caolán McNamara CommitDate: Fri Feb 10 18:21:26 2023 + operator [] out of range assert presumably since: commit 0e45f8318ee73361fecb049b33b0662fabe295d3 Date: Sat Nov 5 15:59:27 2022 +0100 -Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): hwpfilter Change-Id: I1e93526d46d1357a8f11f7ff7ed4c3f2274b9c7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146783 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index b498fa31cfbb..3b740999b560 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -581,7 +581,6 @@ OUString Outline::GetUnicode() const OStringBuffer buf; int i; -buf[0] = 0; for (i = 0; i <= level; i++) { levelnum = ((number[i] < 1) ? 1 : number[i]);
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/crsrsh.hxx |6 +++--- sw/source/core/crsr/crsrsh.cxx | 15 +-- sw/source/core/text/EnhancedPDFExportHelper.cxx |6 +++--- sw/source/uibase/shells/textsh.cxx |9 + sw/source/uibase/wrtsh/wrtsh1.cxx |9 +++-- 5 files changed, 19 insertions(+), 26 deletions(-) New commits: commit 5bc7cb77df839f7dd3cc7d90aaf50ebccdc6 Author: Jim Raykowski AuthorDate: Tue Feb 7 23:17:17 2023 -0900 Commit: Jim Raykowski CommitDate: Fri Feb 10 17:07:50 2023 + tdf#153205 related: Fix selection problems caused by cursor shell push pop during insert state update This patch renames the SelectHiddenRange function to IsInHiddenRange and modifies it to take a bool argument that when true selects the hidden range if the current cursor position is in a hidden range. When the argument is false, the hidden range is not selected if the current cursor position is in a hidden range. This makes using cursor push pop unnecessary when all that is wanted to know is if the current cursor position is in a hidden range. Change-Id: I622dfaf8e73c5b432bb74a48d36433ff755542b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146725 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Jim Raykowski diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index efc8aa1eec49..8eac979b5617 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -851,9 +851,9 @@ public: bool bColumnChange(); static void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection); static void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn); -// If the current cursor position is inside a hidden range, the hidden range -// is selected and true is returned: -bool SelectHiddenRange(); +// If the current cursor position is inside a hidden range true is returned. If bSelect is +// true, the hidden range is selected. If bSelect is false, the hidden range is not selected. +bool IsInHiddenRange(const bool bSelect); // remove all invalid cursors void ClearUpCursors(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index bc78d12cb594..6aef2801b0b7 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3453,9 +3453,9 @@ bool SwCursorShell::IsInRightToLeftText() const return SvxFrameDirection::Vertical_LR_TB == nDir || SvxFrameDirection::Horizontal_RL_TB == nDir; } -/// If the current cursor position is inside a hidden range, the hidden range -/// is selected. -bool SwCursorShell::SelectHiddenRange() +/// If the current cursor position is inside a hidden range true is returned. If bSelect is +/// true, the hidden range is selected. If bSelect is false, the hidden range is not selected. +bool SwCursorShell::IsInHiddenRange(const bool bSelect) { bool bRet = false; if ( !GetViewOptions()->IsShowHiddenChar() && !m_pCurrentCursor->HasMark() ) @@ -3472,9 +3472,12 @@ bool SwCursorShell::SelectHiddenRange() SwScriptInfo::GetBoundsOfHiddenRange( *pNode, nPos, nHiddenStart, nHiddenEnd ); if ( COMPLETE_STRING != nHiddenStart ) { -// make selection: -m_pCurrentCursor->SetMark(); -m_pCurrentCursor->GetMark()->SetContent(nHiddenEnd); +if (bSelect) +{ +// make selection: +m_pCurrentCursor->SetMark(); +m_pCurrentCursor->GetMark()->SetContent(nHiddenEnd); +} bRet = true; } } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index c869413c3164..9e7a01c60a7f 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -274,7 +274,7 @@ bool lcl_TryMoveToNonHiddenField(SwEditShell& rShell, const SwTextNode& rNd, con // 3. Check for hidden text attribute if(rNd.IsHidden()) return false; -if(!rShell.GotoFormatField(rField) || rShell.SelectHiddenRange()) +if(!rShell.GotoFormatField(rField) || rShell.IsInHiddenRange(/*bSelect=*/false)) { rShell.SwCursorShell::ClearMark(); return false; @@ -1673,7 +1673,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // 3. Check for hidden text attribute if ( !pTNd->IsHidden() && mrSh.GotoINetAttr( p->rINetAttr ) && - !mrSh.SelectHiddenRange() ) + !mrSh.IsInHiddenRange(/*bSelect=*/false) ) { // Select the hyperlink: mrSh.SwCursorShell::Right( 1, SwCursorSkipMode::Chars ); @@ -1991,7 +1991,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // 1. Ch
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - vcl/unx
vcl/unx/gtk3/gtkinst.cxx |4 1 file changed, 4 insertions(+) New commits: commit e3068e43679aa4d29e9c28ee056590769e021788 Author: Caolán McNamara AuthorDate: Thu Feb 9 20:57:45 2023 + Commit: Caolán McNamara CommitDate: Fri Feb 10 17:06:09 2023 + gtk4: occasional crash at exit Change-Id: I2008d44f5dae0f22e9213f46a740146d6eb85666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146703 Reviewed-by: Michael Stahl Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index e369b587b9b4..75b3f418c72e 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -18570,7 +18570,11 @@ public: virtual ~GtkInstanceDrawingArea() override { +#if GTK_CHECK_VERSION(4,0,0) +gtk_widget_remove_controller(m_pMouseEventBox, GTK_EVENT_CONTROLLER(m_pZoomGesture)); +#else g_clear_object(&m_pZoomGesture); +#endif ImplGetDefaultWindow()->RemoveEventListener(LINK(this, GtkInstanceDrawingArea, SettingsChangedHdl));
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/stlpool.hxx |2 + sc/source/core/data/stlpool.cxx | 10 sc/source/core/tool/interpr2.cxx | 45 ++- sc/source/ui/docshell/docsh4.cxx |6 - 4 files changed, 44 insertions(+), 19 deletions(-) New commits: commit 208a4ecafafa97ea7fcc5a135fa8160e91ea0a74 Author: Mike Kaganski AuthorDate: Fri Feb 10 16:04:46 2023 +0300 Commit: Mike Kaganski CommitDate: Fri Feb 10 16:33:20 2023 + tdf#153510: STYLE: try harder to detect when there's nothing to do 1. Find the real style names early, to avoid re-triggering style application when STYLE arguments use wrong case; 2. Also check a (rare) case when both immediate and delayed styles are the same as currently applied. Change-Id: Id8ab2e321ede6d0f8f05ac5d1e63ade0212e5865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146775 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx index f4e3ac757094..51694a405202 100644 --- a/sc/inc/stlpool.hxx +++ b/sc/inc/stlpool.hxx @@ -51,6 +51,8 @@ public: boolHasStandardStyles() const { return bHasStandardStyles; } ScStyleSheet* FindCaseIns( const OUString& rName, SfxStyleFamily eFam ); +// Finds Para style with given name case-insensitively, or STR_STYLENAME_STANDARD +ScStyleSheet* FindAutoStyle(const OUString& rName); virtual SfxStyleSheetBase& Make( const OUString&, SfxStyleFamily eFam, SfxStyleSearchBits nMask = SfxStyleSearchBits::All) override; diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index b08b6c2203c9..8f554896ff21 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -424,6 +424,16 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const OUString& rName, SfxStyleFami return first; } +ScStyleSheet* ScStyleSheetPool::FindAutoStyle(const OUString& rName) +{ +ScStyleSheet* pStyleSheet = FindCaseIns(rName, SfxStyleFamily::Para); +if (!pStyleSheet) +if (auto pFound = Find(ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para)) +if (pFound->isScStyleSheet()) // we do not know what kind of sheets we have +pStyleSheet = static_cast(pFound); +return pStyleSheet; +} + void ScStyleSheetPool::setAllParaStandard() { SfxStyleSheetBase* pSheet = First(SfxStyleFamily::Para); diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index c8015598891f..7826522a89bf 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -2595,38 +2596,54 @@ void ScInterpreter::ScStyle() if (!MustHaveParamCount(nParamCount, 1, 3)) return; -OUString aStyle2; // Template after timer +OUString aStyle2; // Style after timer if (nParamCount >= 3) aStyle2 = GetString().getString(); tools::Long nTimeOut = 0; // timeout if (nParamCount >= 2) nTimeOut = static_cast(GetDouble()*1000.0); -OUString aStyle1 = GetString().getString(); // Template for immediate +OUString aStyle1 = GetString().getString(); // Style for immediate if (nTimeOut < 0) nTimeOut = 0; -// Execute request to apply template +// Execute request to apply style if ( !mrDoc.IsClipOrUndo() ) { SfxObjectShell* pShell = mrDoc.GetDocumentShell(); if (pShell) { +// Normalize style names right here, making sure that character case is correct, +// and that we only apply anything when there's something to apply +auto pPool = mrDoc.GetStyleSheetPool(); +if (!aStyle1.isEmpty()) +{ +if (auto pNewStyle = pPool->FindAutoStyle(aStyle1)) +aStyle1 = pNewStyle->GetName(); +else +aStyle1.clear(); +} +if (!aStyle2.isEmpty()) +{ +if (auto pNewStyle = pPool->FindAutoStyle(aStyle2)) +aStyle2 = pNewStyle->GetName(); +else +aStyle2.clear(); +} // notify object shell directly! -bool bNotify = true; -if (aStyle2.isEmpty()) +if (!aStyle1.isEmpty() || !aStyle2.isEmpty()) { const ScStyleSheet* pStyle = mrDoc.GetStyle(aPos.Col(), aPos.Row(), aPos.Tab()); -if (pStyle && pStyle->GetName() == aStyle1) -bNotify = false; -} - -if (bNotify) -{ -ScRange aRange(aPos); -ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 ); -pShell->Broad
[Libreoffice-commits] core.git: 2 commits - sc/source
sc/source/core/data/stlpool.cxx | 10 -- sc/source/core/tool/interpr2.cxx | 64 ++- 2 files changed, 39 insertions(+), 35 deletions(-) New commits: commit 2844670d2a47c606cbebb99f73389f30154a3c5e Author: Mike Kaganski AuthorDate: Fri Feb 10 16:44:37 2023 +0300 Commit: Mike Kaganski CommitDate: Fri Feb 10 16:12:35 2023 + Flatten ScInterpreter::ScStyle Change-Id: I64c622d2c2ca7eda02e8739657fe345f9be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146777 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 707d9c66cb3d..c8015598891f 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -2592,48 +2592,46 @@ void ScInterpreter::ScCurrent() void ScInterpreter::ScStyle() { sal_uInt8 nParamCount = GetByte(); -if (nParamCount >= 1 && nParamCount <= 3) -{ -OUString aStyle2; // Template after timer -if (nParamCount >= 3) -aStyle2 = GetString().getString(); -tools::Long nTimeOut = 0; // timeout -if (nParamCount >= 2) -nTimeOut = static_cast(GetDouble()*1000.0); -OUString aStyle1 = GetString().getString(); // Template for immediate +if (!MustHaveParamCount(nParamCount, 1, 3)) +return; -if (nTimeOut < 0) -nTimeOut = 0; +OUString aStyle2; // Template after timer +if (nParamCount >= 3) +aStyle2 = GetString().getString(); +tools::Long nTimeOut = 0; // timeout +if (nParamCount >= 2) +nTimeOut = static_cast(GetDouble()*1000.0); +OUString aStyle1 = GetString().getString(); // Template for immediate -// Execute request to apply template -if ( !mrDoc.IsClipOrUndo() ) +if (nTimeOut < 0) +nTimeOut = 0; + +// Execute request to apply template +if ( !mrDoc.IsClipOrUndo() ) +{ +SfxObjectShell* pShell = mrDoc.GetDocumentShell(); +if (pShell) { -SfxObjectShell* pShell = mrDoc.GetDocumentShell(); -if (pShell) +// notify object shell directly! +bool bNotify = true; +if (aStyle2.isEmpty()) { -// notify object shell directly! -bool bNotify = true; -if (aStyle2.isEmpty()) -{ -const ScStyleSheet* pStyle = mrDoc.GetStyle(aPos.Col(), aPos.Row(), aPos.Tab()); +const ScStyleSheet* pStyle = mrDoc.GetStyle(aPos.Col(), aPos.Row(), aPos.Tab()); -if (pStyle && pStyle->GetName() == aStyle1) -bNotify = false; -} +if (pStyle && pStyle->GetName() == aStyle1) +bNotify = false; +} -if (bNotify) -{ -ScRange aRange(aPos); -ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 ); -pShell->Broadcast( aHint ); -} +if (bNotify) +{ +ScRange aRange(aPos); +ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 ); +pShell->Broadcast( aHint ); } } - -PushDouble(0.0); } -else -PushIllegalParameter(); + +PushDouble(0.0); } static ScDdeLink* lcl_GetDdeLink( const sfx2::LinkManager* pLinkMgr, commit 2a984c77ccb1aa77d9bbd02218d4dc76aaff4a9e Author: Mike Kaganski AuthorDate: Fri Feb 10 13:25:53 2023 +0300 Commit: Mike Kaganski CommitDate: Fri Feb 10 16:12:28 2023 + tdf#153514: try to find exact match, even when searching case-insensitively Change-Id: Ib3bec382ef80a9078ffde8612c395cb0154fd476 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146747 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 5ca89c37a510..b08b6c2203c9 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -408,14 +408,20 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const OUString& rName, SfxStyleFami CaseInsensitiveNamePredicate aPredicate(rName, eFam); std::vector aFoundPositions = GetIndexedStyleSheets().FindPositionsByPredicate(aPredicate); +ScStyleSheet* first = nullptr; // first case insensitive match found for (const auto& rPos : aFoundPositions) { SfxStyleSheetBase *pFound = GetStyleSheetByPositionInIndex(rPos); // we do not know what kind of sheets we have. if (pFound->isScStyleSheet()) -return static_cast(pFound); +{ +if (pFound->GetName() == rName) // exact case sensitive match +return stati
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/htmlimport/data/tdf153341.html | 13 + sw/qa/extras/htmlimport/htmlimport.cxx | 21 + 2 files changed, 34 insertions(+) New commits: commit cc685e16b5325384268ddd52f24293b6e4bf3502 Author: Xisco Fauli AuthorDate: Fri Feb 10 13:46:40 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 10 14:57:43 2023 + tdf#153341: sw_htmlimport: Add unittest Change-Id: I048a95a3bb36981f5f2d3d243021952b34529075 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146753 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/htmlimport/data/tdf153341.html b/sw/qa/extras/htmlimport/data/tdf153341.html new file mode 100644 index ..dc69feb73b70 --- /dev/null +++ b/sw/qa/extras/htmlimport/data/tdf153341.html @@ -0,0 +1,13 @@ + + + + +Color test + + +1) This text is pasted with color +2) This text is also pasted with color, but the text pasted has a color which ignores the alpha channel +3) This text is pasted without color + + + diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 0bb761647904..fe062f5c83fd 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -574,6 +574,27 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testRGBAColor) CPPUNIT_ASSERT_EQUAL(nBackColor, getProperty(xRun, "CharBackColor")); } +CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf153341) +{ +createSwWebDoc("tdf153341.html"); + +const uno::Reference xPara1 = getParagraph(1); +const uno::Reference xRun1(getRun(xPara1,1), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0x00, 0xFF, 0x00, 0x00), getProperty(xRun1, "CharColor")); + +const uno::Reference xPara2 = getParagraph(2); +const uno::Reference xRun2(getRun(xPara2,1), uno::UNO_QUERY); + +// Without the fix in place, this test would have failed with +// - Expected: rgba[ff7f] +// - Actual : rgba[ffff] +CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0x80, 0xFF, 0x00, 0x00), getProperty(xRun2, "CharColor")); + +const uno::Reference xPara3 = getParagraph(3); +const uno::Reference xRun3(getRun(xPara3,1), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0xB3, 0xFF, 0x00, 0x00), getProperty(xRun3, "CharColor")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sc/source
sc/source/ui/docshell/autostyl.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit c8b72a80bc6cf392868fefd408884fcfa85bf886 Author: Mike Kaganski AuthorDate: Thu Feb 9 16:06:04 2023 +0300 Commit: Mike Kaganski CommitDate: Fri Feb 10 14:52:57 2023 + Related: tdf#153510 Avoid modification of iterated container A crash is seen when resizing a document locally; the problem is range-based for loop, which indirectly modifies its range: sclo.dll!ScAutoStyleList::AddInitial(const ScRange & rRange, const rtl::OUString & rStyle1, unsigned __int64 nTimeout, const rtl::OUString & rStyle2) Line 81 C++ sclo.dll!ScDocShell::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 685C++ svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41C++ sclo.dll!ScInterpreter::ScStyle() Line 2628 C++ sclo.dll!ScInterpreter::Interpret() Line 4441 C++ sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1947 C++ sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1619 C++ sclo.dll!ScFormulaCell::MaybeInterpret() Line 470 C++ sclo.dll!ScFormulaCell::IsValue() Line 2763 C++ sclo.dll!ScConditionEntry::Interpret(const ScAddress & rPos) Line 670 C++ sclo.dll!ScConditionEntry::IsCellValid(ScRefCellValue & rCell, const ScAddress & rPos) Line 1238 C++ sclo.dll!ScConditionalFormat::GetData(ScRefCellValue & rCell, const ScAddress & rPos) Line 1836 C++ sclo.dll!`anonymous namespace'::handleConditionalFormat(ScConditionalFormatList & rCondFormList, const o3tl::sorted_vector,o3tl::find_unique,1> & rCondFormats, ScCellInfo * pInfo, ScTableInfo * pTableInfo, ScStyleSheetPool * pStlPool, const ScAddress & rAddr, bool & bHidden, bool & bHideFormula, bool bTabProtect) Line 297C++ sclo.dll!ScDocument::FillInfo(ScTableInfo & rTabInfo, short nCol1, long nRow1, short nCol2, long nRow2, short nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData * pMarkData) Line 569 C++ sclo.dll!ScGridWindow::Draw(short nX1, long nY1, short nX2, long nY2, ScUpdateMode eMode) Line 556C++ sclo.dll!ScGridWindow::Paint(OutputDevice & __formal, const tools::Rectangle & rRect) Line 458C++ vcllo.dll!PaintHelper::DoPaint(const vcl::Region * pRegion) Line 313 C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 617C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!vcl::Window::ImplCallOverlapPaint() Line 646C++ vcllo.dll!vcl::Window::ImplHandlePaintHdl(Timer * __formal) Line 668 C++ vcllo.dll!vcl::Window::LinkStubImplHandlePaintHdl(void * instance, Timer * data) Line 648 C++ vcllo.dll!Link::Call(Timer * data) Line 111 C++ vcllo.dll!Timer::Invoke(Timer * arg) Line 81 C++ vcllo.dll!vcl::Window::ImplHandleResizeTimerHdl(Timer * __formal) Line 684C++ vcllo.dll!vcl::Window::LinkStubImplHandleResizeTimerHdl(void * instance, Timer * data) Line 674 C++ vcllo.dll!Link::Call(Timer * data) Line 111 C++ vcllo.dll!Timer::Invoke(Timer * arg) Line 81 C++ vcllo.dll!vcl::Window::GetSizePixel() Line 2420 C++ sclo.dll!ScTabView::GetGridWidth(ScHSplitPos eWhich) Line 3032C++ sclo.dll!ScViewData::CellsAtX(short nPosX, short nDir, ScHSplitPos eWhichX, unsigned short nScrSizeX) Line 2634 C++ sclo.dll!ScViewData::VisibleCellsX(ScHSplitPos eWhichX) Line 2710 C++ sclo.dll!ScTabView::PaintArea(short nStartCol, long nStartRow, short nEndCol, long nEndRow, ScUpdateMode eMode) Line 2386 C++ sclo.dll!ScTabViewShell::Notify(SfxBroadcaster & rBC, const SfxHint & rHint) Line 63 C++ svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41C++ sclo.dll!ScDocShell::PostPaint(const ScRangeList & rRanges,
[Libreoffice-commits] core.git: external/freetype
external/freetype/freetype-fd-hack.patch.0 |8 1 file changed, 8 insertions(+) New commits: commit 6d0a0e09ce0daac06bbad0c0cef3057196dbf6e0 Author: Tor Lillqvist AuthorDate: Fri Feb 10 11:15:21 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 10 14:04:47 2023 + Avoid implicit function declaration warnings Noticed when compiling with Emscripten for WASM, but might well happen in other cases, too. Change-Id: I37ae326af21204d81a6a3267831d7a0198d1d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146744 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/external/freetype/freetype-fd-hack.patch.0 b/external/freetype/freetype-fd-hack.patch.0 index db2bdc9e92f6..c12d6739fc4c 100644 --- a/external/freetype/freetype-fd-hack.patch.0 +++ b/external/freetype/freetype-fd-hack.patch.0 @@ -1,6 +1,14 @@ # -*- Mode: Diff -*- --- src/base/ftsystem.c +++ src/base/ftsystem.c +@@ -24,6 +24,7 @@ +* +*/ + ++#include + + #include + #include FT_CONFIG_CONFIG_H @@ -237,6 +237,8 @@ const char* filepathname ) {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sc/source
sc/source/ui/docshell/autostyl.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit a01f4a1c317520a7a3090cfb2f1c9f21bbc50922 Author: Mike Kaganski AuthorDate: Thu Feb 9 16:06:04 2023 +0300 Commit: Xisco Fauli CommitDate: Fri Feb 10 14:04:32 2023 + Related: tdf#153510 Avoid modification of iterated container A crash is seen when resizing a document locally; the problem is range-based for loop, which indirectly modifies its range: sclo.dll!ScAutoStyleList::AddInitial(const ScRange & rRange, const rtl::OUString & rStyle1, unsigned __int64 nTimeout, const rtl::OUString & rStyle2) Line 81 C++ sclo.dll!ScDocShell::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 685C++ svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41C++ sclo.dll!ScInterpreter::ScStyle() Line 2628 C++ sclo.dll!ScInterpreter::Interpret() Line 4441 C++ sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1947 C++ sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1619 C++ sclo.dll!ScFormulaCell::MaybeInterpret() Line 470 C++ sclo.dll!ScFormulaCell::IsValue() Line 2763 C++ sclo.dll!ScConditionEntry::Interpret(const ScAddress & rPos) Line 670 C++ sclo.dll!ScConditionEntry::IsCellValid(ScRefCellValue & rCell, const ScAddress & rPos) Line 1238 C++ sclo.dll!ScConditionalFormat::GetData(ScRefCellValue & rCell, const ScAddress & rPos) Line 1836 C++ sclo.dll!`anonymous namespace'::handleConditionalFormat(ScConditionalFormatList & rCondFormList, const o3tl::sorted_vector,o3tl::find_unique,1> & rCondFormats, ScCellInfo * pInfo, ScTableInfo * pTableInfo, ScStyleSheetPool * pStlPool, const ScAddress & rAddr, bool & bHidden, bool & bHideFormula, bool bTabProtect) Line 297C++ sclo.dll!ScDocument::FillInfo(ScTableInfo & rTabInfo, short nCol1, long nRow1, short nCol2, long nRow2, short nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData * pMarkData) Line 569 C++ sclo.dll!ScGridWindow::Draw(short nX1, long nY1, short nX2, long nY2, ScUpdateMode eMode) Line 556C++ sclo.dll!ScGridWindow::Paint(OutputDevice & __formal, const tools::Rectangle & rRect) Line 458C++ vcllo.dll!PaintHelper::DoPaint(const vcl::Region * pRegion) Line 313 C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 617C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!PaintHelper::~PaintHelper() Line 553C++ vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 623C++ vcllo.dll!vcl::Window::ImplCallOverlapPaint() Line 646C++ vcllo.dll!vcl::Window::ImplHandlePaintHdl(Timer * __formal) Line 668 C++ vcllo.dll!vcl::Window::LinkStubImplHandlePaintHdl(void * instance, Timer * data) Line 648 C++ vcllo.dll!Link::Call(Timer * data) Line 111 C++ vcllo.dll!Timer::Invoke(Timer * arg) Line 81 C++ vcllo.dll!vcl::Window::ImplHandleResizeTimerHdl(Timer * __formal) Line 684C++ vcllo.dll!vcl::Window::LinkStubImplHandleResizeTimerHdl(void * instance, Timer * data) Line 674 C++ vcllo.dll!Link::Call(Timer * data) Line 111 C++ vcllo.dll!Timer::Invoke(Timer * arg) Line 81 C++ vcllo.dll!vcl::Window::GetSizePixel() Line 2420 C++ sclo.dll!ScTabView::GetGridWidth(ScHSplitPos eWhich) Line 3032C++ sclo.dll!ScViewData::CellsAtX(short nPosX, short nDir, ScHSplitPos eWhichX, unsigned short nScrSizeX) Line 2634 C++ sclo.dll!ScViewData::VisibleCellsX(ScHSplitPos eWhichX) Line 2710 C++ sclo.dll!ScTabView::PaintArea(short nStartCol, long nStartRow, short nEndCol, long nEndRow, ScUpdateMode eMode) Line 2386 C++ sclo.dll!ScTabViewShell::Notify(SfxBroadcaster & rBC, const SfxHint & rHint) Line 63 C++ svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41C++ sclo.dll!ScDocShell::PostPaint(const ScRangeList & rRanges, Pa
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/qa sw/source
dev/null |binary sw/qa/extras/ww8export/ww8export4.cxx | 11 --- sw/source/filter/ww8/ww8par.cxx |1 - 3 files changed, 12 deletions(-) New commits: commit 2fb1994addaa26bb11a0e698346b94089066dbb7 Author: Justin Luth AuthorDate: Wed Feb 8 11:55:42 2023 -0500 Commit: Xisco Fauli CommitDate: Fri Feb 10 14:03:52 2023 + Revert "tdf#148360 doc import: add NO_NUMBERING_SHOW_FOLLOWBY(true)" This reverts commit 2405a36f3bcd43f80371ccaed47f7523ff0d8757 which was backported to 7.4.1. This solves the regression report for DOC in tdf#153042. The problem is that the tab-without-numbering is displaying in cases where it shouldn't (i.e. when the tabstop position matches the first line indent). Although the patch itself is fine (DOC should do the same thing as DOCX) the feature is incomplete, even for DOCX/RTF. So just remove DOC from this mix - especially since there seem to be a LOT more instances of DOC files that need the incomplete aspect. Once it is proven to work OK for DOCX, we can add DOC back in. Change-Id: I3c550fc2ca29cf1490ec0a5e3979a6acbd102385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146670 Tested-by: Justin Luth Reviewed-by: Justin Luth (cherry picked from commit 7b3e0639962bab6e757381ad2b3e4868c61ed3b7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146625 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146752 diff --git a/sw/qa/extras/ww8export/data/tdf148360.doc b/sw/qa/extras/ww8export/data/tdf148360.doc deleted file mode 100644 index 3969a560999f.. Binary files a/sw/qa/extras/ww8export/data/tdf148360.doc and /dev/null differ diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx index bc0d51ff529e..7a19938caa10 100644 --- a/sw/qa/extras/ww8export/ww8export4.cxx +++ b/sw/qa/extras/ww8export/ww8export4.cxx @@ -38,17 +38,6 @@ public: } }; -CPPUNIT_TEST_FIXTURE(Test, testTdf148360) -{ -loadAndReload("tdf148360.doc"); -const auto& pLayout = parseLayoutDump(); - -// Ensure first element is a tab -assertXPath(pLayout, "/root/page[1]/body/txt[1]/Text[1]", "nType", "PortionType::TabLeft"); -// and only then goes content -assertXPath(pLayout, "/root/page[1]/body/txt[1]/Text[2]", "nType", "PortionType::Text"); -} - CPPUNIT_TEST_FIXTURE(Test, testTdf77964) { loadAndReload("tdf77964.doc"); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a48893e8cc7a..12d05bf9d102 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1888,7 +1888,6 @@ void SwWW8ImplReader::ImportDop() m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL, true); m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, true); m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::CONTINUOUS_ENDNOTES, true); - m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::NO_NUMBERING_SHOW_FOLLOWBY, true); // COMPATIBILITY FLAGS END
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests2/tdf153244.py | 51 1 file changed, 51 insertions(+) New commits: commit 797757ac567071f25c1bc30ec7e90d2773a18c67 Author: Xisco Fauli AuthorDate: Fri Feb 10 12:35:20 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 10 13:46:33 2023 + tdf#153244: sw: Add UItest Change-Id: I8e992d84171aa4ee10f24b754214965ffb70645e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146749 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/uitest/writer_tests2/tdf153244.py b/sw/qa/uitest/writer_tests2/tdf153244.py new file mode 100644 index ..5dfe459bfd83 --- /dev/null +++ b/sw/qa/uitest/writer_tests2/tdf153244.py @@ -0,0 +1,51 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_url_for_data_file, get_state_as_dict, select_by_text + +class tdf153244(UITestCase): + + def test_tdf153244(self): +with self.ui_test.create_doc_in_start_center("writer") as document: +text = document.getText() +cursor = text.createTextCursor() +textGraphic = document.createInstance('com.sun.star.text.TextGraphicObject') +provider = self.xContext.ServiceManager.createInstance('com.sun.star.graphic.GraphicProvider') +graphic = provider.queryGraphic( mkPropertyValues({"URL": get_url_for_data_file("LibreOffice.jpg")})) +textGraphic.Graphic = graphic +text.insertTextContent(cursor, textGraphic, False) +#select image +document.getCurrentController().select(document.getDrawPage()[0]) + +with self.ui_test.execute_dialog_through_command(".uno:InsertCaptionDialog") as xCaptionDialog: + +xOptionsBtn = xCaptionDialog.getChild("options") +with self.ui_test.execute_blocking_action(xOptionsBtn.executeAction, args=('CLICK', ())) as xOptionsDialog: +xSeparator = xOptionsDialog.getChild("separator") +xLevel = xOptionsDialog.getChild("level") +self.assertEqual("[None]", get_state_as_dict(xLevel)["DisplayText"]) +self.assertEqual(".", get_state_as_dict(xSeparator)["Text"]) + +select_by_text(xLevel, "1") +xSeparator.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xSeparator.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xSeparator.executeAction("TYPE", mkPropertyValues({"TEXT":"x"})) + +with self.ui_test.execute_blocking_action(xOptionsBtn.executeAction, args=('CLICK', ())) as xOptionsDialog: +xSeparator = xOptionsDialog.getChild("separator") +xLevel = xOptionsDialog.getChild("level") + +# Without the fix in place, this test would have failed with +# AssertionError: '1' != '[None]' +self.assertEqual("1", get_state_as_dict(xLevel)["DisplayText"]) +self.assertEqual("x", get_state_as_dict(xSeparator)["Text"]) + +# vim: set shiftwidth=4 softtabstop=4 expandtab:
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtGraphics_Controls.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 70b0c2d84bf5b3b2e94c8da18845c4210a87b7a8 Author: Andrea Gelmini AuthorDate: Fri Feb 10 12:40:41 2023 +0100 Commit: Julien Nabet CommitDate: Fri Feb 10 13:19:21 2023 + Fix typo Change-Id: I14c04884eab36560c96dbc59b809a5871d87b75f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146750 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx index f2e48f655149..0c5b85d28a11 100644 --- a/vcl/qt5/QtGraphics_Controls.cxx +++ b/vcl/qt5/QtGraphics_Controls.cxx @@ -762,7 +762,7 @@ bool QtGraphics_Controls::getNativeControlRegion(ControlType type, ControlPart p int nBottom = qMax(nLine, upscale(fo.rect.bottom() - aSubRect.bottom(), Round::Ceil)); boundingRect.adjust(nLeft, nTop, nRight, nBottom); -// tdf#150451: ensure a minimium size that fits text content + frame at top and bottom. +// tdf#150451: ensure a minimum size that fits text content + frame at top and bottom. // Themes may use the widget type for determining the actual frame width to use, // so pass a dummy QLineEdit //
[Libreoffice-commits] core.git: RepositoryExternal.mk
RepositoryExternal.mk |8 1 file changed, 8 insertions(+) New commits: commit 8d90e02b4cecdc7fd74b05b122f074a5f36ca965 Author: Tor Lillqvist AuthorDate: Thu Oct 20 11:20:12 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 11:54:16 2023 + Get the shared object of a bundled fontconfig into rpm and deb packages Change-Id: I9630fa25178637bba189c263605a2198ef5c6064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141550 Reviewed-by: Andras Timar Tested-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146720 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146740 Tested-by: Jenkins diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 0f7c77f443d6..9e8a46fa733e 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1284,6 +1284,14 @@ gb_ExternalProject__use_fontconfig := else # SYSTEM_FONTCONFIG +ifneq ($(filter-out MACOSX WNT,$(OS)),) + +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + fontconfig \ +)) + +endif + define gb_LinkTarget__use_fontconfig $(call gb_LinkTarget_use_external_project,$(1),fontconfig) $(call gb_LinkTarget_set_include,$(1),\
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - vcl/source
vcl/source/window/window2.cxx | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit 09939fab624db498c9055aa384151a91ce6a2462 Author: Aron Budea AuthorDate: Thu Feb 2 00:08:41 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 10 11:51:59 2023 + vcl: fix online crash in vcl::Window::IsTracking() Crashreport signature: program/libmergedlo.so vcl::Window::IsTracking() const vcl/source/window/window2.cxx:340 program/libmergedlo.so (anonymous namespace)::LOKPostAsyncEvent(void*, void*) sfx2/source/view/lokhelper.cxx:812 program/libmergedlo.so LokChartHelper::postMouseEvent(int, int, int, int, int, int, double, double) include/rtl/ref.hxx:128 program/libmergedlo.so SfxLokHelper::testInPlaceComponentMouseEventHit(SfxViewShell*, int, int, int, int, int, int, double, double, bool) sfx2/source/view/lokhelper.cxx:980 /program/libswlo.so SwXTextDocument::postMouseEvent(int, int, int, int, int, int) sw/source/uibase/uno/unotxdoc.cxx:3663 program/libmergedlo.so doc_postMouseEvent desktop/source/lib/init.cxx:4831 Change-Id: Iab7d24a901e57dc8af3fb2c77fbea3b4fdad9fb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146483 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146549 Tested-by: Jenkins Reviewed-by: Andras Timar (cherry picked from commit d4c99f07ed4a795519797f56be29c24a242f4db2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146697 Reviewed-by: Xisco Fauli diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 87db8e470e21..180edf5cf961 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -341,9 +341,15 @@ bool Window::IsTracking() const { if (!mpWindowImpl) return false; -return (mpWindowImpl->mbUseFrameData ? -mpWindowImpl->mpFrameData->mpTrackWin == this : -ImplGetSVData()->mpWinData->mpTrackWin == this); +if (mpWindowImpl->mbUseFrameData && mpWindowImpl->mpFrameData) +{ +return mpWindowImpl->mpFrameData->mpTrackWin == this; +} +if (!mpWindowImpl->mbUseFrameData && ImplGetSVData()->mpWinData) +{ +return ImplGetSVData()->mpWinData->mpTrackWin == this; +} +return false; } void Window::StartAutoScroll( StartAutoScrollFlags nFlags )
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sc/inc sc/source
sc/inc/validat.hxx |4 sc/source/core/data/validat.cxx | 196 +++- 2 files changed, 79 insertions(+), 121 deletions(-) New commits: commit a5e765e67ef6527486771caaf6c89962136ec07e Author: Balazs Varga AuthorDate: Tue Jan 31 14:21:31 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 10 11:50:59 2023 + Related: tdf#150098 sc validation: allowing formulas for validity test Clean-up and a little optimization. Change-Id: Ib56d959188912f4b18acb5466ce55bc7b5b4ee4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146391 Tested-by: Jenkins Reviewed-by: Balazs Varga (cherry picked from commit d8ae6d1388f28c405c4de2dfe93dbfe2d8acd470) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146696 Reviewed-by: Xisco Fauli diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 79eb9b75a334..6f64b842daba 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -152,6 +152,10 @@ public: bool IsDataValid( ScRefCellValue& rCell, const ScAddress& rPos ) const; +/** Test, if formula is valid. */ +bool isFormulaResultsValidatable(const OUString& rTest, const ScAddress& rPos, SvNumberFormatter* pFormatter, +OUString& rStrResult, double& nVal, sal_uInt32& nFormat, bool& bIsVal) const; + // TRUE -> break bool DoError(weld::Window* pParent, const OUString& rInput, const ScAddress& rPos) const; void DoCalcError( ScFormulaCell* pCell ) const; diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 2d6194baf588..4db07b09abc7 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -444,67 +444,12 @@ bool ScValidationData::IsDataValidCustom( if (rTest[0] == '=') { -std::optional pFCell(std::in_place, *mpDoc, rPos, rTest, true); -pFCell->SetLimitString(true); - -bool bColRowName = pFCell->HasColRowName(); -if (bColRowName) -{ -// ColRowName from RPN-Code? -if (pFCell->GetCode()->GetCodeLen() <= 1) -{ // ==1: area -// ==0: would be an area if... -OUString aBraced = "(" + rTest + ")"; -pFCell.emplace(*mpDoc, rPos, aBraced, true); -pFCell->SetLimitString(true); -} -else -bColRowName = false; -} - -FormulaError nErrCode = pFCell->GetErrCode(); -if (nErrCode == FormulaError::NONE || pFCell->IsMatrix()) -{ -pFormatter = mpDoc->GetFormatTable(); -const Color* pColor; -if (pFCell->IsMatrix()) -{ -rStrResult = pFCell->GetString().getString(); -} -else if (pFCell->IsValue()) -{ -nVal = pFCell->GetValue(); -nFormat = pFormatter->GetStandardFormat(nVal, 0, -pFCell->GetFormatType(), ScGlobal::eLnge); -pFormatter->GetOutputString(nVal, nFormat, rStrResult, &pColor); -bIsVal = true; -} -else -{ -nFormat = pFormatter->GetStandardFormat( -pFCell->GetFormatType(), ScGlobal::eLnge); -pFormatter->GetOutputString(pFCell->GetString().getString(), nFormat, -rStrResult, &pColor); -// Indicate it's a string, so a number string doesn't look numeric. -// Escape embedded quotation marks first by doubling them, as -// usual. Actually the result can be copy-pasted from the result -// box as literal into a formula expression. -rStrResult = "\"" + rStrResult.replaceAll("\"", "\"\"") + "\""; -} - -ScRange aTestRange; -if (bColRowName || (aTestRange.Parse(rTest, *mpDoc) & ScRefFlags::VALID)) -rStrResult += " ..."; -// area - -// check whether empty cells are allowed -if (rStrResult.isEmpty()) -return IsIgnoreBlank(); -} -else -{ +if (!isFormulaResultsValidatable(rTest, rPos, pFormatter, rStrResult, nVal, nFormat, bIsVal)) return false; -} + +// check whether empty cells are allowed +if (rStrResult.isEmpty()) +return IsIgnoreBlank(); } else { @@ -599,69 +544,14 @@ bool ScValidationData::IsDataValid( OUString rStrResult = ""; bool bIsVal = false; -if (rTest[0] == '=') // formulas do not pass the validity test +if (rTest[0] == '=') { -std::optional pFCell(std::in_place, *mpDoc, rPos, rTest, true); -pFCell->SetLimitString(true); - -bool bColRowName = pFCell->HasColRowName(); -if (bColRowName) -{ -// ColRowName from RPN-Code? -if (pFCell->GetCode()->G
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/source
sw/source/uibase/app/applab.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 72e99627fedc65084ff0aff29b0b54a224a77fab Author: Xisco Fauli AuthorDate: Thu Feb 9 14:36:51 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 10 10:54:25 2023 + sw: fix crash in SwModule::InsertLab Seen in https://crashreport.libreoffice.org/stats/crash_details/e17357e9-d5e2-4eee-868e-ecf72e04dc41 Change-Id: I32f239249e72b6644b3a38d4dd9bbae65f7bede0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146708 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 1ea666ccdf61..7ee421ed5ee7 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -181,6 +181,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) } SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); +if (!pViewFrame) +return; SwView *pNewView = static_cast( pViewFrame->GetViewShell()); pNewView->AttrChangedNotify(nullptr);// So that SelectShell is being called.
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sw/source
sw/source/uibase/app/applab.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 15e08e498a64eca1d4305682d6055a9ab1d568c6 Author: Xisco Fauli AuthorDate: Thu Feb 9 14:36:51 2023 +0100 Commit: Michael Stahl CommitDate: Fri Feb 10 10:16:53 2023 + sw: fix crash in SwModule::InsertLab Seen in https://crashreport.libreoffice.org/stats/crash_details/e17357e9-d5e2-4eee-868e-ecf72e04dc41 Change-Id: I32f239249e72b6644b3a38d4dd9bbae65f7bede0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146704 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 1ea666ccdf61..7ee421ed5ee7 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -181,6 +181,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) } SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); +if (!pViewFrame) +return; SwView *pNewView = static_cast( pViewFrame->GetViewShell()); pNewView->AttrChangedNotify(nullptr);// So that SelectShell is being called.
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - vcl/inc vcl/qt5
vcl/inc/qt5/QtGraphics_Controls.hxx |3 ++- vcl/qt5/QtGraphics_Controls.cxx | 30 -- 2 files changed, 30 insertions(+), 3 deletions(-) New commits: commit 43c1de9f68a589304f060d2e662dc37c842a2a67 Author: Rafael Lima AuthorDate: Thu Feb 2 15:27:37 2023 + Commit: Caolán McNamara CommitDate: Fri Feb 10 09:03:39 2023 + tdf#150451 Fix borders in Editbox controls (kf5) The bounding rectangle calculated for an Editbox in QtGraphics_Controls::getNativeControlRegion was not always enough to accommodate content and the borders. The KDE Breeze does not draw any borders if the total height of the bounding rectangle is smaller than the minimum size needed for content + frame at top and bottom, s. Style::drawFrameLineEditPrimitive in the Breeze style [1]. Therefore, ensure a minimum height of that size. The Breeze style also considers the type of the passed widget when retrieving the frame width using QStyle::pixelMetric [2], so pass a dummy `QLineEdit` in order to get the actual frame width of 6 that the Breeze style uses for line edits, rather than the default value of 2 that is returned when not passing any widget. Just do that for the minimum size calculation for now and not everywhere, because the handling for edit boxes here in the qt VCL plugins and in the calling code currently does all kinds of "interesting" things like doing extra size adjustments or passing the content rect where the bounding rect would be expected,... Ideally this should be cleaned up in the callers and all platform integrations in a follow-up commit to adhere to what the doc in vcl/inc/WidgetDrawInterface.hxx says, but this here keeps it working with existing code for now. (s.a. discussion in the Gerrit change for more details) Tested using various scaling factors: 1, 1.25, 1.5, 1.75 and 2.0. [1] https://invent.kde.org/plasma/breeze/-/blob/144ea45018d28758db07afd987d97318d56c4981/kstyle/breezestyle.cpp#L3527 [2] https://invent.kde.org/plasma/breeze/-/blob/144ea45018d28758db07afd987d97318d56c4981/kstyle/breezestyle.cpp#L555 Co-authored-by: Michael Weghorn Change-Id: If8cb4794c7f3ce1be4d1ee421c9c27ad5adf5da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146516 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 5c96e813bed3293605f8d746f188cc051d1e5949) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146706 Reviewed-by: Caolán McNamara diff --git a/vcl/inc/qt5/QtGraphics_Controls.hxx b/vcl/inc/qt5/QtGraphics_Controls.hxx index 17039f9d6038..dd1865e34008 100644 --- a/vcl/inc/qt5/QtGraphics_Controls.hxx +++ b/vcl/inc/qt5/QtGraphics_Controls.hxx @@ -59,7 +59,8 @@ public: tools::Rectangle& rNativeContentRegion) override; private: -static int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = nullptr); +static int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = nullptr, + const QWidget* pWidget = nullptr); static QSize sizeFromContents(QStyle::ContentsType type, const QStyleOption* option, const QSize& contentsSize); static QRect subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex* option, diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx index e08b84719e61..f2e48f655149 100644 --- a/vcl/qt5/QtGraphics_Controls.cxx +++ b/vcl/qt5/QtGraphics_Controls.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -129,9 +130,10 @@ bool QtGraphics_Controls::isNativeControlSupported(ControlType type, ControlPart return false; } -inline int QtGraphics_Controls::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option) +inline int QtGraphics_Controls::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option, +const QWidget* pWidget) { -return QApplication::style()->pixelMetric(metric, option); +return QApplication::style()->pixelMetric(metric, option, pWidget); } inline QSize QtGraphics_Controls::sizeFromContents(QStyle::ContentsType type, @@ -759,6 +761,30 @@ bool QtGraphics_Controls::getNativeControlRegion(ControlType type, ControlPart p int nRight = qMax(nLine, upscale(fo.rect.right() - aSubRect.right(), Round::Ceil)); int nBottom = qMax(nLine, upscale(fo.rect.bottom() - aSubRect.bottom(), Round::Ceil)); boundingRect.adjust(nLeft, nTop, nRight, nBottom); + +// tdf#150451: ensure a minimium size that fits text content + frame at top and bottom. +// Themes may use the widget type for determining the actual frame width to use, +// so pass a dummy QLineEdi
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx |4 1 file changed, 4 insertions(+) New commits: commit 72959cc2b36749a779b56522f27e290731187043 Author: Caolán McNamara AuthorDate: Thu Feb 9 20:57:45 2023 + Commit: Caolán McNamara CommitDate: Fri Feb 10 09:03:02 2023 + gtk4: occasional crash at exit Change-Id: I2008d44f5dae0f22e9213f46a740146d6eb85666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146727 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 16945ee85dd7..f0923cff2ccd 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -18571,7 +18571,11 @@ public: virtual ~GtkInstanceDrawingArea() override { +#if GTK_CHECK_VERSION(4,0,0) +gtk_widget_remove_controller(m_pMouseEventBox, GTK_EVENT_CONTROLLER(m_pZoomGesture)); +#else g_clear_object(&m_pZoomGesture); +#endif ImplGetDefaultWindow()->RemoveEventListener(LINK(this, GtkInstanceDrawingArea, SettingsChangedHdl));
[Libreoffice-commits] core.git: vcl/win
vcl/win/gdi/salnativewidgets-luna.cxx |2 +- vcl/win/window/salframe.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 86cfb4da4fdca63d92060bcfa65e808f579260f4 Author: Stephan Bergmann AuthorDate: Fri Feb 10 08:18:04 2023 +0100 Commit: Stephan Bergmann CommitDate: Fri Feb 10 08:59:38 2023 + loplugin:staticaccess Change-Id: If0a2032bede27af3176951dabaab4a165efb144d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146738 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index a0379baa7c6c..c837cb7a1c82 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -403,7 +403,7 @@ bool UseDarkMode() return false; bool bRet(false); -switch (Application::GetSettings().GetMiscSettings().GetDarkMode()) +switch (MiscSettings::GetDarkMode()) { case 0: // auto default: diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index b12fdfffbabe..5bccf6707700 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -286,7 +286,7 @@ static void UpdateDarkMode(HWND hWnd) auto SetPreferredAppMode = reinterpret_cast(GetProcAddress(hUxthemeLib, MAKEINTRESOURCEA(135))); if (SetPreferredAppMode) { -switch (Application::GetSettings().GetMiscSettings().GetDarkMode()) +switch (MiscSettings::GetDarkMode()) { case 0: SetPreferredAppMode(AllowDark);
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdomedia.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5025a56db91bb3cf337659c0f8a77d36f49974ad Author: Tor Lillqvist AuthorDate: Tue Oct 25 11:37:42 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 08:49:01 2023 + Guard against no HAVE_FEATURE_AVMEDIA in one more place This was said to fix build of the iOS app some years ago in a vendor branch, but unclear about that now, it seems to build from master at the moment anyway? Anyway, this still probably makes sense. Change-Id: I4a9e6f18e7b17664e5aed36233d5ccde44cf1194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141796 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146742 Tested-by: Jenkins diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9b17b7bf278a..c63df5d8b69e 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -474,6 +474,7 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper void SdrMediaObj::notifyPropertiesForLOKit() { +#if HAVE_FEATURE_AVMEDIA if (!m_xImpl->m_MediaProperties.getTempURL().isEmpty()) { const auto mediaId = reinterpret_cast(this); @@ -491,6 +492,7 @@ void SdrMediaObj::notifyPropertiesForLOKit() SfxLokHelper::notifyMediaUpdate(json); } +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: solenv/bin
solenv/bin/ooinstall |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit cbac6b9d8f1319fffc66b397dfa20588e35c24fb Author: Tor Lillqvist AuthorDate: Wed Nov 22 21:05:48 2017 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 10 08:48:39 2023 + Pass product name and not hardcoded "LibreOffice" to make_installer.pl -p Change-Id: I9b2d84bcc18e21b325960f7057e259daa37234a5 Reviewed-on: https://gerrit.libreoffice.org/55640 Reviewed-by: Andras Timar Tested-by: Andras Timar (cherry picked from commit 12d1b08aac8cc8c3176040efc7290377e380f0c4) Reviewed-on: https://gerrit.libreoffice.org/79128 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit 0069417b55c99166aec5489ccef803eba25d2b4f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136842 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146741 Tested-by: Jenkins diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall index efb1f28de824..71f10c739036 100755 --- a/solenv/bin/ooinstall +++ b/solenv/bin/ooinstall @@ -88,11 +88,14 @@ if ($destdir && "$ENV{DESTDIR}" ne "/" && -d "$ENV{DESTDIR}") { print "Running LibreOffice installer\n"; +my $PRODUCTNAME_no_spaces = $ENV{PRODUCTNAME}; +$PRODUCTNAME_no_spaces =~ s/ //g; + system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " . "perl " . (scalar keys(%DB::sub) ? "-d " : "") . "-w $ENV{SRCDIR}/solenv/bin/make_installer.pl " . -"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p LibreOffice " . +"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p $PRODUCTNAME_no_spaces " . "-u $tmp_dir " . "-buildid $BUILD $destdir $strip $msi " . "-simple $path") && die "Failed to install: $!";
[Libreoffice-commits] core.git: vcl/win
vcl/win/window/salframe.cxx |4 1 file changed, 4 insertions(+) New commits: commit b8a3d1b7577adce9e4844f6f8915820b98b6d2d8 Author: Stephan Bergmann AuthorDate: Fri Feb 10 08:17:23 2023 +0100 Commit: Stephan Bergmann CommitDate: Fri Feb 10 08:18:06 2023 + loplugin:external Change-Id: Idde40e44254a6c545185470a1db36ab684504bec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146737 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 847156f5b2df..b12fdfffbabe 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -261,6 +261,8 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect ) } } +namespace { + enum PreferredAppMode { AllowDark = 1, @@ -268,6 +270,8 @@ enum PreferredAppMode ForceLight = 3 }; +} + static void UpdateDarkMode(HWND hWnd) { static bool bOSSupportsDarkMode = OSSupportsDarkMode();
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5-1' - configure.ac vcl/inc vcl/source
configure.ac|3 ++- vcl/inc/font/LogicalFontInstance.hxx|2 -- vcl/source/font/LogicalFontInstance.cxx | 13 + vcl/source/gdi/CommonSalLayout.cxx |9 ++--- 4 files changed, 5 insertions(+), 22 deletions(-) New commits: commit 6a006674c2cf62742ae0653f397aea1166fb43d8 Author: Khaled Hosny AuthorDate: Wed Feb 8 21:27:50 2023 +0200 Commit: خالد حسني CommitDate: Fri Feb 10 08:16:39 2023 + Require HarfBuzz 5.1.0 This is the minimal version to provide the functionality we currently check for. Some important LO functionality currently depend on idfdef'd HarfBuzz code, and some distributions build against old system HarfBuzz leading to user bug reports that are tricky to track down, e.g: tdf#153048 and tdf#153470. Change-Id: I7d58ec46f8fd340d2592887c0088876d71351771 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146674 Tested-by: Jenkins Reviewed-by: خالد حسني (cherry picked from commit 8c1e91444c78db1093c3db54d98efb16294f82ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146700 Reviewed-by: Adolfo Jayme Barrientos Tested-by: René Engelhard diff --git a/configure.ac b/configure.ac index 734149364bbd..2fc55c588ac3 100644 --- a/configure.ac +++ b/configure.ac @@ -10848,6 +10848,7 @@ AC_SUBST(SYSTEM_LIBORCUS) dnl === dnl HarfBuzz dnl === +harfbuzz_required_version=5.1.0 GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC" GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite" @@ -10855,7 +10856,7 @@ libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3]) HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src" HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz" -libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 2.6.8]) +libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= $harfbuzz_required_version]) if test "$COM" = "MSC"; then # override the above GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib" diff --git a/vcl/inc/font/LogicalFontInstance.hxx b/vcl/inc/font/LogicalFontInstance.hxx index 6f4645c82c0c..c9e837d540f1 100644 --- a/vcl/inc/font/LogicalFontInstance.hxx +++ b/vcl/inc/font/LogicalFontInstance.hxx @@ -156,10 +156,8 @@ private: // The value is initialized and used in NeedOffsetCorrection(). std::optional m_xeFontFamilyEnum; -#if HB_VERSION_ATLEAST(4, 0, 0) mutable hb_draw_funcs_t* m_pHbDrawFuncs = nullptr; basegfx::B2DPolygon m_aDrawPolygon; -#endif }; inline hb_font_t* LogicalFontInstance::GetHbFont() diff --git a/vcl/source/font/LogicalFontInstance.cxx b/vcl/source/font/LogicalFontInstance.cxx index 277edec2d96c..58b291d04bdf 100644 --- a/vcl/source/font/LogicalFontInstance.cxx +++ b/vcl/source/font/LogicalFontInstance.cxx @@ -54,10 +54,8 @@ LogicalFontInstance::~LogicalFontInstance() if (m_pHbFontUntransformed) hb_font_destroy(m_pHbFontUntransformed); -#if HB_VERSION_ATLEAST(4, 0, 0) if (m_pHbDrawFuncs) hb_draw_funcs_destroy(m_pHbDrawFuncs); -#endif } hb_font_t* LogicalFontInstance::InitHbFont() @@ -75,12 +73,10 @@ hb_font_t* LogicalFontInstance::InitHbFont() if (!aVariations.empty()) hb_font_set_variations(pHbFont, aVariations.data(), aVariations.size()); -#if HB_VERSION_ATLEAST(3, 3, 0) // If we are applying artificial italic, instruct HarfBuzz to do the same // so that mark positioning is also transformed. if (NeedsArtificialItalic()) hb_font_set_synthetic_slant(pHbFont, ARTIFICIAL_ITALIC_SKEW); -#endif ImplInitHbFont(pHbFont); @@ -91,7 +87,6 @@ hb_font_t* LogicalFontInstance::GetHbFontUntransformed() const { auto* pHbFont = const_cast(this)->GetHbFont(); -#if HB_VERSION_ATLEAST(3, 3, 0) if (NeedsArtificialItalic()) // || NeedsArtificialBold() { if (!m_pHbFontUntransformed) @@ -103,7 +98,7 @@ hb_font_t* LogicalFontInstance::GetHbFontUntransformed() const } return m_pHbFontUntransformed; } -#endif + return pHbFont; } @@ -259,7 +254,6 @@ bool LogicalFontInstance::NeedsArtificialItalic() const return m_aFontSelData.GetItalic() != ITALIC_NONE && m_pFontFace->GetItalic() == ITALIC_NONE; } -#if HB_VERSION_ATLEAST(4, 0, 0) namespace { void move_to_func(hb_draw_funcs_t*, void* /*pDrawData*/, hb_draw_state_t*, float to_x, float to_y, @@ -294,12 +288,10 @@ void close_path_func(hb_draw_funcs_t*, void* pDrawData, hb_draw_state_t*, void* pPoly->clear(); } } -#endif bool LogicalFontInstance::GetGlyphOutlineUntransformed(sal_GlyphId nGlyph, basegfx::B2DPolyPolygon& rPolyPoly) const { -#if HB_VERSION_ATL
[Libreoffice-commits] core.git: solenv/clang-format
solenv/clang-format/check-last-commit |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit 0fcc2f933e588f5a9fa19f3decf91874d935ecfa Author: Ilmari Lauhakangas AuthorDate: Fri Feb 10 08:12:16 2023 + Commit: Ilmari Lauhakangas CommitDate: Fri Feb 10 08:12:26 2023 + Revert "check-last-commit: more detailed advice on using clang-format" This reverts commit f59d449ecfc078765dfaa2e150a21a7e4b330932. Reason for revert: confusing Change-Id: If5924ff3952f344f7a418e80d4ceb774dea94430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146707 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/solenv/clang-format/check-last-commit b/solenv/clang-format/check-last-commit index bd26258c5ad4..0de5ac4b0783 100755 --- a/solenv/clang-format/check-last-commit +++ b/solenv/clang-format/check-last-commit @@ -65,11 +65,7 @@ sub check_style() { print("\nERROR: The above differences were found between the code to commit \n"); print("and the clang-format rules. Tips:\n"); -print("\n- On your local machine you may check how clang-format would modify the problematic file by saying\n"); -print(" diff --unified <(/opt/lo/bin/clang-format )\n"); -print("- NOTE: you should only correct the lines that you changed. Do not add unrelated formatting to your patch.\n"); -print("- If the suggested corrections only apply to the lines you changed, you may run\n"); -print(" '/opt/lo/bin/clang-format -i ' to fix up style automatically.\n"); +print("\n- You may run '/opt/lo/bin/clang-format -i ' to fix up style automatically.\n"); print("- See solenv/clang-format/README on where to get the required version of clang-format binaries.\n"); print("- If you renamed an excluded file, update solenv/clang-format/excludelist accordingly to keep it excluded.\n"); print("\nsolenv/clang-format/check-last-commit: KO\n");
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/QtGraphics_Controls.hxx |3 ++- vcl/qt5/QtGraphics_Controls.cxx | 30 -- 2 files changed, 30 insertions(+), 3 deletions(-) New commits: commit 5c96e813bed3293605f8d746f188cc051d1e5949 Author: Rafael Lima AuthorDate: Thu Feb 2 15:27:37 2023 + Commit: Michael Weghorn CommitDate: Fri Feb 10 08:04:40 2023 + tdf#150451 Fix borders in Editbox controls (kf5) The bounding rectangle calculated for an Editbox in QtGraphics_Controls::getNativeControlRegion was not always enough to accommodate content and the borders. The KDE Breeze does not draw any borders if the total height of the bounding rectangle is smaller than the minimum size needed for content + frame at top and bottom, s. Style::drawFrameLineEditPrimitive in the Breeze style [1]. Therefore, ensure a minimum height of that size. The Breeze style also considers the type of the passed widget when retrieving the frame width using QStyle::pixelMetric [2], so pass a dummy `QLineEdit` in order to get the actual frame width of 6 that the Breeze style uses for line edits, rather than the default value of 2 that is returned when not passing any widget. Just do that for the minimum size calculation for now and not everywhere, because the handling for edit boxes here in the qt VCL plugins and in the calling code currently does all kinds of "interesting" things like doing extra size adjustments or passing the content rect where the bounding rect would be expected,... Ideally this should be cleaned up in the callers and all platform integrations in a follow-up commit to adhere to what the doc in vcl/inc/WidgetDrawInterface.hxx says, but this here keeps it working with existing code for now. (s.a. discussion in the Gerrit change for more details) Tested using various scaling factors: 1, 1.25, 1.5, 1.75 and 2.0. [1] https://invent.kde.org/plasma/breeze/-/blob/144ea45018d28758db07afd987d97318d56c4981/kstyle/breezestyle.cpp#L3527 [2] https://invent.kde.org/plasma/breeze/-/blob/144ea45018d28758db07afd987d97318d56c4981/kstyle/breezestyle.cpp#L555 Co-authored-by: Michael Weghorn Change-Id: If8cb4794c7f3ce1be4d1ee421c9c27ad5adf5da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146516 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/inc/qt5/QtGraphics_Controls.hxx b/vcl/inc/qt5/QtGraphics_Controls.hxx index 17039f9d6038..dd1865e34008 100644 --- a/vcl/inc/qt5/QtGraphics_Controls.hxx +++ b/vcl/inc/qt5/QtGraphics_Controls.hxx @@ -59,7 +59,8 @@ public: tools::Rectangle& rNativeContentRegion) override; private: -static int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = nullptr); +static int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = nullptr, + const QWidget* pWidget = nullptr); static QSize sizeFromContents(QStyle::ContentsType type, const QStyleOption* option, const QSize& contentsSize); static QRect subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex* option, diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx index e08b84719e61..f2e48f655149 100644 --- a/vcl/qt5/QtGraphics_Controls.cxx +++ b/vcl/qt5/QtGraphics_Controls.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -129,9 +130,10 @@ bool QtGraphics_Controls::isNativeControlSupported(ControlType type, ControlPart return false; } -inline int QtGraphics_Controls::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option) +inline int QtGraphics_Controls::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option, +const QWidget* pWidget) { -return QApplication::style()->pixelMetric(metric, option); +return QApplication::style()->pixelMetric(metric, option, pWidget); } inline QSize QtGraphics_Controls::sizeFromContents(QStyle::ContentsType type, @@ -759,6 +761,30 @@ bool QtGraphics_Controls::getNativeControlRegion(ControlType type, ControlPart p int nRight = qMax(nLine, upscale(fo.rect.right() - aSubRect.right(), Round::Ceil)); int nBottom = qMax(nLine, upscale(fo.rect.bottom() - aSubRect.bottom(), Round::Ceil)); boundingRect.adjust(nLeft, nTop, nRight, nBottom); + +// tdf#150451: ensure a minimium size that fits text content + frame at top and bottom. +// Themes may use the widget type for determining the actual frame width to use, +// so pass a dummy QLineEdit +// +// NOTE: This is currently only done here for the minimum size calculation and +// not above because the handling for edit boxe