summaryrefslogtreecommitdiffstats
path: root/vcl/inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
commit8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch)
treeca2b0cc4fba88107f5f6e740285184a061011866 /vcl/inc
parentAdding debian version 4:24.2.3-2. (diff)
downloadlibreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz
libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/osx/a11ywrapper.h2
-rw-r--r--vcl/inc/qt5/QtTransferable.hxx31
-rw-r--r--vcl/inc/salvtables.hxx2
3 files changed, 26 insertions, 9 deletions
diff --git a/vcl/inc/osx/a11ywrapper.h b/vcl/inc/osx/a11ywrapper.h
index 1eb4039c57..48fdd8e2a5 100644
--- a/vcl/inc/osx/a11ywrapper.h
+++ b/vcl/inc/osx/a11ywrapper.h
@@ -67,6 +67,7 @@ struct ReferenceWrapper
ReferenceWrapper maReferenceWrapper;
BOOL mActsAsRadioGroup;
BOOL mIsTableCell;
+ BOOL mIsDisposed;
}
// NSAccessibility Protocol
-(id)accessibilityAttributeValue:(NSString *)attribute;
@@ -101,6 +102,7 @@ struct ReferenceWrapper
-(NSWindow*)windowForParent;
-(id)init;
-(id)initWithAccessibleContext: (css::uno::Reference < css::accessibility::XAccessibleContext >) anAccessibleContext;
+-(void)setDisposed;
-(void) setDefaults: (css::uno::Reference < css::accessibility::XAccessibleContext >) rxAccessibleContext;
+(void)setPopupMenuOpen:(BOOL)popupMenuOpen;
-(css::accessibility::XAccessibleAction *)accessibleAction;
diff --git a/vcl/inc/qt5/QtTransferable.hxx b/vcl/inc/qt5/QtTransferable.hxx
index 5f1533dd59..5687fa06df 100644
--- a/vcl/inc/qt5/QtTransferable.hxx
+++ b/vcl/inc/qt5/QtTransferable.hxx
@@ -34,13 +34,23 @@ class QtTransferable : public cppu::WeakImplHelper<css::datatransfer::XTransfera
QtTransferable(const QtTransferable&) = delete;
const QMimeData* m_pMimeData;
- osl::Mutex m_aMutex;
- bool m_bProvideUTF16FromOtherEncoding;
- css::uno::Sequence<css::datatransfer::DataFlavor> m_aMimeTypeSeq;
+
+protected:
+ /** Sets new mime data.
+ * Since data flavors supported by this class depend on the mime data,
+ * results from previous calls to the public methods of this
+ * class are no longer valid after setting new mime data using this method.
+ *
+ * Subclasses that set new mime data must ensure that no data race exists
+ * on m_pMimeData.
+ * (For the current only subclass doing so, QtClipboardTransferable, all access
+ * to m_pMimeData happens with the SolarMutex held.)
+ */
+ void setMimeData(const QMimeData* pMimeData) { m_pMimeData = pMimeData; }
+ const QMimeData* mimeData() const { return m_pMimeData; }
public:
QtTransferable(const QMimeData* pMimeData);
- const QMimeData* mimeData() const { return m_pMimeData; }
css::uno::Sequence<css::datatransfer::DataFlavor> SAL_CALL getTransferDataFlavors() override;
sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor& rFlavor) override;
@@ -54,21 +64,24 @@ public:
* the QClipboard's object thread, which is the QApplication's thread, so all of
* the access has to go through RunInMainThread().
*
- * If we detect a QMimeData change, we simply drop reporting any content. In theory
- * we can recover in the case where there hadn't been any calls of the XTransferable
- * interface, but currently we don't. But we ensure to never report mixed content,
- * so we'll just cease operation on QMimeData change.
+ * If we detect a QMimeData change, the mime data is updated with the new one from
+ * the system clipboard. Note however that this means that results of any previous
+ * calls of the XTransferable interface will be out of sync with the newly set mime
+ * data, so this scenario should generally be avoided.
**/
class QtClipboardTransferable final : public QtTransferable
{
// to detect in-flight QMimeData changes
const QClipboard::Mode m_aMode;
- bool hasInFlightChanged() const;
+ void ensureConsistencyWithSystemClipboard();
public:
explicit QtClipboardTransferable(const QClipboard::Mode aMode, const QMimeData* pMimeData);
+ // whether pMimeData are the current mime data
+ bool hasMimeData(const QMimeData* pMimeData) const;
+
// these are the same then QtTransferable, except they go through RunInMainThread
css::uno::Sequence<css::datatransfer::DataFlavor> SAL_CALL getTransferDataFlavors() override;
sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor& rFlavor) override;
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 4074e097a4..d6d3a90ce2 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -922,6 +922,8 @@ public:
return 20 * (pDefault ? pDefault->GetDPIScaleFactor() : 1.0);
}
+ void set_max_drop_down_rows(int nRows) override { m_xComboBox->SetDropDownLineCount(nRows); }
+
void CallHandleEventListener(VclWindowEvent& rEvent)
{
if (rEvent.GetId() == VclEventId::DropdownPreOpen