[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |2 ++ vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 2d13cf60ecdab83997c9cd7275c799ddd96617cd Author: Caolán McNamara caol...@redhat.com Date: Fri Apr 24 11:01:50 2015 +0100 Resolves: tdf#73211 gtk checkboxes need erase afer toggling because an unchecked checkbox can have a smaller paint area than a checked checkbox. This has always bugged me (cherry picked from commit d194074aa34e3724dd9b93fbc81bf2ba793cd37a) Conflicts: vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx Change-Id: Iac0f075089611b47c381863a9655445d732bfddc Reviewed-on: https://gerrit.libreoffice.org/15510 Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com Tested-by: Adolfo Jayme Barrientos fit...@ubuntu.com diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index b1e7e23..226ea69 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -441,6 +441,8 @@ void GtkData::initNWF( void ) pSVData-maNWFData.mnMenuFormatBorderX = xthickness + horizontal_padding; pSVData-maNWFData.mnMenuFormatBorderY = ythickness + vertical_padding; +pSVData-maNWFData.mbCheckBoxNeedsErase = true; + if( SalGetDesktopEnvironment() == KDE ) { // #i97196# ensure a widget exists and the style engine was loaded diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 2a1f4e7..ed4c2d0 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -1470,7 +1470,12 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP return false; } -void GtkData::initNWF() {} +void GtkData::initNWF() +{ +ImplSVData* pSVData = ImplGetSVData(); +pSVData-maNWFData.mbCheckBoxNeedsErase = true; +} + void GtkData::deInitNWF() {} void GtkSalGraphics::getStyleContext(GtkStyleContext** style, GtkWidget* widget) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx
vcl/unx/gtk/a11y/atkwrapper.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit 5346929ef8127e177a1bf86f47be69da0ad7603f Author: Niklas Johansson sleeping.pil...@gmail.com Date: Fri Jan 16 12:51:52 2015 +0100 fdo#86674 paragraphs have ATK_STATE_INVALID A few states have been added in the IA2 integration. These need to be handled somehow on linux as well. At the moment they all get the state INVALID. Let's add the state DEFAULT that already have a equivalent. The state MOVEABLE is causing the issues in paragraphs of LibreOffice Writer. The state is not invalid so let's avoid reporting it at all. There must be a cleaner way of doing this however. Reviewed-on: https://gerrit.libreoffice.org/13727 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit df5fa4082cfb17c5d5be6678995689485df6d429) Reviewed-on: https://gerrit.libreoffice.org/13947 (cherry picked from commit 3bde8657f50b88268ffb2693cc298411fcead005) Change-Id: I859439f92fe19f5050195383f43fa4af787b249e Reviewed-on: https://gerrit.libreoffice.org/13951 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx index a30bf16..8a0f8f0 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk/a11y/atkwrapper.cxx @@ -160,12 +160,16 @@ AtkStateType mapAtkState( sal_Int16 nState ) MAP_DIRECT( TRANSIENT ); MAP_DIRECT( VERTICAL ); MAP_DIRECT( VISIBLE ); +MAP_DIRECT( DEFAULT ); // a spelling error ... case accessibility::AccessibleStateType::DEFUNC: type = ATK_STATE_DEFUNCT; break; case accessibility::AccessibleStateType::MULTI_SELECTABLE: type = ATK_STATE_MULTISELECTABLE; break; default: +//Mis-use ATK_STATE_LAST_DEFINED to check if a state is unmapped +//NOTE! Do not report it +type = ATK_STATE_LAST_DEFINED; break; } @@ -534,7 +538,12 @@ wrapper_ref_state_set( AtkObject *atk_obj ) uno::Sequence sal_Int16 aStates = xStateSet-getStates(); for( sal_Int32 n = 0; n aStates.getLength(); n++ ) -atk_state_set_add_state( pSet, mapAtkState( aStates[n] ) ); +{ +// ATK_STATE_LAST_DEFINED is used to check if the state +// is unmapped, do not report it to Atk +if ( mapAtkState( aStates[n] ) != ATK_STATE_LAST_DEFINED ) +atk_state_set_add_state( pSet, mapAtkState( aStates[n] ) ); +} // We need to emulate FOCUS state for menus, menu-items etc. if( atk_obj == atk_get_focus_object() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx
vcl/unx/generic/dtrans/X11_clipboard.cxx | 15 +++ vcl/unx/generic/dtrans/X11_clipboard.hxx |6 +- vcl/unx/generic/dtrans/X11_service.cxx |4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) New commits: commit 493ecf8f17185bbd9ffe1ac9c58791da6d23b0d9 Author: Stephan Bergmann sberg...@redhat.com Date: Mon Nov 24 14:00:30 2014 +0100 rhbz#1167250: Avoid X11Clipboard already being destroyed in constructor ...via SelectionManager::run's aKeep acquring and releasing getReference() Change-Id: I18696d30c41ca9ae101261668cbf54cb0a6c45fc (cherry picked from commit 94d2de0ba1f010be7acf0d00ce5b2ed4ed2b895b) Reviewed-on: https://gerrit.libreoffice.org/13102 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx b/vcl/unx/generic/dtrans/X11_clipboard.cxx index 4e6b953..95d44a5 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.cxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx @@ -29,6 +29,7 @@ #include uno/mapping.hxx #include cppuhelper/factory.hxx #include cppuhelper/supportsservice.hxx +#include rtl/ref.hxx #include rtl/tencinfo.h #if OSL_DEBUG_LEVEL 1 @@ -57,16 +58,22 @@ X11Clipboard::X11Clipboard( SelectionManager rManager, Atom aSelection ) : #if OSL_DEBUG_LEVEL 1 fprintf( stderr, creating instance of X11Clipboard (this=%p)\n, this ); #endif +} -if( m_aSelection != None ) +css::uno::Referencecss::datatransfer::clipboard::XClipboard +X11Clipboard::create( SelectionManager rManager, Atom aSelection ) +{ +rtl::ReferenceX11Clipboard cb(new X11Clipboard(rManager, aSelection)); +if( aSelection != None ) { -m_rSelectionManager.registerHandler( m_aSelection, *this ); +rManager.registerHandler( aSelection, *cb.get() ); } else { -m_rSelectionManager.registerHandler( XA_PRIMARY, *this ); -m_rSelectionManager.registerHandler( m_rSelectionManager.getAtom( OUString(CLIPBOARD) ), *this ); +rManager.registerHandler( XA_PRIMARY, *cb.get() ); +rManager.registerHandler( rManager.getAtom( OUString(CLIPBOARD) ), *cb.get() ); } +return cb.get(); } X11Clipboard::~X11Clipboard() diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx b/vcl/unx/generic/dtrans/X11_clipboard.hxx index 6269927..ba83636 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.hxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx @@ -46,6 +46,8 @@ namespace x11 { ::std::list css::uno::Reference css::datatransfer::clipboard::XClipboardListener m_aListeners; Atomm_aSelection; +X11Clipboard( SelectionManager rManager, Atom aSelection ); + protected: friend class SelectionManager; @@ -55,7 +57,9 @@ namespace x11 { public: -X11Clipboard( SelectionManager rManager, Atom aSelection ); +static css::uno::Referencecss::datatransfer::clipboard::XClipboard +create( SelectionManager rManager, Atom aSelection ); + virtual ~X11Clipboard(); static X11Clipboard* get( const OUString rDisplayName, Atom aSelection ); diff --git a/vcl/unx/generic/dtrans/X11_service.cxx b/vcl/unx/generic/dtrans/X11_service.cxx index 6d5a8fb..4ec02c1 100644 --- a/vcl/unx/generic/dtrans/X11_service.cxx +++ b/vcl/unx/generic/dtrans/X11_service.cxx @@ -77,10 +77,10 @@ css::uno::Reference XInterface X11SalInstance::CreateClipboard( const Sequenc if( it != m_aInstances.end() ) return it-second; -X11Clipboard* pClipboard = new X11Clipboard( rManager, nSelection ); +css::uno::Referencecss::datatransfer::clipboard::XClipboard pClipboard = X11Clipboard::create( rManager, nSelection ); m_aInstances[ nSelection ] = pClipboard; -return static_castOWeakObject*(pClipboard); +return pClipboard; } css::uno::Reference XInterface X11SalInstance::CreateDragSource() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx
vcl/unx/gtk/a11y/atkwrapper.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 2c7786a6bcb0b2628fce8fb2e3cd51fb8f4304fc Author: Jacobo Aragunde Pérez jaragu...@igalia.com Date: Thu Jul 3 20:13:51 2014 +0200 fdo#39944: Fix mapping for some a11y roles to ATK In particular, EDIT_BAR, EMBEDDED_OBJECT and HYPER_LINK were being mapped to custom roles when specific roles exist; fixed passing the proper name to registerRole. Besides, moved two roles that were in the section 'don't exist in ATK yet' because that's not the case now. Change-Id: I6818a0ac623f45053812b5c6dd5fc25c9abf4f65 (cherry picked from commit 7c37cd7bb26b91bda5e57d7bd0cecdbc9d1ebb22) Reviewed-on: https://gerrit.libreoffice.org/10066 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx index f3ef8d5..a30bf16 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk/a11y/atkwrapper.cxx @@ -291,8 +291,8 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) if( ! initialized ) { // re-use strings from ATK library -roleMap[accessibility::AccessibleRole::EDIT_BAR] = registerRole(edit bar); -roleMap[accessibility::AccessibleRole::EMBEDDED_OBJECT] = registerRole(embedded component); +roleMap[accessibility::AccessibleRole::EDIT_BAR] = registerRole(editbar); +roleMap[accessibility::AccessibleRole::EMBEDDED_OBJECT] = registerRole(embedded); roleMap[accessibility::AccessibleRole::CHART] = registerRole(chart); roleMap[accessibility::AccessibleRole::CAPTION] = registerRole(caption); roleMap[accessibility::AccessibleRole::DOCUMENT] = registerRole(document frame); @@ -302,16 +302,16 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) roleMap[accessibility::AccessibleRole::FORM] = registerRole(form); roleMap[accessibility::AccessibleRole::GROUP_BOX] = registerRole(grouping); roleMap[accessibility::AccessibleRole::COMMENT] = registerRole(comment); +roleMap[accessibility::AccessibleRole::IMAGE_MAP] = registerRole(image map); +roleMap[accessibility::AccessibleRole::TREE_ITEM] = registerRole(tree item); +roleMap[accessibility::AccessibleRole::HYPER_LINK] = registerRole(link); // these don't exist in ATK yet roleMap[accessibility::AccessibleRole::END_NOTE] = registerRole(end note); roleMap[accessibility::AccessibleRole::FOOTNOTE] = registerRole(foot note); -roleMap[accessibility::AccessibleRole::HYPER_LINK] = registerRole(hyper link); roleMap[accessibility::AccessibleRole::SHAPE] = registerRole(shape); roleMap[accessibility::AccessibleRole::TEXT_FRAME] = registerRole(text frame); -roleMap[accessibility::AccessibleRole::IMAGE_MAP] = registerRole(image map); roleMap[accessibility::AccessibleRole::NOTE] = registerRole(note); -roleMap[accessibility::AccessibleRole::TREE_ITEM] = registerRole(tree item); initialized = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx
vcl/unx/generic/gdi/salgdi2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c22fcb268cad9e0394f6af01f10a327f7e2ff5bd Author: Caolán McNamara caol...@redhat.com Date: Fri Jun 27 09:05:53 2014 +0100 bah, const issue Change-Id: If7fd95287ba1a28e7b5f5440776859b912d6ad6e (cherry picked from commit d781e874e018988d26b558ae1e4d6a1303b14cc1) diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index be722c5..4af97a5 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -450,7 +450,7 @@ namespace //fdo#33455 and fdo#80160 handle 1 bit depth pngs with palette entries //to set fore/back colors SalBitmap rBitmap = const_castSalBitmap(rSalBitmap); -if (const BitmapBuffer* pBitmapBuffer = rBitmap.AcquireBuffer(true)) +if (BitmapBuffer* pBitmapBuffer = rBitmap.AcquireBuffer(true)) { const BitmapPalette rPalette = pBitmapBuffer-maPalette; if (rPalette.GetEntryCount() == 2) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx
vcl/unx/kde4/KDEXLib.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 39a589e1cf9340e95d63602afd272faccbaac9a5 Author: LuboÅ¡ LuÅák l.lu...@collabora.com Date: Fri May 23 18:48:53 2014 +0200 force posted events before timer timeouts in KDE4 event loop (bnc#467278) In this particular case, basctl::Shell::onDocumentCreated() and pretty much everything in basctl/ it seems operate on the current window. The OnNew event that triggers this comes from a timeout generated who knows where for whatever reason. However, the code knows what the current window is by having basctl::Shell::SetCurWindow() react on events about the current window changing ... which come from posted events. So, unless it's defined somewhere that an ordering here must exist, this is inherently racy. At least generic and Gtk event loops appear to always deliver the posted event first, so force the same ordering in the KDE event loop handling. Change-Id: Ia098f6b45e6b5a5133a12a9172eb09069e6362f9 diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 2630c0c..9d2949e 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -349,6 +349,16 @@ void KDEXLib::StopTimer() void KDEXLib::timeoutActivated() { +// HACK? Always process posted events before timer timeouts. +// There are places that may watch both both (for example, there's a posted +// event about change of the current active window and there's a timeout +// event informing that a document has finished loading). This is of course +// racy, but both generic and gtk event loops manage to deliver posted events +// first, so it's at least consistent, and it probably kind of makes at least +// some sense (timeouts should be more ok to wait and be triggered somewhen). +while( SalKDEDisplay::self()-HasUserEvents() ) +SalKDEDisplay::self()-DispatchInternalEvent(); + X11SalData *pData = (X11SalData*)ImplGetSVData()-mpSalData; pData-Timeout(); // QTimer is not single shot, so will be restarted immediatelly ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits