diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-09-24 14:47:51 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-09-24 14:47:51 +0200 |
commit | 3e90c83c2439b4640131394b4f3999b643ce0c87 (patch) | |
tree | e2be6d850bd198f8262eacc5d3e424f2e9bbdb40 /sw/source | |
parent | f5f6d4982b66dfec6d8364c622235bb60f7cb340 (diff) | |
parent | 4abe1904132f0eb34228c41454ef0abcb167f65c (diff) |
CWS-TOOLING: integrate CWS sw33bf09ooo/OOO330_m9
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 33 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/layout/fly.cxx | 27 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 5 |
6 files changed, 89 insertions, 12 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a414c8fb9b..a470440968 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1714,16 +1714,22 @@ sal_uInt16 SwDoc::GetPageCount() const const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const { Size aSize; - if( GetRootFrm() && nPageNum ) + if ( GetRootFrm() && nPageNum ) { const SwPageFrm* pPage = static_cast<const SwPageFrm*> (GetRootFrm()->Lower()); - while( --nPageNum && pPage->GetNext() ) + while ( --nPageNum && pPage->GetNext() ) + { pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + } - if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + // switch to next page for an empty page, if empty pages are not skipped + // in order to get a sensible page size for an empty page - e.g. for printing. + if ( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + { pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + } aSize = pPage->Frm().SSize(); } diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 60798250b9..2af7adb394 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1396,6 +1396,37 @@ void SwDrawContact::_Changed( const SdrObject& rObj, DisconnectFromLayout( false ); break; } + case SDRUSERCALL_CHILD_INSERTED : + case SDRUSERCALL_CHILD_REMOVED : + { + // --> AW, OD 2010-09-13 #i113730# + // force layer of controls for group objects containing control objects + if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj())) + { + if(::CheckControlLayer(maAnchoredDrawObj.DrawObj())) + { + const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + maAnchoredDrawObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + maAnchoredDrawObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + } + // fallthrough intended here + // <-- + } case SDRUSERCALL_MOVEONLY: case SDRUSERCALL_RESIZE: case SDRUSERCALL_CHILD_MOVEONLY : @@ -1403,8 +1434,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj, case SDRUSERCALL_CHILD_CHGATTR : case SDRUSERCALL_CHILD_DELETE : case SDRUSERCALL_CHILD_COPY : - case SDRUSERCALL_CHILD_INSERTED : - case SDRUSERCALL_CHILD_REMOVED : { // --> OD 2004-08-04 #i31698# - improvement: // get instance <SwAnchoredDrawObject> only once diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 2eb597f887..ca9e424133 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -603,7 +603,7 @@ bool SwFEShell::IsSelContainsControl() const // if we have one marked object, get the SdrObject and check // whether it contains a control const SdrObject* pSdrObject = pMarkList->GetMark( 0 )->GetMarkedSdrObj(); - bRet = CheckControlLayer( pSdrObject ); + bRet = ::CheckControlLayer( pSdrObject ); } return bRet; } @@ -998,8 +998,14 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // OD 21.08.2003 #i18447# - no change of layer for controls // or group objects containing controls. - const bool bControlObj = ::CheckControlLayer( pObj ); - //if ( pObj->GetLayer() != nLayerId && pObj->GetLayer() != nControls ) + // --> OD 2010-09-14 #i113730# + // consider that a member of a drawing group has been selected. + const SwContact* pContact = ::GetUserCall( pObj ); + ASSERT( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" ); + const bool bControlObj = ( pContact && pContact->GetMaster() ) + ? ::CheckControlLayer( pContact->GetMaster() ) + : ::CheckControlLayer( pObj ); + // <-- if ( !bControlObj && pObj->GetLayer() != nLayerId ) { pObj->SetLayer( nLayerId ); diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index feee382b5e..7b09b9983e 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -51,6 +51,9 @@ #include <layhelp.hxx> #include <ndtxt.hxx> +// --> OD 2010-09-14 #i113730# +#include <svx/svdogrp.hxx> +// <-- // OD 16.04.2003 #i13147# - for <SwFlyFrm::GetContour(..)> #include <ndgrf.hxx> // OD 29.10.2003 #113049# @@ -2250,6 +2253,30 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) _rNewObj.ChgAnchorFrm( this ); } + // --> OD 2010-09-14 #i113730# + // Assure the control objects and group objects containing controls are on the control layer + if ( ::CheckControlLayer( _rNewObj.DrawObj() ) ) + { + const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + _rNewObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + _rNewObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + // <-- + // no direct positioning needed, but invalidate the drawing object position _rNewObj.InvalidateObjPos(); diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index e0a73cae15..7277d7a235 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -926,9 +926,15 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue( if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId ) { - - rUnitConverter.convertNumber( - aOut, (sal_Int32)pPageDesc->GetNumOffset() ); + sal_Int32 const number(pPageDesc->GetNumOffset()); + if (0 >= number) + { + aOut.append(GetXMLToken(XML_AUTO)); + } + else // #i114163# positiveInteger only! + { + rUnitConverter.convertNumber(aOut, number); + } bOk = sal_True; } } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 862c2b321b..0ea6f0fc6b 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2856,7 +2856,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { - const USHORT nPage = nRenderer + 1; + // --> TL, OD 2010-09-07 #i114210# + // determine the correct page number from the renderer index + const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // <-- // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; |