[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5DragAndDrop.cxx |1 + vcl/qt5/Qt5Frame.cxx |2 -- 2 files changed, 1 insertion(+), 2 deletions(-) New commits: commit af8266b4d371ffbc14609686259546642b167755 Author: Jan-Marek Glogowski AuthorDate: Fri Jun 14 02:30:01 2019 +0200 Commit: Michael Weghorn CommitDate: Sat Jun 15 21:44:32 2019 +0200 Qt5 move and init static m_ActiveDragSource Change-Id: Iab82151b8d1a8281c983b9de5f35dfb0442e Reviewed-on: https://gerrit.libreoffice.org/74013 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 5195c5bcd8be5f3b183659ead272cd86b8774cc1) Reviewed-on: https://gerrit.libreoffice.org/74091 (cherry picked from commit bf1a7feb2b871409e61512b8faf415fc87d4c631) Reviewed-on: https://gerrit.libreoffice.org/74096 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx index 42e61074a824..001302fef0d0 100644 --- a/vcl/qt5/Qt5DragAndDrop.cxx +++ b/vcl/qt5/Qt5DragAndDrop.cxx @@ -96,6 +96,7 @@ std::vector Qt5DnDTransferable::getTransferDataFl bool Qt5DragSource::m_bDropSuccessSet = false; bool Qt5DragSource::m_bDropSuccess = false; +Qt5DragSource* Qt5DragSource::m_ActiveDragSource = nullptr; Qt5DragSource::~Qt5DragSource() { diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 6b738f159ea4..f5f7e52b2764 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -1166,8 +1166,6 @@ void Qt5Frame::SetApplicationID(const OUString&) // Drag'n'drop foo -Qt5DragSource* Qt5DragSource::m_ActiveDragSource; - void Qt5Frame::registerDragSource(Qt5DragSource* pDragSource) { assert(!m_pDragSource); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Menu.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 7f89fe721d2b74ad88b5a124cda20ae419746dec Author: Jan-Marek Glogowski AuthorDate: Thu Jun 13 02:33:20 2019 + Commit: Michael Weghorn CommitDate: Thu Jun 13 18:46:03 2019 +0200 Qt5 correctly hide menu bar in tabbed mode Change-Id: I179780c2df5637b8a28c3a77b829319b1a64845b Reviewed-on: https://gerrit.libreoffice.org/73924 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 9758b9b6e52e8e8a8a5cc24b51d62a853a3def82) Reviewed-on: https://gerrit.libreoffice.org/73926 (cherry picked from commit 221f27433900490e2b00bd4ed6957ab36ecadb33) Reviewed-on: https://gerrit.libreoffice.org/73927 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 0eeafb89f85d..916e92f794c5 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -536,8 +536,8 @@ Qt5Menu* Qt5Menu::GetTopLevel() void Qt5Menu::ShowMenuBar(bool bVisible) { -if (mpQMenuBar && (bVisible != mpQMenuBar->isVisible())) -bVisible ? mpQMenuBar->show() : mpQMenuBar->hide(); +if (mpQMenuBar) +mpQMenuBar->setVisible(bVisible); } const Qt5Frame* Qt5Menu::GetFrame() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Timer.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e70af1096275e7705fa71bb5ca0fc564746a98c7 Author: Jan-Marek Glogowski AuthorDate: Sat Jun 1 22:23:58 2019 + Commit: Katarina Behrens CommitDate: Wed Jun 5 22:22:35 2019 +0200 Qt5 use precise timer to prevent unneeded restarts We just have one driving timer. Not much to sync with. Gets rid of these annoying scheduler restart messages. The idea of coarse, synced timer events sounds nice to have, but LO currently can't handle it in a sensible sense.. Change-Id: I169c2bb582aca0e03b00e24dc364ac9b19162c3b Reviewed-on: https://gerrit.libreoffice.org/73392 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 677db60166106e33bc2329f868f96cf2fb85f11b) Reviewed-on: https://gerrit.libreoffice.org/73411 Reviewed-by: Michael Weghorn (cherry picked from commit f85d99ede4054876f608819e808c9b03c6a03481) Reviewed-on: https://gerrit.libreoffice.org/73464 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Timer.cxx b/vcl/qt5/Qt5Timer.cxx index 7fcb7e17dcda..348c9a825ae6 100644 --- a/vcl/qt5/Qt5Timer.cxx +++ b/vcl/qt5/Qt5Timer.cxx @@ -29,6 +29,7 @@ Qt5Timer::Qt5Timer() { m_aTimer.setSingleShot(true); +m_aTimer.setTimerType(Qt::PreciseTimer); connect(_aTimer, SIGNAL(timeout()), this, SLOT(timeoutActivated())); connect(this, SIGNAL(startTimerSignal(int)), this, SLOT(startTimer(int))); connect(this, SIGNAL(stopTimerSignal()), this, SLOT(stopTimer())); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5AccessibleWidget.cxx | 16 1 file changed, 16 insertions(+) New commits: commit 0b904a8b3ceb648cf6466cb33f07310a3c70f793 Author: Michael Weghorn AuthorDate: Thu May 30 23:41:10 2019 +0200 Commit: Katarina Behrens CommitDate: Mon Jun 3 18:12:45 2019 +0200 tdf#122200 Qt5AccessibleWidget: Handle special offset values Handle special values for offset in 'Qt5AccessibleWidget::attributes' the same way that the base class's 'QAccessibleTextWidget::attributes' does, s. [1]. In particular, an offset matching the text length can be passed e.g. by "accerciser" or screen readers, which previously resulted in an 'IndexOutOfBoundsException' being thrown when the index was later checked in the call to 'VCLXAccessibleStatusBarItem::getCharacterAttributes'. See also 'IAccessibleText::attributes' documentation at [2] and the page on special offset values referenced there [3]. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/accessible/qaccessiblewidgets.cpp?h=5.12.4#n791 [2] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_text.html#a29e5c8f69ec13c683ed6bca5e6a5 [3] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_general_info.html#_specialOffsets Change-Id: I623995aeb689b31c5b49fb3ace8e4dd4c18927d2 Reviewed-on: https://gerrit.libreoffice.org/73225 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 93c81657c6111b4bb97a2bb9ec155465f9a6f523) Reviewed-on: https://gerrit.libreoffice.org/73379 diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index b76acb4a1c57..e2cc0a31765c 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -830,6 +830,22 @@ QString Qt5AccessibleWidget::attributes(int offset, int* startOffset, int* endOf if (!xText.is()) return QString(); +// handle special values for offset the same way base class's QAccessibleTextWidget::attributes does +// (as defined in IAccessible 2: -1 -> length, -2 -> cursor position) +if (offset == -2) +offset = cursorPosition(); // currently always returns 0 + +const int nTextLength = characterCount(); +if (offset == -1 || offset == nTextLength) +offset = nTextLength - 1; + +if (offset < 0 || offset > nTextLength) +{ +*startOffset = -1; +*endOffset = -1; +return QString(); +} + Sequence attribs = xText->getCharacterAttributes(offset, Sequence()); const PropertyValue* pValues = attribs.getConstArray(); OUString aRet; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Menu.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ed200895d4a2bc31ca99d4e41abaae7dce73ffa1 Author: Jan-Marek Glogowski AuthorDate: Wed May 29 19:45:24 2019 +0200 Commit: Katarina Behrens CommitDate: Thu May 30 08:53:31 2019 +0200 tdf#125548 Qt5 no focus for the menu bar button You can't tab into the menu bar, but if you add a corner widget, it will be enlisted in the parent's focus chain! Interestingly the menu bar even is considered to have the focus, if the widget is focused, and will handle key events, but this can probably be considered consistent. So this just denies the button any focus, as this is a mouse-only widget, and clicking it will close the document window. Change-Id: I3c48d85ca56b6a54daf01f444dddc736e7ebb8e7 Reviewed-on: https://gerrit.libreoffice.org/73186 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit f6e7dbccf063767c2ac87c6460bd1004df742081) Reviewed-on: https://gerrit.libreoffice.org/73191 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 47613988beac..0eeafb89f85d 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -622,6 +622,7 @@ void Qt5Menu::ShowCloseButton(bool bShow) pButton = new QPushButton(mpQMenuBar); pButton->setIcon(aIcon); pButton->setFlat(true); +pButton->setFocusPolicy(Qt::NoFocus); pButton->setToolTip(toQString(VclResId(SV_HELPTEXT_CLOSEDOCUMENT))); mpQMenuBar->setCornerWidget(pButton, Qt::TopRightCorner); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Widget.cxx | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) New commits: commit 88158bb37d1e41fd192dc66db544daebc980df31 Author: Jan-Marek Glogowski AuthorDate: Fri May 3 21:18:34 2019 +0200 Commit: Michael Weghorn CommitDate: Fri May 24 03:12:19 2019 +0200 tdf#123957 Qt5 IM generate correct formating Actually really evaluate some of the formating provided by the QInputMethodEvent::TextFormat attribute and not blindly underline all of the text. This evaluates the same formating that the gtk3 backend evaluates from pango, so the result should be somehow on par. Couldn't find a way to test the red strike-out text. Don't know how often I typed hyoujunnsutairu to test this bug, which - according to Google - translates to "standard style". Reviewed-on: https://gerrit.libreoffice.org/71783 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit da3103365f9574307f70f3f2bae2a3dc461915c1) This includes 48e44b367a6fde947963de0d896e5d276a7f231e Change-Id: I4263df6dc1e0e5ce5d8cb0be681656ccd662a830 Reviewed-on: https://gerrit.libreoffice.org/71990 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 3bc310954cc8..62d02e58565d 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -448,6 +449,24 @@ Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f) setFocusPolicy(Qt::StrongFocus); } +static ExtTextInputAttr lcl_MapUndrelineStyle(QTextCharFormat::UnderlineStyle us) +{ +switch (us) +{ +case QTextCharFormat::NoUnderline: +return ExtTextInputAttr::NONE; +case QTextCharFormat::DotLine: +return ExtTextInputAttr::DottedUnderline; +case QTextCharFormat::DashDotDotLine: +case QTextCharFormat::DashDotLine: +return ExtTextInputAttr::DashDotUnderline; +case QTextCharFormat::WaveUnderline: +return ExtTextInputAttr::GrayWaveline; +default: +return ExtTextInputAttr::Underline; +} +} + void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent) { SolarMutexGuard aGuard; @@ -472,13 +491,32 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent) const sal_Int32 nLength = aInputEvent.maText.getLength(); const QList& rAttrList = pEvent->attributes(); -std::vector aTextAttrs(nLength, ExtTextInputAttr::Underline); +std::vector aTextAttrs(std::max(sal_Int32(1), nLength), + ExtTextInputAttr::NONE); +aInputEvent.mpTextAttr = [0]; for (int i = 0; i < rAttrList.size(); ++i) { const QInputMethodEvent::Attribute& rAttr = rAttrList.at(i); switch (rAttr.type) { +case QInputMethodEvent::TextFormat: +{ +QTextCharFormat aCharFormat += qvariant_cast(rAttr.value).toCharFormat(); +if (aCharFormat.isValid()) +{ +ExtTextInputAttr aETIP += lcl_MapUndrelineStyle(aCharFormat.underlineStyle()); +if (aCharFormat.hasProperty(QTextFormat::BackgroundBrush)) +aETIP |= ExtTextInputAttr::Highlight; +if (aCharFormat.fontStrikeOut()) +aETIP |= ExtTextInputAttr::RedText; +for (int j = rAttr.start; j < rAttr.start + rAttr.length; j++) +aTextAttrs[j] = aETIP; +} +break; +} case QInputMethodEvent::Cursor: { aInputEvent.mnCursorPos = rAttr.start; @@ -492,8 +530,6 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent) break; } } -if (nLength) -aInputEvent.mpTextAttr = [0]; m_pFrame->CallCallback(SalEvent::ExtTextInput, ); pEvent->accept(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Object.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 01b885420a227c2610f00cd5569212a507f48d27 Author: Katarina Behrens AuthorDate: Fri May 17 11:28:35 2019 +0200 Commit: Michael Weghorn CommitDate: Thu May 23 19:07:02 2019 +0200 tdf#124027: use ID of the embedded window after many trials and errors what LibO apparently expects here is the ID of QWindow parent of [embedded] system child window (the rest of the original commit bbe1ede0fada499fd49b60bdc7964e311b331454 is not relevant for LibO 6.2) Change-Id: Ie4c6d14a50959c0fdd04e745918d4889c9da45ec Reviewed-on: https://gerrit.libreoffice.org/72458 Tested-by: Jenkins Reviewed-by: Katarina Behrens Reviewed-on: https://gerrit.libreoffice.org/72769 Reviewed-by: Michael Weghorn Tested-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx index 3787bc715976..499cf190b4db 100644 --- a/vcl/qt5/Qt5Object.cxx +++ b/vcl/qt5/Qt5Object.cxx @@ -40,7 +40,7 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow) m_pQWidget->show(); m_aSystemData.nSize = sizeof(SystemEnvData); -m_aSystemData.aWindow = pParent->GetQWidget()->winId(); +m_aSystemData.aWindow = m_pQWindow->winId(); // ID of the embedded window m_aSystemData.aShellWindow = reinterpret_cast(this); //m_aSystemData.pSalFrame = this; //m_aSystemData.pWidget = m_pQWidget; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5FilePicker.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit e9280e673da66cc37a8908dd82698ff91f2fe4ec Author: Michael Weghorn AuthorDate: Wed Feb 6 17:45:56 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:44:05 2019 +0200 Qt5FilePicker::addCustomControl: Add missing from kde5 Take over functionality from 'KDE5FilePicker::addCustomControl' that has not been implemented in qt5 one yet. Change-Id: I9690e163b3b739bfec6813d9a4e1e0170b730187 Reviewed-on: https://gerrit.libreoffice.org/68056 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit c5947393cdd433a4a9d3e19ded1e9ca6ef384d74) Reviewed-on: https://gerrit.libreoffice.org/72653 diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index 9a0d6e820783..0d2025cec55b 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -624,9 +624,13 @@ void Qt5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_IMAGE_TEMPLATE: resId = STR_FPICKER_IMAGE_TEMPLATE; break; +case LISTBOX_IMAGE_ANCHOR: +resId = STR_FPICKER_IMAGE_ANCHOR; +break; case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: +case LISTBOX_IMAGE_ANCHOR_LABEL: case LISTBOX_FILTER_SELECTOR: break; } @@ -653,6 +657,7 @@ void Qt5FilePicker::addCustomControl(sal_Int16 controlId) break; case LISTBOX_VERSION: case LISTBOX_TEMPLATE: +case LISTBOX_IMAGE_ANCHOR: case LISTBOX_IMAGE_TEMPLATE: case LISTBOX_FILTER_SELECTOR: label = new QLabel(getResString(resId), m_pExtraControls); @@ -662,6 +667,7 @@ void Qt5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: +case LISTBOX_IMAGE_ANCHOR_LABEL: break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5 vcl/unx
vcl/qt5/Qt5FilePicker.cxx|8 --- vcl/unx/kde5/KDE5FilePicker.hxx |7 -- vcl/unx/kde5/KDE5FilePicker2.cxx | 40 --- 3 files changed, 5 insertions(+), 50 deletions(-) New commits: commit 7009d04b0015b0fe51db236f77d8cecd66d7dc27 Author: Michael Weghorn AuthorDate: Wed Feb 6 08:55:59 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:34:23 2019 +0200 kde5 fpicker: Drop 'getFiles' and 'getSelectedFiles' ... and related signals/slots. Those from the Qt5FilePicker base class do the same thing, except for one 'SolarMutexReleaser' that was commented out in 'KDE5FilePicker::getFiles' for no apparent reason since that line was added in commit 8fb0881a3e5b2. Take over the slightly nicer syntax for the range-based for loop from 'KDE5FilePicker::getSelectedFiles' to 'Qt5FilePicker::getSelectedFiles'. Change-Id: I419f933d256f3b85eccaea85803b4890770efa24 Reviewed-on: https://gerrit.libreoffice.org/68046 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit e180574ff8b6055fc962974042acb9b1ef27690e) Reviewed-on: https://gerrit.libreoffice.org/72643 Tested-by: Katarina Behrens diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index 5a0abc2b8d48..37790a7d0349 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -300,9 +300,11 @@ uno::Sequence SAL_CALL Qt5FilePicker::getSelectedFiles() } QList urls = m_pFileDialog->selectedUrls(); uno::Sequence seq(urls.size()); -int i = 0; -foreach (const QUrl& url, urls) -seq[i++] = toOUString(url.toString()); + +size_t i = 0; +for (const QUrl& aURL : urls) +seq[i++] = toOUString(aURL.toString()); + return seq; } diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 5ac896ee5d6c..8fac527b086e 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -81,7 +81,6 @@ public: // XFilePicker functions virtual OUString SAL_CALL getDisplayDirectory() override; -virtual css::uno::Sequence SAL_CALL getFiles() override; // XFilterManager functions virtual void SAL_CALL appendFilter(const OUString& rTitle, const OUString& rFilter) override; @@ -117,9 +116,6 @@ public: virtual sal_Bool SAL_CALL getShowState( ); */ -// XFilePicker2 functions -virtual css::uno::Sequence SAL_CALL getSelectedFiles() override; - // XInitialization virtual void SAL_CALL initialize(const css::uno::Sequence& rArguments) override; @@ -160,8 +156,6 @@ Q_SIGNALS: const css::uno::Sequence& rFilters); void setCurrentFilterSignal(const OUString& rFilter); OUString getCurrentFilterSignal(); -css::uno::Sequence getFilesSignal(); -css::uno::Sequence getSelectedFilesSignal(); private Q_SLOTS: OUString getDisplayDirectorySlot() { return implGetDirectory(); } @@ -201,7 +195,6 @@ private Q_SLOTS: void setCurrentFilterSlot(const OUString& rFilter) { return setCurrentFilter(rFilter); } OUString getCurrentFilterSlot() { return getCurrentFilter(); } -css::uno::Sequence getSelectedFilesSlot() { return getFiles(); } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 4a199ce3fd4a..d512cc94fe12 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -129,11 +129,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) Qt::BlockingQueuedConnection); connect(this, ::enableControlSignal, this, ::enableControlSlot, Qt::BlockingQueuedConnection); -// XFilePicker2 -connect(this, ::getSelectedFilesSignal, this, -::getSelectedFilesSlot, Qt::BlockingQueuedConnection); -connect(this, ::getFilesSignal, this, ::getFiles, -Qt::BlockingQueuedConnection); // used to set the custom controls qApp->installEventFilter(this); @@ -170,41 +165,6 @@ OUString SAL_CALL KDE5FilePicker::getDisplayDirectory() return implGetDirectory(); } -uno::Sequence SAL_CALL KDE5FilePicker::getFiles() -{ -if (qApp->thread() != QThread::currentThread()) -{ -//SolarMutexReleaser aReleaser; -return Q_EMIT getFilesSignal(); -} - -uno::Sequence seq = getSelectedFiles(); -if (seq.getLength() > 1) -seq.realloc(1); -return seq; -} - -// XFilePicker2 -uno::Sequence SAL_CALL KDE5FilePicker::getSelectedFiles() -{ -if (qApp->thread() != QThread::currentThread()) -{ -SolarMutexReleaser aReleaser; -return Q_EMIT getSelectedFilesSignal(); -} - -QList aURLs = m_pFileDialog->selectedUrls(); -uno::Sequence seq(aURLs.size()); - -size_t i = 0; -for (auto& aURL : aURLs) -{ -seq[i++] =
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Widget.cxx | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) New commits: commit 1b2aaed5e60e4e41f1d3475d6229d893d49bbeb7 Author: Jan-Marek Glogowski AuthorDate: Fri May 3 21:16:49 2019 +0200 Commit: Katarina Behrens CommitDate: Wed May 8 15:17:53 2019 +0200 tdf#123956 Qt5 IM update cursor position This sets the cursor position to the one provided by the QInputMethodEvent::Cursor attribute. Change-Id: I4a99f9939b53c69631e45d41102bf9c7f53f0ff5 Reviewed-on: https://gerrit.libreoffice.org/71782 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 110fd705ad3ae35144aaa6e5d8249b7e35f2825f) Reviewed-on: https://gerrit.libreoffice.org/71955 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 62fae3736247..3bc310954cc8 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -469,10 +469,32 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent) { aInputEvent.maText = toOUString(pEvent->preeditString()); aInputEvent.mnCursorPos = 0; -sal_Int32 nLength = aInputEvent.maText.getLength(); + +const sal_Int32 nLength = aInputEvent.maText.getLength(); +const QList& rAttrList = pEvent->attributes(); std::vector aTextAttrs(nLength, ExtTextInputAttr::Underline); + +for (int i = 0; i < rAttrList.size(); ++i) +{ +const QInputMethodEvent::Attribute& rAttr = rAttrList.at(i); +switch (rAttr.type) +{ +case QInputMethodEvent::Cursor: +{ +aInputEvent.mnCursorPos = rAttr.start; +if (rAttr.length == 0) +aInputEvent.mnCursorFlags |= EXTTEXTINPUT_CURSOR_INVISIBLE; +break; +} +default: +SAL_WARN("vcl.qt5", "Unhandled QInputMethodEvent attribute: " +<< static_cast(rAttr.type)); +break; +} +} if (nLength) aInputEvent.mpTextAttr = [0]; + m_pFrame->CallCallback(SalEvent::ExtTextInput, ); pEvent->accept(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |1 + vcl/qt5/Qt5Widget.cxx |1 - 2 files changed, 1 insertion(+), 1 deletion(-) New commits: commit 69582a4afcc2d8f0da602d319b5785609c0292ad Author: Katarina Behrens AuthorDate: Mon Apr 29 15:42:40 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Apr 30 23:44:25 2019 +0200 tdf#123859: only accept drops when drop target was registered some hard to reliably reproduce crashes when drag'n'dropping slides in slide sorter in Impress can be tracked down to null drop target. Not every SalFrame is registered as drop target, so let's accept drops (QWidget::setAcceptDrops) only for those frames that are. Change-Id: I01f006d619209c558e8d9976116daad65f51d7d9 Reviewed-on: https://gerrit.libreoffice.org/71533 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 6a67ecd9b12e68031b5dbacb591955b59f476b86) Reviewed-on: https://gerrit.libreoffice.org/71583 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index b1ad0f93d561..62d3808ba572 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -1100,6 +1100,7 @@ void Qt5Frame::registerDropTarget(Qt5DropTarget* pDropTarget) { assert(!m_pDropTarget); m_pDropTarget = pDropTarget; +m_pQWidget->setAcceptDrops(true); } void Qt5Frame::deregisterDropTarget(Qt5DropTarget const* pDropTarget) diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 8f7cb8756c25..62fae3736247 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -445,7 +445,6 @@ Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f) { create(); setMouseTracking(true); -setAcceptDrops(true); setFocusPolicy(Qt::StrongFocus); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5 vcl/unx
vcl/qt5/Qt5Graphics_GDI.cxx |4 ++-- vcl/qt5/Qt5Instance.cxx |2 ++ vcl/unx/kde5/KDE5SalGraphics.cxx |4 ++-- vcl/unx/kde5/KDE5SalInstance.cxx |2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) New commits: commit c3eeb421526f284419e90d2c4c4da5b0d7bbcc0e Author: Jan-Marek Glogowski AuthorDate: Fri Mar 29 02:58:59 2019 +0100 Commit: Thorsten Behrens CommitDate: Sat Mar 30 23:45:41 2019 +0100 tdf#124292 Qt5 / KDE5 disable Qt's HiDPI scaling LO does its own layouting and also all the scaling, so disable the automatic HiDPI scaling explicitly. Otherwise fonts will be rendered in LoDPI and just scaled as an image, if UI scaling is enabled in KDE, resulting in really blocky / ugly fonts. Change-Id: I38503ce27c1671e80d0749d21c6c6dcff1a808a6 Reviewed-on: https://gerrit.libreoffice.org/69941 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit b4698a2241ec26d796c66da3a814f7cc693785b6) Reviewed-on: https://gerrit.libreoffice.org/69984 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index 90baba36d3f0..851d222f0ab7 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -643,8 +643,8 @@ void Qt5Graphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) return; QScreen* pScreen = m_pFrame->GetQWidget()->window()->windowHandle()->screen(); -rDPIX = pScreen->logicalDotsPerInchX(); -rDPIY = pScreen->logicalDotsPerInchY(); +rDPIX = pScreen->logicalDotsPerInchX() * pScreen->devicePixelRatio() + 0.5; +rDPIY = pScreen->logicalDotsPerInchY() * pScreen->devicePixelRatio() + 0.5; } sal_uInt16 Qt5Graphics::GetBitCount() const { return getFormatBits(m_pQImage->format()); } diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index adbe70bfb296..8de9fc7f5712 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -336,6 +336,8 @@ VCLPLUG_QT5_PUBLIC SalInstance* create_SalInstance() unsetenv("SESSION_MANAGER"); } +QApplication::setAttribute(Qt::AA_DisableHighDpiScaling); + int* pFakeArgc = new int; *pFakeArgc = nFakeArgc; pQApplication = new QApplication(*pFakeArgc, pFakeArgv); diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx index 290127d0526e..0b4b4283f0da 100644 --- a/vcl/unx/kde5/KDE5SalGraphics.cxx +++ b/vcl/unx/kde5/KDE5SalGraphics.cxx @@ -78,8 +78,8 @@ void KDE5SalGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) return; QScreen* pScreen = m_pFrame->GetQWidget()->window()->windowHandle()->screen(); -rDPIX = pScreen->logicalDotsPerInchX(); -rDPIY = pScreen->logicalDotsPerInchY(); +rDPIX = pScreen->logicalDotsPerInchX() * pScreen->devicePixelRatio() + 0.5; +rDPIY = pScreen->logicalDotsPerInchY() * pScreen->devicePixelRatio() + 0.5; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx index 401afbcfa2dd..32998cdb36e3 100644 --- a/vcl/unx/kde5/KDE5SalInstance.cxx +++ b/vcl/unx/kde5/KDE5SalInstance.cxx @@ -144,6 +144,8 @@ VCLPLUG_KDE5_PUBLIC SalInstance* create_SalInstance() unsetenv("SESSION_MANAGER"); } +QApplication::setAttribute(Qt::AA_DisableHighDpiScaling); + int* pFakeArgc = new int; *pFakeArgc = nFakeArgc; pQApplication = new QApplication(*pFakeArgc, pFakeArgv); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit d7e335018979e4c6d56f5f6ef152fcef1dd5ad9b Author: Katarina Behrens AuthorDate: Thu Mar 14 22:35:38 2019 +0100 Commit: Thorsten Behrens CommitDate: Tue Mar 19 00:01:06 2019 +0100 tdf#119718: give focus where focus is due shamelessly copied X11SalFrame behaviour with different ToTopFlags: focus central widget with GrabFocus and GrabFocusOnly, activate window when coming back from minimized (RestoreWhenMin) or coming back to foreground (ForegroundTask) Change-Id: I4d43a00f0a9034e661303c39a1b522def85ab6f5 Reviewed-on: https://gerrit.libreoffice.org/69285 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 39396a2e4362608c792cf3bdde447b66c75d64d6) Reviewed-on: https://gerrit.libreoffice.org/69402 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 334466770fd1..57a2cb219b52 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -640,8 +640,10 @@ void Qt5Frame::ToTop(SalFrameToTop nFlags) if (isWindow() && !(nFlags & SalFrameToTop::GrabFocusOnly)) pWidget->raise(); -pWidget->setFocus(); -pWidget->activateWindow(); +if ((nFlags & SalFrameToTop::RestoreWhenMin) || (nFlags & SalFrameToTop::ForegroundTask)) +pWidget->activateWindow(); +else if ((nFlags & SalFrameToTop::GrabFocus) || (nFlags & SalFrameToTop::GrabFocusOnly)) +m_pQWidget->setFocus(); } void Qt5Frame::SetPointer(PointerStyle ePointerStyle) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 1ffbe6da60391bcf71c579d4da9543f0b769bfc8 Author: Michael Weghorn AuthorDate: Wed Feb 27 16:13:48 2019 +0100 Commit: Michael Weghorn CommitDate: Wed Mar 13 00:09:22 2019 +0100 tdf#104235: Qt5Frame: Set default icon Set a default icon in Qt5Frame constructor, similar to how it's done for the gtk and gtk3 VCL plugins in 'GtkSalFrame::InitCommon'. Change-Id: I4e4e62ffa0eca6499f4752ff467d004cae68788f Reviewed-on: https://gerrit.libreoffice.org/68450 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit cfb2e03a683a8d217b00b8abfd9c55bf61059462) Reviewed-on: https://gerrit.libreoffice.org/69123 diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 27f331ce2f05..1ecf9cfa9986 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -161,6 +161,8 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) //m_aSystemData.pWidget = m_pQWidget; //m_aSystemData.nScreen = m_nXScreen.getXScreen(); m_aSystemData.pToolkit = "qt5"; + +SetIcon(SV_ICON_ID_OFFICE); } Qt5Frame::~Qt5Frame() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit cda7159937be6f88eeb5826dcbdc72d64788779c Author: Katarina Behrens AuthorDate: Tue Feb 12 16:03:00 2019 +0100 Commit: Xisco Faulí CommitDate: Tue Mar 12 21:46:13 2019 +0100 tdf#120786: show undocked toolbar only when it's ready in SetAlwaysOnTop set window flags only, don't show the widget yet (it'll be shown later, when it can be painted in full) Change-Id: I5e855f1ebba1eb9985744ece055a0f141e965940 Reviewed-on: https://gerrit.libreoffice.org/67739 Reviewed-by: Katarina Behrens Tested-by: Katarina Behrens (cherry picked from commit ad6d9bce1126997750d3c3c2606d28164d63d1d8) Reviewed-on: https://gerrit.libreoffice.org/69124 Reviewed-by: Xisco Faulí Tested-by: Xisco Faulí diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 3537c1b286ba..acf7c6da7266 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -613,7 +613,6 @@ void Qt5Frame::SetAlwaysOnTop(bool bOnTop) pWidget->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint); else pWidget->setWindowFlags(flags & ~(Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint)); -pWidget->show(); } void Qt5Frame::ToTop(SalFrameToTop nFlags) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 42dd1f0ad75b5509ce2e1dbaec9944b0876603db Author: Katarina Behrens AuthorDate: Wed Feb 13 12:24:38 2019 +0100 Commit: Michael Weghorn CommitDate: Tue Mar 12 21:12:52 2019 +0100 tdf#120787: fine-tune window flags w/ focus on floating toolbars Floating toolbars are tool windows (Qt::Tool, not Qt::Window which has a separate taskbar entry). They are frameles (Qt::FramelessWindowHint) bc LibO takes care of drawing window decorations itself. They also must be able to receive keyboard focus (remove Qt::WindowDoesNotAcceptFocus) Change-Id: I61e8a905fdc4fde1a64df5a0824d358036cfcdea Reviewed-on: https://gerrit.libreoffice.org/67768 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit dc32f930ede9df0d7c98fdef2d5bd787139dc7cf) Reviewed-on: https://gerrit.libreoffice.org/69096 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 841350f95704..3537c1b286ba 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -93,6 +93,11 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) { if (nStyle & SalFrameStyleFlags::INTRO) aWinFlags |= Qt::SplashScreen; +// floating toolbars are frameless tool windows +// + they must be able to receive keyboard focus +else if ((nStyle & SalFrameStyleFlags::FLOAT) + && (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)) +aWinFlags |= Qt::Tool | Qt::FramelessWindowHint; else if (nStyle & (SalFrameStyleFlags::FLOAT | SalFrameStyleFlags::TOOLTIP)) aWinFlags |= Qt::ToolTip; else if ((nStyle & SalFrameStyleFlags::FLOAT) @@ -102,8 +107,6 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) aWinFlags |= Qt::Dialog; else if (nStyle & SalFrameStyleFlags::TOOLWINDOW) aWinFlags |= Qt::Tool; -else if (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) -aWinFlags |= Qt::Window | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus; else aWinFlags |= Qt::Window; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Menu.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 8b0a9db87d776dbdb2cbbd1fd79ede13e2504321 Author: Aleksei Nikiforov AuthorDate: Mon Feb 25 18:06:11 2019 +0300 Commit: Michael Weghorn CommitDate: Wed Feb 27 22:17:24 2019 +0100 tdf#120824 KDE5: fix visible/enabled state for menu Change-Id: I003703f0bc2e1697124e068a68bfb2e24c33cd1a Reviewed-on: https://gerrit.libreoffice.org/68351 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit ea6b4b743d397f40029291954af6d37d9059042b) Reviewed-on: https://gerrit.libreoffice.org/68412 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 8fee56a9cf70..049d90b7b4da 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -157,15 +157,19 @@ QMenu* Qt5Menu::InsertMenuItem(Qt5MenuItem* pSalMenuItem, unsigned nPos) pAction->setChecked(bChecked); } -pAction->setEnabled(pSalMenuItem->mbEnabled); -pAction->setVisible(pSalMenuItem->mbVisible); - connect(pAction, ::triggered, this, [pSalMenuItem] { slotMenuTriggered(pSalMenuItem); }); } } } +QAction* pAction = pSalMenuItem->getAction(); +if (pAction) +{ +pAction->setEnabled(pSalMenuItem->mbEnabled); +pAction->setVisible(pSalMenuItem->mbVisible); +} + return pQMenu; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) New commits: commit ccb2ab39935892230e04f536596a0b49a3529f5a Author: Aleksei Nikiforov AuthorDate: Mon Feb 25 11:48:07 2019 +0300 Commit: Michael Weghorn CommitDate: Wed Feb 27 21:12:22 2019 +0100 tdf#119720 KDE5: Don't show hidden windows on modality change This change fixes clipping and drawing issues for document recovery window and other modal windows. Change-Id: I005254d4cd2598f4f2d02ba7e7bbf7388affe36c Reviewed-on: https://gerrit.libreoffice.org/68307 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 5e8276e665490d961c333f788469a5ecdb996d16) Reviewed-on: https://gerrit.libreoffice.org/68413 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 6d96f7926c0f..841350f95704 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -482,13 +482,21 @@ void Qt5Frame::SetModal(bool bModal) { if (isWindow()) { -if (m_pTopLevel) -m_pTopLevel->setVisible(true); +bool wasVisible = windowHandle()->isVisible(); + // modality change is only effective if the window is hidden -windowHandle()->hide(); +if (wasVisible) +{ +windowHandle()->hide(); +} + windowHandle()->setModality(bModal ? Qt::WindowModal : Qt::NonModal); -// and shown again -windowHandle()->show(); + +// and shown again if it was visible +if (wasVisible) +{ +windowHandle()->show(); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) New commits: commit f184af314ec43fbac5bb22cd3ebc09ccdf865a7c Author: Aleksei Nikiforov AuthorDate: Thu Feb 21 10:24:39 2019 +0300 Commit: Thorsten Behrens CommitDate: Sat Feb 23 10:09:23 2019 +0100 tdf#122256 KDE5: Make menubar work for windows with parents Change-Id: I325faec8594e1c5b8b2c34a135f1604244e4826c Reviewed-on: https://gerrit.libreoffice.org/68140 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 8777fc78ce7913b774d1c6ef660c7668c6c7b526) Reviewed-on: https://gerrit.libreoffice.org/68221 diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 55e0eea76ff7..6d96f7926c0f 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -108,9 +108,16 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) aWinFlags |= Qt::Window; } -if (!pParent && (aWinFlags == Qt::Window)) +if (aWinFlags == Qt::Window) { -m_pTopLevel = new Qt5MainWindow(*this, nullptr, aWinFlags); +QWidget* pParentWidget = nullptr; +if (m_pParent) +{ +pParentWidget += (m_pParent->m_pTopLevel) ? m_pParent->m_pTopLevel : m_pParent->m_pQWidget; +} + +m_pTopLevel = new Qt5MainWindow(*this, pParentWidget, aWinFlags); m_pQWidget = new Qt5Widget(*this, aWinFlags); m_pTopLevel->setCentralWidget(m_pQWidget); } @@ -124,8 +131,9 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) if (pParent && !(pParent->m_nStyle & SalFrameStyleFlags::PLUG)) { QWindow* pParentWindow = pParent->GetQWidget()->window()->windowHandle(); -QWindow* pChildWindow = m_pQWidget->window()->windowHandle(); -if (pParentWindow != pChildWindow) +QWindow* pChildWindow = (m_pTopLevel ? m_pTopLevel->window()->windowHandle() + : m_pQWidget->window()->windowHandle()); +if (pParentWindow && pChildWindow && (pParentWindow != pChildWindow)) pChildWindow->setTransientParent(pParentWindow); } @@ -366,8 +374,9 @@ void Qt5Frame::Center() if (m_pParent) { QWidget* pWindow = m_pParent->GetQWidget()->window(); -m_pQWidget->move(pWindow->frameGeometry().topLeft() + pWindow->rect().center() - - m_pQWidget->rect().center()); +QWidget* const pWidget = (m_pTopLevel) ? m_pTopLevel : m_pQWidget; +pWidget->move(pWindow->frameGeometry().topLeft() + pWindow->rect().center() + - pWidget->rect().center()); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Widget.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit a02d1c9705bfd8cb0b03342bb717c8bbe3723461 Author: Michael Weghorn AuthorDate: Fri Feb 15 20:41:07 2019 +0100 Commit: Thorsten Behrens CommitDate: Mon Feb 18 09:36:18 2019 +0100 tdf#123451 qt5: Detect decimal separator on keypad 'QtKeyEvent::key()' doesn't return a special value for the decimal separator key on the keypad ("," or "."), but just returns 'Qt::Key_Comma' or 'Qt::Key_Period'. However, the 'Qt::KeypadModifier' modifier is set in this case, so check for this one in addition and return 'KEY_DECIMAL' if those are combined. Change-Id: Ia80826e2ad5e47a1f49bef450168523d766c1d6a Reviewed-on: https://gerrit.libreoffice.org/67886 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 5ad289b558c11fcef3dada51b873b5f48b9a2cab) Reviewed-on: https://gerrit.libreoffice.org/67888 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 394bcc1029e4..6d44262b38e8 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -237,7 +237,7 @@ void Qt5Widget::closeEvent(QCloseEvent* /*pEvent*/) m_pFrame->CallCallback(SalEvent::Close, nullptr); } -static sal_uInt16 GetKeyCode(int keyval) +static sal_uInt16 GetKeyCode(int keyval, Qt::KeyboardModifiers modifiers) { sal_uInt16 nCode = 0; if (keyval >= Qt::Key_0 && keyval <= Qt::Key_9) @@ -246,6 +246,11 @@ static sal_uInt16 GetKeyCode(int keyval) nCode = KEY_A + (keyval - Qt::Key_A); else if (keyval >= Qt::Key_F1 && keyval <= Qt::Key_F26) nCode = KEY_F1 + (keyval - Qt::Key_F1); +else if (modifiers.testFlag(Qt::KeypadModifier) + && (keyval == Qt::Key_Period || keyval == Qt::Key_Comma)) +// Qt doesn't use a special keyval for decimal separator ("," or ".") +// on numerical keypad, but sets Qt::KeypadModifier in addition +nCode = KEY_DECIMAL; else { switch (keyval) @@ -384,7 +389,7 @@ bool Qt5Widget::handleKeyEvent(QKeyEvent* pEvent, bool bDown) aEvent.mnCharCode = (pEvent->text().isEmpty() ? 0 : pEvent->text().at(0).unicode()); aEvent.mnRepeat = 0; -aEvent.mnCode = GetKeyCode(pEvent->key()); +aEvent.mnCode = GetKeyCode(pEvent->key(), pEvent->modifiers()); aEvent.mnCode |= GetKeyModCode(pEvent->modifiers()); bool bStopProcessingKey; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5 vcl/unx
vcl/qt5/Qt5Graphics_GDI.cxx |4 ++-- vcl/unx/kde5/KDE5SalFrame.cxx|2 +- vcl/unx/kde5/KDE5SalGraphics.cxx | 25 - vcl/unx/kde5/KDE5SalGraphics.hxx |7 ++- 4 files changed, 33 insertions(+), 5 deletions(-) New commits: commit f93f0d0d85299b6f27aece0c93d045f3f4613cb1 Author: Jan-Marek Glogowski AuthorDate: Thu Jan 17 14:01:51 2019 + Commit: Thorsten Behrens CommitDate: Wed Feb 6 16:32:17 2019 +0100 Qt5/KDE5 use logicalDotsPerInch to report DPI It looks like all other backend don't use the physical, but the logical DPI to report the resolution. So use the QScreens logical resolution when reporting the DPI values. Also use QScreen for KDE5, as the Svp defaults to 96. This might fix tdf#122131, but since I can't reproduce... Change-Id: Iefc75acf26f8664f2a9ad995edbdc749be2228cf Reviewed-on: https://gerrit.libreoffice.org/66525 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit b0b089e8f7a6df793761bdec6ee9d98b1bf12a5a) Reviewed-on: https://gerrit.libreoffice.org/67410 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index 156c487ad57d..90baba36d3f0 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -643,8 +643,8 @@ void Qt5Graphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) return; QScreen* pScreen = m_pFrame->GetQWidget()->window()->windowHandle()->screen(); -rDPIX = pScreen->physicalDotsPerInchX(); -rDPIY = pScreen->physicalDotsPerInchY(); +rDPIX = pScreen->logicalDotsPerInchX(); +rDPIY = pScreen->logicalDotsPerInchY(); } sal_uInt16 Qt5Graphics::GetBitCount() const { return getFormatBits(m_pQImage->format()); } diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx index c4b72f3afa89..d3a13968237f 100644 --- a/vcl/unx/kde5/KDE5SalFrame.cxx +++ b/vcl/unx/kde5/KDE5SalFrame.cxx @@ -210,7 +210,7 @@ SalGraphics* KDE5SalFrame::AcquireGraphics() if (!m_pKDE5Graphics.get()) { -m_pKDE5Graphics.reset(new KDE5SalGraphics()); +m_pKDE5Graphics.reset(new KDE5SalGraphics(this)); Qt5Frame::InitSvpSalGraphics(m_pKDE5Graphics.get()); } diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx index 583edf6e8e6c..290127d0526e 100644 --- a/vcl/unx/kde5/KDE5SalGraphics.cxx +++ b/vcl/unx/kde5/KDE5SalGraphics.cxx @@ -21,7 +21,11 @@ #include +#include +#include + #include +#include static void QImage2BitmapBuffer(QImage* pImg, BitmapBuffer* pBuf) { @@ -35,8 +39,9 @@ static void QImage2BitmapBuffer(QImage* pImg, BitmapBuffer* pBuf) } } -KDE5SalGraphics::KDE5SalGraphics() +KDE5SalGraphics::KDE5SalGraphics(Qt5Frame* pFrame) : SvpSalGraphics() +, m_pFrame(pFrame) { } @@ -59,4 +64,22 @@ bool KDE5SalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, return bHandled; } +void KDE5SalGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) +{ +char* pForceDpi; +if ((pForceDpi = getenv("SAL_FORCEDPI"))) +{ +OString sForceDPI(pForceDpi); +rDPIX = rDPIY = sForceDPI.toInt32(); +return; +} + +if (!m_pFrame || !m_pFrame->GetQWidget()->window()->windowHandle()) +return; + +QScreen* pScreen = m_pFrame->GetQWidget()->window()->windowHandle()->screen(); +rDPIX = pScreen->logicalDotsPerInchX(); +rDPIY = pScreen->logicalDotsPerInchY(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde5/KDE5SalGraphics.hxx b/vcl/unx/kde5/KDE5SalGraphics.hxx index d5b01542e877..109a0fa8ac29 100644 --- a/vcl/unx/kde5/KDE5SalGraphics.hxx +++ b/vcl/unx/kde5/KDE5SalGraphics.hxx @@ -29,13 +29,15 @@ #include #include +class Qt5Frame; + /** * Handles native graphics requests and performs the needed drawing operations. */ class KDE5SalGraphics : public SvpSalGraphics { public: -KDE5SalGraphics(); +KDE5SalGraphics(Qt5Frame* pFrame); virtual bool IsNativeControlSupported(ControlType, ControlPart) override; virtual bool hitTestNativeControl(ControlType, ControlPart, const tools::Rectangle&, @@ -48,8 +50,11 @@ public: ControlState, const ImplControlValue&, const OUString&, tools::Rectangle&, tools::Rectangle&) override; +virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override; + private: Qt5Graphics_Controls m_aControl; +Qt5Frame* m_pFrame; }; inline bool KDE5SalGraphics::IsNativeControlSupported(ControlType nType, ControlPart nPart) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5DragAndDrop.cxx | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) New commits: commit 98b7cf194f012d06f569259c9379ac71f6cd565a Author: Katarina Behrens AuthorDate: Sat Feb 2 10:07:21 2019 +0100 Commit: Thorsten Behrens CommitDate: Wed Feb 6 16:26:52 2019 +0100 tdf#120772: DnD of multiple URLs from file manager -> LibO Change-Id: I8d6fc446eff46fd6ab1152a3af836df891dde52a Reviewed-on: https://gerrit.libreoffice.org/67277 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit b8ac898eb0e1ce9f068e5b4e0c4b04a729a394cb) Reviewed-on: https://gerrit.libreoffice.org/67442 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx index 9352eea1cc47..fcd65fe39049 100644 --- a/vcl/qt5/Qt5DragAndDrop.cxx +++ b/vcl/qt5/Qt5DragAndDrop.cxx @@ -44,9 +44,18 @@ css::uno::Any Qt5DnDTransferable::getTransferData(const css::datatransfer::DataF if (urlList.size() > 0) { -//FIXME: multiple URLs, here we take only 1st one -QString url = urlList.at(0).path(); -std::string aStr = url.toStdString(); +std::string aStr; + +// transfer data is list of URLs +for (int i = 0; i < urlList.size(); ++i) +{ +QString url = urlList.at(i).path(); +aStr += url.toStdString(); +// separated by newline if more than 1 +if (i < urlList.size() - 1) +aStr += "\n"; +} + Sequence aSeq(reinterpret_cast(aStr.c_str()), aStr.length()); aAny <<= aSeq; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5FilePicker.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 02af5f92e9938c6370fbcaa40f399234d128be54 Author: Michael Weghorn AuthorDate: Tue Feb 5 08:40:33 2019 +0100 Commit: Katarina Behrens CommitDate: Tue Feb 5 13:36:19 2019 +0100 qt5 fpicker: Fix initial directory selection This takes over the fix from the KDE5FilePicker from commit 1af4ab72e2488515fcaedeb4a377ee070d68a495 for the qt5 one. Change-Id: Ibe34ecff9913fc91df2b9bd25b559375bab0ff83 Reviewed-on: https://gerrit.libreoffice.org/67385 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 7029597034363c301727a3d16bd394c27a379796) Reviewed-on: https://gerrit.libreoffice.org/67393 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index ffd482ded5d0..7817f4de0488 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -249,7 +249,9 @@ void SAL_CALL Qt5FilePicker::setDisplayDirectory(const OUString& dir) SolarMutexReleaser aReleaser; return Q_EMIT setDisplayDirectorySignal(dir); } -m_pFileDialog->setDirectory(toQString(dir)); + +QString qDir(toQString(dir)); +m_pFileDialog->setDirectoryUrl(QUrl(qDir)); } OUString SAL_CALL Qt5FilePicker::getDisplayDirectory() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Clipboard.cxx | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) New commits: commit 2b77e50cfe6fa06b7f7193d0a170553bdab63718 Author: Katarina Behrens AuthorDate: Wed Dec 12 10:03:49 2018 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 4 17:22:56 2019 +0100 Related tdf#120625: improve querying supported data flavours Change-Id: Ia46b136f64c2750ed466d86967de9dfe90b4ce65 Reviewed-on: https://gerrit.libreoffice.org/65003 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 3fa4674615b747e219afe5bf0a9b689df3840439) Reviewed-on: https://gerrit.libreoffice.org/67363 Reviewed-by: Samuel Mehrbrodt diff --git a/vcl/qt5/Qt5Clipboard.cxx b/vcl/qt5/Qt5Clipboard.cxx index 7a794cfd46e5..7407e2b062b0 100644 --- a/vcl/qt5/Qt5Clipboard.cxx +++ b/vcl/qt5/Qt5Clipboard.cxx @@ -76,25 +76,27 @@ std::vector Qt5Transferable::getTransferDataFlavo const QMimeData* mimeData = clipboard->mimeData(m_aClipboardMode); css::datatransfer::DataFlavor aFlavor; -if (mimeData->hasHtml()) -{ -aFlavor.MimeType = "text/html"; -aFlavor.DataType = cppu::UnoType>::get(); -aVector.push_back(aFlavor); -} - -if (mimeData->hasText()) +if (mimeData) { -aFlavor.MimeType = "text/plain;charset=utf-16"; -aFlavor.DataType = cppu::UnoType::get(); -aVector.push_back(aFlavor); -} +for (QString& rMimeType : mimeData->formats()) +{ +// filter out non-MIME types such as TARGETS, MULTIPLE, TIMESTAMP +if (rMimeType.indexOf('/') == -1) +continue; -if (mimeData->hasImage()) -{ -aFlavor.MimeType = "image/png"; -aFlavor.DataType = cppu::UnoType>::get(); -aVector.push_back(aFlavor); +if (rMimeType.startsWith("text/plain")) +{ +aFlavor.MimeType = "text/plain;charset=utf-16"; +aFlavor.DataType = cppu::UnoType::get(); +aVector.push_back(aFlavor); +} +else +{ +aFlavor.MimeType = toOUString(rMimeType); +aFlavor.DataType = cppu::UnoType>::get(); +aVector.push_back(aFlavor); +} +} } return aVector; @@ -106,11 +108,13 @@ css::uno::Sequence SAL_CALL Qt5Transferable::getT } sal_Bool SAL_CALL -Qt5Transferable::isDataFlavorSupported(const css::datatransfer::DataFlavor& /*rFlavor*/) +Qt5Transferable::isDataFlavorSupported(const css::datatransfer::DataFlavor& rFlavor) { const std::vector aAll = getTransferDataFlavorsAsVector(); -return !aAll.empty(); //FIXME +return std::any_of(aAll.begin(), aAll.end(), [&](const css::datatransfer::DataFlavor& aFlavor) { +return rFlavor.MimeType == aFlavor.MimeType; +}); //FIXME } /* ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Clipboard.cxx | 111 +-- 1 file changed, 70 insertions(+), 41 deletions(-) New commits: commit b0b203b5d09054250a257c052d7c7870eb1c4ffe Author: Aleksei Nikiforov AuthorDate: Thu Jan 17 15:31:51 2019 +0300 Commit: Thorsten Behrens CommitDate: Mon Feb 4 14:35:55 2019 +0100 tdf#120836 KDE5: allow adding multiple mime types to clipboard Also correct processing "text/html" and "image/png" mime types to fix slow select in Calc: if both "text/html" and "image/png" mime types were present, "image/png" data was requested, but it was processed as if it was "text/html" data. Change-Id: Ie192fff06cd9de28f466547dac32343620fe2730 Reviewed-on: https://gerrit.libreoffice.org/66576 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 7e01a02b12a9ea3a39b5a627f3b26d94bc1ad921) Reviewed-on: https://gerrit.libreoffice.org/67362 Tested-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Clipboard.cxx b/vcl/qt5/Qt5Clipboard.cxx index 6ed8b1086e4a..a9134506896f 100644 --- a/vcl/qt5/Qt5Clipboard.cxx +++ b/vcl/qt5/Qt5Clipboard.cxx @@ -184,63 +184,92 @@ void VclQt5Clipboard::setContents( bool bHasHtml = false, bHasImage = false; lcl_peekFormats(aFormats, bHasHtml, bHasImage); -css::datatransfer::DataFlavor aFlavor; -QClipboard* clipboard = QApplication::clipboard(); +std::unique_ptr pMimeData(new QMimeData); -if (bHasImage) -{ -//FIXME: other image formats? -aFlavor.MimeType = "image/png"; -aFlavor.DataType = cppu::UnoType::get(); -} -else if (bHasHtml) +// Add html data if present +if (bHasHtml) { +css::datatransfer::DataFlavor aFlavor; aFlavor.MimeType = "text/html"; -aFlavor.DataType = cppu::UnoType::get(); -} -else -{ -aFlavor.MimeType = "text/plain;charset=utf-16"; -aFlavor.DataType = cppu::UnoType::get(); -} +aFlavor.DataType = cppu::UnoType>::get(); -Any aValue; -try -{ -aValue = xTrans->getTransferData(aFlavor); -} -catch (...) -{ -} - -if (aValue.getValueTypeClass() == TypeClass_STRING) -{ -OUString aString; -aValue >>= aString; -clipboard->setText(toQString(aString)); -} -else if (aValue.getValueType() == cppu::UnoType>::get()) -{ -Sequence aData; -aValue >>= aData; +Any aValue; +try +{ +aValue = xTrans->getTransferData(aFlavor); +} +catch (...) +{ +} -if (bHasHtml) +if (aValue.getValueType() == cppu::UnoType>::get()) { +Sequence aData; +aValue >>= aData; + OUString aHtmlAsString(reinterpret_cast(aData.getConstArray()), aData.getLength(), RTL_TEXTENCODING_UTF8); -QMimeData* mimeData = new QMimeData; -mimeData->setHtml(toQString(aHtmlAsString)); -clipboard->setMimeData(mimeData); +pMimeData->setHtml(toQString(aHtmlAsString)); } -else if (bHasImage) +} + +// Add image data if present +if (bHasImage) +{ +css::datatransfer::DataFlavor aFlavor; +//FIXME: other image formats? +aFlavor.MimeType = "image/png"; +aFlavor.DataType = cppu::UnoType>::get(); + +Any aValue; +try { +aValue = xTrans->getTransferData(aFlavor); +} +catch (...) +{ +} + +if (aValue.getValueType() == cppu::UnoType>::get()) +{ +Sequence aData; +aValue >>= aData; + QImage image; image.loadFromData(reinterpret_cast(aData.getConstArray()), aData.getLength()); -clipboard->setImage(image); + +pMimeData->setImageData(image); +} +} + +// Add text data +// TODO: consider checking if text of suitable type is present +{ +css::datatransfer::DataFlavor aFlavor; +aFlavor.MimeType = "text/plain;charset=utf-16"; +aFlavor.DataType = cppu::UnoType::get(); + +Any aValue; +try +{ +aValue = xTrans->getTransferData(aFlavor); +} +catch (...) +{ +} + +if (aValue.getValueTypeClass() == TypeClass_STRING) +{ +OUString aString; +aValue >>= aString; +
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5AccessibleWidget.cxx | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) New commits: commit 32e1e206694b5dbbf47e2c2310117314714305fc Author: Katarina Behrens AuthorDate: Sun Dec 30 16:41:07 2018 + Commit: Katarina Behrens CommitDate: Wed Jan 23 13:08:29 2019 +0100 tdf#122056: catch DisposedException to avoid crash w/ screen reader The repro scenario is closing a slideshow with screen reader on. Some object are already disposed by the time [full-screen] win with presentation closes Change-Id: I7e2ae7a5b694daaf7355ef93d87a998c9f2e345a Reviewed-on: https://gerrit.libreoffice.org/65931 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit d804d22c229a9a08bd50c348a0e933b0138385bf) Reviewed-on: https://gerrit.libreoffice.org/66748 diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index c2c1fdc2b7f8..efafab17f3cf 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -662,8 +663,18 @@ QAccessibleInterface* Qt5AccessibleWidget::childAt(int x, int y) const { if (!m_xAccessible.is()) return nullptr; -Reference xAccessibleComponent(m_xAccessible->getAccessibleContext(), - UNO_QUERY); + +Reference xAc; +try +{ +xAc = m_xAccessible->getAccessibleContext(); +} +catch (css::lang::DisposedException /*ex*/) +{ +return nullptr; +} + +Reference xAccessibleComponent(xAc, UNO_QUERY); return QAccessible::queryAccessibleInterface( new Qt5XAccessible(xAccessibleComponent->getAccessibleAtPoint(awt::Point(x, y; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Menu.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 82c1ff5177a0d182702151fba9c4256939c1322e Author: Katarina Behrens AuthorDate: Thu Dec 27 17:27:54 2018 +0100 Commit: Thorsten Behrens CommitDate: Wed Jan 23 01:29:24 2019 +0100 tdf#120877: make menu items checkable as needed Change-Id: I5a07526aa5187313977d6f7c244541be83b5edbc Reviewed-on: https://gerrit.libreoffice.org/65930 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 4de638c14c0a74e29e213fd53cd01cad93285aa4) Reviewed-on: https://gerrit.libreoffice.org/66747 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 6aa201f7ad30..9aaea199eeae 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -277,7 +277,10 @@ void Qt5Menu::CheckItem(unsigned nPos, bool bChecked) Qt5MenuItem* pSalMenuItem = GetItemAtPos(nPos); QAction* pAction = pSalMenuItem->getAction(); if (pAction) +{ +pAction->setCheckable(true); pAction->setChecked(bChecked); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Widget.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 7ca6bd053869a84d18bcce2b3f08a27a6ad785d9 Author: Jan-Marek Glogowski AuthorDate: Fri Jan 4 15:40:06 2019 +0100 Commit: Michael Weghorn CommitDate: Fri Jan 4 20:26:56 2019 +0100 tdf#122459 Qt5 IM underline pre-edit This simply always underlines the pre-edit text, so it'S easier to see what text block is currently IM edited. Change-Id: I45145e4faa872c44eb6583ac6f335dd40fe3e53e Reviewed-on: https://gerrit.libreoffice.org/65856 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit f2ee532640fa200ada55ac51fbe47bad260aec7e) Reviewed-on: https://gerrit.libreoffice.org/65858 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 462f19675905..4eaac1629b53 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -41,6 +41,7 @@ #include #include +#include void Qt5Widget::paintEvent(QPaintEvent* pEvent) { @@ -449,6 +450,10 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent) { aInputEvent.maText = toOUString(pEvent->preeditString()); aInputEvent.mnCursorPos = 0; +sal_Int32 nLength = aInputEvent.maText.getLength(); +std::vector aTextAttrs(nLength, ExtTextInputAttr::Underline); +if (nLength) +aInputEvent.mpTextAttr = [0]; m_pFrame->CallCallback(SalEvent::ExtTextInput, ); pEvent->accept(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5 vcl/unx
vcl/qt5/Qt5Frame.cxx |6 -- vcl/unx/kde4/KDESalFrame.cxx |6 -- 2 files changed, 12 deletions(-) New commits: commit 2b6ba5e47671358cbe44ba68000e13db22bd36db Author: Jan-Marek Glogowski AuthorDate: Wed Dec 12 12:57:10 2018 +0100 Commit: Michael Weghorn CommitDate: Fri Jan 4 20:26:24 2019 +0100 Qt5+kde4 don't override generic VCL style settings In commit 3911bf8364da ("tdf#98253 Qt5 rely on VCL for SetDeactiveColor") the named was dropped from the Qt5 styling. This results in SetDeactiveColor now being controlled by LO, but SetActiveColor by the Qt theming. But IMHO both need to be managed together in some way, as the deactive color is normally some variant of active with a lower opacity. Also no other backends except Windows and headless even overide the four general colors Set(De|A)ctive(Text)?Color and Windows is setting them from the window decorations (CAPTION)?! So let's get rid of all these settings for Qt5 and kde4. Change-Id: Id9497dc067e4718d25d24c5795589b6c028a8817 Reviewed-on: https://gerrit.libreoffice.org/65028 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 89c888b48eca24e25ffe8895542cf7ac9b731187) Reviewed-on: https://gerrit.libreoffice.org/65857 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index ea43b16abd0f..e3ced2dec236 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -849,12 +849,6 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings) style.SetToolbarIconSize(ToolbarIconSize::Large); -style.SetActiveColor(toColor(pal.color(QPalette::Active, QPalette::Window))); -// rely on VCL for style.SetDeactiveColor - -style.SetActiveTextColor(toColor(pal.color(QPalette::Active, QPalette::WindowText))); -style.SetDeactiveTextColor(toColor(pal.color(QPalette::Inactive, QPalette::WindowText))); - Color aFore = toColor(pal.color(QPalette::Active, QPalette::WindowText)); Color aBack = toColor(pal.color(QPalette::Active, QPalette::Window)); Color aText = toColor(pal.color(QPalette::Active, QPalette::Text)); diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index e9b5f4ecc1ba..c92551fe6ca2 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -170,12 +170,6 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) style.SetToolbarIconSize( ToolbarIconSize::Large ); -style.SetActiveColor(toColor(pal.color(QPalette::Active, QPalette::Window))); -style.SetDeactiveColor(toColor(pal.color(QPalette::Inactive, QPalette::Window))); - -style.SetActiveTextColor(toColor(pal.color(QPalette::Active, QPalette::WindowText))); -style.SetDeactiveTextColor(toColor(pal.color(QPalette::Inactive, QPalette::WindowText))); - // Font vcl::Font aFont = toFont( QApplication::font(), rSettings.GetUILanguageTag().getLocale() ); style.BatchSetFonts( aFont, aFont ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 66d3a5b78b7a7665a75047c87ac180eeb03b476f Author: Sumit Chauhan AuthorDate: Tue Dec 4 18:47:10 2018 +0530 Commit: Michael Weghorn CommitDate: Mon Dec 31 00:56:17 2018 +0100 tdf#98253 Qt5 rely on VCL for SetDeactiveColor Keep the DeactiveColor from generic vcl style without overriding it with the Qt5 style. Change-Id: I10ffdc79e1b6878d27ae13c6394ad50d7470f073 Reviewed-on: https://gerrit.libreoffice.org/64522 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 3911bf8364dae4c855ad37237c114f9007f70657) Reviewed-on: https://gerrit.libreoffice.org/65560 Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 230c98395a70..ea43b16abd0f 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -850,7 +850,7 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings) style.SetToolbarIconSize(ToolbarIconSize::Large); style.SetActiveColor(toColor(pal.color(QPalette::Active, QPalette::Window))); -style.SetDeactiveColor(toColor(pal.color(QPalette::Inactive, QPalette::Window))); +// rely on VCL for style.SetDeactiveColor style.SetActiveTextColor(toColor(pal.color(QPalette::Active, QPalette::WindowText))); style.SetDeactiveTextColor(toColor(pal.color(QPalette::Inactive, QPalette::WindowText))); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5 vcl/workben
vcl/qt5/Qt5Graphics_GDI.cxx |8 +--- vcl/workben/vcldemo.cxx |4 2 files changed, 9 insertions(+), 3 deletions(-) New commits: commit f5d7049f4eb39967625bac819e17170485ea6698 Author: Jan-Marek Glogowski AuthorDate: Tue Dec 18 10:28:53 2018 + Commit: Caolán McNamara CommitDate: Thu Dec 20 14:09:10 2018 +0100 Qt5 fix SalGraphics::invert ... and also print the invert mode name into the inverted region when running "./bin/run vcldemo --show ellipse". Conflicts: vcl/workben/vcldemo.cxx Change-Id: Id461a32756583df1ef778320c29c45c0e7e4fbc8 Reviewed-on: https://gerrit.libreoffice.org/65326 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 6251e4080f4c1ed3bf1a5d615fc3ebdda4c87059) Reviewed-on: https://gerrit.libreoffice.org/65474 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index fb766205f654..156c487ad57d 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -485,15 +485,17 @@ void Qt5Graphics::invert(long nX, long nY, long nWidth, long nHeight, SalInvert if (SalInvert::N50 & nFlags) { aPainter.setCompositionMode(QPainter::RasterOp_SourceXorDestination); -aPainter.setBrush(Qt::DiagCrossPattern); -aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush()); +QBrush aBrush(Qt::white, Qt::Dense4Pattern); +aPainter.fillRect(nX, nY, nWidth, nHeight, aBrush); } else { if (SalInvert::TrackFrame & nFlags) { aPainter.setCompositionMode(QPainter::RasterOp_SourceXorDestination); -aPainter.setPen(Qt::DashLine); +QPen aPen(Qt::white); +aPen.setStyle(Qt::DotLine); +aPainter.setPen(aPen); aPainter.drawRect(nX, nY, nWidth, nHeight); } else diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 59d121b70c28..520ef3e66138 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -766,9 +766,13 @@ public: { auto aRegions = partition(rCtx, 2, 2); doInvert(rDev, aRegions[0], InvertFlags::NONE); +rDev.DrawText(aRegions[0], "InvertFlags::NONE"); doInvert(rDev, aRegions[1], InvertFlags::N50); +rDev.DrawText(aRegions[1], "InvertFlags::N50"); doInvert(rDev, aRegions[2], InvertFlags::Highlight); +rDev.DrawText(aRegions[2], "InvertFlags::Highlight"); doInvert(rDev, aRegions[3], InvertFlags::TrackFrame); +rDev.DrawText(aRegions[3], "InvertFlags::TrackFrame"); } } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5FilePicker.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 77c5d0f4be46071f49957e3e2f7fce24f9e927f3 Author: Aleksei Nikiforov AuthorDate: Tue Dec 18 16:39:57 2018 +0300 Commit: Katarina Behrens CommitDate: Wed Dec 19 13:13:59 2018 +0100 Qt5: remove assert leading to crash while executing 'open' dialog When Writer is opened using "qt5" VCL plugin, opening menu item "File" -> "Open" leads to a crash due to presence of mentioned assert. Impress crashes same way when same menu item is used. Change-Id: I9d1937344c694d4f4620be1b71d1181eb9645427 Reviewed-on: https://gerrit.libreoffice.org/65344 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit dd2421b148fedc40547ccff8b332285047a0b09e) Reviewed-on: https://gerrit.libreoffice.org/65396 Reviewed-by: Aleksei Nikiforov Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index 2895bc34bc1c..ffd482ded5d0 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -187,7 +187,6 @@ sal_Int16 SAL_CALL Qt5FilePicker::execute() } vcl::Window* pWindow = ::Application::GetActiveTopWindow(); -assert(pWindow); QWidget* pTransientParent = nullptr; QWindow* pTransientWindow = nullptr; if (pWindow) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5AccessibleWidget.cxx | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) New commits: commit 20da54d941083a947d8890c2f6b0e8edf3bc9ed5 Author: Katarina Behrens AuthorDate: Tue Dec 18 18:31:08 2018 +0100 Commit: Thorsten Behrens CommitDate: Wed Dec 19 06:46:44 2018 +0100 tdf#122055: catch RuntimeException if a11y context no longer alive otherwise Desktop::Main will do it and soffice will crash w/ empty error msg Change-Id: I56768909227a6ff158ae353e1eff9b249d6ba9d4 Reviewed-on: https://gerrit.libreoffice.org/65357 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit d41bc9bd9359eb83f807fdfa72dbde0831f39be8) Reviewed-on: https://gerrit.libreoffice.org/65384 diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index 9773b2875050..c2c1fdc2b7f8 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -636,7 +636,22 @@ void* Qt5AccessibleWidget::interface_cast(QAccessible::InterfaceType t) bool Qt5AccessibleWidget::isValid() const { -return m_xAccessible.is() && m_xAccessible->getAccessibleContext().is(); +if (m_xAccessible.is()) +{ +try +{ +// getAccessibleContext throws RuntimeException if context is no longer alive +Reference xAc = m_xAccessible->getAccessibleContext(); +return xAc.is(); +} +// so let's catch it here, cuz otherwise soffice falls flat on its face +// with FatalError and nothing else +catch (css::uno::RuntimeException /*ex*/) +{ +return false; +} +} +return false; } QObject* Qt5AccessibleWidget::object() const { return nullptr; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Bitmap.cxx |4 1 file changed, 4 insertions(+) New commits: commit 80cd503d4a24e7e5407181b57c3968a679ae9bab Author: Aleksei Nikiforov AuthorDate: Mon Dec 17 15:31:16 2018 +0300 Commit: Jan-Marek Glogowski CommitDate: Tue Dec 18 15:55:14 2018 +0100 Qt5: fix color bits interpretation for 32bit ARGB image formats Change-Id: Iea8547089a0ce2dc9f6a06b84552f4261fbfa0f1 Reviewed-on: https://gerrit.libreoffice.org/65311 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 7802d99c35f5acfa43203f1dd6d1752af4e7c0b6) Reviewed-on: https://gerrit.libreoffice.org/65332 Reviewed-by: Aleksei Nikiforov diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx index defd0280ac24..5ccc72823adb 100644 --- a/vcl/qt5/Qt5Bitmap.cxx +++ b/vcl/qt5/Qt5Bitmap.cxx @@ -265,7 +265,11 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/) break; case 32: { +#ifdef OSL_BIGENDIAN pBuffer->mnFormat = ScanlineFormat::N32BitTcArgb | ScanlineFormat::TopDown; +#else +pBuffer->mnFormat = ScanlineFormat::N32BitTcBgra | ScanlineFormat::TopDown; +#endif pBuffer->maPalette = aEmptyPalette; break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Graphics_Text.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 6d3faf6a048eedf3fe4a1f43545eeda38adb2763 Author: Jan-Marek Glogowski AuthorDate: Mon Dec 17 15:07:26 2018 +0100 Commit: Jan-Marek Glogowski CommitDate: Mon Dec 17 22:31:41 2018 +0100 Qt5 don't re-register system fonts System fonts are already registered in the QFontDatabase. And addApplicationFont seems to be really expensive especially when registering large fonts like the Noto CJK fonts, which increases load time by 4 seconds per font. This skips all font + style combinations already known in the DB. Since addApplicationFont already relies on fontconfig on Unix/X11 this should be fine. Change-Id: Ief13a613abd99b9fe391d9afe868541035340d1c Reviewed-on: https://gerrit.libreoffice.org/65270 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 5d13f3efe0157559d3625c6b8fe7e9741e601215) Reviewed-on: https://gerrit.libreoffice.org/65290 diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx index ba7133f7b53e..19a05f8410fc 100644 --- a/vcl/qt5/Qt5Graphics_Text.cxx +++ b/vcl/qt5/Qt5Graphics_Text.cxx @@ -98,6 +98,7 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC) if (bUseFontconfig) { +const QStringList aFontFamilyList = aFDB.families(); ::std::vector aList; psp::FastPrintFontInfo aInfo; @@ -109,7 +110,11 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC) continue; QString aFilename = toQString( OStringToOUString(rMgr.getFontFileSysPath(aInfo.m_nID), RTL_TEXTENCODING_UTF8)); -QFontDatabase::addApplicationFont(aFilename); +QRawFont aRawFont(aFilename, 0.0); +QString aFamilyName = aRawFont.familyName(); +if (!aFontFamilyList.contains(aFamilyName) +|| !aFDB.styles(aFamilyName).contains(aRawFont.styleName())) +QFontDatabase::addApplicationFont(aFilename); } SalGenericInstance::RegisterFontSubstitutors(pPFC); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Menu.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 2aee047beae576823c4625678c6220012ff95c88 Author: Michael Weghorn AuthorDate: Sat Dec 8 03:35:09 2018 +0100 Commit: Michael Weghorn CommitDate: Fri Dec 14 14:59:34 2018 +0100 tdf#121974 Convert Qt menu text as needed Just as is already done in 'Qt5Menu::InsertMenuItem', the text needs to be converted in 'Qt5Menu::SetItemText' as well. Change-Id: I03c8f2e6fe0e926a3f7e4be5b7eac70f1bd9850f Reviewed-on: https://gerrit.libreoffice.org/64796 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit ee53d07ae17747cb81340c05983b1937bd23c136) Reviewed-on: https://gerrit.libreoffice.org/65154 diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index acb8f957fcf6..130d7c583f58 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -287,7 +287,11 @@ void Qt5Menu::SetItemText(unsigned, SalMenuItem* pItem, const OUString& rText) Qt5MenuItem* pSalMenuItem = static_cast(pItem); QAction* pAction = pSalMenuItem->getAction(); if (pAction) -pAction->setText(toQString(rText)); +{ +OUString aText(rText); +NativeItemText(aText); +pAction->setText(toQString(aText)); +} } void Qt5Menu::SetItemImage(unsigned, SalMenuItem* pItem, const Image& rImage) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Graphics_GDI.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit eb5291e428c704a61561f2453405a01dd04d0632 Author: Rene Engelhard AuthorDate: Sun Dec 9 20:11:25 2018 +0100 Commit: Rene Engelhard CommitDate: Sun Dec 9 20:31:57 2018 +0100 fix build (boo->bool) Change-Id: Ia25f388f81b827803683859c388317484a2b0cde Reviewed-on: https://gerrit.libreoffice.org/64845 Reviewed-by: Xisco Faulí Tested-by: Rene Engelhard diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index d2692528274d..fb766205f654 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -657,7 +657,7 @@ void Qt5Graphics::SetFillColor() { m_aFillColor = SALCOLOR_NONE; } void Qt5Graphics::SetFillColor(Color nColor) { m_aFillColor = nColor; } -void Qt5Graphics::SetXORMode(bool bSet, boo) +void Qt5Graphics::SetXORMode(bool bSet, bool) { if (bSet) m_eCompositionMode = QPainter::CompositionMode_Xor; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits