2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 13:25:45 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:25:45 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:25:45 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:25:45 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:25:45 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:25:45 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 12:30:28 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <svx/svdmodel.hxx>
|
|
|
|
#include <sfx2/app.hxx>
|
|
|
|
#include <sfx2/sfx.hrc>
|
2000-12-11 08:03:50 -06:00
|
|
|
#ifndef _SV_SALBTYPE_HRC //autogen
|
|
|
|
#include <vcl/salbtype.hxx>
|
|
|
|
#endif
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <unotools/syslocale.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
#include "app.hxx"
|
2000-09-28 12:05:36 -05:00
|
|
|
#include "optsitem.hxx"
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "cfgids.hxx"
|
2004-01-20 03:35:13 -06:00
|
|
|
#include "FrameView.hxx"
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
using namespace ::rtl;
|
|
|
|
using namespace ::utl;
|
|
|
|
using namespace ::com::sun::star::uno;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
#define B2U(_def_aStr) (OUString::createFromAscii(_def_aStr))
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------
|
|
|
|
// - SdOptionsItem -
|
|
|
|
// -----------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SdOptionsItem::SdOptionsItem( const SdOptionsGeneric& rParent, const OUString rSubTree ) :
|
|
|
|
ConfigItem ( rSubTree ),
|
|
|
|
mrParent ( rParent )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SdOptionsItem::~SdOptionsItem()
|
|
|
|
{
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
void SdOptionsItem::Commit()
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
if( IsModified() )
|
|
|
|
mrParent.Commit( *this );
|
|
|
|
};
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2009-10-15 17:05:16 -05:00
|
|
|
void SdOptionsItem::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& )
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
Sequence< Any > SdOptionsItem::GetProperties( const Sequence< OUString >& rNames )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
return ConfigItem::GetProperties( rNames );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
sal_Bool SdOptionsItem::PutProperties( const Sequence< OUString >& rNames, const Sequence< Any>& rValues )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
return ConfigItem::PutProperties( rNames, rValues );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
void SdOptionsItem::SetModified()
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
ConfigItem::SetModified();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// --------------------
|
|
|
|
// - SdOptionsGeneric -
|
|
|
|
// --------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SdOptionsGeneric::SdOptionsGeneric( USHORT nConfigId, const OUString& rSubTree ) :
|
|
|
|
maSubTree ( rSubTree ),
|
|
|
|
mpCfgItem ( NULL ),
|
|
|
|
mnConfigId ( nConfigId ),
|
|
|
|
mbInit ( rSubTree.getLength() == 0 )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
void SdOptionsGeneric::Init() const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
if( !mbInit )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-10-11 03:27:13 -05:00
|
|
|
SdOptionsGeneric* pThis = const_cast<SdOptionsGeneric*>(this);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
if( !mpCfgItem )
|
|
|
|
pThis->mpCfgItem = new SdOptionsItem( *this, maSubTree );
|
|
|
|
|
|
|
|
const Sequence< OUString > aNames( GetPropertyNames() );
|
|
|
|
const Sequence< Any > aValues = mpCfgItem->GetProperties( aNames );
|
|
|
|
|
|
|
|
if( aNames.getLength() && ( aValues.getLength() == aNames.getLength() ) )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
const Any* pValues = aValues.getConstArray();
|
|
|
|
|
|
|
|
pThis->EnableModify( FALSE );
|
|
|
|
pThis->mbInit = pThis->ReadData( pValues );
|
|
|
|
pThis->EnableModify( TRUE );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else
|
2000-09-28 12:05:36 -05:00
|
|
|
pThis->mbInit = TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
SdOptionsGeneric::~SdOptionsGeneric()
|
|
|
|
{
|
|
|
|
if( mpCfgItem )
|
|
|
|
delete mpCfgItem;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsGeneric::Commit( SdOptionsItem& rCfgItem ) const
|
|
|
|
{
|
|
|
|
const Sequence< OUString > aNames( GetPropertyNames() );
|
|
|
|
Sequence< Any > aValues( aNames.getLength() );
|
|
|
|
|
|
|
|
if( aNames.getLength() && ( aValues.getLength() == aNames.getLength() ) )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-10-11 03:27:13 -05:00
|
|
|
if( (const_cast<SdOptionsGeneric*>(this))->WriteData( aValues.getArray() ) )
|
2000-09-28 12:05:36 -05:00
|
|
|
rCfgItem.PutProperties( aNames, aValues );
|
2000-09-18 11:07:07 -05:00
|
|
|
else
|
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
DBG_ERROR( "PutProperties failed" );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Sequence< OUString > SdOptionsGeneric::GetPropertyNames() const
|
|
|
|
{
|
|
|
|
ULONG nCount;
|
|
|
|
const char** ppPropNames;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
GetPropNameArray( ppPropNames, nCount );
|
|
|
|
|
|
|
|
Sequence< OUString > aNames( nCount );
|
|
|
|
OUString* pNames = aNames.getArray();
|
|
|
|
|
2000-11-24 11:54:34 -06:00
|
|
|
for( ULONG i = 0; i < nCount; i++ )
|
2000-09-28 12:05:36 -05:00
|
|
|
pNames[ i ] = OUString::createFromAscii( ppPropNames[ i ] );
|
|
|
|
|
|
|
|
return aNames;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-10-11 04:25:52 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsGeneric::Store()
|
|
|
|
{
|
|
|
|
if( mpCfgItem )
|
|
|
|
mpCfgItem->Commit();
|
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2002-11-25 09:29:38 -06:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
bool SdOptionsGeneric::isMetricSystem()
|
|
|
|
{
|
|
|
|
SvtSysLocale aSysLocale;
|
|
|
|
MeasurementSystem eSys = aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum();
|
|
|
|
|
|
|
|
return ( eSys == MEASURE_METRIC );
|
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsLayout
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptionsLayout::SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ) :
|
|
|
|
SdOptionsGeneric( nConfigId, bUseConfig ?
|
|
|
|
( ( SDCFG_DRAW == nConfigId ) ?
|
|
|
|
B2U( "Office.Draw/Layout" ) :
|
|
|
|
B2U( "Office.Impress/Layout" ) ) :
|
2003-11-25 03:49:06 -06:00
|
|
|
OUString() ),
|
|
|
|
bRuler( TRUE ),
|
|
|
|
bMoveOutline( TRUE ),
|
|
|
|
bDragStripes( FALSE ),
|
2006-12-12 09:53:31 -06:00
|
|
|
bHandlesBezier( FALSE ),
|
|
|
|
bHelplines( TRUE ),
|
|
|
|
nMetric((UINT16)(isMetricSystem() ? FUNIT_CM : FUNIT_INCH)),
|
2003-11-25 03:49:06 -06:00
|
|
|
nDefTab( 1250 )
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
EnableModify( TRUE );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
return( IsRulerVisible() == rOpt.IsRulerVisible() &&
|
|
|
|
IsMoveOutline() == rOpt.IsMoveOutline() &&
|
|
|
|
IsDragStripes() == rOpt.IsDragStripes() &&
|
|
|
|
IsHandlesBezier() == rOpt.IsHandlesBezier() &&
|
|
|
|
IsHelplines() == rOpt.IsHelplines() &&
|
|
|
|
GetMetric() == rOpt.GetMetric() &&
|
|
|
|
GetDefTab() == rOpt.GetDefTab() );
|
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
void SdOptionsLayout::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
2002-11-25 09:29:38 -06:00
|
|
|
static const char* aPropNamesMetric[] =
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
"Display/Ruler",
|
|
|
|
"Display/Bezier",
|
2000-09-29 09:39:42 -05:00
|
|
|
"Display/Contour",
|
|
|
|
"Display/Guide",
|
|
|
|
"Display/Helpline",
|
2000-11-20 09:45:22 -06:00
|
|
|
"Other/MeasureUnit/Metric",
|
|
|
|
"Other/TabStop/Metric"
|
2000-09-28 12:05:36 -05:00
|
|
|
};
|
|
|
|
|
2002-11-25 09:29:38 -06:00
|
|
|
static const char* aPropNamesNonMetric[] =
|
|
|
|
{
|
|
|
|
"Display/Ruler",
|
|
|
|
"Display/Bezier",
|
|
|
|
"Display/Contour",
|
|
|
|
"Display/Guide",
|
|
|
|
"Display/Helpline",
|
|
|
|
"Other/MeasureUnit/NonMetric",
|
|
|
|
"Other/TabStop/NonMetric"
|
|
|
|
};
|
|
|
|
|
2000-09-29 09:39:42 -05:00
|
|
|
rCount = 7;
|
2002-11-25 09:29:38 -06:00
|
|
|
|
|
|
|
if( isMetricSystem() )
|
|
|
|
ppNames = aPropNamesMetric;
|
|
|
|
else
|
|
|
|
ppNames = aPropNamesNonMetric;
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
BOOL SdOptionsLayout::ReadData( const Any* pValues )
|
|
|
|
{
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[0].hasValue() ) SetRulerVisible( *(sal_Bool*) pValues[ 0 ].getValue() );
|
|
|
|
if( pValues[1].hasValue() ) SetHandlesBezier( *(sal_Bool*) pValues[ 1 ].getValue() );
|
|
|
|
if( pValues[2].hasValue() ) SetMoveOutline( *(sal_Bool*) pValues[ 2 ].getValue() );
|
|
|
|
if( pValues[3].hasValue() ) SetDragStripes( *(sal_Bool*) pValues[ 3 ].getValue() );
|
|
|
|
if( pValues[4].hasValue() ) SetHelplines( *(sal_Bool*) pValues[ 4 ].getValue() );
|
2000-11-24 11:54:34 -06:00
|
|
|
if( pValues[5].hasValue() ) SetMetric( (UINT16) *(sal_Int32*) pValues[ 5 ].getValue() );
|
|
|
|
if( pValues[6].hasValue() ) SetDefTab( (UINT16) *(sal_Int32*) pValues[ 6 ].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
BOOL SdOptionsLayout::WriteData( Any* pValues ) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
pValues[ 0 ] <<= IsRulerVisible();
|
|
|
|
pValues[ 1 ] <<= IsHandlesBezier();
|
2000-09-29 09:39:42 -05:00
|
|
|
pValues[ 2 ] <<= IsMoveOutline();
|
|
|
|
pValues[ 3 ] <<= IsDragStripes();
|
|
|
|
pValues[ 4 ] <<= IsHelplines();
|
|
|
|
pValues[ 5 ] <<= (sal_Int32) GetMetric();
|
|
|
|
pValues[ 6 ] <<= (sal_Int32) GetDefTab();
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsLayoutItem
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsLayoutItem::SdOptionsLayoutItem( USHORT _nWhich )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsLayout ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsLayoutItem::SdOptionsLayoutItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsLayout ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
maOptionsLayout.SetMetric( pOpts->GetMetric() );
|
|
|
|
maOptionsLayout.SetDefTab( pOpts->GetDefTab() );
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
if( pView )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsLayout.SetRulerVisible( pView->HasRuler() );
|
|
|
|
maOptionsLayout.SetMoveOutline( !pView->IsNoDragXorPolys() );
|
|
|
|
maOptionsLayout.SetDragStripes( pView->IsDragStripes() );
|
|
|
|
maOptionsLayout.SetHandlesBezier( pView->IsPlusHandlesAlwaysVisible() );
|
|
|
|
maOptionsLayout.SetHelplines( pView->IsHlplVisible() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
2006-12-12 09:53:31 -06:00
|
|
|
else if( pOpts )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsLayout.SetRulerVisible( pOpts->IsRulerVisible() );
|
|
|
|
maOptionsLayout.SetMoveOutline( pOpts->IsMoveOutline() );
|
|
|
|
maOptionsLayout.SetDragStripes( pOpts->IsDragStripes() );
|
|
|
|
maOptionsLayout.SetHandlesBezier( pOpts->IsHandlesBezier() );
|
|
|
|
maOptionsLayout.SetHelplines( pOpts->IsHelplines() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SfxPoolItem* SdOptionsLayoutItem::Clone( SfxItemPool* ) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
return new SdOptionsLayoutItem( *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
int SdOptionsLayoutItem::operator==( const SfxPoolItem& rAttr ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
const bool bSameType = SfxPoolItem::operator==( rAttr );
|
|
|
|
DBG_ASSERT( bSameType, "SdOptionsLayoutItem::operator==(), differen pool item type!" );
|
|
|
|
return bSameType && ( maOptionsLayout == static_cast< const SdOptionsLayoutItem& >( rAttr ).maOptionsLayout );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsLayoutItem::SetOptions( SdOptions* pOpts ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
pOpts->SetRulerVisible( maOptionsLayout.IsRulerVisible() );
|
|
|
|
pOpts->SetMoveOutline( maOptionsLayout.IsMoveOutline() );
|
|
|
|
pOpts->SetDragStripes( maOptionsLayout.IsDragStripes() );
|
|
|
|
pOpts->SetHandlesBezier( maOptionsLayout.IsHandlesBezier() );
|
|
|
|
pOpts->SetHelplines( maOptionsLayout.IsHelplines() );
|
|
|
|
pOpts->SetMetric( maOptionsLayout.GetMetric() );
|
|
|
|
pOpts->SetDefTab( maOptionsLayout.GetDefTab() );
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsContents
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptionsContents::SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ) :
|
|
|
|
SdOptionsGeneric( nConfigId, bUseConfig ?
|
|
|
|
( ( SDCFG_DRAW == nConfigId ) ?
|
|
|
|
B2U( "Office.Draw/Content" ) :
|
|
|
|
B2U( "Office.Impress/Content" ) ) :
|
2007-11-26 07:33:57 -06:00
|
|
|
OUString() )
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
EnableModify( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2007-11-26 07:33:57 -06:00
|
|
|
BOOL SdOptionsContents::operator==(const SdOptionsContents&) const
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
2007-11-26 07:33:57 -06:00
|
|
|
return true;
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsContents::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
|
|
|
static const char* aPropNames[] =
|
|
|
|
{
|
|
|
|
"Display/PicturePlaceholder",
|
|
|
|
"Display/ContourMode",
|
|
|
|
"Display/LineContour",
|
|
|
|
"Display/TextPlaceholder"
|
|
|
|
};
|
|
|
|
|
|
|
|
rCount = 4;
|
|
|
|
ppNames = aPropNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2007-11-26 07:33:57 -06:00
|
|
|
BOOL SdOptionsContents::ReadData(const Any*)
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsContents::WriteData( Any* pValues ) const
|
|
|
|
{
|
2007-11-26 07:33:57 -06:00
|
|
|
//#i80528# no draft anymore
|
|
|
|
pValues[ 0 ] <<= (BOOL)false;
|
|
|
|
pValues[ 1 ] <<= (BOOL)false;
|
|
|
|
pValues[ 2 ] <<= (BOOL)false;
|
|
|
|
pValues[ 3 ] <<= (BOOL)false;
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsContentsItem
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2007-11-26 07:33:57 -06:00
|
|
|
SdOptionsContentsItem::SdOptionsContentsItem(USHORT _nWhich, SdOptions*, ::sd::FrameView*)
|
2006-12-12 09:53:31 -06:00
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsContents ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SfxPoolItem* SdOptionsContentsItem::Clone( SfxItemPool* ) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
return new SdOptionsContentsItem( *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
int SdOptionsContentsItem::operator==( const SfxPoolItem& rAttr ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
const bool bSameType = SfxPoolItem::operator==(rAttr);
|
|
|
|
DBG_ASSERT( bSameType, "SdOptionsContentsItem::operator==(), differen pool item type!" );
|
|
|
|
return bSameType && ( maOptionsContents == static_cast<const SdOptionsContentsItem&>( rAttr ).maOptionsContents );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2007-11-26 07:33:57 -06:00
|
|
|
void SdOptionsContentsItem::SetOptions(SdOptions*) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsMisc
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) :
|
|
|
|
SdOptionsGeneric( nConfigId, bUseConfig ?
|
|
|
|
( ( SDCFG_DRAW == nConfigId ) ?
|
|
|
|
B2U( "Office.Draw/Misc" ) :
|
|
|
|
B2U( "Office.Impress/Misc" ) ) :
|
2003-11-25 03:49:06 -06:00
|
|
|
OUString() ),
|
2006-12-12 09:53:31 -06:00
|
|
|
// #97016#
|
|
|
|
nDefaultObjectSizeWidth(8000),
|
|
|
|
nDefaultObjectSizeHeight(5000),
|
2003-11-25 03:49:06 -06:00
|
|
|
bStartWithTemplate( TRUE ),
|
|
|
|
bMarkedHitMovesAlways( TRUE ),
|
|
|
|
bMoveOnlyDragging( FALSE ),
|
|
|
|
bCrookNoContortion( FALSE ),
|
|
|
|
bQuickEdit( GetConfigId() != SDCFG_DRAW ),
|
|
|
|
bMasterPageCache( TRUE ),
|
|
|
|
bDragWithCopy( FALSE ),
|
|
|
|
bPickThrough( TRUE ),
|
|
|
|
bBigHandles( FALSE ),
|
|
|
|
bDoubleClickTextEdit( TRUE ),
|
|
|
|
bClickChangeRotation( FALSE ),
|
|
|
|
bStartWithActualPage( FALSE ),
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 07:44:12 -06:00
|
|
|
bSolidDragging( TRUE ),
|
2003-11-25 03:49:06 -06:00
|
|
|
bSolidMarkHdl( TRUE ),
|
2006-12-12 09:53:31 -06:00
|
|
|
bSummationOfParagraphs( FALSE ),
|
2003-11-25 03:49:06 -06:00
|
|
|
// #90356#
|
|
|
|
bShowUndoDeleteWarning( TRUE ),
|
2007-07-17 08:29:52 -05:00
|
|
|
bSlideshowRespectZOrder( TRUE ),
|
2009-09-16 08:55:36 -05:00
|
|
|
bShowComments( TRUE ),
|
2006-03-06 02:04:40 -06:00
|
|
|
bPreviewNewEffects( TRUE ),
|
|
|
|
bPreviewChangedEffects( FALSE ),
|
2006-10-06 03:51:32 -05:00
|
|
|
bPreviewTransitions( TRUE ),
|
2006-12-12 09:53:31 -06:00
|
|
|
mnDisplay( 0 ),
|
|
|
|
// The default for 6.1-and-above documents is to use printer-independent
|
|
|
|
// formatting.
|
|
|
|
mnPrinterIndependentLayout (1)
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
EnableModify( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
|
|
|
|
{
|
|
|
|
return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
|
|
|
|
IsMarkedHitMovesAlways() == rOpt.IsMarkedHitMovesAlways() &&
|
|
|
|
IsMoveOnlyDragging() == rOpt.IsMoveOnlyDragging() &&
|
|
|
|
IsCrookNoContortion() == rOpt.IsCrookNoContortion() &&
|
|
|
|
IsQuickEdit() == rOpt.IsQuickEdit() &&
|
|
|
|
IsMasterPagePaintCaching() == rOpt.IsMasterPagePaintCaching() &&
|
|
|
|
IsDragWithCopy() == rOpt.IsDragWithCopy() &&
|
|
|
|
IsPickThrough() == rOpt.IsPickThrough() &&
|
|
|
|
IsBigHandles() == rOpt.IsBigHandles() &&
|
|
|
|
IsDoubleClickTextEdit() == rOpt.IsDoubleClickTextEdit() &&
|
|
|
|
IsClickChangeRotation() == rOpt.IsClickChangeRotation() &&
|
|
|
|
IsStartWithActualPage() == rOpt.IsStartWithActualPage() &&
|
2001-04-02 05:14:24 -05:00
|
|
|
IsSummationOfParagraphs() == rOpt.IsSummationOfParagraphs() &&
|
2000-10-17 09:05:58 -05:00
|
|
|
IsSolidDragging() == rOpt.IsSolidDragging() &&
|
2001-09-28 06:02:46 -05:00
|
|
|
IsSolidMarkHdl() == rOpt.IsSolidMarkHdl() &&
|
|
|
|
// #90356#
|
2002-02-15 09:45:09 -06:00
|
|
|
IsShowUndoDeleteWarning() == rOpt.IsShowUndoDeleteWarning() &&
|
2007-07-17 08:29:52 -05:00
|
|
|
IsSlideshowRespectZOrder() == rOpt.IsSlideshowRespectZOrder() &&
|
2003-04-24 08:36:54 -05:00
|
|
|
GetPrinterIndependentLayout() == rOpt.GetPrinterIndependentLayout() &&
|
2002-02-15 09:45:09 -06:00
|
|
|
// #97016#
|
|
|
|
GetDefaultObjectSizeWidth() == rOpt.GetDefaultObjectSizeWidth() &&
|
2005-01-21 11:19:28 -06:00
|
|
|
GetDefaultObjectSizeHeight() == rOpt.GetDefaultObjectSizeHeight() &&
|
|
|
|
|
|
|
|
IsPreviewNewEffects() == rOpt.IsPreviewNewEffects() &&
|
|
|
|
IsPreviewChangedEffects() == rOpt.IsPreviewChangedEffects() &&
|
2006-10-06 03:51:32 -05:00
|
|
|
IsPreviewTransitions() == rOpt.IsPreviewTransitions() &&
|
2009-09-16 08:55:36 -05:00
|
|
|
GetDisplay() == rOpt.GetDisplay() &&
|
|
|
|
IsShowComments() == rOpt.IsShowComments()
|
2001-09-28 06:02:46 -05:00
|
|
|
);
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsMisc::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
|
|
|
static const char* aPropNames[] =
|
|
|
|
{
|
2000-10-17 09:05:58 -05:00
|
|
|
"ObjectMoveable",
|
2000-09-28 12:05:36 -05:00
|
|
|
"NoDistort",
|
|
|
|
"TextObject/QuickEditing",
|
|
|
|
"BackgroundCache",
|
|
|
|
"CopyWhileMoving",
|
2000-10-17 09:05:58 -05:00
|
|
|
"TextObject/Selectable",
|
2000-09-28 12:05:36 -05:00
|
|
|
"BigHandles",
|
|
|
|
"DclickTextedit",
|
|
|
|
"RotateClick",
|
|
|
|
"Preview",
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 07:44:12 -06:00
|
|
|
"ModifyWithAttributes",
|
2000-10-17 09:05:58 -05:00
|
|
|
"SimpleHandles",
|
2002-02-15 09:45:09 -06:00
|
|
|
// #97016#
|
|
|
|
"DefaultObjectSize/Width",
|
|
|
|
"DefaultObjectSize/Height",
|
2000-09-28 12:05:36 -05:00
|
|
|
|
2003-04-24 08:36:54 -05:00
|
|
|
"Compatibility/PrinterIndependentLayout",
|
|
|
|
|
2009-09-16 08:55:36 -05:00
|
|
|
"ShowComments",
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// just for impress
|
|
|
|
"NewDoc/AutoPilot",
|
2001-04-02 05:14:24 -05:00
|
|
|
"Start/CurrentPage",
|
2001-09-28 06:02:46 -05:00
|
|
|
"Compatibility/AddBetween",
|
|
|
|
// #90356#
|
2005-01-21 11:19:28 -06:00
|
|
|
"ShowUndoDeleteWarning",
|
2007-07-17 08:29:52 -05:00
|
|
|
"SlideshowRespectZOrder",
|
2005-01-21 11:19:28 -06:00
|
|
|
|
|
|
|
"PreviewNewEffects",
|
|
|
|
"PreviewChangedEffects",
|
2006-10-06 03:51:32 -05:00
|
|
|
"PreviewTransitions",
|
|
|
|
|
|
|
|
"Display"
|
2000-09-28 12:05:36 -05:00
|
|
|
};
|
|
|
|
|
2009-09-16 08:55:36 -05:00
|
|
|
rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 25 : 16 );
|
2000-09-28 12:05:36 -05:00
|
|
|
ppNames = aPropNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsMisc::ReadData( const Any* pValues )
|
|
|
|
{
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[0].hasValue() ) SetMarkedHitMovesAlways( *(sal_Bool*) pValues[ 0 ].getValue() );
|
|
|
|
if( pValues[1].hasValue() ) SetCrookNoContortion( *(sal_Bool*) pValues[ 1 ].getValue() );
|
|
|
|
if( pValues[2].hasValue() ) SetQuickEdit( *(sal_Bool*)pValues[ 2 ].getValue() );
|
|
|
|
if( pValues[3].hasValue() ) SetMasterPagePaintCaching( *(sal_Bool*) pValues[ 3 ].getValue() );
|
|
|
|
if( pValues[4].hasValue() ) SetDragWithCopy( *(sal_Bool*) pValues[ 4 ].getValue() );
|
|
|
|
if( pValues[5].hasValue() ) SetPickThrough( *(sal_Bool*) pValues[ 5 ].getValue() );
|
|
|
|
if( pValues[6].hasValue() ) SetBigHandles( *(sal_Bool*) pValues[ 6 ].getValue() );
|
|
|
|
if( pValues[7].hasValue() ) SetDoubleClickTextEdit( *(sal_Bool*) pValues[ 7 ].getValue() );
|
|
|
|
if( pValues[8].hasValue() ) SetClickChangeRotation( *(sal_Bool*) pValues[ 8 ].getValue() );
|
2005-01-27 07:12:09 -06:00
|
|
|
// if( pValues[9].hasValue() ) SetPreviewQuality( FRound( *(double*) pValues[ 9 ].getValue() ) );
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[10].hasValue() ) SetSolidDragging( *(sal_Bool*) pValues[ 10 ].getValue() );
|
|
|
|
if( pValues[11].hasValue() ) SetSolidMarkHdl( *(sal_Bool*) pValues[ 11 ].getValue() );
|
2002-02-15 09:45:09 -06:00
|
|
|
// #97016#
|
|
|
|
if( pValues[12].hasValue() ) SetDefaultObjectSizeWidth( *(sal_uInt32*) pValues[ 12 ].getValue() );
|
|
|
|
if( pValues[13].hasValue() ) SetDefaultObjectSizeHeight( *(sal_uInt32*) pValues[ 13 ].getValue() );
|
2003-04-24 08:36:54 -05:00
|
|
|
if( pValues[14].hasValue() ) SetPrinterIndependentLayout( *(sal_uInt16*) pValues[ 14 ].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
2010-02-15 09:09:39 -06:00
|
|
|
if( pValues[15].hasValue() )
|
|
|
|
SetShowComments( *(sal_Bool*) pValues[ 15 ].getValue() );
|
2009-09-16 08:55:36 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
// just for Impress
|
|
|
|
if( GetConfigId() == SDCFG_IMPRESS )
|
|
|
|
{
|
2002-02-15 09:45:09 -06:00
|
|
|
if( pValues[16].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetStartWithTemplate( *(sal_Bool*) pValues[ 16 ].getValue() );
|
2002-02-15 09:45:09 -06:00
|
|
|
if( pValues[17].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetStartWithActualPage( *(sal_Bool*) pValues[ 17 ].getValue() );
|
2003-04-24 08:36:54 -05:00
|
|
|
if( pValues[18].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetSummationOfParagraphs( *(sal_Bool*) pValues[ 18 ].getValue() );
|
|
|
|
// #90356#
|
2005-01-21 11:19:28 -06:00
|
|
|
if( pValues[19].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetShowUndoDeleteWarning( *(sal_Bool*) pValues[ 19 ].getValue() );
|
2005-01-21 11:19:28 -06:00
|
|
|
|
|
|
|
if( pValues[20].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetSlideshowRespectZOrder(*(sal_Bool*) pValues[ 20 ].getValue());
|
2005-01-21 11:19:28 -06:00
|
|
|
|
|
|
|
if( pValues[21].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetPreviewNewEffects(*(sal_Bool*) pValues[ 21 ].getValue());
|
2005-01-21 11:19:28 -06:00
|
|
|
|
2006-10-06 03:51:32 -05:00
|
|
|
if( pValues[22].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetPreviewChangedEffects(*(sal_Bool*) pValues[ 22 ].getValue());
|
2007-07-17 08:29:52 -05:00
|
|
|
|
|
|
|
if( pValues[23].hasValue() )
|
2009-09-16 08:55:36 -05:00
|
|
|
SetPreviewTransitions(*(sal_Bool*) pValues[ 23 ].getValue());
|
|
|
|
|
|
|
|
if( pValues[24].hasValue() )
|
|
|
|
SetDisplay(*(sal_Int32*) pValues[ 24 ].getValue());
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsMisc::WriteData( Any* pValues ) const
|
|
|
|
{
|
2000-10-17 09:05:58 -05:00
|
|
|
pValues[ 0 ] <<= IsMarkedHitMovesAlways();
|
|
|
|
pValues[ 1 ] <<= IsCrookNoContortion();
|
|
|
|
pValues[ 2 ] <<= IsQuickEdit();
|
|
|
|
pValues[ 3 ] <<= IsMasterPagePaintCaching();
|
|
|
|
pValues[ 4 ] <<= IsDragWithCopy();
|
|
|
|
pValues[ 5 ] <<= IsPickThrough();
|
|
|
|
pValues[ 6 ] <<= IsBigHandles();
|
|
|
|
pValues[ 7 ] <<= IsDoubleClickTextEdit();
|
|
|
|
pValues[ 8 ] <<= IsClickChangeRotation();
|
2005-01-27 07:12:09 -06:00
|
|
|
// The preview is not supported anymore. Use a dummy value.
|
|
|
|
pValues[ 9 ] <<= (double)0;// GetPreviewQuality();
|
2000-10-17 09:05:58 -05:00
|
|
|
pValues[ 10 ] <<= IsSolidDragging();
|
|
|
|
pValues[ 11 ] <<= IsSolidMarkHdl();
|
2002-02-15 09:45:09 -06:00
|
|
|
// #97016#
|
|
|
|
pValues[ 12 ] <<= GetDefaultObjectSizeWidth();
|
|
|
|
pValues[ 13 ] <<= GetDefaultObjectSizeHeight();
|
2003-04-24 08:36:54 -05:00
|
|
|
pValues[ 14 ] <<= GetPrinterIndependentLayout();
|
2009-09-16 08:55:36 -05:00
|
|
|
pValues[ 15 ] <<= (sal_Bool)IsShowComments();
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
// just for Impress
|
|
|
|
if( GetConfigId() == SDCFG_IMPRESS )
|
|
|
|
{
|
2009-09-16 08:55:36 -05:00
|
|
|
pValues[ 16 ] <<= IsStartWithTemplate();
|
|
|
|
pValues[ 17 ] <<= IsStartWithActualPage();
|
|
|
|
pValues[ 18 ] <<= IsSummationOfParagraphs();
|
2001-09-28 06:02:46 -05:00
|
|
|
// #90356#
|
2009-09-16 08:55:36 -05:00
|
|
|
pValues[ 19 ] <<= IsShowUndoDeleteWarning();
|
|
|
|
pValues[ 20 ] <<= IsSlideshowRespectZOrder();
|
2005-01-21 11:19:28 -06:00
|
|
|
|
2009-09-16 08:55:36 -05:00
|
|
|
pValues[ 21 ] <<= IsPreviewNewEffects();
|
|
|
|
pValues[ 22 ] <<= IsPreviewChangedEffects();
|
|
|
|
pValues[ 23 ] <<= IsPreviewTransitions();
|
2006-10-06 03:51:32 -05:00
|
|
|
|
2009-09-16 08:55:36 -05:00
|
|
|
pValues[ 24 ] <<= GetDisplay();
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsMiscItem
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsMisc ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsMisc ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
maOptionsMisc.SetStartWithTemplate( pOpts->IsStartWithTemplate() );
|
|
|
|
maOptionsMisc.SetStartWithActualPage( pOpts->IsStartWithActualPage() );
|
|
|
|
maOptionsMisc.SetSummationOfParagraphs( pOpts->IsSummationOfParagraphs() );
|
|
|
|
// #90356#
|
|
|
|
maOptionsMisc.SetShowUndoDeleteWarning( pOpts->IsShowUndoDeleteWarning() );
|
|
|
|
maOptionsMisc.SetPrinterIndependentLayout( pOpts->GetPrinterIndependentLayout() );
|
|
|
|
// #97016#
|
|
|
|
maOptionsMisc.SetDefaultObjectSizeWidth( pOpts->GetDefaultObjectSizeWidth() );
|
|
|
|
maOptionsMisc.SetDefaultObjectSizeHeight( pOpts->GetDefaultObjectSizeHeight() );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsMisc.SetPreviewNewEffects(pOpts->IsPreviewNewEffects());
|
|
|
|
maOptionsMisc.SetPreviewChangedEffects(pOpts->IsPreviewChangedEffects());
|
|
|
|
maOptionsMisc.SetPreviewTransitions(pOpts->IsPreviewTransitions());
|
2005-01-21 11:19:28 -06:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsMisc.SetDisplay(pOpts->GetDisplay());
|
2010-02-15 09:09:39 -06:00
|
|
|
maOptionsMisc.SetShowComments( pOpts->IsShowComments() );
|
2006-12-12 09:53:31 -06:00
|
|
|
}
|
2006-10-06 03:51:32 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
if( pView )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsMisc.SetMarkedHitMovesAlways( pView->IsMarkedHitMovesAlways() );
|
|
|
|
maOptionsMisc.SetMoveOnlyDragging( pView->IsMoveOnlyDragging() );
|
|
|
|
maOptionsMisc.SetCrookNoContortion( pView->IsCrookNoContortion() );
|
|
|
|
maOptionsMisc.SetQuickEdit( pView->IsQuickEdit() );
|
2003-11-24 10:09:17 -06:00
|
|
|
|
2004-10-12 03:55:59 -05:00
|
|
|
// #i26631#
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsMisc.SetMasterPagePaintCaching( pView->IsMasterPagePaintCaching() );
|
|
|
|
|
|
|
|
maOptionsMisc.SetDragWithCopy( pView->IsDragWithCopy() );
|
|
|
|
maOptionsMisc.SetPickThrough( (BOOL)pView->GetModel()->IsPickThroughTransparentTextFrames() );
|
|
|
|
maOptionsMisc.SetBigHandles( (BOOL)pView->IsBigHandles() );
|
|
|
|
maOptionsMisc.SetDoubleClickTextEdit( pView->IsDoubleClickTextEdit() );
|
|
|
|
maOptionsMisc.SetClickChangeRotation( pView->IsClickChangeRotation() );
|
|
|
|
maOptionsMisc.SetSolidDragging( pView->IsSolidDragging() );
|
|
|
|
maOptionsMisc.SetSolidMarkHdl( pView->IsSolidMarkHdl() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
2006-12-12 09:53:31 -06:00
|
|
|
else if( pOpts )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsMisc.SetMarkedHitMovesAlways( pOpts->IsMarkedHitMovesAlways() );
|
|
|
|
maOptionsMisc.SetMoveOnlyDragging( pOpts->IsMoveOnlyDragging() );
|
|
|
|
maOptionsMisc.SetCrookNoContortion( pOpts->IsCrookNoContortion() );
|
|
|
|
maOptionsMisc.SetQuickEdit( pOpts->IsQuickEdit() );
|
|
|
|
maOptionsMisc.SetMasterPagePaintCaching( pOpts->IsMasterPagePaintCaching() );
|
|
|
|
maOptionsMisc.SetDragWithCopy( pOpts->IsDragWithCopy() );
|
|
|
|
maOptionsMisc.SetPickThrough( pOpts->IsPickThrough() );
|
|
|
|
maOptionsMisc.SetBigHandles( pOpts->IsBigHandles() );
|
|
|
|
maOptionsMisc.SetDoubleClickTextEdit( pOpts->IsDoubleClickTextEdit() );
|
|
|
|
maOptionsMisc.SetClickChangeRotation( pOpts->IsClickChangeRotation() );
|
|
|
|
maOptionsMisc.SetSolidDragging( pOpts->IsSolidDragging() );
|
|
|
|
maOptionsMisc.SetSolidMarkHdl( pOpts->IsSolidMarkHdl() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SfxPoolItem* SdOptionsMiscItem::Clone( SfxItemPool* ) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
return new SdOptionsMiscItem( *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
int SdOptionsMiscItem::operator==( const SfxPoolItem& rAttr ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
const bool bSameType = SfxPoolItem::operator==(rAttr);
|
|
|
|
DBG_ASSERT( bSameType, "SdOptionsMiscItem::operator==(), differen pool item type!" );
|
|
|
|
return bSameType && ( maOptionsMisc == static_cast< const SdOptionsMiscItem& >(rAttr).maOptionsMisc );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
pOpts->SetStartWithTemplate( maOptionsMisc.IsStartWithTemplate() );
|
|
|
|
pOpts->SetMarkedHitMovesAlways( maOptionsMisc.IsMarkedHitMovesAlways() );
|
|
|
|
pOpts->SetMoveOnlyDragging( maOptionsMisc.IsMoveOnlyDragging() );
|
|
|
|
pOpts->SetCrookNoContortion( maOptionsMisc.IsCrookNoContortion() );
|
|
|
|
pOpts->SetQuickEdit( maOptionsMisc.IsQuickEdit() );
|
|
|
|
pOpts->SetMasterPagePaintCaching( maOptionsMisc.IsMasterPagePaintCaching() );
|
|
|
|
pOpts->SetDragWithCopy( maOptionsMisc.IsDragWithCopy() );
|
|
|
|
pOpts->SetPickThrough( maOptionsMisc.IsPickThrough() );
|
|
|
|
pOpts->SetBigHandles( maOptionsMisc.IsBigHandles() );
|
|
|
|
pOpts->SetDoubleClickTextEdit( maOptionsMisc.IsDoubleClickTextEdit() );
|
|
|
|
pOpts->SetClickChangeRotation( maOptionsMisc.IsClickChangeRotation() );
|
|
|
|
pOpts->SetStartWithActualPage( maOptionsMisc.IsStartWithActualPage() );
|
|
|
|
pOpts->SetSummationOfParagraphs( maOptionsMisc.IsSummationOfParagraphs() );
|
|
|
|
pOpts->SetSolidDragging( maOptionsMisc.IsSolidDragging() );
|
|
|
|
pOpts->SetSolidMarkHdl( maOptionsMisc.IsSolidMarkHdl() );
|
|
|
|
// #90356#
|
|
|
|
pOpts->SetShowUndoDeleteWarning( maOptionsMisc.IsShowUndoDeleteWarning() );
|
|
|
|
pOpts->SetPrinterIndependentLayout( maOptionsMisc.GetPrinterIndependentLayout() );
|
2010-02-15 09:09:39 -06:00
|
|
|
pOpts->SetShowComments( maOptionsMisc.IsShowComments() );
|
2006-12-12 09:53:31 -06:00
|
|
|
// #97016#
|
|
|
|
pOpts->SetDefaultObjectSizeWidth( maOptionsMisc.GetDefaultObjectSizeWidth() );
|
|
|
|
pOpts->SetDefaultObjectSizeHeight( maOptionsMisc.GetDefaultObjectSizeHeight() );
|
2005-01-21 11:19:28 -06:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
pOpts->SetPreviewNewEffects( maOptionsMisc.IsPreviewNewEffects() );
|
|
|
|
pOpts->SetPreviewChangedEffects( maOptionsMisc.IsPreviewChangedEffects() );
|
|
|
|
pOpts->SetPreviewTransitions( maOptionsMisc.IsPreviewTransitions() );
|
2006-10-06 03:51:32 -05:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
pOpts->SetDisplay( maOptionsMisc.GetDisplay() );
|
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsSnap
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptionsSnap::SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ) :
|
|
|
|
SdOptionsGeneric( nConfigId, bUseConfig ?
|
|
|
|
( ( SDCFG_DRAW == nConfigId ) ?
|
|
|
|
B2U( "Office.Draw/Snap" ) :
|
|
|
|
B2U( "Office.Impress/Snap" ) ) :
|
2003-11-25 03:49:06 -06:00
|
|
|
OUString() ),
|
|
|
|
bSnapHelplines( TRUE ),
|
|
|
|
bSnapBorder( TRUE ),
|
|
|
|
bSnapFrame( FALSE ),
|
|
|
|
bSnapPoints( FALSE ),
|
|
|
|
bOrtho( FALSE ),
|
|
|
|
bBigOrtho( TRUE ),
|
|
|
|
bRotate( FALSE ),
|
|
|
|
nSnapArea( 5 ),
|
|
|
|
nAngle( 1500 ),
|
|
|
|
nBezAngle( 1500 )
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
EnableModify( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
|
|
|
|
{
|
|
|
|
return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
|
|
|
|
IsSnapBorder() == rOpt.IsSnapBorder() &&
|
|
|
|
IsSnapFrame() == rOpt.IsSnapFrame() &&
|
|
|
|
IsSnapPoints() == rOpt.IsSnapPoints() &&
|
|
|
|
IsOrtho() == rOpt.IsOrtho() &&
|
|
|
|
IsBigOrtho() == rOpt.IsBigOrtho() &&
|
|
|
|
IsRotate() == rOpt.IsRotate() &&
|
|
|
|
GetSnapArea() == rOpt.GetSnapArea() &&
|
|
|
|
GetAngle() == rOpt.GetAngle() &&
|
|
|
|
GetEliminatePolyPointLimitAngle() == rOpt.GetEliminatePolyPointLimitAngle() );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsSnap::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
|
|
|
static const char* aPropNames[] =
|
|
|
|
{
|
|
|
|
"Object/SnapLine",
|
|
|
|
"Object/PageMargin",
|
|
|
|
"Object/ObjectFrame",
|
|
|
|
"Object/ObjectPoint",
|
|
|
|
"Position/CreatingMoving",
|
|
|
|
"Position/ExtendEdges",
|
|
|
|
"Position/Rotating",
|
|
|
|
"Object/Range",
|
|
|
|
"Position/RotatingValue",
|
|
|
|
"Position/PointReduction"
|
|
|
|
};
|
|
|
|
|
|
|
|
rCount = 10;
|
|
|
|
ppNames = aPropNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsSnap::ReadData( const Any* pValues )
|
|
|
|
{
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[0].hasValue() ) SetSnapHelplines( *(sal_Bool*) pValues[ 0 ].getValue() );
|
|
|
|
if( pValues[1].hasValue() ) SetSnapBorder( *(sal_Bool*)pValues[ 1 ].getValue() );
|
|
|
|
if( pValues[2].hasValue() ) SetSnapFrame( *(sal_Bool*) pValues[ 2 ].getValue() );
|
|
|
|
if( pValues[3].hasValue() ) SetSnapPoints( *(sal_Bool*) pValues[ 3 ].getValue() );
|
|
|
|
if( pValues[4].hasValue() ) SetOrtho( *(sal_Bool*) pValues[ 4 ].getValue() );
|
|
|
|
if( pValues[5].hasValue() ) SetBigOrtho( *(sal_Bool*) pValues[ 5 ].getValue() );
|
|
|
|
if( pValues[6].hasValue() ) SetRotate( *(sal_Bool*) pValues[ 6 ].getValue() );
|
2000-11-24 11:54:34 -06:00
|
|
|
if( pValues[7].hasValue() ) SetSnapArea( (INT16) *(sal_Int32*) pValues[ 7 ].getValue() );
|
|
|
|
if( pValues[8].hasValue() ) SetAngle( (INT16) *(sal_Int32*) pValues[ 8 ].getValue() );
|
|
|
|
if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( (INT16) *(sal_Int32*) pValues[ 9 ].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsSnap::WriteData( Any* pValues ) const
|
|
|
|
{
|
|
|
|
pValues[ 0 ] <<= IsSnapHelplines();
|
|
|
|
pValues[ 1 ] <<= IsSnapBorder();
|
|
|
|
pValues[ 2 ] <<= IsSnapFrame();
|
|
|
|
pValues[ 3 ] <<= IsSnapPoints();
|
|
|
|
pValues[ 4 ] <<= IsOrtho();
|
|
|
|
pValues[ 5 ] <<= IsBigOrtho();
|
|
|
|
pValues[ 6 ] <<= IsRotate();
|
|
|
|
pValues[ 7 ] <<= (sal_Int32) GetSnapArea();
|
|
|
|
pValues[ 8 ] <<= (sal_Int32) GetAngle();
|
|
|
|
pValues[ 9 ] <<= (sal_Int32) GetEliminatePolyPointLimitAngle();
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsSnapItem
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsSnapItem::SdOptionsSnapItem( USHORT _nWhich )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsSnap ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsSnapItem::SdOptionsSnapItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsSnap ( 0, FALSE )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
if( pView )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsSnap.SetSnapHelplines( pView->IsHlplSnap() );
|
|
|
|
maOptionsSnap.SetSnapBorder( pView->IsBordSnap() );
|
|
|
|
maOptionsSnap.SetSnapFrame( pView->IsOFrmSnap() );
|
|
|
|
maOptionsSnap.SetSnapPoints( pView->IsOPntSnap() );
|
|
|
|
maOptionsSnap.SetOrtho( pView->IsOrtho() );
|
|
|
|
maOptionsSnap.SetBigOrtho( pView->IsBigOrtho() );
|
|
|
|
maOptionsSnap.SetRotate( pView->IsAngleSnapEnabled() );
|
|
|
|
maOptionsSnap.SetSnapArea( pView->GetSnapMagneticPixel() );
|
|
|
|
maOptionsSnap.SetAngle( (INT16) pView->GetSnapAngle() );
|
|
|
|
maOptionsSnap.SetEliminatePolyPointLimitAngle( (INT16) pView->GetEliminatePolyPointLimitAngle() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
2006-12-12 09:53:31 -06:00
|
|
|
else if( pOpts )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
maOptionsSnap.SetSnapHelplines( pOpts->IsSnapHelplines() );
|
|
|
|
maOptionsSnap.SetSnapBorder( pOpts->IsSnapBorder() );
|
|
|
|
maOptionsSnap.SetSnapFrame( pOpts->IsSnapFrame() );
|
|
|
|
maOptionsSnap.SetSnapPoints( pOpts->IsSnapPoints() );
|
|
|
|
maOptionsSnap.SetOrtho( pOpts->IsOrtho() );
|
|
|
|
maOptionsSnap.SetBigOrtho( pOpts->IsBigOrtho() );
|
|
|
|
maOptionsSnap.SetRotate( pOpts->IsRotate() );
|
|
|
|
maOptionsSnap.SetSnapArea( pOpts->GetSnapArea() );
|
|
|
|
maOptionsSnap.SetAngle( pOpts->GetAngle() );
|
|
|
|
maOptionsSnap.SetEliminatePolyPointLimitAngle( pOpts->GetEliminatePolyPointLimitAngle() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SfxPoolItem* SdOptionsSnapItem::Clone( SfxItemPool* ) const
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
return new SdOptionsSnapItem( *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
int SdOptionsSnapItem::operator==( const SfxPoolItem& rAttr ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
const bool bSameType = SfxPoolItem::operator==(rAttr);
|
|
|
|
DBG_ASSERT( bSameType, "SdOptionsSnapItem::operator==(), differen pool item type!" );
|
|
|
|
return bSameType && ( maOptionsSnap == static_cast< const SdOptionsSnapItem& >(rAttr).maOptionsSnap );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsSnapItem::SetOptions( SdOptions* pOpts ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
pOpts->SetSnapHelplines( maOptionsSnap.IsSnapHelplines() );
|
|
|
|
pOpts->SetSnapBorder( maOptionsSnap.IsSnapBorder() );
|
|
|
|
pOpts->SetSnapFrame( maOptionsSnap.IsSnapFrame() );
|
|
|
|
pOpts->SetSnapPoints( maOptionsSnap.IsSnapPoints() );
|
|
|
|
pOpts->SetOrtho( maOptionsSnap.IsOrtho() );
|
|
|
|
pOpts->SetBigOrtho( maOptionsSnap.IsBigOrtho() );
|
|
|
|
pOpts->SetRotate( maOptionsSnap.IsRotate() );
|
|
|
|
pOpts->SetSnapArea( maOptionsSnap.GetSnapArea() );
|
|
|
|
pOpts->SetAngle( maOptionsSnap.GetAngle() );
|
|
|
|
pOpts->SetEliminatePolyPointLimitAngle( maOptionsSnap.GetEliminatePolyPointLimitAngle() );
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsZoom
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) :
|
2000-09-29 09:39:42 -05:00
|
|
|
SdOptionsGeneric( nConfigId, ( bUseConfig && ( SDCFG_DRAW == nConfigId ) ) ?
|
|
|
|
B2U( "Office.Draw/Zoom" ) :
|
2003-11-25 03:49:06 -06:00
|
|
|
OUString() ),
|
|
|
|
nX( 1 ),
|
|
|
|
nY( 1 )
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
EnableModify( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
|
|
|
|
{
|
|
|
|
INT32 nX1, nX2, nY1, nY2;
|
|
|
|
|
|
|
|
GetScale( nX1, nY1 );
|
|
|
|
rOpt.GetScale( nX2, nY2 );
|
|
|
|
|
|
|
|
return( ( nX1 == nX2 ) &&
|
|
|
|
( nY1 == nY2 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsZoom::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
|
|
|
static const char* aPropNames[] =
|
|
|
|
{
|
|
|
|
"ScaleX",
|
|
|
|
"ScaleY"
|
|
|
|
};
|
|
|
|
|
|
|
|
rCount = ( GetConfigId() == SDCFG_DRAW ) ? 2 : 0;
|
|
|
|
ppNames = aPropNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsZoom::ReadData( const Any* pValues )
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
INT32 x = 1, y = 1;
|
2000-09-28 12:05:36 -05:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pValues[0].hasValue() ) x = ( *(sal_Int32*) pValues[ 0 ].getValue() );
|
|
|
|
if( pValues[1].hasValue() ) y = ( *(sal_Int32*) pValues[ 1 ].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SetScale( x, y );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsZoom::WriteData( Any* pValues ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
INT32 x, y;
|
2000-09-28 12:05:36 -05:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
GetScale( x, y );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
pValues[ 0 ] <<= (sal_Int32) x;
|
|
|
|
pValues[ 1 ] <<= (sal_Int32) y;
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsGrid
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptionsGrid::SdOptionsGrid( USHORT nConfigId, BOOL bUseConfig ) :
|
|
|
|
SdOptionsGeneric( nConfigId, bUseConfig ?
|
|
|
|
( ( SDCFG_DRAW == nConfigId ) ?
|
|
|
|
B2U( "Office.Draw/Grid" ) :
|
|
|
|
B2U( "Office.Impress/Grid" ) ) :
|
|
|
|
OUString() )
|
|
|
|
{
|
|
|
|
EnableModify( FALSE );
|
|
|
|
SetDefaults();
|
|
|
|
EnableModify( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
SdOptionsGrid::~SdOptionsGrid()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsGrid::SetDefaults()
|
|
|
|
{
|
2000-11-14 09:36:27 -06:00
|
|
|
const UINT32 nVal = 1000;
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
SetFldDivisionX( nVal );
|
|
|
|
SetFldDivisionY( nVal );
|
2000-11-14 09:36:27 -06:00
|
|
|
SetFldDrawX( nVal );
|
2000-09-28 12:05:36 -05:00
|
|
|
SetFldDrawY( nVal );
|
|
|
|
SetFldSnapX( nVal );
|
|
|
|
SetFldSnapY( nVal );
|
|
|
|
SetUseGridSnap( FALSE );
|
|
|
|
SetSynchronize( TRUE );
|
2002-05-07 03:55:17 -05:00
|
|
|
SetGridVisible( FALSE );
|
2000-09-28 12:05:36 -05:00
|
|
|
SetEqualGrid( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsGrid::operator==( const SdOptionsGrid& rOpt ) const
|
|
|
|
{
|
|
|
|
return( GetFldDrawX() == rOpt.GetFldDrawX() &&
|
|
|
|
GetFldDivisionX() == rOpt.GetFldDivisionX() &&
|
|
|
|
GetFldDrawY() == rOpt.GetFldDrawY() &&
|
|
|
|
GetFldDivisionY() == rOpt.GetFldDivisionY() &&
|
|
|
|
GetFldSnapX() == rOpt.GetFldSnapX() &&
|
|
|
|
GetFldSnapY() == rOpt.GetFldSnapY() &&
|
|
|
|
IsUseGridSnap() == rOpt.IsUseGridSnap() &&
|
|
|
|
IsSynchronize() == rOpt.IsSynchronize() &&
|
2002-05-07 03:55:17 -05:00
|
|
|
IsGridVisible() == rOpt.IsGridVisible() &&
|
2000-09-28 12:05:36 -05:00
|
|
|
IsEqualGrid() == rOpt.IsEqualGrid() );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsGrid::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
2002-11-25 09:29:38 -06:00
|
|
|
static const char* aPropNamesMetric[] =
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
2000-11-24 11:54:34 -06:00
|
|
|
"Resolution/XAxis/Metric",
|
|
|
|
"Resolution/YAxis/Metric",
|
2000-12-11 08:03:50 -06:00
|
|
|
"Subdivision/XAxis",
|
2000-09-28 12:05:36 -05:00
|
|
|
"Subdivision/YAxis",
|
2000-11-24 11:54:34 -06:00
|
|
|
"SnapGrid/XAxis/Metric",
|
|
|
|
"SnapGrid/YAxis/Metric",
|
2000-09-28 12:05:36 -05:00
|
|
|
"Option/SnapToGrid",
|
|
|
|
"Option/Synchronize",
|
2002-05-07 03:55:17 -05:00
|
|
|
"Option/VisibleGrid",
|
2000-09-28 12:05:36 -05:00
|
|
|
"SnapGrid/Size"
|
|
|
|
};
|
|
|
|
|
2002-11-25 09:29:38 -06:00
|
|
|
static const char* aPropNamesNonMetric[] =
|
|
|
|
{
|
|
|
|
"Resolution/XAxis/NonMetric",
|
|
|
|
"Resolution/YAxis/NonMetric",
|
|
|
|
"Subdivision/XAxis",
|
|
|
|
"Subdivision/YAxis",
|
|
|
|
"SnapGrid/XAxis/NonMetric",
|
|
|
|
"SnapGrid/YAxis/NonMetric",
|
|
|
|
"Option/SnapToGrid",
|
|
|
|
"Option/Synchronize",
|
|
|
|
"Option/VisibleGrid",
|
|
|
|
"SnapGrid/Size"
|
|
|
|
};
|
|
|
|
|
2002-05-07 03:55:17 -05:00
|
|
|
rCount = 10;
|
2002-11-25 09:29:38 -06:00
|
|
|
|
|
|
|
if( isMetricSystem() )
|
|
|
|
ppNames = aPropNamesMetric;
|
|
|
|
else
|
|
|
|
ppNames = aPropNamesNonMetric;
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsGrid::ReadData( const Any* pValues )
|
|
|
|
{
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[0].hasValue() ) SetFldDrawX( *(sal_Int32*) pValues[ 0 ].getValue() );
|
2000-12-11 08:03:50 -06:00
|
|
|
if( pValues[1].hasValue() ) SetFldDrawY( *(sal_Int32*) pValues[ 1 ].getValue() );
|
|
|
|
|
|
|
|
if( pValues[2].hasValue() )
|
|
|
|
{
|
|
|
|
const UINT32 nDivX = FRound( *(double*) pValues[ 2 ].getValue() );
|
|
|
|
SetFldDivisionX( SvxOptionsGrid::GetFldDrawX() / ( nDivX + 1 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( pValues[3].hasValue() )
|
|
|
|
{
|
|
|
|
const UINT32 nDivY = FRound( *(double*) pValues[ 3 ].getValue() );
|
|
|
|
SetFldDivisionY( SvxOptionsGrid::GetFldDrawY() / ( nDivY + 1 ) );
|
|
|
|
}
|
|
|
|
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[4].hasValue() ) SetFldSnapX( *(sal_Int32*) pValues[ 4 ].getValue() );
|
|
|
|
if( pValues[5].hasValue() ) SetFldSnapY( *(sal_Int32*) pValues[ 5 ].getValue() );
|
|
|
|
if( pValues[6].hasValue() ) SetUseGridSnap( *(sal_Bool*) pValues[ 6 ].getValue() );
|
|
|
|
if( pValues[7].hasValue() ) SetSynchronize( *(sal_Bool*) pValues[ 7 ].getValue() );
|
2002-05-07 03:55:17 -05:00
|
|
|
if( pValues[8].hasValue() ) SetGridVisible( *(sal_Bool*) pValues[ 8 ].getValue() );
|
|
|
|
if( pValues[9].hasValue() ) SetEqualGrid( *(sal_Bool*) pValues[ 9 ].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsGrid::WriteData( Any* pValues ) const
|
|
|
|
{
|
|
|
|
pValues[ 0 ] <<= (sal_Int32) GetFldDrawX();
|
2000-12-11 08:03:50 -06:00
|
|
|
pValues[ 1 ] <<= (sal_Int32) GetFldDrawY();
|
|
|
|
pValues[ 2 ] <<= ( GetFldDivisionX() ? ( (double) GetFldDrawX() / GetFldDivisionX() - 1.0 ) : (double) 0 );
|
|
|
|
pValues[ 3 ] <<= ( GetFldDivisionY() ? ( (double) GetFldDrawY() / GetFldDivisionY() - 1.0 ) : (double) 0 );
|
2000-09-28 12:05:36 -05:00
|
|
|
pValues[ 4 ] <<= (sal_Int32) GetFldSnapX();
|
|
|
|
pValues[ 5 ] <<= (sal_Int32) GetFldSnapY();
|
|
|
|
pValues[ 6 ] <<= IsUseGridSnap();
|
|
|
|
pValues[ 7 ] <<= IsSynchronize();
|
2002-05-07 03:55:17 -05:00
|
|
|
pValues[ 8 ] <<= IsGridVisible();
|
|
|
|
pValues[ 9 ] <<= IsEqualGrid();
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
return TRUE;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsGridItem
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) :
|
|
|
|
SvxGridItem( _nWhich )
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
SetSynchronize( pOpts->IsSynchronize() );
|
|
|
|
SetEqualGrid( pOpts->IsEqualGrid() );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if( pView )
|
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
SetFldDrawX( pView->GetGridCoarse().Width() );
|
|
|
|
SetFldDrawY( pView->GetGridCoarse().Height() );
|
|
|
|
SetFldDivisionX( pView->GetGridFine().Width() ? ( GetFldDrawX() / pView->GetGridFine().Width() - 1 ) : 0 );
|
|
|
|
SetFldDivisionY( pView->GetGridFine().Height() ? ( GetFldDrawY() / pView->GetGridFine().Height() - 1 ) : 0 );
|
2006-11-14 07:24:43 -06:00
|
|
|
SetFldSnapX( long(pView->GetSnapGridWidthX()) );
|
|
|
|
SetFldSnapY( long(pView->GetSnapGridWidthY()) );
|
2000-09-28 12:05:36 -05:00
|
|
|
SetUseGridSnap( pView->IsGridSnap() );
|
2002-05-07 03:55:17 -05:00
|
|
|
SetGridVisible( pView->IsGridVisible() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
SetFldDrawX( pOpts->GetFldDrawX() );
|
|
|
|
SetFldDrawY( pOpts->GetFldDrawY() );
|
2000-11-14 09:36:27 -06:00
|
|
|
SetFldDivisionX( pOpts->GetFldDivisionX() ? ( pOpts->GetFldDrawX() / pOpts->GetFldDivisionX() - 1 ) : 0 );
|
|
|
|
SetFldDivisionY( pOpts->GetFldDivisionY() ? ( pOpts->GetFldDrawY() / pOpts->GetFldDivisionY() - 1 ) : 0 );
|
2000-09-28 12:05:36 -05:00
|
|
|
SetFldSnapX( pOpts->GetFldSnapX() );
|
|
|
|
SetFldSnapY( pOpts->GetFldSnapY() );
|
|
|
|
SetUseGridSnap( pOpts->IsUseGridSnap() );
|
2002-05-07 03:55:17 -05:00
|
|
|
SetGridVisible( pOpts->IsGridVisible() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2000-09-28 12:05:36 -05:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
void SdOptionsGridItem::SetOptions( SdOptions* pOpts ) const
|
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
pOpts->SetFldDrawX( GetFldDrawX() );
|
2000-11-14 09:36:27 -06:00
|
|
|
pOpts->SetFldDivisionX( GetFldDrawX() / ( GetFldDivisionX() + 1 ) );
|
2000-09-28 12:05:36 -05:00
|
|
|
pOpts->SetFldDrawY( GetFldDrawY() );
|
2000-11-14 09:36:27 -06:00
|
|
|
pOpts->SetFldDivisionY( GetFldDrawY() / ( GetFldDivisionY() + 1 ) );
|
2000-09-28 12:05:36 -05:00
|
|
|
pOpts->SetFldSnapX( GetFldSnapX() );
|
|
|
|
pOpts->SetFldSnapY( GetFldSnapY() );
|
2000-09-29 09:39:42 -05:00
|
|
|
pOpts->SetUseGridSnap( GetUseGridSnap() );
|
|
|
|
pOpts->SetSynchronize( GetSynchronize() );
|
2002-05-07 03:55:17 -05:00
|
|
|
pOpts->SetGridVisible( GetGridVisible() );
|
2000-09-29 09:39:42 -05:00
|
|
|
pOpts->SetEqualGrid( GetEqualGrid() );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsPrint
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2000-09-28 12:05:36 -05:00
|
|
|
SdOptionsPrint::SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ) :
|
|
|
|
SdOptionsGeneric( nConfigId, bUseConfig ?
|
|
|
|
( ( SDCFG_DRAW == nConfigId ) ?
|
|
|
|
B2U( "Office.Draw/Print" ) :
|
|
|
|
B2U( "Office.Impress/Print" ) ) :
|
2003-11-25 03:49:06 -06:00
|
|
|
OUString() ),
|
|
|
|
bDraw( TRUE ),
|
|
|
|
bNotes( FALSE ),
|
|
|
|
bHandout( FALSE ),
|
|
|
|
bOutline( FALSE ),
|
|
|
|
bDate( FALSE ),
|
|
|
|
bTime( FALSE ),
|
|
|
|
bPagename( FALSE ),
|
|
|
|
bHiddenPages( TRUE ),
|
|
|
|
bPagesize( FALSE ),
|
|
|
|
bPagetile( FALSE ),
|
|
|
|
bWarningPrinter( TRUE ),
|
|
|
|
bWarningSize( FALSE ),
|
|
|
|
bWarningOrientation( FALSE ),
|
|
|
|
bBooklet( FALSE ),
|
|
|
|
bFront( TRUE ),
|
|
|
|
bBack( TRUE ),
|
|
|
|
bCutPage( FALSE ),
|
|
|
|
bPaperbin( FALSE ),
|
2008-03-06 09:27:30 -06:00
|
|
|
mbHandoutHorizontal( TRUE ),
|
|
|
|
mnHandoutPages( 6 ),
|
2003-11-25 03:49:06 -06:00
|
|
|
nQuality( 0 )
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
EnableModify( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
|
|
|
|
{
|
|
|
|
return( IsDraw() == rOpt.IsDraw() &&
|
|
|
|
IsNotes() == rOpt.IsNotes() &&
|
|
|
|
IsHandout() == rOpt.IsHandout() &&
|
|
|
|
IsOutline() == rOpt.IsOutline() &&
|
|
|
|
IsDate() == rOpt.IsDate() &&
|
|
|
|
IsTime() == rOpt.IsTime() &&
|
|
|
|
IsPagename() == rOpt.IsPagename() &&
|
|
|
|
IsHiddenPages() == rOpt.IsHiddenPages() &&
|
|
|
|
IsPagesize() == rOpt.IsPagesize() &&
|
|
|
|
IsPagetile() == rOpt.IsPagetile() &&
|
|
|
|
IsWarningPrinter() == rOpt.IsWarningPrinter() &&
|
|
|
|
IsWarningSize() == rOpt.IsWarningSize() &&
|
|
|
|
IsWarningOrientation() == rOpt.IsWarningOrientation() &&
|
|
|
|
IsBooklet() == rOpt.IsBooklet() &&
|
|
|
|
IsFrontPage() == rOpt.IsFrontPage() &&
|
|
|
|
IsBackPage() == rOpt.IsBackPage() &&
|
|
|
|
IsCutPage() == rOpt.IsCutPage() &&
|
|
|
|
IsPaperbin() == rOpt.IsPaperbin() &&
|
2008-03-06 09:27:30 -06:00
|
|
|
GetOutputQuality() == rOpt.GetOutputQuality() &&
|
|
|
|
IsHandoutHorizontal() == rOpt.IsHandoutHorizontal() &&
|
|
|
|
GetHandoutPages() == rOpt.GetHandoutPages() );
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsPrint::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
|
|
|
|
{
|
2000-12-07 03:14:38 -06:00
|
|
|
static const char* aDrawPropNames[] =
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
2000-12-07 03:14:38 -06:00
|
|
|
"Other/Date",
|
|
|
|
"Other/Time",
|
|
|
|
"Other/PageName",
|
|
|
|
"Other/HiddenPage",
|
|
|
|
"Page/PageSize",
|
|
|
|
"Page/PageTile",
|
|
|
|
// bWarningPrinter
|
|
|
|
// bWarningSize
|
|
|
|
// bWarningOrientation
|
|
|
|
"Page/Booklet",
|
|
|
|
"Page/BookletFront",
|
2000-12-14 07:47:03 -06:00
|
|
|
"Page/BookletBack",
|
2000-12-07 03:14:38 -06:00
|
|
|
// bCutPage
|
|
|
|
"Other/FromPrinterSetup",
|
|
|
|
"Other/Quality",
|
2000-09-28 12:05:36 -05:00
|
|
|
"Content/Drawing",
|
2000-12-07 03:14:38 -06:00
|
|
|
};
|
|
|
|
static const char* aImpressPropNames[] =
|
|
|
|
{
|
2000-09-28 12:05:36 -05:00
|
|
|
"Other/Date",
|
|
|
|
"Other/Time",
|
|
|
|
"Other/PageName",
|
|
|
|
"Other/HiddenPage",
|
|
|
|
"Page/PageSize",
|
|
|
|
"Page/PageTile",
|
|
|
|
// bWarningPrinter
|
|
|
|
// bWarningSize
|
|
|
|
// bWarningOrientation
|
|
|
|
"Page/Booklet",
|
|
|
|
"Page/BookletFront",
|
2000-12-14 07:47:03 -06:00
|
|
|
"Page/BookletBack",
|
2000-09-28 12:05:36 -05:00
|
|
|
// bCutPage
|
|
|
|
"Other/FromPrinterSetup",
|
|
|
|
"Other/Quality",
|
2000-12-07 03:14:38 -06:00
|
|
|
"Content/Presentation",
|
2000-09-28 12:05:36 -05:00
|
|
|
"Content/Note",
|
|
|
|
"Content/Handout",
|
2008-03-06 09:27:30 -06:00
|
|
|
"Content/Outline",
|
|
|
|
"Other/HandoutHorizontal",
|
|
|
|
"Other/PagesPerHandout"
|
2000-09-28 12:05:36 -05:00
|
|
|
};
|
|
|
|
|
2000-12-07 03:14:38 -06:00
|
|
|
if( GetConfigId() == SDCFG_IMPRESS )
|
|
|
|
{
|
2008-03-06 09:27:30 -06:00
|
|
|
rCount = 17;
|
2000-12-07 03:14:38 -06:00
|
|
|
ppNames = aImpressPropNames;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rCount = 12;
|
|
|
|
ppNames = aDrawPropNames;
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsPrint::ReadData( const Any* pValues )
|
|
|
|
{
|
2000-12-14 07:47:03 -06:00
|
|
|
if( pValues[0].hasValue() ) SetDate( *(sal_Bool*) pValues[ 0 ].getValue() );
|
|
|
|
if( pValues[1].hasValue() ) SetTime( *(sal_Bool*) pValues[ 1 ].getValue() );
|
|
|
|
if( pValues[2].hasValue() ) SetPagename( *(sal_Bool*) pValues[ 2 ].getValue() );
|
|
|
|
if( pValues[3].hasValue() ) SetHiddenPages( *(sal_Bool*) pValues[ 3 ].getValue() );
|
|
|
|
if( pValues[4].hasValue() ) SetPagesize( *(sal_Bool*) pValues[ 4 ].getValue() );
|
|
|
|
if( pValues[5].hasValue() ) SetPagetile( *(sal_Bool*) pValues[ 5 ].getValue() );
|
|
|
|
if( pValues[6].hasValue() ) SetBooklet( *(sal_Bool*) pValues[ 6 ].getValue() );
|
|
|
|
if( pValues[7].hasValue() ) SetFrontPage( *(sal_Bool*) pValues[ 7 ].getValue() );
|
|
|
|
if( pValues[8].hasValue() ) SetBackPage( *(sal_Bool*) pValues[ 8 ].getValue() );
|
|
|
|
if( pValues[9].hasValue() ) SetPaperbin( *(sal_Bool*) pValues[ 9 ].getValue() );
|
|
|
|
if( pValues[10].hasValue() ) SetOutputQuality( (UINT16) *(sal_Int32*) pValues[ 10 ].getValue() );
|
|
|
|
if( pValues[11].hasValue() ) SetDraw( *(sal_Bool*) pValues[ 11 ].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
// just for impress
|
|
|
|
if( GetConfigId() == SDCFG_IMPRESS )
|
|
|
|
{
|
2000-11-17 09:53:04 -06:00
|
|
|
if( pValues[12].hasValue() ) SetNotes( *(sal_Bool*) pValues[ 12 ].getValue() );
|
|
|
|
if( pValues[13].hasValue() ) SetHandout( *(sal_Bool*) pValues[ 13 ].getValue() );
|
|
|
|
if( pValues[14].hasValue() ) SetOutline( *(sal_Bool*) pValues[ 14 ].getValue() );
|
2008-12-11 09:25:59 -06:00
|
|
|
if( pValues[15].hasValue() ) SetHandoutHorizontal( *(sal_Bool*) pValues[15].getValue() );
|
|
|
|
if( pValues[16].hasValue() ) SetHandoutPages( (UINT16)*(sal_Int32*) pValues[16].getValue() );
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BOOL SdOptionsPrint::WriteData( Any* pValues ) const
|
|
|
|
{
|
2000-12-14 07:47:03 -06:00
|
|
|
pValues[ 0 ] <<= IsDate();
|
|
|
|
pValues[ 1 ] <<= IsTime();
|
|
|
|
pValues[ 2 ] <<= IsPagename();
|
|
|
|
pValues[ 3 ] <<= IsHiddenPages();
|
|
|
|
pValues[ 4 ] <<= IsPagesize();
|
|
|
|
pValues[ 5 ] <<= IsPagetile();
|
|
|
|
pValues[ 6 ] <<= IsBooklet();
|
|
|
|
pValues[ 7 ] <<= IsFrontPage();
|
|
|
|
pValues[ 8 ] <<= IsBackPage();
|
|
|
|
pValues[ 9 ] <<= IsPaperbin();
|
|
|
|
pValues[ 10 ] <<= (sal_Int32) GetOutputQuality();
|
|
|
|
pValues[ 11 ] <<= IsDraw();
|
2000-09-28 12:05:36 -05:00
|
|
|
|
|
|
|
// just for impress
|
|
|
|
if( GetConfigId() == SDCFG_IMPRESS )
|
|
|
|
{
|
|
|
|
pValues[ 12 ] <<= IsNotes();
|
|
|
|
pValues[ 13 ] <<= IsHandout();
|
|
|
|
pValues[ 14 ] <<= IsOutline();
|
2008-03-06 09:27:30 -06:00
|
|
|
pValues[ 15 ] <<= IsHandoutHorizontal();
|
|
|
|
pValues[ 16 ] <<= GetHandoutPages();
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptionsPrintItem
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsPrintItem::SdOptionsPrintItem( USHORT _nWhich )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsPrint ( 0, FALSE )
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2006-12-12 09:53:31 -06:00
|
|
|
SdOptionsPrintItem::SdOptionsPrintItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* )
|
|
|
|
: SfxPoolItem ( _nWhich )
|
|
|
|
, maOptionsPrint ( 0, FALSE )
|
|
|
|
{
|
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
maOptionsPrint.SetDraw( pOpts->IsDraw() );
|
|
|
|
maOptionsPrint.SetNotes( pOpts->IsNotes() );
|
|
|
|
maOptionsPrint.SetHandout( pOpts->IsHandout() );
|
|
|
|
maOptionsPrint.SetOutline( pOpts->IsOutline() );
|
|
|
|
maOptionsPrint.SetDate( pOpts->IsDate() );
|
|
|
|
maOptionsPrint.SetTime( pOpts->IsTime() );
|
|
|
|
maOptionsPrint.SetPagename( pOpts->IsPagename() );
|
|
|
|
maOptionsPrint.SetHiddenPages( pOpts->IsHiddenPages() );
|
|
|
|
maOptionsPrint.SetPagesize( pOpts->IsPagesize() );
|
|
|
|
maOptionsPrint.SetPagetile( pOpts->IsPagetile() );
|
|
|
|
maOptionsPrint.SetWarningPrinter( pOpts->IsWarningPrinter() );
|
|
|
|
maOptionsPrint.SetWarningSize( pOpts->IsWarningSize() );
|
|
|
|
maOptionsPrint.SetWarningOrientation( pOpts->IsWarningOrientation() );
|
|
|
|
maOptionsPrint.SetBooklet( pOpts->IsBooklet() );
|
|
|
|
maOptionsPrint.SetFrontPage( pOpts->IsFrontPage() );
|
|
|
|
maOptionsPrint.SetBackPage( pOpts->IsBackPage() );
|
|
|
|
maOptionsPrint.SetCutPage( pOpts->IsCutPage() );
|
|
|
|
maOptionsPrint.SetPaperbin( pOpts->IsPaperbin() );
|
|
|
|
maOptionsPrint.SetOutputQuality( pOpts->GetOutputQuality() );
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SfxPoolItem* SdOptionsPrintItem::Clone( SfxItemPool* ) const
|
|
|
|
{
|
|
|
|
return new SdOptionsPrintItem( *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
int SdOptionsPrintItem::operator==( const SfxPoolItem& rAttr ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
const bool bSameType = SfxPoolItem::operator==(rAttr);
|
|
|
|
DBG_ASSERT( bSameType, "SdOptionsPrintItem::operator==(), differen pool item type!" );
|
|
|
|
return bSameType && ( maOptionsPrint == static_cast< const SdOptionsPrintItem& >( rAttr ).maOptionsPrint );
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SdOptionsPrintItem::SetOptions( SdOptions* pOpts ) const
|
|
|
|
{
|
2006-12-12 09:53:31 -06:00
|
|
|
if( pOpts )
|
|
|
|
{
|
|
|
|
pOpts->SetDraw( maOptionsPrint.IsDraw() );
|
|
|
|
pOpts->SetNotes( maOptionsPrint.IsNotes() );
|
|
|
|
pOpts->SetHandout( maOptionsPrint.IsHandout() );
|
|
|
|
pOpts->SetOutline( maOptionsPrint.IsOutline() );
|
|
|
|
pOpts->SetDate( maOptionsPrint.IsDate() );
|
|
|
|
pOpts->SetTime( maOptionsPrint.IsTime() );
|
|
|
|
pOpts->SetPagename( maOptionsPrint.IsPagename() );
|
|
|
|
pOpts->SetHiddenPages( maOptionsPrint.IsHiddenPages() );
|
|
|
|
pOpts->SetPagesize( maOptionsPrint.IsPagesize() );
|
|
|
|
pOpts->SetPagetile( maOptionsPrint.IsPagetile() );
|
|
|
|
pOpts->SetWarningPrinter( maOptionsPrint.IsWarningPrinter() );
|
|
|
|
pOpts->SetWarningSize( maOptionsPrint.IsWarningSize() );
|
|
|
|
pOpts->SetWarningOrientation( maOptionsPrint.IsWarningOrientation() );
|
|
|
|
pOpts->SetBooklet( maOptionsPrint.IsBooklet() );
|
|
|
|
pOpts->SetFrontPage( maOptionsPrint.IsFrontPage() );
|
|
|
|
pOpts->SetBackPage( maOptionsPrint.IsBackPage() );
|
|
|
|
pOpts->SetCutPage( maOptionsPrint.IsCutPage() );
|
|
|
|
pOpts->SetPaperbin( maOptionsPrint.IsPaperbin() );
|
|
|
|
pOpts->SetOutputQuality( maOptionsPrint.GetOutputQuality() );
|
|
|
|
}
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SdOptions
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdOptions::SdOptions( USHORT nConfigId ) :
|
|
|
|
SdOptionsLayout( nConfigId, TRUE ),
|
|
|
|
SdOptionsContents( nConfigId, TRUE ),
|
|
|
|
SdOptionsMisc( nConfigId, TRUE ),
|
|
|
|
SdOptionsSnap( nConfigId, TRUE ),
|
|
|
|
SdOptionsZoom( nConfigId, TRUE ),
|
|
|
|
SdOptionsGrid( nConfigId, TRUE ),
|
|
|
|
SdOptionsPrint( nConfigId, TRUE )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SdOptions::~SdOptions()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2000-10-11 04:25:52 -05:00
|
|
|
void SdOptions::StoreConfig( ULONG nOptionsRange )
|
2000-09-28 12:05:36 -05:00
|
|
|
{
|
2000-10-11 04:25:52 -05:00
|
|
|
if( nOptionsRange & SD_OPTIONS_LAYOUT )
|
|
|
|
SdOptionsLayout::Store();
|
|
|
|
|
|
|
|
if( nOptionsRange & SD_OPTIONS_CONTENTS )
|
|
|
|
SdOptionsContents::Store();
|
|
|
|
|
|
|
|
if( nOptionsRange & SD_OPTIONS_MISC )
|
|
|
|
SdOptionsMisc::Store();
|
|
|
|
|
|
|
|
if( nOptionsRange & SD_OPTIONS_SNAP )
|
|
|
|
SdOptionsSnap::Store();
|
|
|
|
|
|
|
|
if( nOptionsRange & SD_OPTIONS_ZOOM )
|
|
|
|
SdOptionsZoom::Store();
|
|
|
|
|
|
|
|
if( nOptionsRange & SD_OPTIONS_GRID )
|
|
|
|
SdOptionsGrid::Store();
|
|
|
|
|
|
|
|
if( nOptionsRange & SD_OPTIONS_PRINT )
|
|
|
|
SdOptionsPrint::Store();
|
2000-09-28 12:05:36 -05:00
|
|
|
}
|