solenv/bin/uilangfilter.xslt | 20 +++++++++++++++++--- vcl/inc/vcl/window.hxx | 18 +++++++++--------- vcl/source/window/brdwin.cxx | 31 ++++++++++++++++++++++++++----- vcl/source/window/window2.cxx | 12 ++++++++++++ 4 files changed, 64 insertions(+), 17 deletions(-)
New commits: commit f23df687f6975e9ebd4545366fa6d7f76766918f Author: Caolán McNamara <caol...@redhat.com> Date: Wed Nov 14 13:02:29 2012 +0000 Resolves: fdo#57107 processing translatable child nodes twice I'm rubbish with xslt. Change-Id: Idc92a602aca7dc2a96cf185b1904e1373435a8a9 diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt index 42d066f..90abf11 100644 --- a/solenv/bin/uilangfilter.xslt +++ b/solenv/bin/uilangfilter.xslt @@ -13,19 +13,33 @@ <xsl:template match="/"> <l><xsl:text> </xsl:text> - <xsl:apply-templates select="//*[*[not(self::col)]/@translatable='yes']" /> + <!-- + What I want to do here is to extract all nodes that are translatable + except the columns of list and tree stores + --> + <xsl:apply-templates select="//*[not(self::col)][@translatable='yes']" /> + <!-- + What I want to do here is to extract just the list and tree store + columns that that are translatable + --> <xsl:apply-templates select="interface/object[data/row/col[@id='0'][@translatable='yes']]" /> </l> </xsl:template> -<xsl:template match="*/*[not(self::col)][@translatable]"> +<!-- + Normal nodes +--> +<xsl:template match="*/*[not(self::col)][@translatable='yes']"> <xsl:text> </xsl:text> <t r="string" g="{str:tokenize(../@id,':')[1]}" l="{@name}"> <xsl:copy-of select="text()" /> </t><xsl:text> </xsl:text> </xsl:template> -<xsl:template match="col[@id='0']"> +<!-- + Column nodes +--> +<xsl:template match="col[@id='0'][@translatable='yes']"> <xsl:text> </xsl:text> <xsl:variable name="groupid" select="../../../@id"/> <t r="stringlist" g="{str:tokenize($groupid,':')[1]}" l="{count(preceding::col[@id='0'][../../../@id=$groupid])}"> commit 18f08d180db8e821f5c39359e08c177bcfecb58b Author: Caolán McNamara <caol...@redhat.com> Date: Wed Nov 14 12:20:57 2012 +0000 Resolves: fdo#57090 visual glitches on MacOSX with borders + layout We need to force a resync of the borders of a borderwindow onto its client window when the borders change when layout is active, otherwise we are doing out calculations using the old borders and it all turns into a pile of junk Change-Id: I7dbff0b30aad41779f0f295498af6a492ddf5430 diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index 98bcdc4..9a96e7d 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -577,15 +577,6 @@ protected: void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); void FireVclEvent( VclSimpleEvent* pEvent ); - /* - * Widgets call this to inform their owner container that the widget wants - * to renegotiate its size. Should be called when a widget has a new size - * request. e.g. a FixedText Control gets a new label. - * - * akin to gtk_widget_queue_resize - */ - SAL_DLLPRIVATE void queue_resize(); - sal_Int32 get_height_request() const; sal_Int32 get_width_request() const; @@ -1077,6 +1068,15 @@ public: virtual Size GetOptimalSize(WindowSizeType eType) const; /* + * Widgets call this to inform their owner container that the widget wants + * to renegotiate its size. Should be called when a widget has a new size + * request. e.g. a FixedText Control gets a new label. + * + * akin to gtk_widget_queue_resize + */ + void queue_resize(); + + /* * Sets the "width-request" property * * Override for width request of the widget, or -1 if natural request diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 8f7ea25..5de8938 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1077,6 +1077,18 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei mnHeight = nHeight; mbNWFBorder = false; + Window *pWin = NULL, *pCtrl = NULL; + if (mpOutDev->GetOutDevType() == OUTDEV_WINDOW) + pWin = (Window*) mpOutDev; + + if (pWin) + pCtrl = mpBorderWindow->GetWindow(WINDOW_CLIENT); + + long nOrigLeftBorder = mnLeftBorder; + long nOrigTopBorder = mnTopBorder; + long nOrigRightBorder = mnRightBorder; + long nOrigBottomBorder = mnBottomBorder; + sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle(); if ( nBorderStyle & WINDOW_BORDER_NOBORDER ) { @@ -1093,12 +1105,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei { // for native widget drawing we must find out what // control this border belongs to - Window *pWin = NULL, *pCtrl = NULL; - if( mpOutDev->GetOutDevType() == OUTDEV_WINDOW ) - pWin = (Window*) mpOutDev; - ControlType aCtrlType = 0; - if( pWin && (pCtrl = mpBorderWindow->GetWindow( WINDOW_CLIENT )) != NULL ) + if (pCtrl) { switch( pCtrl->GetType() ) { @@ -1207,6 +1215,19 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom(); } } + + if (pCtrl) + { + //fdo#57090 If the borders have changed, then trigger a queue_resize on + //the bordered window, which will resync its borders at that point + if (nOrigLeftBorder != mnLeftBorder || + nOrigTopBorder != mnTopBorder || + nOrigRightBorder != mnRightBorder || + nOrigBottomBorder != mnBottomBorder) + { + pCtrl->queue_resize(); + } + } } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index f816d2a..be8c8ba 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1746,6 +1746,8 @@ void Window::SetBackgroundBitmap( const BitmapEx& rBitmapEx ) //as dirty for the size remains unchanged, but layout changed circumstances void Window::queue_resize() { + bool bSomeoneCares = false; + Dialog *pDialog = NULL; Window *pWindow = this; @@ -1756,6 +1758,7 @@ void Window::queue_resize() { VclContainer *pContainer = static_cast<VclContainer*>(pWindow); pContainer->markLayoutDirty(); + bSomeoneCares = true; } else if (pWindow->GetType() == WINDOW_TABCONTROL) { @@ -1770,6 +1773,15 @@ void Window::queue_resize() pWindow = pWindow->GetParent(); } + if (bSomeoneCares) + { + //fdo#57090 force a resync of the borders of the borderwindow onto this + //window in case they have changed + Window* pBorderWindow = ImplGetBorderWindow(); + if (pBorderWindow) + pBorderWindow->Resize(); + } + if (!pDialog || pDialog == this) return; pDialog->queue_layout();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits