diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-09-24 15:33:19 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-09-24 15:33:19 +0200 |
commit | 36524b9df562caa67e885575a25acc3bcf19e081 (patch) | |
tree | eec6024a231f5b3eb42d815475946433dc3f09ce | |
parent | 7769d917d89bdf28007261f1a628d275df4c1f61 (diff) | |
parent | dd488a6edbf07578b9ec7c7c0978c2ebe2149836 (diff) |
CWS-TOOLING: integrate CWS ooo33gsl09
Notes
split repo tag: libs-gui_ooo/OOO330_m9
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 101 |
2 files changed, 66 insertions, 41 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7b7f3bbcb4d3..580161da8a4e 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8499,6 +8499,7 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRe { push( PUSH_ALL ); + // force reemitting clip region clearClipRegion(); updateGraphicsState(); @@ -8542,7 +8543,10 @@ SvStream* PDFWriterImpl::endRedirect() } pop(); - // force reemitting colors + // force reemitting colors and clip region + clearClipRegion(); + m_aCurrentPDFState.m_bClipRegion = m_aGraphicsStack.front().m_bClipRegion; + m_aCurrentPDFState.m_aClipRegion = m_aGraphicsStack.front().m_aClipRegion; m_aCurrentPDFState.m_aLineColor = Color( COL_TRANSPARENT ); m_aCurrentPDFState.m_aFillColor = Color( COL_TRANSPARENT ); diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 64f2b7e0d2a1..055b7e9fe80b 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -1058,29 +1058,10 @@ static sal_Unicode getAccel( const String& rStr ) return nChar; } -Window* Window::GetLabelFor() const +static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window* pLabel, sal_Unicode nAccel ) { - if ( mpWindowImpl->mbDisableAccessibleLabelForRelation ) - return NULL; - Window* pWindow = NULL; - Window* pFrameWindow = ImplGetFrameWindow(); - - WinBits nFrameStyle = pFrameWindow->GetStyle(); - if( ! ( nFrameStyle & WB_DIALOGCONTROL ) - || ( nFrameStyle & WB_NODIALOGCONTROL ) - ) - return NULL; - - if ( mpWindowImpl->mpRealParent ) - pWindow = mpWindowImpl->mpRealParent->GetParentLabelFor( this ); - - if( pWindow ) - return pWindow; - sal_Unicode nAccel = getAccel( GetText() ); - - WindowType nMyType = GetType(); if( nMyType == WINDOW_FIXEDTEXT || nMyType == WINDOW_FIXEDLINE || nMyType == WINDOW_GROUPBOX ) @@ -1092,7 +1073,7 @@ Window* Window::GetLabelFor() const // get index, form start and form end USHORT nIndex=0, nFormStart=0, nFormEnd=0; pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, - const_cast<Window*>(this), + pLabel, nIndex, nFormStart, nFormEnd ); @@ -1139,32 +1120,39 @@ Window* Window::GetLabelFor() const return pWindow; } -// ----------------------------------------------------------------------- - -Window* Window::GetLabeledBy() const +Window* Window::GetLabelFor() const { - if ( mpWindowImpl->mbDisableAccessibleLabeledByRelation ) + if ( mpWindowImpl->mbDisableAccessibleLabelForRelation ) return NULL; Window* pWindow = NULL; Window* pFrameWindow = ImplGetFrameWindow(); + WinBits nFrameStyle = pFrameWindow->GetStyle(); + if( ! ( nFrameStyle & WB_DIALOGCONTROL ) + || ( nFrameStyle & WB_NODIALOGCONTROL ) + ) + return NULL; + if ( mpWindowImpl->mpRealParent ) - pWindow = mpWindowImpl->mpRealParent->GetParentLabeledBy( this ); + pWindow = mpWindowImpl->mpRealParent->GetParentLabelFor( this ); if( pWindow ) return pWindow; - // #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels - if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON ) - return NULL; + sal_Unicode nAccel = getAccel( GetText() ); -// if( ! ( GetType() == WINDOW_FIXEDTEXT || -// GetType() == WINDOW_FIXEDLINE || -// GetType() == WINDOW_GROUPBOX ) ) - // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text. - // See tools/options/print for example. - WindowType nMyType = GetType(); + pWindow = ImplGetLabelFor( pFrameWindow, GetType(), const_cast<Window*>(this), nAccel ); + if( ! pWindow && mpWindowImpl->mpRealParent ) + pWindow = ImplGetLabelFor( mpWindowImpl->mpRealParent, GetType(), const_cast<Window*>(this), nAccel ); + return pWindow; +} + +// ----------------------------------------------------------------------- + +static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled ) +{ + Window* pWindow = NULL; if ( (nMyType != WINDOW_GROUPBOX) && (nMyType != WINDOW_FIXEDLINE) ) { // search for a control that labels this window @@ -1176,16 +1164,16 @@ Window* Window::GetLabeledBy() const // get form start and form end and index of this control USHORT nIndex, nFormStart, nFormEnd; Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, - const_cast<Window*>(this), + pLabeled, nIndex, nFormStart, nFormEnd ); if( pSWindow && nIndex != nFormStart ) { - if( GetType() == WINDOW_PUSHBUTTON || - GetType() == WINDOW_HELPBUTTON || - GetType() == WINDOW_OKBUTTON || - GetType() == WINDOW_CANCELBUTTON ) + if( nMyType == WINDOW_PUSHBUTTON || + nMyType == WINDOW_HELPBUTTON || + nMyType == WINDOW_OKBUTTON || + nMyType == WINDOW_CANCELBUTTON ) { nFormStart = nIndex-1; } @@ -1217,6 +1205,39 @@ Window* Window::GetLabeledBy() const return pWindow; } +Window* Window::GetLabeledBy() const +{ + if ( mpWindowImpl->mbDisableAccessibleLabeledByRelation ) + return NULL; + + Window* pWindow = NULL; + Window* pFrameWindow = ImplGetFrameWindow(); + + if ( mpWindowImpl->mpRealParent ) + { + pWindow = mpWindowImpl->mpRealParent->GetParentLabeledBy( this ); + + if( pWindow ) + return pWindow; + } + + // #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels + if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON ) + return NULL; + +// if( ! ( GetType() == WINDOW_FIXEDTEXT || +// GetType() == WINDOW_FIXEDLINE || +// GetType() == WINDOW_GROUPBOX ) ) + // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text. + // See tools/options/print for example. + + pWindow = ImplGetLabeledBy( pFrameWindow, GetType(), const_cast<Window*>(this) ); + if( ! pWindow && mpWindowImpl->mpRealParent ) + pWindow = ImplGetLabeledBy( mpWindowImpl->mpRealParent, GetType(), const_cast<Window*>(this) ); + + return pWindow; +} + // ----------------------------------------------------------------------- KeyEvent Window::GetActivationKey() const |