/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// Assure, that ID is a Which-ID (it could be a Slot-ID.) // Thus, convert handle to Which-ID.
pPool->GetUserOrPoolDefaultItem( pPool->GetWhichIDFromSlotID( static_cast<sal_uInt16>(pEntry->mnHandle) ) ).QueryValue( rValue, nMemberId );
}
}
// Assure, that ID is a Which-ID (it could be a Slot-ID.) // Thus, convert handle to Which-ID. const sal_uInt16 nWhich = pPool->GetWhichIDFromSlotID( static_cast<sal_uInt16>(pEntry->mnHandle) ); switch( nWhich )
{ case OWN_ATTR_FILLBMP_MODE: do
{
drawing::BitmapMode eMode; if(!(aValue >>= eMode) )
{
sal_Int32 nMode = 0; if(!(aValue >>= nMode)) throw lang::IllegalArgumentException();
DBG_ASSERT( pPool, "I need a SfxItemPool!" ); if( nullptr == pPool ) throw beans::UnknownPropertyException( u"no pool, no properties.."_ustr, getXWeak());
DBG_ASSERT( pPool, "I need a SfxItemPool!" ); if( nullptr == pPool ) throw beans::UnknownPropertyException( u"no pool, no properties.."_ustr, getXWeak());
if( pPool && pPool != mpDefaultsPool.get() )
{ while( *ppEntries )
{ //Assure, that ID is a Which-ID (it could be a Slot-ID.) // Thus, convert handle to Which-ID. const sal_uInt16 nWhich = pPool->GetWhichIDFromSlotID( static_cast<sal_uInt16>((*ppEntries)->mnHandle) );
switch( nWhich )
{ case OWN_ATTR_FILLBMP_MODE:
{ // use method <IsStaticDefaultItem(..)> instead of using // probably incompatible item pool <mpDefaultPool>. if ( IsStaticDefaultItem( &(pPool->GetUserOrPoolDefaultItem( XATTR_FILLBMP_STRETCH )) ) ||
IsStaticDefaultItem( &(pPool->GetUserOrPoolDefaultItem( XATTR_FILLBMP_TILE )) ) )
{
*pStates = beans::PropertyState_DEFAULT_VALUE;
} else
{
*pStates = beans::PropertyState_DIRECT_VALUE;
}
} break; case OWN_ATTR_TEXTCOLUMNS: if (IsStaticDefaultItem(&pPool->GetUserOrPoolDefaultItem(sal_uInt16(SDRATTR_TEXTCOLUMNS_NUMBER)))
&& IsStaticDefaultItem(&pPool->GetUserOrPoolDefaultItem(sal_uInt16(SDRATTR_TEXTCOLUMNS_SPACING))))
*pStates = beans::PropertyState_DEFAULT_VALUE; else
*pStates = beans::PropertyState_DIRECT_VALUE; break; default: //#i18732# - correction: // use method <IsStaticDefaultItem(..)> instead of using probably // incompatible item pool <mpDefaultPool>. const SfxPoolItem& r1 = pPool->GetUserOrPoolDefaultItem( nWhich ); //const SfxPoolItem& r2 = mpDefaultPool->GetUserOrPoolDefaultItem( nWhich );
pStates++;
ppEntries++;
}
} else
{ // as long as we have no model, all properties are default while( *ppEntries++ )
*pStates++ = beans::PropertyState_DEFAULT_VALUE; return;
}
}
// Assure, that ID is a Which-ID (it could be a Slot-ID.) // Thus, convert handle to Which-ID. const sal_uInt16 nWhich = pPool->GetWhichIDFromSlotID( static_cast<sal_uInt16>(pEntry->mnHandle) ); if ( pPool && pPool != mpDefaultsPool.get() )
{ // use method <ResetUserDefaultItem(..)> instead of using probably incompatible item pool <mpDefaultsPool>.
pPool->ResetUserDefaultItem( nWhich );
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.