#i10000# changes from OOO330 m9
This commit is contained in:
commit
44639c847a
6 changed files with 101 additions and 12 deletions
12
sw/source/core/doc/doc.cxx
Executable file → Normal file
12
sw/source/core/doc/doc.cxx
Executable file → Normal file
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -599,7 +599,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;
|
||||
}
|
||||
|
@ -994,8 +994,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 );
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
#include <svx/xmleohlp.hxx>
|
||||
#include <globals.hrc>
|
||||
#include <unomid.h>
|
||||
#include <unotools/printwarningoptions.hxx>
|
||||
|
||||
#include <com/sun/star/util/SearchOptions.hpp>
|
||||
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
|
||||
|
@ -2732,10 +2733,21 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
|
|||
// since printing now also use the API for PDF export this option
|
||||
// should be set for printing as well ...
|
||||
pWrtShell->SetPDFExportOption( sal_True );
|
||||
bool bOrigStatus = pRenderDocShell->IsEnableSetModified();
|
||||
// check configuration: shall update of printing information in DocInfo set the document to "modified"?
|
||||
bool bStateChanged = false;
|
||||
if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
|
||||
{
|
||||
pRenderDocShell->EnableSetModified( sal_False );
|
||||
bStateChanged = true;
|
||||
}
|
||||
|
||||
|
||||
// --> FME 2005-05-23 #122919# Force field update before PDF export:
|
||||
pWrtShell->ViewShell::UpdateFlds(TRUE);
|
||||
// <--
|
||||
if( bStateChanged )
|
||||
pRenderDocShell->EnableSetModified( sal_True );
|
||||
|
||||
// there is some redundancy between those two function calls, but right now
|
||||
// there is no time to sort this out.
|
||||
|
@ -2844,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;
|
||||
|
|
Loading…
Reference in a new issue