fdo#38838,::rtl::OUString_to_OUString
Change-Id: I7c9ebd01c16ff066008e53de865560ad78215bab Reviewed-on: https://gerrit.libreoffice.org/2330 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -161,16 +161,16 @@ namespace pcr
|
||||
//--------------------------------------------------------------------
|
||||
IMPLEMENT_FORWARD_XINTERFACE2(FormComponentPropertyHandler,FormComponentPropertyHandler_Base,::comphelper::OPropertyContainer)
|
||||
//--------------------------------------------------------------------
|
||||
::rtl::OUString SAL_CALL FormComponentPropertyHandler::getImplementationName_static( ) throw (RuntimeException)
|
||||
OUString SAL_CALL FormComponentPropertyHandler::getImplementationName_static( ) throw (RuntimeException)
|
||||
{
|
||||
return ::rtl::OUString( "com.sun.star.comp.extensions.FormComponentPropertyHandler" );
|
||||
return OUString( "com.sun.star.comp.extensions.FormComponentPropertyHandler" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Sequence< ::rtl::OUString > SAL_CALL FormComponentPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException)
|
||||
Sequence< OUString > SAL_CALL FormComponentPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException)
|
||||
{
|
||||
Sequence< ::rtl::OUString > aSupported( 1 );
|
||||
aSupported[0] = ::rtl::OUString( "com.sun.star.form.inspection.FormComponentPropertyHandler" );
|
||||
Sequence< OUString > aSupported( 1 );
|
||||
aSupported[0] = OUString( "com.sun.star.form.inspection.FormComponentPropertyHandler" );
|
||||
return aSupported;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace pcr
|
||||
|
||||
namespace
|
||||
{
|
||||
bool lcl_isLanguageDependentProperty( ::rtl::OUString aName )
|
||||
bool lcl_isLanguageDependentProperty( OUString aName )
|
||||
{
|
||||
bool bRet = false;
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
Reference< resource::XStringResourceResolver > lcl_getStringResourceResolverForProperty
|
||||
( Reference< XPropertySet > _xComponent, const ::rtl::OUString& _rPropertyName,
|
||||
( Reference< XPropertySet > _xComponent, const OUString& _rPropertyName,
|
||||
const Any& _rPropertyValue )
|
||||
{
|
||||
Reference< resource::XStringResourceResolver > xRet;
|
||||
@@ -221,7 +221,7 @@ namespace pcr
|
||||
if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
|
||||
lcl_isLanguageDependentProperty( _rPropertyName ) )
|
||||
{
|
||||
static const ::rtl::OUString s_sResourceResolverPropName("ResourceResolver");
|
||||
static const OUString s_sResourceResolverPropName("ResourceResolver");
|
||||
|
||||
Reference< resource::XStringResourceResolver > xStringResourceResolver;
|
||||
try
|
||||
@@ -244,7 +244,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Any FormComponentPropertyHandler::impl_getPropertyValue_throw( const ::rtl::OUString& _rPropertyName ) const
|
||||
Any FormComponentPropertyHandler::impl_getPropertyValue_throw( const OUString& _rPropertyName ) const
|
||||
{
|
||||
const PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
|
||||
|
||||
@@ -257,14 +257,14 @@ namespace pcr
|
||||
TypeClass eType = aPropertyValue.getValueType().getTypeClass();
|
||||
if( eType == TypeClass_STRING )
|
||||
{
|
||||
::rtl::OUString aPropStr;
|
||||
OUString aPropStr;
|
||||
aPropertyValue >>= aPropStr;
|
||||
if( aPropStr.getLength() > 1 )
|
||||
{
|
||||
::rtl::OUString aPureIdStr = aPropStr.copy( 1 );
|
||||
OUString aPureIdStr = aPropStr.copy( 1 );
|
||||
if( xStringResourceResolver->hasEntryForId( aPureIdStr ) )
|
||||
{
|
||||
::rtl::OUString aResourceStr = xStringResourceResolver->resolveString( aPureIdStr );
|
||||
OUString aResourceStr = xStringResourceResolver->resolveString( aPureIdStr );
|
||||
aPropertyValue <<= aResourceStr;
|
||||
}
|
||||
}
|
||||
@@ -272,21 +272,21 @@ namespace pcr
|
||||
// StringItemList?
|
||||
else if( eType == TypeClass_SEQUENCE )
|
||||
{
|
||||
Sequence< ::rtl::OUString > aStrings;
|
||||
Sequence< OUString > aStrings;
|
||||
aPropertyValue >>= aStrings;
|
||||
|
||||
const ::rtl::OUString* pStrings = aStrings.getConstArray();
|
||||
const OUString* pStrings = aStrings.getConstArray();
|
||||
sal_Int32 nCount = aStrings.getLength();
|
||||
|
||||
Sequence< ::rtl::OUString > aResolvedStrings;
|
||||
Sequence< OUString > aResolvedStrings;
|
||||
aResolvedStrings.realloc( nCount );
|
||||
::rtl::OUString* pResolvedStrings = aResolvedStrings.getArray();
|
||||
OUString* pResolvedStrings = aResolvedStrings.getArray();
|
||||
try
|
||||
{
|
||||
for ( sal_Int32 i = 0; i < nCount; ++i )
|
||||
{
|
||||
::rtl::OUString aIdStr = pStrings[i];
|
||||
::rtl::OUString aPureIdStr = aIdStr.copy( 1 );
|
||||
OUString aIdStr = pStrings[i];
|
||||
OUString aPureIdStr = aIdStr.copy( 1 );
|
||||
if( xStringResourceResolver->hasEntryForId( aPureIdStr ) )
|
||||
pResolvedStrings[i] = xStringResourceResolver->resolveString( aPureIdStr );
|
||||
else
|
||||
@@ -305,7 +305,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Any SAL_CALL FormComponentPropertyHandler::getPropertyValue( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException)
|
||||
Any SAL_CALL FormComponentPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException)
|
||||
{
|
||||
if( _rPropertyName == PROPERTY_ROWSET )
|
||||
return ::comphelper::OPropertyContainer::getPropertyValue( _rPropertyName );
|
||||
@@ -315,7 +315,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
void SAL_CALL FormComponentPropertyHandler::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException)
|
||||
void SAL_CALL FormComponentPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException)
|
||||
{
|
||||
if( _rPropertyName == PROPERTY_ROWSET )
|
||||
{
|
||||
@@ -360,12 +360,12 @@ namespace pcr
|
||||
TypeClass eType = aPropertyValue.getValueType().getTypeClass();
|
||||
if( eType == TypeClass_STRING )
|
||||
{
|
||||
::rtl::OUString aPropStr;
|
||||
OUString aPropStr;
|
||||
aPropertyValue >>= aPropStr;
|
||||
if( aPropStr.getLength() > 1 )
|
||||
{
|
||||
::rtl::OUString aPureIdStr = aPropStr.copy( 1 );
|
||||
::rtl::OUString aValueStr;
|
||||
OUString aPureIdStr = aPropStr.copy( 1 );
|
||||
OUString aValueStr;
|
||||
_rValue >>= aValueStr;
|
||||
xStringResourceManager->setString( aPureIdStr, aValueStr );
|
||||
aValue = aPropertyValue; // set value to force modified
|
||||
@@ -374,31 +374,31 @@ namespace pcr
|
||||
// StringItemList?
|
||||
else if( eType == TypeClass_SEQUENCE )
|
||||
{
|
||||
static ::rtl::OUString aDot(".");
|
||||
static ::rtl::OUString aEsc("&");
|
||||
static OUString aDot(".");
|
||||
static OUString aEsc("&");
|
||||
|
||||
// Put strings into resource using new ids
|
||||
Sequence< ::rtl::OUString > aNewStrings;
|
||||
Sequence< OUString > aNewStrings;
|
||||
_rValue >>= aNewStrings;
|
||||
|
||||
const ::rtl::OUString* pNewStrings = aNewStrings.getConstArray();
|
||||
const OUString* pNewStrings = aNewStrings.getConstArray();
|
||||
sal_Int32 nNewCount = aNewStrings.getLength();
|
||||
|
||||
// Create new Ids
|
||||
::rtl::OUString* pNewPureIds = new ::rtl::OUString[nNewCount];
|
||||
::rtl::OUString aIdStrBase = aDot;
|
||||
OUString* pNewPureIds = new OUString[nNewCount];
|
||||
OUString aIdStrBase = aDot;
|
||||
Any aNameAny = m_xComponent->getPropertyValue(PROPERTY_NAME);
|
||||
::rtl::OUString sControlName;
|
||||
OUString sControlName;
|
||||
aNameAny >>= sControlName;
|
||||
aIdStrBase += sControlName;
|
||||
aIdStrBase += aDot;
|
||||
aIdStrBase += _rPropertyName;
|
||||
sal_Int32 i;
|
||||
::rtl::OUString aDummyStr;
|
||||
OUString aDummyStr;
|
||||
for ( i = 0; i < nNewCount; ++i )
|
||||
{
|
||||
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
|
||||
::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
|
||||
OUString aPureIdStr = OUString::valueOf( nUniqueId );
|
||||
aPureIdStr += aIdStrBase;
|
||||
pNewPureIds[i] = aPureIdStr;
|
||||
// Force usage of next Unique Id
|
||||
@@ -409,28 +409,28 @@ namespace pcr
|
||||
Sequence< Locale > aLocaleSeq = xStringResourceManager->getLocales();
|
||||
const Locale* pLocale = aLocaleSeq.getConstArray();
|
||||
sal_Int32 nLocaleCount = aLocaleSeq.getLength();
|
||||
Sequence< ::rtl::OUString > aOldIdStrings;
|
||||
Sequence< OUString > aOldIdStrings;
|
||||
aPropertyValue >>= aOldIdStrings;
|
||||
try
|
||||
{
|
||||
const ::rtl::OUString* pOldIdStrings = aOldIdStrings.getConstArray();
|
||||
const OUString* pOldIdStrings = aOldIdStrings.getConstArray();
|
||||
sal_Int32 nOldIdCount = aOldIdStrings.getLength();
|
||||
for ( i = 0; i < nNewCount; ++i )
|
||||
{
|
||||
::rtl::OUString aOldIdStr;
|
||||
::rtl::OUString aOldPureIdStr;
|
||||
OUString aOldIdStr;
|
||||
OUString aOldPureIdStr;
|
||||
if( i < nOldIdCount )
|
||||
{
|
||||
aOldIdStr = pOldIdStrings[i];
|
||||
aOldPureIdStr = aOldIdStr.copy( 1 );
|
||||
}
|
||||
::rtl::OUString aNewPureIdStr = pNewPureIds[i];
|
||||
OUString aNewPureIdStr = pNewPureIds[i];
|
||||
|
||||
for ( sal_Int32 iLocale = 0; iLocale < nLocaleCount; ++iLocale )
|
||||
{
|
||||
Locale aLocale = pLocale[iLocale];
|
||||
|
||||
::rtl::OUString aResourceStr;
|
||||
OUString aResourceStr;
|
||||
if( !aOldPureIdStr.isEmpty() )
|
||||
{
|
||||
if( xStringResourceManager->hasEntryForIdAndLocale( aOldPureIdStr, aLocale ) )
|
||||
@@ -449,28 +449,28 @@ namespace pcr
|
||||
|
||||
// Set new strings for current locale and create
|
||||
// new Id sequence as new property value
|
||||
Sequence< ::rtl::OUString > aNewIdStrings;
|
||||
Sequence< OUString > aNewIdStrings;
|
||||
aNewIdStrings.realloc( nNewCount );
|
||||
::rtl::OUString* pNewIdStrings = aNewIdStrings.getArray();
|
||||
OUString* pNewIdStrings = aNewIdStrings.getArray();
|
||||
for ( i = 0; i < nNewCount; ++i )
|
||||
{
|
||||
::rtl::OUString aPureIdStr = pNewPureIds[i];
|
||||
::rtl::OUString aStr = pNewStrings[i];
|
||||
OUString aPureIdStr = pNewPureIds[i];
|
||||
OUString aStr = pNewStrings[i];
|
||||
xStringResourceManager->setString( aPureIdStr, aStr );
|
||||
|
||||
::rtl::OUString aIdStr = aEsc;
|
||||
OUString aIdStr = aEsc;
|
||||
aIdStr += aPureIdStr;
|
||||
pNewIdStrings[i] = aIdStr;
|
||||
}
|
||||
aValue <<= aNewIdStrings;
|
||||
|
||||
// Remove old ids from resource for all locales
|
||||
const ::rtl::OUString* pOldIdStrings = aOldIdStrings.getConstArray();
|
||||
const OUString* pOldIdStrings = aOldIdStrings.getConstArray();
|
||||
sal_Int32 nOldIdCount = aOldIdStrings.getLength();
|
||||
for( i = 0 ; i < nOldIdCount ; ++i )
|
||||
{
|
||||
::rtl::OUString aIdStr = pOldIdStrings[i];
|
||||
::rtl::OUString aPureIdStr = aIdStr.copy( 1 );
|
||||
OUString aIdStr = pOldIdStrings[i];
|
||||
OUString aPureIdStr = aIdStr.copy( 1 );
|
||||
for ( sal_Int32 iLocale = 0; iLocale < nLocaleCount; ++iLocale )
|
||||
{
|
||||
Locale aLocale = pLocale[iLocale];
|
||||
@@ -492,7 +492,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Any SAL_CALL FormComponentPropertyHandler::convertToPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException)
|
||||
Any SAL_CALL FormComponentPropertyHandler::convertToPropertyValue( const OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
|
||||
@@ -512,7 +512,7 @@ namespace pcr
|
||||
if ( m_aPropertiesWithDefListEntry.find( _rPropertyName ) != m_aPropertiesWithDefListEntry.end() )
|
||||
{
|
||||
// it's a control with a string list
|
||||
::rtl::OUString sStringValue;
|
||||
OUString sStringValue;
|
||||
if ( _rControlValue >>= sStringValue )
|
||||
{ // note that ColorListBoxes might transfer values either as string or as css.util.Color,
|
||||
// so this check here is important
|
||||
@@ -525,7 +525,7 @@ namespace pcr
|
||||
{
|
||||
case PROPERTY_ID_DATASOURCE:
|
||||
{
|
||||
::rtl::OUString sControlValue;
|
||||
OUString sControlValue;
|
||||
OSL_VERIFY( _rControlValue >>= sControlValue );
|
||||
|
||||
if ( !sControlValue.isEmpty() )
|
||||
@@ -534,7 +534,7 @@ namespace pcr
|
||||
if ( !xDatabaseContext->hasByName( sControlValue ) )
|
||||
{
|
||||
::svt::OFileNotation aTransformer(sControlValue);
|
||||
aPropertyValue <<= ::rtl::OUString( aTransformer.get( ::svt::OFileNotation::N_URL ) );
|
||||
aPropertyValue <<= OUString( aTransformer.get( ::svt::OFileNotation::N_URL ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,10 +545,10 @@ namespace pcr
|
||||
case PROPERTY_ID_SHOW_RECORDACTIONS:
|
||||
case PROPERTY_ID_SHOW_FILTERSORT:
|
||||
{
|
||||
::rtl::OUString sControlValue;
|
||||
OUString sControlValue;
|
||||
OSL_VERIFY( _rControlValue >>= sControlValue );
|
||||
|
||||
::std::vector< ::rtl::OUString > aListEntries;
|
||||
::std::vector< OUString > aListEntries;
|
||||
tools::StringListResource aRes( PcrRes( RID_RSC_ENUM_SHOWHIDE ), aListEntries );
|
||||
OSL_ENSURE( aListEntries.size() == 2, "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!" );
|
||||
sal_Bool bShow = ( aListEntries.size() < 2 ) || ( sControlValue == aListEntries[1] );
|
||||
@@ -560,7 +560,7 @@ namespace pcr
|
||||
case PROPERTY_ID_TARGET_URL:
|
||||
case PROPERTY_ID_IMAGE_URL:
|
||||
{
|
||||
::rtl::OUString sControlValue;
|
||||
OUString sControlValue;
|
||||
OSL_VERIFY( _rControlValue >>= sControlValue );
|
||||
// Don't convert a placeholder
|
||||
if ( nPropId == PROPERTY_ID_IMAGE_URL && sControlValue.equals( String( PcrRes( RID_EMBED_IMAGE_PLACEHOLDER ) ) ) )
|
||||
@@ -568,7 +568,7 @@ namespace pcr
|
||||
else
|
||||
{
|
||||
INetURLObject aDocURL( impl_getDocumentURL_nothrow() );
|
||||
aPropertyValue <<= (::rtl::OUString)URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI );
|
||||
aPropertyValue <<= (OUString)URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -627,7 +627,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Any SAL_CALL FormComponentPropertyHandler::convertToControlValue( const ::rtl::OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException)
|
||||
Any SAL_CALL FormComponentPropertyHandler::convertToControlValue( const OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
sal_Int32 nPropId = m_pInfoService->getPropertyId( _rPropertyName );
|
||||
@@ -654,13 +654,13 @@ namespace pcr
|
||||
case PROPERTY_ID_SHOW_RECORDACTIONS:
|
||||
case PROPERTY_ID_SHOW_FILTERSORT:
|
||||
{
|
||||
::std::vector< ::rtl::OUString > aListEntries;
|
||||
::std::vector< OUString > aListEntries;
|
||||
tools::StringListResource aRes( PcrRes( RID_RSC_ENUM_SHOWHIDE ), aListEntries );
|
||||
OSL_ENSURE( aListEntries.size() == 2, "FormComponentPropertyHandler::convertToControlValue: broken resource for Show/Hide!" );
|
||||
|
||||
if ( aListEntries.size() == 2 )
|
||||
{
|
||||
::rtl::OUString sControlValue = ::comphelper::getBOOL( _rPropertyValue )
|
||||
OUString sControlValue = ::comphelper::getBOOL( _rPropertyValue )
|
||||
? aListEntries[1]
|
||||
: aListEntries[0];
|
||||
aControlValue <<= sControlValue;
|
||||
@@ -674,7 +674,7 @@ namespace pcr
|
||||
OSL_ENSURE( _rControlValueType.getTypeClass() == TypeClass_STRING,
|
||||
"FormComponentPropertyHandler::convertToControlValue: wrong ControlValueType!" );
|
||||
|
||||
::rtl::OUString sDataSource;
|
||||
OUString sDataSource;
|
||||
_rPropertyValue >>= sDataSource;
|
||||
if ( !sDataSource.isEmpty() )
|
||||
{
|
||||
@@ -688,7 +688,7 @@ namespace pcr
|
||||
//////////////////////////////////////////////////////////////
|
||||
case PROPERTY_ID_CONTROLLABEL:
|
||||
{
|
||||
::rtl::OUString sControlValue;
|
||||
OUString sControlValue;
|
||||
|
||||
Reference< XPropertySet > xSet;
|
||||
_rPropertyValue >>= xSet;
|
||||
@@ -697,9 +697,9 @@ namespace pcr
|
||||
xPSI = xSet->getPropertySetInfo();
|
||||
if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_LABEL ) )
|
||||
{
|
||||
::rtl::OUStringBuffer aValue;
|
||||
OUStringBuffer aValue;
|
||||
aValue.append( (sal_Unicode)'<' );
|
||||
::rtl::OUString sLabel;
|
||||
OUString sLabel;
|
||||
OSL_VERIFY( xSet->getPropertyValue( PROPERTY_LABEL ) >>= sLabel );
|
||||
aValue.append( sLabel );
|
||||
aValue.append( (sal_Unicode)'>' );
|
||||
@@ -758,7 +758,7 @@ namespace pcr
|
||||
FontDescriptor aFont;
|
||||
OSL_VERIFY( _rPropertyValue >>= aFont );
|
||||
|
||||
::rtl::OUStringBuffer displayName;
|
||||
OUStringBuffer displayName;
|
||||
if ( aFont.Name.isEmpty() )
|
||||
{
|
||||
displayName.append( String( PcrRes( RID_STR_FONT_DEFAULT ) ) );
|
||||
@@ -808,7 +808,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
PropertyState SAL_CALL FormComponentPropertyHandler::getPropertyState( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException)
|
||||
PropertyState SAL_CALL FormComponentPropertyHandler::getPropertyState( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if ( m_xPropertyState.is() )
|
||||
@@ -822,7 +822,7 @@ namespace pcr
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
FormComponentPropertyHandler_Base::addPropertyChangeListener( _rxListener );
|
||||
if ( m_xComponent.is() )
|
||||
m_xComponent->addPropertyChangeListener( ::rtl::OUString(), _rxListener );
|
||||
m_xComponent->addPropertyChangeListener( OUString(), _rxListener );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
@@ -830,7 +830,7 @@ namespace pcr
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if ( m_xComponent.is() )
|
||||
m_xComponent->removePropertyChangeListener( ::rtl::OUString(), _rxListener );
|
||||
m_xComponent->removePropertyChangeListener( OUString(), _rxListener );
|
||||
FormComponentPropertyHandler_Base::removePropertyChangeListener( _rxListener );
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ namespace pcr
|
||||
|
||||
// filter the properties
|
||||
PropertyId nPropId( 0 );
|
||||
::rtl::OUString sDisplayName;
|
||||
OUString sDisplayName;
|
||||
|
||||
Property* pProperty = aAllProperties.getArray();
|
||||
Property* pPropertiesEnd = pProperty + aAllProperties.getLength();
|
||||
@@ -927,16 +927,16 @@ namespace pcr
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Sequence< ::rtl::OUString > SAL_CALL FormComponentPropertyHandler::getSupersededProperties( ) throw (RuntimeException)
|
||||
Sequence< OUString > SAL_CALL FormComponentPropertyHandler::getSupersededProperties( ) throw (RuntimeException)
|
||||
{
|
||||
return Sequence< ::rtl::OUString >( );
|
||||
return Sequence< OUString >( );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Sequence< ::rtl::OUString > SAL_CALL FormComponentPropertyHandler::getActuatingProperties( ) throw (RuntimeException)
|
||||
Sequence< OUString > SAL_CALL FormComponentPropertyHandler::getActuatingProperties( ) throw (RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
::std::vector< ::rtl::OUString > aInterestingProperties;
|
||||
::std::vector< OUString > aInterestingProperties;
|
||||
aInterestingProperties.push_back( static_cast<const rtl::OUString&>(PROPERTY_DATASOURCE) );
|
||||
aInterestingProperties.push_back( static_cast<const rtl::OUString&>(PROPERTY_COMMAND) );
|
||||
aInterestingProperties.push_back( static_cast<const rtl::OUString&>(PROPERTY_COMMANDTYPE) );
|
||||
@@ -959,11 +959,11 @@ namespace pcr
|
||||
aInterestingProperties.push_back( static_cast<const rtl::OUString&>(PROPERTY_FORMATKEY) );
|
||||
aInterestingProperties.push_back( static_cast<const rtl::OUString&>(PROPERTY_EMPTY_IS_NULL) );
|
||||
aInterestingProperties.push_back( static_cast<const rtl::OUString&>(PROPERTY_TOGGLE) );
|
||||
return Sequence< ::rtl::OUString >( &(*aInterestingProperties.begin()), aInterestingProperties.size() );
|
||||
return Sequence< OUString >( &(*aInterestingProperties.begin()), aInterestingProperties.size() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
LineDescriptor SAL_CALL FormComponentPropertyHandler::describePropertyLine( const ::rtl::OUString& _rPropertyName,
|
||||
LineDescriptor SAL_CALL FormComponentPropertyHandler::describePropertyLine( const OUString& _rPropertyName,
|
||||
const Reference< XPropertyControlFactory >& _rxControlFactory )
|
||||
throw (UnknownPropertyException, NullPointerException, RuntimeException)
|
||||
{
|
||||
@@ -1256,7 +1256,7 @@ namespace pcr
|
||||
)
|
||||
nResId = RID_RSC_ENUM_SHOWHIDE;
|
||||
|
||||
::std::vector< ::rtl::OUString > aListEntries;
|
||||
::std::vector< OUString > aListEntries;
|
||||
tools::StringListResource aRes(PcrRes(nResId),aListEntries);
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_False );
|
||||
bNeedDefaultStringIfVoidAllowed = true;
|
||||
@@ -1268,9 +1268,9 @@ namespace pcr
|
||||
bool bIsEnumProperty = ( nPropertyUIFlags & PROP_FLAG_ENUM ) != 0;
|
||||
if ( bIsEnumProperty || ( PROPERTY_ID_TARGET_FRAME == nPropId ) )
|
||||
{
|
||||
::std::vector< ::rtl::OUString > aEnumValues = m_pInfoService->getPropertyEnumRepresentations( nPropId );
|
||||
::std::vector< ::rtl::OUString >::const_iterator pStart = aEnumValues.begin();
|
||||
::std::vector< ::rtl::OUString >::const_iterator pEnd = aEnumValues.end();
|
||||
::std::vector< OUString > aEnumValues = m_pInfoService->getPropertyEnumRepresentations( nPropId );
|
||||
::std::vector< OUString >::const_iterator pStart = aEnumValues.begin();
|
||||
::std::vector< OUString >::const_iterator pEnd = aEnumValues.end();
|
||||
|
||||
// for a checkbox: if "ambiguous" is not allowed, remove this from the sequence
|
||||
if ( ( PROPERTY_ID_DEFAULT_STATE == nPropId )
|
||||
@@ -1295,7 +1295,7 @@ namespace pcr
|
||||
++pStart;
|
||||
|
||||
// copy the sequence
|
||||
::std::vector< ::rtl::OUString > aListEntries( pEnd - pStart );
|
||||
::std::vector< OUString > aListEntries( pEnd - pStart );
|
||||
::std::copy( pStart, pEnd, aListEntries.begin() );
|
||||
|
||||
// create the control
|
||||
@@ -1360,10 +1360,10 @@ namespace pcr
|
||||
{
|
||||
aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_ATTR_DATASOURCE);
|
||||
|
||||
::std::vector< ::rtl::OUString > aListEntries;
|
||||
::std::vector< OUString > aListEntries;
|
||||
|
||||
Reference< XDatabaseContext > xDatabaseContext = sdb::DatabaseContext::create( m_aContext.getUNOContext() );
|
||||
Sequence< ::rtl::OUString > aDatasources = xDatabaseContext->getElementNames();
|
||||
Sequence< OUString > aDatasources = xDatabaseContext->getElementNames();
|
||||
aListEntries.resize( aDatasources.getLength() );
|
||||
::std::copy( aDatasources.getConstArray(), aDatasources.getConstArray() + aDatasources.getLength(),
|
||||
aListEntries.begin() );
|
||||
@@ -1374,7 +1374,7 @@ namespace pcr
|
||||
|
||||
case PROPERTY_ID_CONTROLSOURCE:
|
||||
{
|
||||
::std::vector< ::rtl::OUString > aFieldNames;
|
||||
::std::vector< OUString > aFieldNames;
|
||||
impl_initFieldList_nothrow( aFieldNames );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl(
|
||||
_rxControlFactory, aFieldNames, sal_False, sal_False );
|
||||
@@ -1410,12 +1410,12 @@ namespace pcr
|
||||
aDescriptor.HasSecondaryButton = sal_True;
|
||||
|
||||
bool bIsDataProperty = ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0;
|
||||
aDescriptor.Category = bIsDataProperty ? ::rtl::OUString("Data") : ::rtl::OUString("General");
|
||||
aDescriptor.Category = bIsDataProperty ? OUString("Data") : OUString("General");
|
||||
return aDescriptor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
InteractiveSelectionResult SAL_CALL FormComponentPropertyHandler::onInteractivePropertySelection( const ::rtl::OUString& _rPropertyName, sal_Bool /*_bPrimary*/, Any& _rData, const Reference< XObjectInspectorUI >& _rxInspectorUI ) throw (UnknownPropertyException, NullPointerException, RuntimeException)
|
||||
InteractiveSelectionResult SAL_CALL FormComponentPropertyHandler::onInteractivePropertySelection( const OUString& _rPropertyName, sal_Bool /*_bPrimary*/, Any& _rData, const Reference< XObjectInspectorUI >& _rxInspectorUI ) throw (UnknownPropertyException, NullPointerException, RuntimeException)
|
||||
{
|
||||
if ( !_rxInspectorUI.is() )
|
||||
throw NullPointerException();
|
||||
@@ -1435,7 +1435,7 @@ namespace pcr
|
||||
case PROPERTY_ID_FILTER:
|
||||
case PROPERTY_ID_SORT:
|
||||
{
|
||||
::rtl::OUString sClause;
|
||||
OUString sClause;
|
||||
if ( impl_dialogFilterOrSort_nothrow( PROPERTY_ID_FILTER == nPropId, sClause, aGuard ) )
|
||||
{
|
||||
_rData <<= sClause;
|
||||
@@ -1513,12 +1513,12 @@ namespace pcr
|
||||
OSL_PRECOND( _rxInspectorUI.is(), "lcl_rebuildAndResetCommand: invalid BrowserUI!" );
|
||||
OSL_PRECOND( _rxHandler.is(), "lcl_rebuildAndResetCommand: invalid handler!" );
|
||||
_rxInspectorUI->rebuildPropertyUI( PROPERTY_COMMAND );
|
||||
_rxHandler->setPropertyValue( PROPERTY_COMMAND, makeAny( ::rtl::OUString() ) );
|
||||
_rxHandler->setPropertyValue( PROPERTY_COMMAND, makeAny( OUString() ) );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
void SAL_CALL FormComponentPropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& _rActuatingPropertyName, const Any& _rNewValue, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool _bFirstTimeInit ) throw (NullPointerException, RuntimeException)
|
||||
void SAL_CALL FormComponentPropertyHandler::actuatingPropertyChanged( const OUString& _rActuatingPropertyName, const Any& _rNewValue, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool _bFirstTimeInit ) throw (NullPointerException, RuntimeException)
|
||||
{
|
||||
if ( !_rxInspectorUI.is() )
|
||||
throw NullPointerException();
|
||||
@@ -1592,7 +1592,7 @@ namespace pcr
|
||||
// ----- DataField -----
|
||||
case PROPERTY_ID_CONTROLSOURCE:
|
||||
{
|
||||
::rtl::OUString sControlSource;
|
||||
OUString sControlSource;
|
||||
_rNewValue >>= sControlSource;
|
||||
if ( impl_componentHasProperty_throw( PROPERTY_FILTERPROPOSAL ) )
|
||||
_rxInspectorUI->enablePropertyUI( PROPERTY_FILTERPROPOSAL, !sControlSource.isEmpty() );
|
||||
@@ -1665,7 +1665,7 @@ namespace pcr
|
||||
{
|
||||
if ( impl_isSupportedProperty_nothrow( PROPERTY_ID_IMAGEPOSITION ) )
|
||||
{
|
||||
::rtl::OUString sImageURL;
|
||||
OUString sImageURL;
|
||||
OSL_VERIFY( _rNewValue >>= sImageURL );
|
||||
_rxInspectorUI->enablePropertyUI( PROPERTY_IMAGEPOSITION, !sImageURL.isEmpty() );
|
||||
}
|
||||
@@ -1710,7 +1710,7 @@ namespace pcr
|
||||
|
||||
// propagate the changes to the min/max/default fields
|
||||
Any aCurrentProp;
|
||||
::rtl::OUString aAffectedProps[] = { PROPERTY_VALUE, PROPERTY_DEFAULT_VALUE, PROPERTY_VALUEMIN, PROPERTY_VALUEMAX };
|
||||
OUString aAffectedProps[] = { PROPERTY_VALUE, PROPERTY_DEFAULT_VALUE, PROPERTY_VALUEMIN, PROPERTY_VALUEMAX };
|
||||
for (sal_uInt16 i=0; i<SAL_N_ELEMENTS(aAffectedProps); ++i)
|
||||
{
|
||||
Reference< XPropertyControl > xControl;
|
||||
@@ -1755,7 +1755,7 @@ namespace pcr
|
||||
aNewDesc.nKey = 0;
|
||||
|
||||
// give each control which has to know this an own copy of the description
|
||||
::rtl::OUString aFormattedPropertyControls[] = {
|
||||
OUString aFormattedPropertyControls[] = {
|
||||
PROPERTY_EFFECTIVE_MIN, PROPERTY_EFFECTIVE_MAX, PROPERTY_EFFECTIVE_DEFAULT, PROPERTY_EFFECTIVE_VALUE
|
||||
};
|
||||
for ( sal_uInt16 i=0; i<SAL_N_ELEMENTS(aFormattedPropertyControls); ++i )
|
||||
@@ -1815,9 +1815,9 @@ namespace pcr
|
||||
ListSourceType eLSType = ListSourceType_VALUELIST;
|
||||
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_LISTSOURCETYPE ) >>= eLSType );
|
||||
|
||||
::rtl::OUString sListSource;
|
||||
OUString sListSource;
|
||||
{
|
||||
Sequence< ::rtl::OUString > aListSource;
|
||||
Sequence< OUString > aListSource;
|
||||
Any aListSourceValue( impl_getPropertyValue_throw( PROPERTY_LISTSOURCE ) );
|
||||
if ( aListSourceValue >>= aListSource )
|
||||
{
|
||||
@@ -1838,7 +1838,7 @@ namespace pcr
|
||||
// ----- BoundColumn -----
|
||||
case PROPERTY_ID_BOUNDCOLUMN:
|
||||
{
|
||||
::rtl::OUString sControlSource;
|
||||
OUString sControlSource;
|
||||
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_CONTROLSOURCE ) >>= sControlSource );
|
||||
|
||||
ListSourceType eLSType = ListSourceType_VALUELIST;
|
||||
@@ -1856,11 +1856,11 @@ namespace pcr
|
||||
case PROPERTY_ID_SCALEIMAGE:
|
||||
case PROPERTY_ID_SCALE_MODE:
|
||||
{
|
||||
::rtl::OUString sControlSource;
|
||||
OUString sControlSource;
|
||||
if ( impl_isSupportedProperty_nothrow( PROPERTY_ID_CONTROLSOURCE ) )
|
||||
impl_getPropertyValue_throw( PROPERTY_CONTROLSOURCE ) >>= sControlSource;
|
||||
|
||||
::rtl::OUString sImageURL;
|
||||
OUString sImageURL;
|
||||
impl_getPropertyValue_throw( PROPERTY_IMAGE_URL ) >>= sImageURL;
|
||||
|
||||
_rxInspectorUI->enablePropertyUI( impl_getPropertyNameFromId_nothrow( _nPropId ),
|
||||
@@ -1872,7 +1872,7 @@ namespace pcr
|
||||
// ----- InputRequired -----
|
||||
case PROPERTY_ID_INPUT_REQUIRED:
|
||||
{
|
||||
::rtl::OUString sControlSource;
|
||||
OUString sControlSource;
|
||||
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_CONTROLSOURCE ) >>= sControlSource );
|
||||
|
||||
sal_Bool bEmptyIsNULL = sal_False;
|
||||
@@ -1895,7 +1895,7 @@ namespace pcr
|
||||
case PROPERTY_ID_SELECTEDITEMS:
|
||||
case PROPERTY_ID_DEFAULT_SELECT_SEQ:
|
||||
{
|
||||
Sequence< ::rtl::OUString > aEntries;
|
||||
Sequence< OUString > aEntries;
|
||||
impl_getPropertyValue_throw( PROPERTY_STRINGITEMLIST ) >>= aEntries;
|
||||
bool isEnabled = aEntries.getLength() != 0;
|
||||
|
||||
@@ -1913,7 +1913,7 @@ namespace pcr
|
||||
// ----- TargetFrame ------
|
||||
case PROPERTY_ID_TARGET_FRAME:
|
||||
{
|
||||
::rtl::OUString sTargetURL;
|
||||
OUString sTargetURL;
|
||||
impl_getPropertyValue_throw( PROPERTY_TARGET_URL ) >>= sTargetURL;
|
||||
FormButtonType eButtonType( FormButtonType_URL );
|
||||
if ( 0 != m_nClassId )
|
||||
@@ -2157,8 +2157,8 @@ namespace pcr
|
||||
|
||||
for ( sal_Int32 i = 0; i < nKnownControlTypes; ++i )
|
||||
{
|
||||
::rtl::OUString sServiceName( "com.sun.star.awt." );
|
||||
sServiceName += ::rtl::OUString::createFromAscii( aControlModelServiceNames[ i ] );
|
||||
OUString sServiceName( "com.sun.star.awt." );
|
||||
sServiceName += OUString::createFromAscii( aControlModelServiceNames[ i ] );
|
||||
|
||||
if ( xServiceInfo->supportsService( sServiceName ) )
|
||||
{
|
||||
@@ -2342,7 +2342,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FormComponentPropertyHandler::impl_initFieldList_nothrow( ::std::vector< ::rtl::OUString >& _rFieldNames ) const
|
||||
void FormComponentPropertyHandler::impl_initFieldList_nothrow( ::std::vector< OUString >& _rFieldNames ) const
|
||||
{
|
||||
clearContainer( _rFieldNames );
|
||||
try
|
||||
@@ -2356,19 +2356,19 @@ namespace pcr
|
||||
if ( !xFormSet.is() )
|
||||
return;
|
||||
|
||||
::rtl::OUString sObjectName;
|
||||
OUString sObjectName;
|
||||
OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_COMMAND ) >>= sObjectName );
|
||||
// when there is no command we don't need to ask for columns
|
||||
if ( !sObjectName.isEmpty() && impl_ensureRowsetConnection_nothrow() )
|
||||
{
|
||||
::rtl::OUString aDatabaseName;
|
||||
OUString aDatabaseName;
|
||||
OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_DATASOURCE ) >>= aDatabaseName );
|
||||
sal_Int32 nObjectType = CommandType::COMMAND;
|
||||
OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_COMMANDTYPE ) >>= nObjectType );
|
||||
|
||||
Sequence< ::rtl::OUString > aFields( ::dbtools::getFieldNamesByCommandDescriptor( m_xRowSetConnection, nObjectType, sObjectName ) );
|
||||
Sequence< OUString > aFields( ::dbtools::getFieldNamesByCommandDescriptor( m_xRowSetConnection, nObjectType, sObjectName ) );
|
||||
|
||||
const ::rtl::OUString* pFields = aFields.getConstArray();
|
||||
const OUString* pFields = aFields.getConstArray();
|
||||
for ( sal_Int32 i = 0; i < aFields.getLength(); ++i, ++pFields )
|
||||
_rFieldNames.push_back( *pFields );
|
||||
}
|
||||
@@ -2422,7 +2422,7 @@ namespace pcr
|
||||
// report errors, if necessary
|
||||
if ( aError.isValid() )
|
||||
{
|
||||
::rtl::OUString sDataSourceName;
|
||||
OUString sDataSourceName;
|
||||
try
|
||||
{
|
||||
xRowSetProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= sDataSourceName;
|
||||
@@ -2470,7 +2470,7 @@ namespace pcr
|
||||
case CommandType::TABLE:
|
||||
case CommandType::QUERY:
|
||||
{
|
||||
::std::vector< ::rtl::OUString > aNames;
|
||||
::std::vector< OUString > aNames;
|
||||
if ( impl_ensureRowsetConnection_nothrow() )
|
||||
{
|
||||
if ( nCommandType == CommandType::TABLE )
|
||||
@@ -2494,7 +2494,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FormComponentPropertyHandler::impl_fillTableNames_throw( ::std::vector< ::rtl::OUString >& _out_rNames ) const
|
||||
void FormComponentPropertyHandler::impl_fillTableNames_throw( ::std::vector< OUString >& _out_rNames ) const
|
||||
{
|
||||
OSL_PRECOND( m_xRowSetConnection.is(), "FormComponentPropertyHandler::impl_fillTableNames_throw: need a connection!" );
|
||||
_out_rNames.resize( 0 );
|
||||
@@ -2507,16 +2507,16 @@ namespace pcr
|
||||
if ( !xTableNames.is() )
|
||||
return;
|
||||
|
||||
Sequence< ::rtl::OUString> aTableNames = xTableNames->getElementNames();
|
||||
Sequence< OUString> aTableNames = xTableNames->getElementNames();
|
||||
sal_uInt32 nCount = aTableNames.getLength();
|
||||
const ::rtl::OUString* pTableNames = aTableNames.getConstArray();
|
||||
const OUString* pTableNames = aTableNames.getConstArray();
|
||||
|
||||
for ( sal_uInt32 i=0; i<nCount; ++i ,++pTableNames )
|
||||
_out_rNames.push_back( *pTableNames );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FormComponentPropertyHandler::impl_fillQueryNames_throw( ::std::vector< ::rtl::OUString >& _out_rNames ) const
|
||||
void FormComponentPropertyHandler::impl_fillQueryNames_throw( ::std::vector< OUString >& _out_rNames ) const
|
||||
{
|
||||
OSL_PRECOND( m_xRowSetConnection.is(), "FormComponentPropertyHandler::impl_fillQueryNames_throw: need a connection!" );
|
||||
_out_rNames.resize( 0 );
|
||||
@@ -2530,20 +2530,20 @@ namespace pcr
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
void FormComponentPropertyHandler::impl_fillQueryNames_throw( const Reference< XNameAccess >& _xQueryNames,::std::vector< ::rtl::OUString >& _out_rNames,const ::rtl::OUString& _sName ) const
|
||||
void FormComponentPropertyHandler::impl_fillQueryNames_throw( const Reference< XNameAccess >& _xQueryNames,::std::vector< OUString >& _out_rNames,const OUString& _sName ) const
|
||||
{
|
||||
DBG_ASSERT( _xQueryNames.is(), "FormComponentPropertyHandler::impl_fillQueryNames_throw: no way to obtain the queries of the connection!" );
|
||||
if ( !_xQueryNames.is() )
|
||||
return;
|
||||
|
||||
Sequence< ::rtl::OUString> aQueryNames = _xQueryNames->getElementNames();
|
||||
Sequence< OUString> aQueryNames = _xQueryNames->getElementNames();
|
||||
sal_uInt32 nCount = aQueryNames.getLength();
|
||||
const ::rtl::OUString* pQueryNames = aQueryNames.getConstArray();
|
||||
const OUString* pQueryNames = aQueryNames.getConstArray();
|
||||
sal_Bool bAdd = !_sName.isEmpty();
|
||||
|
||||
for ( sal_uInt32 i=0; i<nCount; i++, ++pQueryNames )
|
||||
{
|
||||
::rtl::OUStringBuffer sTemp;
|
||||
OUStringBuffer sTemp;
|
||||
if ( bAdd )
|
||||
{
|
||||
sTemp.append(_sName);
|
||||
@@ -2585,7 +2585,7 @@ namespace pcr
|
||||
case ListSourceType_TABLE:
|
||||
case ListSourceType_QUERY:
|
||||
{
|
||||
::std::vector< ::rtl::OUString > aListEntries;
|
||||
::std::vector< OUString > aListEntries;
|
||||
if ( impl_ensureRowsetConnection_nothrow() )
|
||||
{
|
||||
if ( nListSourceType == ListSourceType_QUERY )
|
||||
@@ -2605,7 +2605,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool FormComponentPropertyHandler::impl_dialogListSelection_nothrow( const ::rtl::OUString& _rProperty, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
|
||||
bool FormComponentPropertyHandler::impl_dialogListSelection_nothrow( const OUString& _rProperty, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
|
||||
{
|
||||
OSL_PRECOND( m_pInfoService.get(), "FormComponentPropertyHandler::impl_dialogListSelection_nothrow: no property meta data!" );
|
||||
|
||||
@@ -2616,12 +2616,12 @@ namespace pcr
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow( bool _bFilter, ::rtl::OUString& _out_rSelectedClause, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
|
||||
bool FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow( bool _bFilter, OUString& _out_rSelectedClause, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
|
||||
{
|
||||
OSL_PRECOND( Reference< XRowSet >( m_xComponent, UNO_QUERY ).is(),
|
||||
"FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow: to be called for forms only!" );
|
||||
|
||||
_out_rSelectedClause = ::rtl::OUString();
|
||||
_out_rSelectedClause = OUString();
|
||||
bool bSuccess = false;
|
||||
SQLExceptionInfo aErrorInfo;
|
||||
try
|
||||
@@ -2635,7 +2635,7 @@ namespace pcr
|
||||
if ( !xComposer.is() )
|
||||
return false;
|
||||
|
||||
::rtl::OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( _bFilter ? PROPERTY_ID_FILTER : PROPERTY_ID_SORT ) );
|
||||
OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( _bFilter ? PROPERTY_ID_FILTER : PROPERTY_ID_SORT ) );
|
||||
|
||||
// create the dialog
|
||||
Reference< XExecutableDialog > xDialog;
|
||||
@@ -2651,10 +2651,10 @@ namespace pcr
|
||||
|
||||
// initialize the dialog
|
||||
Reference< XPropertySet > xDialogProps( xDialog, UNO_QUERY_THROW );
|
||||
xDialogProps->setPropertyValue( ::rtl::OUString( "QueryComposer" ), makeAny( xComposer ) );
|
||||
xDialogProps->setPropertyValue( ::rtl::OUString( "RowSet" ), makeAny( m_xComponent ) );
|
||||
xDialogProps->setPropertyValue( ::rtl::OUString( "ParentWindow" ), makeAny( VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ) ) );
|
||||
xDialogProps->setPropertyValue( ::rtl::OUString( "Title" ), makeAny( sPropertyUIName ) );
|
||||
xDialogProps->setPropertyValue( OUString( "QueryComposer" ), makeAny( xComposer ) );
|
||||
xDialogProps->setPropertyValue( OUString( "RowSet" ), makeAny( m_xComponent ) );
|
||||
xDialogProps->setPropertyValue( OUString( "ParentWindow" ), makeAny( VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ) ) );
|
||||
xDialogProps->setPropertyValue( OUString( "Title" ), makeAny( sPropertyUIName ) );
|
||||
|
||||
_rClearBeforeDialog.clear();
|
||||
bSuccess = ( xDialog->execute() != 0 );
|
||||
@@ -2767,7 +2767,7 @@ namespace pcr
|
||||
bool FormComponentPropertyHandler::impl_browseForImage_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
|
||||
{
|
||||
bool bIsLink = true;// reflect the legacy behavior
|
||||
::rtl::OUString aStrTrans = m_pInfoService->getPropertyTranslation( PROPERTY_ID_IMAGE_URL );
|
||||
OUString aStrTrans = m_pInfoService->getPropertyTranslation( PROPERTY_ID_IMAGE_URL );
|
||||
|
||||
::sfx2::FileDialogHelper aFileDlg(
|
||||
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
|
||||
@@ -2791,7 +2791,7 @@ namespace pcr
|
||||
|
||||
}
|
||||
|
||||
::rtl::OUString sCurValue;
|
||||
OUString sCurValue;
|
||||
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_IMAGE_URL ) >>= sCurValue );
|
||||
if ( !sCurValue.isEmpty() && sCurValue.compareToAscii(GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH(GRAPHOBJ_URLPREFIX) ) != 0 )
|
||||
{
|
||||
@@ -2820,7 +2820,7 @@ namespace pcr
|
||||
|
||||
}
|
||||
else
|
||||
_out_rNewValue <<= (::rtl::OUString)aFileDlg.GetPath();
|
||||
_out_rNewValue <<= (OUString)aFileDlg.GetPath();
|
||||
}
|
||||
return bSuccess;
|
||||
}
|
||||
@@ -2831,7 +2831,7 @@ namespace pcr
|
||||
::sfx2::FileDialogHelper aFileDlg(
|
||||
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0);
|
||||
|
||||
::rtl::OUString sURL;
|
||||
OUString sURL;
|
||||
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_TARGET_URL ) >>= sURL );
|
||||
INetURLObject aParser( sURL );
|
||||
if ( INET_PROT_FILE == aParser.GetProtocol() )
|
||||
@@ -2842,7 +2842,7 @@ namespace pcr
|
||||
_rClearBeforeDialog.clear();
|
||||
bool bSuccess = ( 0 == aFileDlg.Execute() );
|
||||
if ( bSuccess )
|
||||
_out_rNewValue <<= (::rtl::OUString)aFileDlg.GetPath();
|
||||
_out_rNewValue <<= (OUString)aFileDlg.GetPath();
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
@@ -2886,7 +2886,7 @@ namespace pcr
|
||||
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0,
|
||||
rtl::OUString("sdatabase"));
|
||||
|
||||
::rtl::OUString sDataSource;
|
||||
OUString sDataSource;
|
||||
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_DATASOURCE ) >>= sDataSource );
|
||||
INetURLObject aParser( sDataSource );
|
||||
if ( INET_PROT_FILE == aParser.GetProtocol() )
|
||||
@@ -2905,7 +2905,7 @@ namespace pcr
|
||||
_rClearBeforeDialog.clear();
|
||||
bool bSuccess = ( 0 == aFileDlg.Execute() );
|
||||
if ( bSuccess )
|
||||
_out_rNewValue <<= (::rtl::OUString)aFileDlg.GetPath();
|
||||
_out_rNewValue <<= (OUString)aFileDlg.GetPath();
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
@@ -2977,7 +2977,7 @@ namespace pcr
|
||||
whose UI is to be disabled while the SQL command property is
|
||||
being edited.
|
||||
*/
|
||||
virtual ::rtl::OUString* getPropertiesToDisable() = 0;
|
||||
virtual OUString* getPropertiesToDisable() = 0;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
@@ -3024,13 +3024,13 @@ namespace pcr
|
||||
FormSQLCommandUI( const Reference< XPropertySet >& _rxForm );
|
||||
|
||||
// ISQLCommandAdapter
|
||||
virtual ::rtl::OUString getSQLCommand() const;
|
||||
virtual OUString getSQLCommand() const;
|
||||
virtual sal_Bool getEscapeProcessing() const;
|
||||
virtual void setSQLCommand( const ::rtl::OUString& _rCommand ) const;
|
||||
virtual void setSQLCommand( const OUString& _rCommand ) const;
|
||||
virtual void setEscapeProcessing( const sal_Bool _bEscapeProcessing ) const;
|
||||
|
||||
// ISQLCommandPropertyUI
|
||||
virtual ::rtl::OUString* getPropertiesToDisable();
|
||||
virtual OUString* getPropertiesToDisable();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
@@ -3043,9 +3043,9 @@ namespace pcr
|
||||
}
|
||||
|
||||
//....................................................................
|
||||
::rtl::OUString FormSQLCommandUI::getSQLCommand() const
|
||||
OUString FormSQLCommandUI::getSQLCommand() const
|
||||
{
|
||||
::rtl::OUString sCommand;
|
||||
OUString sCommand;
|
||||
OSL_VERIFY( m_xObject->getPropertyValue( PROPERTY_COMMAND ) >>= sCommand );
|
||||
return sCommand;
|
||||
}
|
||||
@@ -3059,7 +3059,7 @@ namespace pcr
|
||||
}
|
||||
|
||||
//....................................................................
|
||||
void FormSQLCommandUI::setSQLCommand( const ::rtl::OUString& _rCommand ) const
|
||||
void FormSQLCommandUI::setSQLCommand( const OUString& _rCommand ) const
|
||||
{
|
||||
m_xObject->setPropertyValue( PROPERTY_COMMAND, makeAny( _rCommand ) );
|
||||
}
|
||||
@@ -3071,14 +3071,14 @@ namespace pcr
|
||||
}
|
||||
|
||||
//....................................................................
|
||||
::rtl::OUString* FormSQLCommandUI::getPropertiesToDisable()
|
||||
OUString* FormSQLCommandUI::getPropertiesToDisable()
|
||||
{
|
||||
static ::rtl::OUString s_aCommandProps[] = {
|
||||
static OUString s_aCommandProps[] = {
|
||||
PROPERTY_DATASOURCE,
|
||||
PROPERTY_COMMAND,
|
||||
PROPERTY_COMMANDTYPE,
|
||||
PROPERTY_ESCAPE_PROCESSING,
|
||||
::rtl::OUString()
|
||||
OUString()
|
||||
};
|
||||
return s_aCommandProps;
|
||||
}
|
||||
@@ -3091,13 +3091,13 @@ namespace pcr
|
||||
ValueListCommandUI( const Reference< XPropertySet >& _rxListOrCombo );
|
||||
|
||||
// ISQLCommandAdapter
|
||||
virtual ::rtl::OUString getSQLCommand() const;
|
||||
virtual OUString getSQLCommand() const;
|
||||
virtual sal_Bool getEscapeProcessing() const;
|
||||
virtual void setSQLCommand( const ::rtl::OUString& _rCommand ) const;
|
||||
virtual void setSQLCommand( const OUString& _rCommand ) const;
|
||||
virtual void setEscapeProcessing( const sal_Bool _bEscapeProcessing ) const;
|
||||
|
||||
// ISQLCommandPropertyUI
|
||||
virtual ::rtl::OUString* getPropertiesToDisable();
|
||||
virtual OUString* getPropertiesToDisable();
|
||||
private:
|
||||
mutable bool m_bPropertyValueIsList;
|
||||
};
|
||||
@@ -3113,9 +3113,9 @@ namespace pcr
|
||||
}
|
||||
|
||||
//....................................................................
|
||||
::rtl::OUString ValueListCommandUI::getSQLCommand() const
|
||||
OUString ValueListCommandUI::getSQLCommand() const
|
||||
{
|
||||
::rtl::OUString sValue;
|
||||
OUString sValue;
|
||||
m_bPropertyValueIsList = false;
|
||||
|
||||
// for combo boxes, the property is a mere string
|
||||
@@ -3123,7 +3123,7 @@ namespace pcr
|
||||
if ( aValue >>= sValue )
|
||||
return sValue;
|
||||
|
||||
Sequence< ::rtl::OUString > aValueList;
|
||||
Sequence< OUString > aValueList;
|
||||
if ( aValue >>= aValueList )
|
||||
{
|
||||
m_bPropertyValueIsList = true;
|
||||
@@ -3147,11 +3147,11 @@ namespace pcr
|
||||
}
|
||||
|
||||
//....................................................................
|
||||
void ValueListCommandUI::setSQLCommand( const ::rtl::OUString& _rCommand ) const
|
||||
void ValueListCommandUI::setSQLCommand( const OUString& _rCommand ) const
|
||||
{
|
||||
Any aValue;
|
||||
if ( m_bPropertyValueIsList )
|
||||
aValue <<= Sequence< ::rtl::OUString >( &_rCommand, 1 );
|
||||
aValue <<= Sequence< OUString >( &_rCommand, 1 );
|
||||
else
|
||||
aValue <<= _rCommand;
|
||||
m_xObject->setPropertyValue( PROPERTY_LISTSOURCE, aValue );
|
||||
@@ -3165,12 +3165,12 @@ namespace pcr
|
||||
}
|
||||
|
||||
//....................................................................
|
||||
::rtl::OUString* ValueListCommandUI::getPropertiesToDisable()
|
||||
OUString* ValueListCommandUI::getPropertiesToDisable()
|
||||
{
|
||||
static ::rtl::OUString s_aListSourceProps[] = {
|
||||
static OUString s_aListSourceProps[] = {
|
||||
PROPERTY_LISTSOURCETYPE,
|
||||
PROPERTY_LISTSOURCE,
|
||||
::rtl::OUString()
|
||||
OUString()
|
||||
};
|
||||
return s_aListSourceProps;
|
||||
}
|
||||
@@ -3218,14 +3218,14 @@ namespace pcr
|
||||
{
|
||||
m_xBrowserUI = _rxInspectorUI;
|
||||
// disable everything which would affect this property
|
||||
const ::rtl::OUString* pToDisable = xCommandUI->getPropertiesToDisable();
|
||||
const OUString* pToDisable = xCommandUI->getPropertiesToDisable();
|
||||
while ( !pToDisable->isEmpty() )
|
||||
{
|
||||
m_xBrowserUI->enablePropertyUIElements( *pToDisable++, PropertyLineElement::All, sal_False );
|
||||
}
|
||||
|
||||
// but enable the browse button for the property itself - so it can be used to raise the query designer
|
||||
::rtl::OUString sPropertyName( impl_getPropertyNameFromId_nothrow( _nDesignForProperty ) );
|
||||
OUString sPropertyName( impl_getPropertyNameFromId_nothrow( _nDesignForProperty ) );
|
||||
m_xBrowserUI->enablePropertyUIElements( sPropertyName, PropertyLineElement::PrimaryButton, sal_True );
|
||||
}
|
||||
}
|
||||
@@ -3249,7 +3249,7 @@ namespace pcr
|
||||
if ( !xCommandUI.is() )
|
||||
throw NullPointerException();
|
||||
|
||||
const ::rtl::OUString* pToEnable = xCommandUI->getPropertiesToDisable();
|
||||
const OUString* pToEnable = xCommandUI->getPropertiesToDisable();
|
||||
while ( !pToEnable->isEmpty() )
|
||||
{
|
||||
m_xBrowserUI->enablePropertyUIElements( *pToEnable++, PropertyLineElement::All, sal_True );
|
||||
@@ -3272,7 +3272,7 @@ namespace pcr
|
||||
{
|
||||
try
|
||||
{
|
||||
::rtl::OUString sPropertyValue;
|
||||
OUString sPropertyValue;
|
||||
// first, we need the name of an existent data source
|
||||
if ( _xFormProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_DATASOURCE) )
|
||||
_xFormProperties->getPropertyValue( PROPERTY_DATASOURCE ) >>= sPropertyValue;
|
||||
@@ -3294,9 +3294,9 @@ namespace pcr
|
||||
return bHas;
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
::rtl::OUString FormComponentPropertyHandler::impl_getDocumentURL_nothrow() const
|
||||
OUString FormComponentPropertyHandler::impl_getDocumentURL_nothrow() const
|
||||
{
|
||||
::rtl::OUString sURL;
|
||||
OUString sURL;
|
||||
try
|
||||
{
|
||||
Reference< XModel > xDocument( impl_getContextDocument_nothrow() );
|
||||
|
@@ -48,11 +48,11 @@ using namespace ::com::sun::star::beans ;
|
||||
using namespace ::com::sun::star::lang ;
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
#define ROOTNODE_ADDONMENU ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Addons" ))
|
||||
#define PATHDELIMITER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/" ))
|
||||
#define ROOTNODE_ADDONMENU OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Addons" ))
|
||||
#define PATHDELIMITER OUString(RTL_CONSTASCII_USTRINGPARAM("/" ))
|
||||
#define SEPARATOR_URL_STR "private:separator"
|
||||
#define SEPARATOR_URL_LEN 17
|
||||
#define SEPARATOR_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEPARATOR_URL_STR ))
|
||||
#define SEPARATOR_URL OUString(RTL_CONSTASCII_USTRINGPARAM( SEPARATOR_URL_STR ))
|
||||
|
||||
#define PROPERTYNAME_URL ADDONSMENUITEM_PROPERTYNAME_URL
|
||||
#define PROPERTYNAME_TITLE ADDONSMENUITEM_PROPERTYNAME_TITLE
|
||||
@@ -63,32 +63,32 @@ using namespace ::com::sun::star;
|
||||
#define PROPERTYNAME_CONTROLTYPE ADDONSMENUITEM_PROPERTYNAME_CONTROLTYPE
|
||||
#define PROPERTYNAME_WIDTH ADDONSMENUITEM_PROPERTYNAME_WIDTH
|
||||
|
||||
#define PROPERTYNAME_IMAGESMALL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmall" ))
|
||||
#define PROPERTYNAME_IMAGEBIG ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBig" ))
|
||||
#define PROPERTYNAME_IMAGESMALLHC ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallHC" ))
|
||||
#define PROPERTYNAME_IMAGEBIGHC ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBigHC" ))
|
||||
#define PROPERTYNAME_IMAGESMALL_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallURL" ))
|
||||
#define PROPERTYNAME_IMAGEBIG_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBigURL" ))
|
||||
#define PROPERTYNAME_IMAGESMALLHC_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallHCURL" ))
|
||||
#define PROPERTYNAME_IMAGEBIGHC_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBigHCURL" ))
|
||||
#define PROPERTYNAME_IMAGESMALL OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmall" ))
|
||||
#define PROPERTYNAME_IMAGEBIG OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBig" ))
|
||||
#define PROPERTYNAME_IMAGESMALLHC OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallHC" ))
|
||||
#define PROPERTYNAME_IMAGEBIGHC OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBigHC" ))
|
||||
#define PROPERTYNAME_IMAGESMALL_URL OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallURL" ))
|
||||
#define PROPERTYNAME_IMAGEBIG_URL OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBigURL" ))
|
||||
#define PROPERTYNAME_IMAGESMALLHC_URL OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallHCURL" ))
|
||||
#define PROPERTYNAME_IMAGEBIGHC_URL OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBigHCURL" ))
|
||||
|
||||
#define IMAGES_NODENAME ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UserDefinedImages" ))
|
||||
#define PRIVATE_IMAGE_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:image/" ))
|
||||
#define IMAGES_NODENAME OUString(RTL_CONSTASCII_USTRINGPARAM("UserDefinedImages" ))
|
||||
#define PRIVATE_IMAGE_URL OUString(RTL_CONSTASCII_USTRINGPARAM("private:image/" ))
|
||||
|
||||
#define PROPERTYNAME_MERGEMENU_MERGEPOINT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGECOMMAND ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGECOMMANDPARAMETER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGEFALLBACK ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGECONTEXT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MENUITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MenuItems" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGEPOINT OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGECOMMAND OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGECOMMANDPARAMETER OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGEFALLBACK OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MERGECONTEXT OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
|
||||
#define PROPERTYNAME_MERGEMENU_MENUITEMS OUString(RTL_CONSTASCII_USTRINGPARAM("MenuItems" ))
|
||||
|
||||
#define PROPERTYNAME_MERGETOOLBAR_TOOLBAR ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeToolBar" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGEPOINT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMAND ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMANDPARAMETER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGEFALLBACK ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGECONTEXT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_TOOLBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ToolBarItems" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_TOOLBAR OUString(RTL_CONSTASCII_USTRINGPARAM("MergeToolBar" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGEPOINT OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMAND OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMANDPARAMETER OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGEFALLBACK OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_MERGECONTEXT OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
|
||||
#define PROPERTYNAME_MERGETOOLBAR_TOOLBARITEMS OUString(RTL_CONSTASCII_USTRINGPARAM("ToolBarItems" ))
|
||||
|
||||
// The following order is mandatory. Please add properties at the end!
|
||||
#define INDEX_URL 0
|
||||
@@ -204,7 +204,7 @@ class AddonsOptions_Impl : public ConfigItem
|
||||
@onerror -
|
||||
*//*-*****************************************************************************************************/
|
||||
|
||||
virtual void Notify( const Sequence< ::rtl::OUString >& lPropertyNames );
|
||||
virtual void Notify( const Sequence< OUString >& lPropertyNames );
|
||||
|
||||
/*-****************************************************************************************************//**
|
||||
@short write changes to configuration
|
||||
@@ -243,11 +243,11 @@ class AddonsOptions_Impl : public ConfigItem
|
||||
const Sequence< Sequence< PropertyValue > >& GetAddonsMenu () const ;
|
||||
const Sequence< Sequence< PropertyValue > >& GetAddonsMenuBarPart () const ;
|
||||
const Sequence< Sequence< PropertyValue > >& GetAddonsToolBarPart ( sal_uInt32 nIndex ) const ;
|
||||
const ::rtl::OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const;
|
||||
const OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const;
|
||||
const Sequence< Sequence< PropertyValue > >& GetAddonsHelpMenu () const ;
|
||||
Image GetImageFromURL( const rtl::OUString& aURL, sal_Bool bBig, sal_Bool bNoScale ) const;
|
||||
const MergeMenuInstructionContainer& GetMergeMenuInstructions() const;
|
||||
bool GetMergeToolbarInstructions( const ::rtl::OUString& rToolbarName, MergeToolbarInstructionContainer& rToolbarInstructions ) const;
|
||||
bool GetMergeToolbarInstructions( const OUString& rToolbarName, MergeToolbarInstructionContainer& rToolbarInstructions ) const;
|
||||
|
||||
void ReadConfigurationData();
|
||||
|
||||
@@ -258,7 +258,7 @@ class AddonsOptions_Impl : public ConfigItem
|
||||
private:
|
||||
struct OUStringHashCode
|
||||
{
|
||||
size_t operator()( const ::rtl::OUString& sString ) const
|
||||
size_t operator()( const OUString& sString ) const
|
||||
{
|
||||
return sString.hashCode();
|
||||
}
|
||||
@@ -273,10 +273,10 @@ class AddonsOptions_Impl : public ConfigItem
|
||||
Image aImageBigNoScale;
|
||||
};
|
||||
|
||||
typedef boost::unordered_map< ::rtl::OUString, ImageEntry, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ImageManager;
|
||||
typedef boost::unordered_map< ::rtl::OUString, sal_uInt32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > StringToIndexMap;
|
||||
typedef boost::unordered_map< OUString, ImageEntry, OUStringHashCode, ::std::equal_to< OUString > > ImageManager;
|
||||
typedef boost::unordered_map< OUString, sal_uInt32, OUStringHashCode, ::std::equal_to< OUString > > StringToIndexMap;
|
||||
typedef std::vector< Sequence< Sequence< PropertyValue > > > AddonToolBars;
|
||||
typedef ::boost::unordered_map< ::rtl::OUString, MergeToolbarInstructionContainer, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ToolbarMergingInstructions;
|
||||
typedef ::boost::unordered_map< OUString, MergeToolbarInstructionContainer, OUStringHashCode, ::std::equal_to< OUString > > ToolbarMergingInstructions;
|
||||
|
||||
enum ImageSize
|
||||
{
|
||||
@@ -306,27 +306,27 @@ class AddonsOptions_Impl : public ConfigItem
|
||||
sal_Bool ReadMenuMergeInstructions( MergeMenuInstructionContainer& rContainer );
|
||||
sal_Bool ReadToolbarMergeInstructions( ToolbarMergingInstructions& rToolbarMergeMap );
|
||||
|
||||
sal_Bool ReadMergeMenuData( const ::rtl::OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );
|
||||
sal_Bool ReadMergeToolbarData( const ::rtl::OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems );
|
||||
sal_Bool ReadMenuItem( const ::rtl::OUString& aMenuItemNodeName, Sequence< PropertyValue >& aMenuItem, sal_Bool bIgnoreSubMenu = sal_False );
|
||||
sal_Bool ReadPopupMenu( const ::rtl::OUString& aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu );
|
||||
sal_Bool ReadMergeMenuData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );
|
||||
sal_Bool ReadMergeToolbarData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems );
|
||||
sal_Bool ReadMenuItem( const OUString& aMenuItemNodeName, Sequence< PropertyValue >& aMenuItem, sal_Bool bIgnoreSubMenu = sal_False );
|
||||
sal_Bool ReadPopupMenu( const OUString& aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu );
|
||||
sal_Bool AppendPopupMenu( Sequence< PropertyValue >& aTargetPopupMenu, const Sequence< PropertyValue >& rSourcePopupMenu );
|
||||
sal_Bool ReadToolBarItem( const ::rtl::OUString& aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem );
|
||||
sal_Bool ReadImagesItem( const ::rtl::OUString& aImagesItemNodeName, Sequence< PropertyValue >& aImagesItem );
|
||||
ImageEntry* ReadImageData( const ::rtl::OUString& aImagesNodeName );
|
||||
void ReadAndAssociateImages( const ::rtl::OUString& aURL, const ::rtl::OUString& aImageId );
|
||||
void ReadImageFromURL( ImageSize nImageSize, const ::rtl::OUString& aURL, Image& aImage, Image& aNoScaleImage );
|
||||
sal_Bool HasAssociatedImages( const ::rtl::OUString& aURL );
|
||||
void SubstituteVariables( ::rtl::OUString& aURL );
|
||||
sal_Bool ReadToolBarItem( const OUString& aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem );
|
||||
sal_Bool ReadImagesItem( const OUString& aImagesItemNodeName, Sequence< PropertyValue >& aImagesItem );
|
||||
ImageEntry* ReadImageData( const OUString& aImagesNodeName );
|
||||
void ReadAndAssociateImages( const OUString& aURL, const OUString& aImageId );
|
||||
void ReadImageFromURL( ImageSize nImageSize, const OUString& aURL, Image& aImage, Image& aNoScaleImage );
|
||||
sal_Bool HasAssociatedImages( const OUString& aURL );
|
||||
void SubstituteVariables( OUString& aURL );
|
||||
|
||||
sal_Bool ReadSubMenuEntries( const Sequence< ::rtl::OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenu );
|
||||
sal_Bool ReadSubMenuEntries( const Sequence< OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenu );
|
||||
void InsertToolBarSeparator( Sequence< Sequence< PropertyValue > >& rAddonOfficeToolBarSeq );
|
||||
::rtl::OUString GeneratePrefixURL();
|
||||
OUString GeneratePrefixURL();
|
||||
|
||||
Sequence< ::rtl::OUString > GetPropertyNamesMenuItem( const ::rtl::OUString& aPropertyRootNode ) const;
|
||||
Sequence< ::rtl::OUString > GetPropertyNamesPopupMenu( const ::rtl::OUString& aPropertyRootNode ) const;
|
||||
Sequence< ::rtl::OUString > GetPropertyNamesToolBarItem( const ::rtl::OUString& aPropertyRootNode ) const;
|
||||
Sequence< ::rtl::OUString > GetPropertyNamesImages( const ::rtl::OUString& aPropertyRootNode ) const;
|
||||
Sequence< OUString > GetPropertyNamesMenuItem( const OUString& aPropertyRootNode ) const;
|
||||
Sequence< OUString > GetPropertyNamesPopupMenu( const OUString& aPropertyRootNode ) const;
|
||||
Sequence< OUString > GetPropertyNamesToolBarItem( const OUString& aPropertyRootNode ) const;
|
||||
Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const;
|
||||
sal_Bool CreateImageFromSequence( Image& rImage, sal_Bool bBig, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
@@ -334,18 +334,18 @@ class AddonsOptions_Impl : public ConfigItem
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
private:
|
||||
ImageEntry* ReadOptionalImageData( const ::rtl::OUString& aMenuNodeName );
|
||||
ImageEntry* ReadOptionalImageData( const OUString& aMenuNodeName );
|
||||
|
||||
sal_Int32 m_nRootAddonPopupMenuId;
|
||||
::rtl::OUString m_aPropNames[PROPERTYCOUNT_INDEX];
|
||||
::rtl::OUString m_aPropImagesNames[PROPERTYCOUNT_IMAGES];
|
||||
::rtl::OUString m_aPropMergeMenuNames[PROPERTYCOUNT_MERGE_MENUBAR];
|
||||
::rtl::OUString m_aPropMergeToolbarNames[PROPERTYCOUNT_MERGE_TOOLBAR];
|
||||
::rtl::OUString m_aEmpty;
|
||||
::rtl::OUString m_aPathDelimiter;
|
||||
::rtl::OUString m_aSeparator;
|
||||
::rtl::OUString m_aRootAddonPopupMenuURLPrexfix;
|
||||
::rtl::OUString m_aPrivateImageURL;
|
||||
OUString m_aPropNames[PROPERTYCOUNT_INDEX];
|
||||
OUString m_aPropImagesNames[PROPERTYCOUNT_IMAGES];
|
||||
OUString m_aPropMergeMenuNames[PROPERTYCOUNT_MERGE_MENUBAR];
|
||||
OUString m_aPropMergeToolbarNames[PROPERTYCOUNT_MERGE_TOOLBAR];
|
||||
OUString m_aEmpty;
|
||||
OUString m_aPathDelimiter;
|
||||
OUString m_aSeparator;
|
||||
OUString m_aRootAddonPopupMenuURLPrexfix;
|
||||
OUString m_aPrivateImageURL;
|
||||
Sequence< Sequence< PropertyValue > > m_aCachedMenuProperties;
|
||||
Sequence< Sequence< PropertyValue > > m_aCachedMenuBarPartProperties;
|
||||
AddonToolBars m_aCachedToolBarPartProperties;
|
||||
@@ -457,7 +457,7 @@ void AddonsOptions_Impl::ReadConfigurationData()
|
||||
//*****************************************************************************************************************
|
||||
// public method
|
||||
//*****************************************************************************************************************
|
||||
void AddonsOptions_Impl::Notify( const Sequence< ::rtl::OUString >& /*lPropertyNames*/ )
|
||||
void AddonsOptions_Impl::Notify( const Sequence< OUString >& /*lPropertyNames*/ )
|
||||
{
|
||||
Application::PostUserEvent( STATIC_LINK( 0, AddonsOptions, Notify ) );
|
||||
}
|
||||
@@ -516,7 +516,7 @@ const Sequence< Sequence< PropertyValue > >& AddonsOptions_Impl::GetAddonsToolBa
|
||||
//*****************************************************************************************************************
|
||||
// public method
|
||||
//*****************************************************************************************************************
|
||||
const ::rtl::OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
|
||||
const OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
|
||||
{
|
||||
if ( nIndex < m_aCachedToolBarPartResourceNames.size() )
|
||||
return m_aCachedToolBarPartResourceNames[nIndex];
|
||||
@@ -544,7 +544,7 @@ const MergeMenuInstructionContainer& AddonsOptions_Impl::GetMergeMenuInstruction
|
||||
// public method
|
||||
//*****************************************************************************************************************
|
||||
bool AddonsOptions_Impl::GetMergeToolbarInstructions(
|
||||
const ::rtl::OUString& rToolbarName,
|
||||
const OUString& rToolbarName,
|
||||
MergeToolbarInstructionContainer& rToolbarInstructions ) const
|
||||
{
|
||||
ToolbarMergingInstructions::const_iterator pIter = m_aCachedToolbarMergingInstructions.find( rToolbarName );
|
||||
@@ -582,9 +582,9 @@ Image AddonsOptions_Impl::GetImageFromURL( const rtl::OUString& aURL, sal_Bool b
|
||||
sal_Bool AddonsOptions_Impl::ReadAddonMenuSet( Sequence< Sequence< PropertyValue > >& rAddonMenuSeq )
|
||||
{
|
||||
// Read the AddonMenu set and fill property sequences
|
||||
::rtl::OUString aAddonMenuNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/AddonMenu" ));
|
||||
Sequence< ::rtl::OUString > aAddonMenuNodeSeq = GetNodeNames( aAddonMenuNodeName );
|
||||
::rtl::OUString aAddonMenuItemNode( aAddonMenuNodeName + m_aPathDelimiter );
|
||||
OUString aAddonMenuNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/AddonMenu" ));
|
||||
Sequence< OUString > aAddonMenuNodeSeq = GetNodeNames( aAddonMenuNodeName );
|
||||
OUString aAddonMenuItemNode( aAddonMenuNodeName + m_aPathDelimiter );
|
||||
|
||||
sal_uInt32 nCount = aAddonMenuNodeSeq.getLength();
|
||||
sal_uInt32 nIndex = 0;
|
||||
@@ -600,7 +600,7 @@ sal_Bool AddonsOptions_Impl::ReadAddonMenuSet( Sequence< Sequence< PropertyValue
|
||||
|
||||
for ( sal_uInt32 n = 0; n < nCount; n++ )
|
||||
{
|
||||
::rtl::OUString aRootMenuItemNode( aAddonMenuItemNode + aAddonMenuNodeSeq[n] );
|
||||
OUString aRootMenuItemNode( aAddonMenuItemNode + aAddonMenuNodeSeq[n] );
|
||||
|
||||
// Read the MenuItem
|
||||
if ( ReadMenuItem( aRootMenuItemNode, aMenuItem ) )
|
||||
@@ -621,9 +621,9 @@ sal_Bool AddonsOptions_Impl::ReadAddonMenuSet( Sequence< Sequence< PropertyValue
|
||||
sal_Bool AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< Sequence< PropertyValue > >& rAddonOfficeHelpMenuSeq )
|
||||
{
|
||||
// Read the AddonMenu set and fill property sequences
|
||||
::rtl::OUString aAddonHelpMenuNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeHelp" ));
|
||||
Sequence< ::rtl::OUString > aAddonHelpMenuNodeSeq = GetNodeNames( aAddonHelpMenuNodeName );
|
||||
::rtl::OUString aAddonHelpMenuItemNode( aAddonHelpMenuNodeName + m_aPathDelimiter );
|
||||
OUString aAddonHelpMenuNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeHelp" ));
|
||||
Sequence< OUString > aAddonHelpMenuNodeSeq = GetNodeNames( aAddonHelpMenuNodeName );
|
||||
OUString aAddonHelpMenuItemNode( aAddonHelpMenuNodeName + m_aPathDelimiter );
|
||||
|
||||
sal_uInt32 nCount = aAddonHelpMenuNodeSeq.getLength();
|
||||
sal_uInt32 nIndex = 0;
|
||||
@@ -639,7 +639,7 @@ sal_Bool AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< Sequence< PropertyValu
|
||||
|
||||
for ( sal_uInt32 n = 0; n < nCount; n++ )
|
||||
{
|
||||
::rtl::OUString aRootMenuItemNode( aAddonHelpMenuItemNode + aAddonHelpMenuNodeSeq[n] );
|
||||
OUString aRootMenuItemNode( aAddonHelpMenuItemNode + aAddonHelpMenuNodeSeq[n] );
|
||||
|
||||
// Read the MenuItem
|
||||
if ( ReadMenuItem( aRootMenuItemNode, aMenuItem, sal_True ) )
|
||||
@@ -660,9 +660,9 @@ sal_Bool AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< Sequence< PropertyValu
|
||||
sal_Bool AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< Sequence< PropertyValue > >& rAddonOfficeMenuBarSeq )
|
||||
{
|
||||
// Read the OfficeMenuBar set and fill property sequences
|
||||
::rtl::OUString aAddonMenuBarNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeMenuBar" ));
|
||||
Sequence< ::rtl::OUString > aAddonMenuBarNodeSeq = GetNodeNames( aAddonMenuBarNodeName );
|
||||
::rtl::OUString aAddonMenuBarNode( aAddonMenuBarNodeName + m_aPathDelimiter );
|
||||
OUString aAddonMenuBarNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeMenuBar" ));
|
||||
Sequence< OUString > aAddonMenuBarNodeSeq = GetNodeNames( aAddonMenuBarNodeName );
|
||||
OUString aAddonMenuBarNode( aAddonMenuBarNodeName + m_aPathDelimiter );
|
||||
|
||||
sal_uInt32 nCount = aAddonMenuBarNodeSeq.getLength();
|
||||
sal_uInt32 nIndex = 0;
|
||||
@@ -678,13 +678,13 @@ sal_Bool AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< Sequence< PropertyV
|
||||
|
||||
for ( sal_uInt32 n = 0; n < nCount; n++ )
|
||||
{
|
||||
::rtl::OUString aPopupMenuNode( aAddonMenuBarNode + aAddonMenuBarNodeSeq[n] );
|
||||
OUString aPopupMenuNode( aAddonMenuBarNode + aAddonMenuBarNodeSeq[n] );
|
||||
|
||||
// Read the MenuItem
|
||||
if ( ReadPopupMenu( aPopupMenuNode, aPopupMenu ) )
|
||||
{
|
||||
// Successfully read a popup menu, append to our list
|
||||
::rtl::OUString aPopupTitle;
|
||||
OUString aPopupTitle;
|
||||
if ( aPopupMenu[OFFSET_POPUPMENU_TITLE].Value >>= aPopupTitle )
|
||||
{
|
||||
StringToIndexMap::const_iterator pIter = aTitleToIndexMap.find( aPopupTitle );
|
||||
@@ -716,15 +716,15 @@ sal_Bool AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< Sequence< PropertyV
|
||||
sal_Bool AddonsOptions_Impl::ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeToolBars, std::vector< rtl::OUString >& rAddonOfficeToolBarResNames )
|
||||
{
|
||||
// Read the OfficeToolBar set and fill property sequences
|
||||
::rtl::OUString aAddonToolBarNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeToolBar" ));
|
||||
Sequence< ::rtl::OUString > aAddonToolBarNodeSeq = GetNodeNames( aAddonToolBarNodeName );
|
||||
::rtl::OUString aAddonToolBarNode( aAddonToolBarNodeName + m_aPathDelimiter );
|
||||
OUString aAddonToolBarNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeToolBar" ));
|
||||
Sequence< OUString > aAddonToolBarNodeSeq = GetNodeNames( aAddonToolBarNodeName );
|
||||
OUString aAddonToolBarNode( aAddonToolBarNodeName + m_aPathDelimiter );
|
||||
|
||||
sal_uInt32 nCount = aAddonToolBarNodeSeq.getLength();
|
||||
|
||||
for ( sal_uInt32 n = 0; n < nCount; n++ )
|
||||
{
|
||||
::rtl::OUString aToolBarItemNode( aAddonToolBarNode + aAddonToolBarNodeSeq[n] );
|
||||
OUString aToolBarItemNode( aAddonToolBarNode + aAddonToolBarNodeSeq[n] );
|
||||
rAddonOfficeToolBarResNames.push_back( aAddonToolBarNodeSeq[n] );
|
||||
rAddonOfficeToolBars.push_back( m_aEmptyAddonToolBar );
|
||||
ReadToolBarItemSet( aToolBarItemNode, rAddonOfficeToolBars[n] );
|
||||
@@ -741,8 +741,8 @@ sal_Bool AddonsOptions_Impl::ReadToolBarItemSet( const rtl::OUString rToolBarIte
|
||||
{
|
||||
sal_Bool bInsertSeparator = sal_False;
|
||||
sal_uInt32 nToolBarItemCount = rAddonOfficeToolBarSeq.getLength();
|
||||
::rtl::OUString aAddonToolBarItemSetNode( rToolBarItemSetNodeName + m_aPathDelimiter );
|
||||
Sequence< ::rtl::OUString > aAddonToolBarItemSetNodeSeq = GetNodeNames( rToolBarItemSetNodeName );
|
||||
OUString aAddonToolBarItemSetNode( rToolBarItemSetNodeName + m_aPathDelimiter );
|
||||
Sequence< OUString > aAddonToolBarItemSetNodeSeq = GetNodeNames( rToolBarItemSetNodeName );
|
||||
Sequence< PropertyValue > aToolBarItem( PROPERTYCOUNT_TOOLBARITEM );
|
||||
|
||||
// Init the property value sequence
|
||||
@@ -757,7 +757,7 @@ sal_Bool AddonsOptions_Impl::ReadToolBarItemSet( const rtl::OUString rToolBarIte
|
||||
sal_uInt32 nCount = aAddonToolBarItemSetNodeSeq.getLength();
|
||||
for ( sal_uInt32 n = 0; n < nCount; n++ )
|
||||
{
|
||||
::rtl::OUString aToolBarItemNode( aAddonToolBarItemSetNode + aAddonToolBarItemSetNodeSeq[n] );
|
||||
OUString aToolBarItemNode( aAddonToolBarItemSetNode + aAddonToolBarItemSetNodeSeq[n] );
|
||||
|
||||
// Read the ToolBarItem
|
||||
if ( ReadToolBarItem( aToolBarItemNode, aToolBarItem ) )
|
||||
@@ -808,22 +808,22 @@ void AddonsOptions_Impl::InsertToolBarSeparator( Sequence< Sequence< PropertyVal
|
||||
sal_Bool AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
|
||||
{
|
||||
// Read the user-defined Images set and fill image manager
|
||||
::rtl::OUString aAddonImagesNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/Images" ));
|
||||
Sequence< ::rtl::OUString > aAddonImagesNodeSeq = GetNodeNames( aAddonImagesNodeName );
|
||||
::rtl::OUString aAddonImagesNode( aAddonImagesNodeName + m_aPathDelimiter );
|
||||
OUString aAddonImagesNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/Images" ));
|
||||
Sequence< OUString > aAddonImagesNodeSeq = GetNodeNames( aAddonImagesNodeName );
|
||||
OUString aAddonImagesNode( aAddonImagesNodeName + m_aPathDelimiter );
|
||||
|
||||
sal_uInt32 nCount = aAddonImagesNodeSeq.getLength();
|
||||
|
||||
// Init the property value sequence
|
||||
Sequence< ::rtl::OUString > aAddonImageItemNodePropNames( 1 );
|
||||
::rtl::OUString aURL;
|
||||
Sequence< OUString > aAddonImageItemNodePropNames( 1 );
|
||||
OUString aURL;
|
||||
|
||||
for ( sal_uInt32 n = 0; n < nCount; n++ )
|
||||
{
|
||||
::rtl::OUString aImagesItemNode( aAddonImagesNode + aAddonImagesNodeSeq[n] );
|
||||
OUString aImagesItemNode( aAddonImagesNode + aAddonImagesNodeSeq[n] );
|
||||
|
||||
// Create sequence for data access
|
||||
::rtl::OUStringBuffer aBuffer( aImagesItemNode );
|
||||
OUStringBuffer aBuffer( aImagesItemNode );
|
||||
aBuffer.append( m_aPathDelimiter );
|
||||
aBuffer.append( m_aPropNames[ OFFSET_MENUITEM_URL ] );
|
||||
aAddonImageItemNodePropNames[0] = aBuffer.makeStringAndClear();
|
||||
@@ -836,11 +836,11 @@ sal_Bool AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
|
||||
!aURL.isEmpty() &&
|
||||
!HasAssociatedImages( aURL ))
|
||||
{
|
||||
::rtl::OUStringBuffer aBuf( aImagesItemNode );
|
||||
OUStringBuffer aBuf( aImagesItemNode );
|
||||
aBuf.append( m_aPathDelimiter );
|
||||
aBuf.append( IMAGES_NODENAME );
|
||||
aBuf.append( m_aPathDelimiter );
|
||||
::rtl::OUString aImagesUserDefinedItemNode = aBuf.makeStringAndClear();
|
||||
OUString aImagesUserDefinedItemNode = aBuf.makeStringAndClear();
|
||||
|
||||
// Read a user-defined images data
|
||||
ImageEntry* pImageEntry = ReadImageData( aImagesUserDefinedItemNode );
|
||||
@@ -860,14 +860,14 @@ sal_Bool AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
|
||||
::rtl::OUString AddonsOptions_Impl::GeneratePrefixURL()
|
||||
OUString AddonsOptions_Impl::GeneratePrefixURL()
|
||||
{
|
||||
// Create an unique prefixed Add-On popup menu URL so it can be identified later as a runtime popup menu.
|
||||
// They use a different image manager, so they must be identified by the sfx2/framework code.
|
||||
::rtl::OUString aPopupMenuURL;
|
||||
::rtl::OUStringBuffer aBuf( m_aRootAddonPopupMenuURLPrexfix.getLength() + 3 );
|
||||
OUString aPopupMenuURL;
|
||||
OUStringBuffer aBuf( m_aRootAddonPopupMenuURLPrexfix.getLength() + 3 );
|
||||
aBuf.append( m_aRootAddonPopupMenuURLPrexfix );
|
||||
aBuf.append( ::rtl::OUString::valueOf( ++m_nRootAddonPopupMenuId ));
|
||||
aBuf.append( OUString::valueOf( ++m_nRootAddonPopupMenuId ));
|
||||
aPopupMenuURL = aBuf.makeStringAndClear();
|
||||
return aPopupMenuURL;
|
||||
}
|
||||
@@ -878,32 +878,32 @@ sal_Bool AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
|
||||
|
||||
sal_Bool AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContainer& aContainer )
|
||||
{
|
||||
const ::rtl::OUString aMenuMergeRootName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeMenuBarMerging/" ));
|
||||
const OUString aMenuMergeRootName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeMenuBarMerging/" ));
|
||||
|
||||
Sequence< ::rtl::OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName );
|
||||
::rtl::OUString aAddonMergeNode( aMenuMergeRootName );
|
||||
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName );
|
||||
OUString aAddonMergeNode( aMenuMergeRootName );
|
||||
|
||||
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
|
||||
|
||||
// Init the property value sequence
|
||||
Sequence< ::rtl::OUString > aNodePropNames( 5 );
|
||||
Sequence< OUString > aNodePropNames( 5 );
|
||||
|
||||
for ( sal_uInt32 i = 0; i < nCount; i++ )
|
||||
{
|
||||
::rtl::OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
|
||||
OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
|
||||
|
||||
Sequence< ::rtl::OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
|
||||
Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
|
||||
sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
|
||||
|
||||
for ( sal_uInt32 j = 0; j < nCountAddons; j++ )
|
||||
{
|
||||
::rtl::OUStringBuffer aMergeAddonInstructionBase( aMergeAddonInstructions );
|
||||
OUStringBuffer aMergeAddonInstructionBase( aMergeAddonInstructions );
|
||||
aMergeAddonInstructionBase.append( m_aPathDelimiter );
|
||||
aMergeAddonInstructionBase.append( aAddonInstMergeNodesSeq[j] );
|
||||
aMergeAddonInstructionBase.append( m_aPathDelimiter );
|
||||
|
||||
// Create sequence for data access
|
||||
::rtl::OUStringBuffer aBuffer( aMergeAddonInstructionBase );
|
||||
OUStringBuffer aBuffer( aMergeAddonInstructionBase );
|
||||
aBuffer.append( m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEPOINT ] );
|
||||
aNodePropNames[0] = aBuffer.makeStringAndClear();
|
||||
|
||||
@@ -932,7 +932,7 @@ sal_Bool AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionCont
|
||||
aNodePropValues[3] >>= aMergeMenuInstruction.aMergeFallback;
|
||||
aNodePropValues[4] >>= aMergeMenuInstruction.aMergeContext;
|
||||
|
||||
::rtl::OUString aMergeMenuBase = aMergeAddonInstructionBase.makeStringAndClear();
|
||||
OUString aMergeMenuBase = aMergeAddonInstructionBase.makeStringAndClear();
|
||||
ReadMergeMenuData( aMergeMenuBase, aMergeMenuInstruction.aMergeMenu );
|
||||
|
||||
aContainer.push_back( aMergeMenuInstruction );
|
||||
@@ -945,16 +945,16 @@ sal_Bool AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionCont
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadMergeMenuData( const ::rtl::OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu )
|
||||
sal_Bool AddonsOptions_Impl::ReadMergeMenuData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu )
|
||||
{
|
||||
::rtl::OUString aMergeMenuBaseNode( aMergeAddonInstructionBase+m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MENUITEMS ] );
|
||||
OUString aMergeMenuBaseNode( aMergeAddonInstructionBase+m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MENUITEMS ] );
|
||||
|
||||
Sequence< ::rtl::OUString > aSubMenuNodeNames = GetNodeNames( aMergeMenuBaseNode );
|
||||
Sequence< OUString > aSubMenuNodeNames = GetNodeNames( aMergeMenuBaseNode );
|
||||
aMergeMenuBaseNode += m_aPathDelimiter;
|
||||
|
||||
// extend the node names to have full path strings
|
||||
for ( sal_uInt32 i = 0; i < (sal_uInt32)aSubMenuNodeNames.getLength(); i++ )
|
||||
aSubMenuNodeNames[i] = ::rtl::OUString( aMergeMenuBaseNode + aSubMenuNodeNames[i] );
|
||||
aSubMenuNodeNames[i] = OUString( aMergeMenuBaseNode + aSubMenuNodeNames[i] );
|
||||
|
||||
return ReadSubMenuEntries( aSubMenuNodeNames, rMergeMenu );
|
||||
}
|
||||
@@ -964,32 +964,32 @@ sal_Bool AddonsOptions_Impl::ReadMergeMenuData( const ::rtl::OUString& aMergeAdd
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstructions& rCachedToolbarMergingInstructions )
|
||||
{
|
||||
const ::rtl::OUString aToolbarMergeRootName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeToolbarMerging/" ));
|
||||
const OUString aToolbarMergeRootName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeToolbarMerging/" ));
|
||||
|
||||
Sequence< ::rtl::OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName );
|
||||
::rtl::OUString aAddonMergeNode( aToolbarMergeRootName );
|
||||
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName );
|
||||
OUString aAddonMergeNode( aToolbarMergeRootName );
|
||||
|
||||
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
|
||||
|
||||
// Init the property value sequence
|
||||
Sequence< ::rtl::OUString > aNodePropNames( 6 );
|
||||
Sequence< OUString > aNodePropNames( 6 );
|
||||
|
||||
for ( sal_uInt32 i = 0; i < nCount; i++ )
|
||||
{
|
||||
::rtl::OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
|
||||
OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
|
||||
|
||||
Sequence< ::rtl::OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
|
||||
Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
|
||||
sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
|
||||
|
||||
for ( sal_uInt32 j = 0; j < nCountAddons; j++ )
|
||||
{
|
||||
::rtl::OUStringBuffer aMergeAddonInstructionBase( aMergeAddonInstructions );
|
||||
OUStringBuffer aMergeAddonInstructionBase( aMergeAddonInstructions );
|
||||
aMergeAddonInstructionBase.append( m_aPathDelimiter );
|
||||
aMergeAddonInstructionBase.append( aAddonInstMergeNodesSeq[j] );
|
||||
aMergeAddonInstructionBase.append( m_aPathDelimiter );
|
||||
|
||||
// Create sequence for data access
|
||||
::rtl::OUStringBuffer aBuffer( aMergeAddonInstructionBase );
|
||||
OUStringBuffer aBuffer( aMergeAddonInstructionBase );
|
||||
aBuffer.append( m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBAR ] );
|
||||
aNodePropNames[0] = aBuffer.makeStringAndClear();
|
||||
|
||||
@@ -1037,12 +1037,12 @@ sal_Bool AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstruc
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadMergeToolbarData( const ::rtl::OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems )
|
||||
sal_Bool AddonsOptions_Impl::ReadMergeToolbarData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems )
|
||||
{
|
||||
::rtl::OUStringBuffer aBuffer( aMergeAddonInstructionBase );
|
||||
OUStringBuffer aBuffer( aMergeAddonInstructionBase );
|
||||
aBuffer.append( m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBARITEMS ] );
|
||||
|
||||
::rtl::OUString aMergeToolbarBaseNode = aBuffer.makeStringAndClear();
|
||||
OUString aMergeToolbarBaseNode = aBuffer.makeStringAndClear();
|
||||
|
||||
return ReadToolBarItemSet( aMergeToolbarBaseNode, rMergeToolbarItems );
|
||||
}
|
||||
@@ -1050,11 +1050,11 @@ sal_Bool AddonsOptions_Impl::ReadMergeToolbarData( const ::rtl::OUString& aMerge
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName, Sequence< PropertyValue >& aMenuItem, sal_Bool bIgnoreSubMenu )
|
||||
sal_Bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence< PropertyValue >& aMenuItem, sal_Bool bIgnoreSubMenu )
|
||||
{
|
||||
sal_Bool bResult = sal_False;
|
||||
::rtl::OUString aStrValue;
|
||||
::rtl::OUString aAddonMenuItemTreeNode( aMenuNodeName + m_aPathDelimiter );
|
||||
OUString aStrValue;
|
||||
OUString aAddonMenuItemTreeNode( aMenuNodeName + m_aPathDelimiter );
|
||||
Sequence< Any > aMenuItemNodePropValues;
|
||||
|
||||
aMenuItemNodePropValues = GetProperties( GetPropertyNamesMenuItem( aAddonMenuItemTreeNode ) );
|
||||
@@ -1062,13 +1062,13 @@ sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName,
|
||||
{
|
||||
aMenuItem[ OFFSET_MENUITEM_TITLE ].Value <<= aStrValue;
|
||||
|
||||
::rtl::OUString aRootSubMenuName( aAddonMenuItemTreeNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
Sequence< ::rtl::OUString > aRootSubMenuNodeNames = GetNodeNames( aRootSubMenuName );
|
||||
OUString aRootSubMenuName( aAddonMenuItemTreeNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
Sequence< OUString > aRootSubMenuNodeNames = GetNodeNames( aRootSubMenuName );
|
||||
if ( aRootSubMenuNodeNames.getLength() > 0 && !bIgnoreSubMenu )
|
||||
{
|
||||
// Set a unique prefixed Add-On popup menu URL so it can be identified later
|
||||
::rtl::OUString aPopupMenuURL = GeneratePrefixURL();
|
||||
::rtl::OUString aPopupMenuImageId;
|
||||
OUString aPopupMenuURL = GeneratePrefixURL();
|
||||
OUString aPopupMenuImageId;
|
||||
|
||||
aMenuItemNodePropValues[ OFFSET_MENUITEM_IMAGEIDENTIFIER ] >>= aPopupMenuImageId;
|
||||
ReadAndAssociateImages( aPopupMenuURL, aPopupMenuImageId );
|
||||
@@ -1082,9 +1082,9 @@ sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName,
|
||||
|
||||
// Continue to read the sub menu nodes
|
||||
Sequence< Sequence< PropertyValue > > aSubMenuSeq;
|
||||
::rtl::OUString aSubMenuRootNodeName( aRootSubMenuName + m_aPathDelimiter );
|
||||
OUString aSubMenuRootNodeName( aRootSubMenuName + m_aPathDelimiter );
|
||||
for ( sal_uInt32 n = 0; n < (sal_uInt32)aRootSubMenuNodeNames.getLength(); n++ )
|
||||
aRootSubMenuNodeNames[n] = ::rtl::OUString( aSubMenuRootNodeName + aRootSubMenuNodeNames[n] );
|
||||
aRootSubMenuNodeNames[n] = OUString( aSubMenuRootNodeName + aRootSubMenuNodeNames[n] );
|
||||
ReadSubMenuEntries( aRootSubMenuNodeNames, aSubMenuSeq );
|
||||
aMenuItem[ OFFSET_MENUITEM_SUBMENU ].Value <<= aSubMenuSeq;
|
||||
bResult = sal_True;
|
||||
@@ -1092,7 +1092,7 @@ sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName,
|
||||
else if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_URL ] >>= aStrValue ) && !aStrValue.isEmpty() )
|
||||
{
|
||||
// A simple menu item => read the other properties;
|
||||
::rtl::OUString aMenuImageId;
|
||||
OUString aMenuImageId;
|
||||
|
||||
aMenuItemNodePropValues[ OFFSET_MENUITEM_IMAGEIDENTIFIER ] >>= aMenuImageId;
|
||||
ReadAndAssociateImages( aStrValue, aMenuImageId );
|
||||
@@ -1124,11 +1124,11 @@ sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName,
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadPopupMenu( const ::rtl::OUString& aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu )
|
||||
sal_Bool AddonsOptions_Impl::ReadPopupMenu( const OUString& aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu )
|
||||
{
|
||||
sal_Bool bResult = sal_False;
|
||||
::rtl::OUString aStrValue;
|
||||
::rtl::OUString aAddonPopupMenuTreeNode( aPopupMenuNodeName + m_aPathDelimiter );
|
||||
OUString aStrValue;
|
||||
OUString aAddonPopupMenuTreeNode( aPopupMenuNodeName + m_aPathDelimiter );
|
||||
Sequence< Any > aPopupMenuNodePropValues;
|
||||
|
||||
aPopupMenuNodePropValues = GetProperties( GetPropertyNamesPopupMenu( aAddonPopupMenuTreeNode ) );
|
||||
@@ -1137,22 +1137,22 @@ sal_Bool AddonsOptions_Impl::ReadPopupMenu( const ::rtl::OUString& aPopupMenuNod
|
||||
{
|
||||
aPopupMenu[ OFFSET_POPUPMENU_TITLE ].Value <<= aStrValue;
|
||||
|
||||
::rtl::OUString aRootSubMenuName( aAddonPopupMenuTreeNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
Sequence< ::rtl::OUString > aRootSubMenuNodeNames = GetNodeNames( aRootSubMenuName );
|
||||
OUString aRootSubMenuName( aAddonPopupMenuTreeNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
Sequence< OUString > aRootSubMenuNodeNames = GetNodeNames( aRootSubMenuName );
|
||||
if ( aRootSubMenuNodeNames.getLength() > 0 )
|
||||
{
|
||||
// A top-level popup menu needs a title
|
||||
// Set a unique prefixed Add-On popup menu URL so it can be identified later
|
||||
::rtl::OUString aPopupMenuURL = GeneratePrefixURL();
|
||||
OUString aPopupMenuURL = GeneratePrefixURL();
|
||||
|
||||
aPopupMenu[ OFFSET_POPUPMENU_URL ].Value <<= aPopupMenuURL;
|
||||
aPopupMenu[ OFFSET_POPUPMENU_CONTEXT ].Value <<= aPopupMenuNodePropValues[ OFFSET_POPUPMENU_CONTEXT ];
|
||||
|
||||
// Continue to read the sub menu nodes
|
||||
Sequence< Sequence< PropertyValue > > aSubMenuSeq;
|
||||
::rtl::OUString aSubMenuRootNodeName( aRootSubMenuName + m_aPathDelimiter );
|
||||
OUString aSubMenuRootNodeName( aRootSubMenuName + m_aPathDelimiter );
|
||||
for ( sal_uInt32 n = 0; n < (sal_uInt32)aRootSubMenuNodeNames.getLength(); n++ )
|
||||
aRootSubMenuNodeNames[n] = ::rtl::OUString( aSubMenuRootNodeName + aRootSubMenuNodeNames[n] );
|
||||
aRootSubMenuNodeNames[n] = OUString( aSubMenuRootNodeName + aRootSubMenuNodeNames[n] );
|
||||
ReadSubMenuEntries( aRootSubMenuNodeNames, aSubMenuSeq );
|
||||
aPopupMenu[ OFFSET_POPUPMENU_SUBMENU ].Value <<= aSubMenuSeq;
|
||||
bResult = sal_True;
|
||||
@@ -1186,12 +1186,12 @@ sal_Bool AddonsOptions_Impl::AppendPopupMenu( Sequence< PropertyValue >& rTarget
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadToolBarItem( const ::rtl::OUString& aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem )
|
||||
sal_Bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem )
|
||||
{
|
||||
sal_Bool bResult = sal_False;
|
||||
::rtl::OUString aTitle;
|
||||
::rtl::OUString aURL;
|
||||
::rtl::OUString aAddonToolBarItemTreeNode( aToolBarItemNodeName + m_aPathDelimiter );
|
||||
OUString aTitle;
|
||||
OUString aURL;
|
||||
OUString aAddonToolBarItemTreeNode( aToolBarItemNodeName + m_aPathDelimiter );
|
||||
Sequence< Any > aToolBarItemNodePropValues;
|
||||
|
||||
aToolBarItemNodePropValues = GetProperties( GetPropertyNamesToolBarItem( aAddonToolBarItemTreeNode ) );
|
||||
@@ -1215,7 +1215,7 @@ sal_Bool AddonsOptions_Impl::ReadToolBarItem( const ::rtl::OUString& aToolBarIte
|
||||
else if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_TITLE ] >>= aTitle ) && !aTitle.isEmpty() )
|
||||
{
|
||||
// A normal toolbar item must also have title => read the other properties;
|
||||
::rtl::OUString aImageId;
|
||||
OUString aImageId;
|
||||
|
||||
// Try to map a user-defined image URL to our internal private image URL
|
||||
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER ] >>= aImageId;
|
||||
@@ -1243,7 +1243,7 @@ sal_Bool AddonsOptions_Impl::ReadToolBarItem( const ::rtl::OUString& aToolBarIte
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::ReadSubMenuEntries( const Sequence< ::rtl::OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenuSeq )
|
||||
sal_Bool AddonsOptions_Impl::ReadSubMenuEntries( const Sequence< OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenuSeq )
|
||||
{
|
||||
Sequence< PropertyValue > aMenuItem( PROPERTYCOUNT_MENUITEM );
|
||||
|
||||
@@ -1273,7 +1273,7 @@ sal_Bool AddonsOptions_Impl::ReadSubMenuEntries( const Sequence< ::rtl::OUString
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
sal_Bool AddonsOptions_Impl::HasAssociatedImages( const ::rtl::OUString& aURL )
|
||||
sal_Bool AddonsOptions_Impl::HasAssociatedImages( const OUString& aURL )
|
||||
{
|
||||
ImageManager::const_iterator pIter = m_aImageManager.find( aURL );
|
||||
return ( pIter != m_aImageManager.end() );
|
||||
@@ -1282,12 +1282,12 @@ sal_Bool AddonsOptions_Impl::HasAssociatedImages( const ::rtl::OUString& aURL )
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
void AddonsOptions_Impl::SubstituteVariables( ::rtl::OUString& aURL )
|
||||
void AddonsOptions_Impl::SubstituteVariables( OUString& aURL )
|
||||
{
|
||||
if (( aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( EXPAND_PROTOCOL )) == 0 ) )
|
||||
{
|
||||
// cut protocol
|
||||
::rtl::OUString macro( aURL.copy( sizeof ( EXPAND_PROTOCOL ) -1 ) );
|
||||
OUString macro( aURL.copy( sizeof ( EXPAND_PROTOCOL ) -1 ) );
|
||||
// decode uric class chars
|
||||
macro = ::rtl::Uri::decode(
|
||||
macro, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
|
||||
@@ -1299,7 +1299,7 @@ void AddonsOptions_Impl::SubstituteVariables( ::rtl::OUString& aURL )
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
void AddonsOptions_Impl::ReadImageFromURL( ImageSize nImageSize, const ::rtl::OUString& aImageURL, Image& aImage, Image& aImageNoScale )
|
||||
void AddonsOptions_Impl::ReadImageFromURL( ImageSize nImageSize, const OUString& aImageURL, Image& aImage, Image& aImageNoScale )
|
||||
{
|
||||
SvStream* pStream = UcbStreamHelper::CreateStream( aImageURL, STREAM_STD_READ );
|
||||
if ( pStream && ( pStream->GetErrorCode() == 0 ))
|
||||
@@ -1344,7 +1344,7 @@ void AddonsOptions_Impl::ReadImageFromURL( ImageSize nImageSize, const ::rtl::OU
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
void AddonsOptions_Impl::ReadAndAssociateImages( const ::rtl::OUString& aURL, const ::rtl::OUString& aImageId )
|
||||
void AddonsOptions_Impl::ReadAndAssociateImages( const OUString& aURL, const OUString& aImageId )
|
||||
{
|
||||
const int MAX_NUM_IMAGES = 2;
|
||||
const char* aExtArray[MAX_NUM_IMAGES] = { "_16", "_26" };
|
||||
@@ -1355,14 +1355,14 @@ void AddonsOptions_Impl::ReadAndAssociateImages( const ::rtl::OUString& aURL, co
|
||||
|
||||
bool bImageFound = true;
|
||||
ImageEntry aImageEntry;
|
||||
::rtl::OUString aImageURL( aImageId );
|
||||
OUString aImageURL( aImageId );
|
||||
|
||||
SubstituteVariables( aImageURL );
|
||||
|
||||
// Loop to create the four possible image names and try to read the bitmap files
|
||||
for ( int i = 0; i < MAX_NUM_IMAGES; i++ )
|
||||
{
|
||||
::rtl::OUStringBuffer aFileURL( aImageURL );
|
||||
OUStringBuffer aFileURL( aImageURL );
|
||||
aFileURL.appendAscii( aExtArray[i] );
|
||||
aFileURL.appendAscii( pBmpExt );
|
||||
|
||||
@@ -1393,12 +1393,12 @@ void AddonsOptions_Impl::ReadAndAssociateImages( const ::rtl::OUString& aURL, co
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
AddonsOptions_Impl::ImageEntry* AddonsOptions_Impl::ReadImageData( const ::rtl::OUString& aImagesNodeName )
|
||||
AddonsOptions_Impl::ImageEntry* AddonsOptions_Impl::ReadImageData( const OUString& aImagesNodeName )
|
||||
{
|
||||
Sequence< ::rtl::OUString > aImageDataNodeNames = GetPropertyNamesImages( aImagesNodeName );
|
||||
Sequence< OUString > aImageDataNodeNames = GetPropertyNamesImages( aImagesNodeName );
|
||||
Sequence< Any > aPropertyData;
|
||||
Sequence< sal_Int8 > aImageDataSeq;
|
||||
::rtl::OUString aImageURL;
|
||||
OUString aImageURL;
|
||||
|
||||
ImageEntry* pEntry = NULL;
|
||||
|
||||
@@ -1495,17 +1495,17 @@ sal_Bool AddonsOptions_Impl::CreateImageFromSequence( Image& rImage, sal_Bool bB
|
||||
return bResult;
|
||||
}
|
||||
|
||||
Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( const ::rtl::OUString& aPropertyRootNode ) const
|
||||
Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( const OUString& aPropertyRootNode ) const
|
||||
{
|
||||
Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_MENUITEM );
|
||||
Sequence< OUString > lResult( PROPERTYCOUNT_MENUITEM );
|
||||
|
||||
// Create property names dependent from the root node name
|
||||
lResult[OFFSET_MENUITEM_URL] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL ] );
|
||||
lResult[OFFSET_MENUITEM_TITLE] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
|
||||
lResult[OFFSET_MENUITEM_IMAGEIDENTIFIER] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER ] );
|
||||
lResult[OFFSET_MENUITEM_TARGET] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TARGET ] );
|
||||
lResult[OFFSET_MENUITEM_CONTEXT] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT ] );
|
||||
lResult[OFFSET_MENUITEM_SUBMENU] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
lResult[OFFSET_MENUITEM_URL] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL ] );
|
||||
lResult[OFFSET_MENUITEM_TITLE] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
|
||||
lResult[OFFSET_MENUITEM_IMAGEIDENTIFIER] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER ] );
|
||||
lResult[OFFSET_MENUITEM_TARGET] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TARGET ] );
|
||||
lResult[OFFSET_MENUITEM_CONTEXT] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT ] );
|
||||
lResult[OFFSET_MENUITEM_SUBMENU] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
|
||||
return lResult;
|
||||
}
|
||||
@@ -1513,15 +1513,15 @@ Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( const
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesPopupMenu( const ::rtl::OUString& aPropertyRootNode ) const
|
||||
Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesPopupMenu( const OUString& aPropertyRootNode ) const
|
||||
{
|
||||
// The URL is automatically set and not read from the configuration.
|
||||
Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_POPUPMENU-1 );
|
||||
Sequence< OUString > lResult( PROPERTYCOUNT_POPUPMENU-1 );
|
||||
|
||||
// Create property names dependent from the root node name
|
||||
lResult[OFFSET_POPUPMENU_TITLE] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
|
||||
lResult[OFFSET_POPUPMENU_CONTEXT] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT ] );
|
||||
lResult[OFFSET_POPUPMENU_SUBMENU] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
lResult[OFFSET_POPUPMENU_TITLE] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
|
||||
lResult[OFFSET_POPUPMENU_CONTEXT] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT ] );
|
||||
lResult[OFFSET_POPUPMENU_SUBMENU] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_SUBMENU ] );
|
||||
|
||||
return lResult;
|
||||
}
|
||||
@@ -1529,18 +1529,18 @@ Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesPopupMenu( const
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( const ::rtl::OUString& aPropertyRootNode ) const
|
||||
Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( const OUString& aPropertyRootNode ) const
|
||||
{
|
||||
Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_TOOLBARITEM );
|
||||
Sequence< OUString > lResult( PROPERTYCOUNT_TOOLBARITEM );
|
||||
|
||||
// Create property names dependent from the root node name
|
||||
lResult[0] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL ] );
|
||||
lResult[1] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
|
||||
lResult[2] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER] );
|
||||
lResult[3] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TARGET ] );
|
||||
lResult[4] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT ] );
|
||||
lResult[5] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE ] );
|
||||
lResult[6] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_WIDTH ] );
|
||||
lResult[0] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL ] );
|
||||
lResult[1] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
|
||||
lResult[2] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER] );
|
||||
lResult[3] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TARGET ] );
|
||||
lResult[4] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT ] );
|
||||
lResult[5] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE ] );
|
||||
lResult[6] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_WIDTH ] );
|
||||
|
||||
return lResult;
|
||||
}
|
||||
@@ -1548,19 +1548,19 @@ Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( con
|
||||
//*****************************************************************************************************************
|
||||
// private method
|
||||
//*****************************************************************************************************************
|
||||
Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesImages( const ::rtl::OUString& aPropertyRootNode ) const
|
||||
Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesImages( const OUString& aPropertyRootNode ) const
|
||||
{
|
||||
Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_IMAGES );
|
||||
Sequence< OUString > lResult( PROPERTYCOUNT_IMAGES );
|
||||
|
||||
// Create property names dependent from the root node name
|
||||
lResult[0] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALL ] );
|
||||
lResult[1] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG ] );
|
||||
lResult[2] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC ] );
|
||||
lResult[3] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC ] );
|
||||
lResult[4] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALL_URL ] );
|
||||
lResult[5] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL ] );
|
||||
lResult[6] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC_URL] );
|
||||
lResult[7] = ::rtl::OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC_URL ] );
|
||||
lResult[0] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALL ] );
|
||||
lResult[1] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG ] );
|
||||
lResult[2] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC ] );
|
||||
lResult[3] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC ] );
|
||||
lResult[4] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALL_URL ] );
|
||||
lResult[5] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL ] );
|
||||
lResult[6] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC_URL] );
|
||||
lResult[7] = OUString( aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC_URL ] );
|
||||
|
||||
return lResult;
|
||||
}
|
||||
@@ -1656,7 +1656,7 @@ const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsToolBarPart
|
||||
//*****************************************************************************************************************
|
||||
// public method
|
||||
//*****************************************************************************************************************
|
||||
const ::rtl::OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
|
||||
const OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
|
||||
{
|
||||
MutexGuard aGuard( GetOwnStaticMutex() );
|
||||
return m_pDataContainer->GetAddonsToolbarResourceName( nIndex );
|
||||
@@ -1684,7 +1684,7 @@ const MergeMenuInstructionContainer& AddonsOptions::GetMergeMenuInstructions() c
|
||||
// public method
|
||||
//*****************************************************************************************************************
|
||||
bool AddonsOptions::GetMergeToolbarInstructions(
|
||||
const ::rtl::OUString& rToolbarName,
|
||||
const OUString& rToolbarName,
|
||||
MergeToolbarInstructionContainer& rToolbarInstructions ) const
|
||||
{
|
||||
MutexGuard aGuard( GetOwnStaticMutex() );
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ namespace rptui
|
||||
sal_uInt32 nUIFlags;
|
||||
|
||||
OPropertyInfoImpl(
|
||||
const ::rtl::OUString& rName,
|
||||
const OUString& rName,
|
||||
sal_Int32 _nId,
|
||||
const String& aTranslation,
|
||||
const rtl::OString& _sHelpId,
|
||||
@@ -55,7 +55,7 @@ namespace rptui
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
OPropertyInfoImpl::OPropertyInfoImpl(const ::rtl::OUString& _rName, sal_Int32 _nId,
|
||||
OPropertyInfoImpl::OPropertyInfoImpl(const OUString& _rName, sal_Int32 _nId,
|
||||
const String& aString, const rtl::OString& sHid, sal_uInt32 _nUIFlags)
|
||||
:sName(_rName)
|
||||
,sTranslation(aString)
|
||||
@@ -226,7 +226,7 @@ namespace rptui
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool OPropertyInfoService::isComposable( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _rxFormComponentHandler )
|
||||
bool OPropertyInfoService::isComposable( const OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _rxFormComponentHandler )
|
||||
{
|
||||
sal_Int32 nId = getPropertyId( _rPropertyName );
|
||||
if ( nId != -1 )
|
||||
@@ -242,40 +242,40 @@ namespace rptui
|
||||
void OPropertyInfoService::getExcludeProperties(::std::vector< beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler)
|
||||
{
|
||||
uno::Sequence< beans::Property > aProps = _xFormComponentHandler->getSupportedProperties();
|
||||
static const ::rtl::OUString pExcludeProperties[] =
|
||||
static const OUString pExcludeProperties[] =
|
||||
{
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printable")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordBreak")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tag")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpURL")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ValueMin")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ValueMax")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Spin")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValue")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValueMin")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValueMax")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSpinValue")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinIncrement")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Repeat")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepeatDelay")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlLabel")), /// TODO: has to be checked
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LabelControl")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), // comment this out if you want to have title feature for charts
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Printable")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("WordBreak")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Tag")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("HelpURL")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("ValueMin")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("ValueMax")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Spin")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValue")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValueMin")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValueMax")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSpinValue")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("SpinIncrement")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Repeat")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("RepeatDelay")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("ControlLabel")), /// TODO: has to be checked
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("LabelControl")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), // comment this out if you want to have title feature for charts
|
||||
PROPERTY_MAXTEXTLEN,
|
||||
PROPERTY_EFFECTIVEDEFAULT,
|
||||
PROPERTY_EFFECTIVEMAX,
|
||||
PROPERTY_EFFECTIVEMIN,
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HideInactiveSelection")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitAction")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputRequired")),
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VerticalAlign")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("HideInactiveSelection")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitAction")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("InputRequired")),
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("VerticalAlign")),
|
||||
PROPERTY_ALIGN,
|
||||
PROPERTY_EMPTY_IS_NULL,
|
||||
PROPERTY_FILTERPROPOSAL
|
||||
|
@@ -115,12 +115,12 @@ static const char s_content [] = "content.xml";
|
||||
static const char s_styles [] = "styles.xml";
|
||||
static const char s_prefix [] = "id"; // prefix for generated xml:id
|
||||
|
||||
static bool isContentFile(::rtl::OUString const & i_rPath)
|
||||
static bool isContentFile(OUString const & i_rPath)
|
||||
{
|
||||
return i_rPath == s_content;
|
||||
}
|
||||
|
||||
static bool isStylesFile (::rtl::OUString const & i_rPath)
|
||||
static bool isStylesFile (OUString const & i_rPath)
|
||||
{
|
||||
return i_rPath == s_styles;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
true iff the element has successfully been registered
|
||||
*/
|
||||
virtual bool TryRegisterMetadatable(Metadatable& i_xObject,
|
||||
::rtl::OUString const& i_rStreamName, ::rtl::OUString const& i_rIdref)
|
||||
OUString const& i_rStreamName, OUString const& i_rIdref)
|
||||
= 0;
|
||||
|
||||
/** unregister an ODF element.
|
||||
@@ -202,10 +202,10 @@ public:
|
||||
protected:
|
||||
|
||||
virtual bool LookupXmlId(const Metadatable& i_xObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const = 0;
|
||||
OUString & o_rStream, OUString & o_rIdref) const = 0;
|
||||
|
||||
virtual Metadatable* LookupElement(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const = 0;
|
||||
virtual Metadatable* LookupElement(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const = 0;
|
||||
};
|
||||
|
||||
// XmlIdRegistryDocument ---------------------------------------------
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
virtual void RegisterMetadatableAndCreateID(Metadatable& i_xObject);
|
||||
|
||||
virtual bool TryRegisterMetadatable(Metadatable& i_xObject,
|
||||
::rtl::OUString const& i_rStreamName, ::rtl::OUString const& i_rIdref);
|
||||
OUString const& i_rStreamName, OUString const& i_rIdref);
|
||||
|
||||
virtual void UnregisterMetadatable(Metadatable const&);
|
||||
|
||||
@@ -242,12 +242,12 @@ public:
|
||||
|
||||
// unfortunately public, Metadatable::RegisterAsCopyOf needs this
|
||||
virtual bool LookupXmlId(const Metadatable& i_xObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const;
|
||||
OUString & o_rStream, OUString & o_rIdref) const;
|
||||
|
||||
private:
|
||||
|
||||
virtual Metadatable* LookupElement(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const;
|
||||
virtual Metadatable* LookupElement(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const;
|
||||
|
||||
struct XmlIdRegistry_Impl;
|
||||
::std::auto_ptr<XmlIdRegistry_Impl> m_pImpl;
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
virtual void RegisterMetadatableAndCreateID(Metadatable& i_xObject);
|
||||
|
||||
virtual bool TryRegisterMetadatable(Metadatable& i_xObject,
|
||||
::rtl::OUString const& i_rStreamName, ::rtl::OUString const& i_rIdref);
|
||||
OUString const& i_rStreamName, OUString const& i_rIdref);
|
||||
|
||||
virtual void UnregisterMetadatable(Metadatable const&);
|
||||
|
||||
@@ -332,10 +332,10 @@ public:
|
||||
|
||||
private:
|
||||
virtual bool LookupXmlId(const Metadatable& i_xObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const;
|
||||
OUString & o_rStream, OUString & o_rIdref) const;
|
||||
|
||||
virtual Metadatable* LookupElement(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const;
|
||||
virtual Metadatable* LookupElement(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const;
|
||||
|
||||
/** create a Clipboard Metadatable for i_rObject. */
|
||||
::boost::shared_ptr<MetadatableClipboard> CreateClipboard(
|
||||
@@ -376,8 +376,8 @@ XmlIdRegistry::GetElementByMetadataReference(
|
||||
beans::StringPair
|
||||
XmlIdRegistry::GetXmlIdForElement(const Metadatable& i_rObject) const
|
||||
{
|
||||
::rtl::OUString path;
|
||||
::rtl::OUString idref;
|
||||
OUString path;
|
||||
OUString idref;
|
||||
if (LookupXmlId(i_rObject, path, idref))
|
||||
{
|
||||
if (LookupElement(path, idref) == &i_rObject)
|
||||
@@ -391,19 +391,19 @@ XmlIdRegistry::GetXmlIdForElement(const Metadatable& i_rObject) const
|
||||
|
||||
/// generate unique xml:id
|
||||
template< typename T >
|
||||
/*static*/ ::rtl::OUString create_id(const
|
||||
::boost::unordered_map< ::rtl::OUString, T, ::rtl::OUStringHash > & i_rXmlIdMap)
|
||||
/*static*/ OUString create_id(const
|
||||
::boost::unordered_map< OUString, T, OUStringHash > & i_rXmlIdMap)
|
||||
{
|
||||
static rtlRandomPool s_Pool( rtl_random_createPool() );
|
||||
const ::rtl::OUString prefix(s_prefix);
|
||||
typename ::boost::unordered_map< ::rtl::OUString, T, ::rtl::OUStringHash >
|
||||
const OUString prefix(s_prefix);
|
||||
typename ::boost::unordered_map< OUString, T, OUStringHash >
|
||||
::const_iterator iter;
|
||||
::rtl::OUString id;
|
||||
OUString id;
|
||||
do
|
||||
{
|
||||
sal_Int32 n;
|
||||
rtl_random_getBytes(s_Pool, & n, sizeof(n));
|
||||
id = prefix + ::rtl::OUString::valueOf(static_cast<sal_Int32>(abs(n)));
|
||||
id = prefix + OUString::valueOf(static_cast<sal_Int32>(abs(n)));
|
||||
iter = i_rXmlIdMap.find(id);
|
||||
}
|
||||
while (iter != i_rXmlIdMap.end());
|
||||
@@ -417,8 +417,8 @@ template< typename T >
|
||||
typedef ::std::list< Metadatable* > XmlIdList_t;
|
||||
|
||||
/// Idref -> (content.xml element list, styles.xml element list)
|
||||
typedef ::boost::unordered_map< ::rtl::OUString,
|
||||
::std::pair< XmlIdList_t, XmlIdList_t >, ::rtl::OUStringHash > XmlIdMap_t;
|
||||
typedef ::boost::unordered_map< OUString,
|
||||
::std::pair< XmlIdList_t, XmlIdList_t >, OUStringHash > XmlIdMap_t;
|
||||
|
||||
/// pointer hash template
|
||||
template<typename T> struct PtrHash
|
||||
@@ -431,7 +431,7 @@ template<typename T> struct PtrHash
|
||||
|
||||
/// element -> (stream name, idref)
|
||||
typedef ::boost::unordered_map< const Metadatable*,
|
||||
::std::pair< ::rtl::OUString, ::rtl::OUString>, PtrHash<Metadatable> >
|
||||
::std::pair< OUString, OUString>, PtrHash<Metadatable> >
|
||||
XmlIdReverseMap_t;
|
||||
|
||||
struct XmlIdRegistryDocument::XmlIdRegistry_Impl
|
||||
@@ -440,21 +440,21 @@ struct XmlIdRegistryDocument::XmlIdRegistry_Impl
|
||||
: m_XmlIdMap(), m_XmlIdReverseMap() { }
|
||||
|
||||
bool TryInsertMetadatable(Metadatable& i_xObject,
|
||||
const ::rtl::OUString & i_rStream, const ::rtl::OUString & i_rIdref);
|
||||
const OUString & i_rStream, const OUString & i_rIdref);
|
||||
|
||||
bool LookupXmlId(const Metadatable& i_xObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const;
|
||||
OUString & o_rStream, OUString & o_rIdref) const;
|
||||
|
||||
Metadatable* LookupElement(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const;
|
||||
Metadatable* LookupElement(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const;
|
||||
|
||||
const XmlIdList_t * LookupElementList(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const;
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const;
|
||||
|
||||
XmlIdList_t * LookupElementList(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref)
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref)
|
||||
{
|
||||
return const_cast<XmlIdList_t*>(
|
||||
const_cast<const XmlIdRegistry_Impl*>(this)
|
||||
@@ -469,7 +469,7 @@ struct XmlIdRegistryDocument::XmlIdRegistry_Impl
|
||||
|
||||
static void
|
||||
rmIter(XmlIdMap_t & i_rXmlIdMap, XmlIdMap_t::iterator const& i_rIter,
|
||||
::rtl::OUString const & i_rStream, Metadatable const& i_rObject)
|
||||
OUString const & i_rStream, Metadatable const& i_rObject)
|
||||
{
|
||||
if (i_rIter != i_rXmlIdMap.end())
|
||||
{
|
||||
@@ -487,8 +487,8 @@ rmIter(XmlIdMap_t & i_rXmlIdMap, XmlIdMap_t::iterator const& i_rIter,
|
||||
|
||||
const XmlIdList_t *
|
||||
XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElementList(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const
|
||||
{
|
||||
const XmlIdMap_t::const_iterator iter( m_XmlIdMap.find(i_rIdref) );
|
||||
if (iter != m_XmlIdMap.end())
|
||||
@@ -507,12 +507,12 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElementList(
|
||||
|
||||
Metadatable*
|
||||
XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const
|
||||
{
|
||||
if (!isValidXmlId(i_rStreamName, i_rIdref))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId"), 0, 0);
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
|
||||
bool
|
||||
XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupXmlId(
|
||||
const Metadatable& i_rObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const
|
||||
OUString & o_rStream, OUString & o_rIdref) const
|
||||
{
|
||||
const XmlIdReverseMap_t::const_iterator iter(
|
||||
m_XmlIdReverseMap.find(&i_rObject) );
|
||||
@@ -562,7 +562,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupXmlId(
|
||||
bool
|
||||
XmlIdRegistryDocument::XmlIdRegistry_Impl::TryInsertMetadatable(
|
||||
Metadatable & i_rObject,
|
||||
const ::rtl::OUString & i_rStreamName, const ::rtl::OUString & i_rIdref)
|
||||
const OUString & i_rStreamName, const OUString & i_rIdref)
|
||||
{
|
||||
const bool bContent( isContentFile(i_rStreamName) );
|
||||
OSL_ENSURE(isContentFile(i_rStreamName) || isStylesFile(i_rStreamName),
|
||||
@@ -650,26 +650,26 @@ XmlIdRegistryDocument::~XmlIdRegistryDocument()
|
||||
bool
|
||||
XmlIdRegistryDocument::LookupXmlId(
|
||||
const Metadatable& i_rObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const
|
||||
OUString & o_rStream, OUString & o_rIdref) const
|
||||
{
|
||||
return m_pImpl->LookupXmlId(i_rObject, o_rStream, o_rIdref);
|
||||
}
|
||||
|
||||
Metadatable*
|
||||
XmlIdRegistryDocument::LookupElement(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const
|
||||
{
|
||||
return m_pImpl->LookupElement(i_rStreamName, i_rIdref);
|
||||
}
|
||||
|
||||
bool
|
||||
XmlIdRegistryDocument::TryRegisterMetadatable(Metadatable & i_rObject,
|
||||
::rtl::OUString const& i_rStreamName, ::rtl::OUString const& i_rIdref)
|
||||
OUString const& i_rStreamName, OUString const& i_rIdref)
|
||||
{
|
||||
OSL_TRACE("TryRegisterMetadatable: %p (%s#%s)\n", &i_rObject,
|
||||
::rtl::OUStringToOString(i_rStreamName, RTL_TEXTENCODING_UTF8).getStr(),
|
||||
::rtl::OUStringToOString(i_rIdref, RTL_TEXTENCODING_UTF8).getStr());
|
||||
OUStringToOString(i_rStreamName, RTL_TEXTENCODING_UTF8).getStr(),
|
||||
OUStringToOString(i_rIdref, RTL_TEXTENCODING_UTF8).getStr());
|
||||
|
||||
OSL_ENSURE(!dynamic_cast<MetadatableUndo*>(&i_rObject),
|
||||
"TryRegisterMetadatable called for MetadatableUndo?");
|
||||
@@ -678,19 +678,19 @@ XmlIdRegistryDocument::TryRegisterMetadatable(Metadatable & i_rObject,
|
||||
|
||||
if (!isValidXmlId(i_rStreamName, i_rIdref))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId"), 0, 0);
|
||||
}
|
||||
if (i_rObject.IsInContent()
|
||||
? !isContentFile(i_rStreamName)
|
||||
: !isStylesFile(i_rStreamName))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId: wrong stream"), 0, 0);
|
||||
}
|
||||
|
||||
::rtl::OUString old_path;
|
||||
::rtl::OUString old_idref;
|
||||
OUString old_path;
|
||||
OUString old_idref;
|
||||
m_pImpl->LookupXmlId(i_rObject, old_path, old_idref);
|
||||
if (old_path == i_rStreamName && old_idref == i_rIdref)
|
||||
{
|
||||
@@ -726,11 +726,11 @@ XmlIdRegistryDocument::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
|
||||
"RegisterMetadatableAndCreateID called for MetadatableClipboard?");
|
||||
|
||||
const bool isInContent( i_rObject.IsInContent() );
|
||||
const ::rtl::OUString stream( ::rtl::OUString::createFromAscii(
|
||||
const OUString stream( OUString::createFromAscii(
|
||||
isInContent ? s_content : s_styles ) );
|
||||
// check if we have a latent xmlid, and if yes, remove it
|
||||
::rtl::OUString old_path;
|
||||
::rtl::OUString old_idref;
|
||||
OUString old_path;
|
||||
OUString old_idref;
|
||||
m_pImpl->LookupXmlId(i_rObject, old_path, old_idref);
|
||||
|
||||
XmlIdMap_t::iterator old_id( m_pImpl->m_XmlIdMap.end() );
|
||||
@@ -750,7 +750,7 @@ XmlIdRegistryDocument::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
|
||||
}
|
||||
|
||||
// create id
|
||||
const ::rtl::OUString id( create_id(m_pImpl->m_XmlIdMap) );
|
||||
const OUString id( create_id(m_pImpl->m_XmlIdMap) );
|
||||
OSL_ENSURE(m_pImpl->m_XmlIdMap.find(id) == m_pImpl->m_XmlIdMap.end(),
|
||||
"created id is in use");
|
||||
m_pImpl->m_XmlIdMap.insert(::std::make_pair(id, isInContent
|
||||
@@ -763,8 +763,8 @@ void XmlIdRegistryDocument::UnregisterMetadatable(const Metadatable& i_rObject)
|
||||
{
|
||||
OSL_TRACE("UnregisterMetadatable: %p", &i_rObject);
|
||||
|
||||
::rtl::OUString path;
|
||||
::rtl::OUString idref;
|
||||
OUString path;
|
||||
OUString idref;
|
||||
if (!m_pImpl->LookupXmlId(i_rObject, path, idref))
|
||||
{
|
||||
OSL_FAIL("unregister: no xml id?");
|
||||
@@ -806,8 +806,8 @@ void XmlIdRegistryDocument::RegisterCopy(Metadatable const& i_rSource,
|
||||
(i_rSource.IsInContent() == i_rCopy.IsInContent()),
|
||||
"RegisterCopy: not in same stream?");
|
||||
|
||||
::rtl::OUString path;
|
||||
::rtl::OUString idref;
|
||||
OUString path;
|
||||
OUString idref;
|
||||
if (!m_pImpl->LookupXmlId( i_rSource, path, idref ))
|
||||
{
|
||||
OSL_FAIL("no xml id?");
|
||||
@@ -869,8 +869,8 @@ XmlIdRegistryDocument::JoinMetadatables(
|
||||
OSL_TRACE("JoinMetadatables: %p <- %p", &i_rMerged, &i_rOther);
|
||||
|
||||
bool mergedOwnsRef;
|
||||
::rtl::OUString path;
|
||||
::rtl::OUString idref;
|
||||
OUString path;
|
||||
OUString idref;
|
||||
if (m_pImpl->LookupXmlId(i_rMerged, path, idref))
|
||||
{
|
||||
mergedOwnsRef = (m_pImpl->LookupElement(path, idref) == &i_rMerged);
|
||||
@@ -897,14 +897,14 @@ XmlIdRegistryDocument::JoinMetadatables(
|
||||
struct RMapEntry
|
||||
{
|
||||
RMapEntry() : m_pLink() { }
|
||||
RMapEntry(::rtl::OUString const& i_rStream,
|
||||
::rtl::OUString const& i_rXmlId,
|
||||
RMapEntry(OUString const& i_rStream,
|
||||
OUString const& i_rXmlId,
|
||||
::boost::shared_ptr<MetadatableClipboard> const& i_pLink
|
||||
= ::boost::shared_ptr<MetadatableClipboard>())
|
||||
: m_Stream(i_rStream), m_XmlId(i_rXmlId), m_pLink(i_pLink)
|
||||
{}
|
||||
::rtl::OUString m_Stream;
|
||||
::rtl::OUString m_XmlId;
|
||||
OUString m_Stream;
|
||||
OUString m_XmlId;
|
||||
// this would have been an auto_ptr, if only that would have compiled...
|
||||
::boost::shared_ptr<MetadatableClipboard> m_pLink;
|
||||
};
|
||||
@@ -916,8 +916,8 @@ typedef ::boost::unordered_map< const Metadatable*,
|
||||
ClipboardXmlIdReverseMap_t;
|
||||
|
||||
/// Idref -> (content.xml element, styles.xml element)
|
||||
typedef ::boost::unordered_map< ::rtl::OUString,
|
||||
::std::pair< Metadatable*, Metadatable* >, ::rtl::OUStringHash >
|
||||
typedef ::boost::unordered_map< OUString,
|
||||
::std::pair< Metadatable*, Metadatable* >, OUStringHash >
|
||||
ClipboardXmlIdMap_t;
|
||||
|
||||
struct XmlIdRegistryClipboard::XmlIdRegistry_Impl
|
||||
@@ -926,20 +926,20 @@ struct XmlIdRegistryClipboard::XmlIdRegistry_Impl
|
||||
: m_XmlIdMap(), m_XmlIdReverseMap() { }
|
||||
|
||||
bool TryInsertMetadatable(Metadatable& i_xObject,
|
||||
const ::rtl::OUString & i_rStream, const ::rtl::OUString & i_rIdref);
|
||||
const OUString & i_rStream, const OUString & i_rIdref);
|
||||
|
||||
bool LookupXmlId(const Metadatable& i_xObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref,
|
||||
OUString & o_rStream, OUString & o_rIdref,
|
||||
MetadatableClipboard const* &o_rpLink) const;
|
||||
|
||||
Metadatable* LookupElement(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const;
|
||||
Metadatable* LookupElement(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const;
|
||||
|
||||
Metadatable* const* LookupEntry(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const;
|
||||
Metadatable* const* LookupEntry(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const;
|
||||
|
||||
Metadatable* * LookupEntry(const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref)
|
||||
Metadatable* * LookupEntry(const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref)
|
||||
{
|
||||
return const_cast<Metadatable**>(
|
||||
const_cast<const XmlIdRegistry_Impl*>(this)
|
||||
@@ -955,7 +955,7 @@ struct XmlIdRegistryClipboard::XmlIdRegistry_Impl
|
||||
static void
|
||||
rmIter(ClipboardXmlIdMap_t & i_rXmlIdMap,
|
||||
ClipboardXmlIdMap_t::iterator const& i_rIter,
|
||||
::rtl::OUString const & i_rStream, Metadatable const& i_rObject)
|
||||
OUString const & i_rStream, Metadatable const& i_rObject)
|
||||
{
|
||||
if (i_rIter != i_rXmlIdMap.end())
|
||||
{
|
||||
@@ -976,12 +976,12 @@ rmIter(ClipboardXmlIdMap_t & i_rXmlIdMap,
|
||||
|
||||
Metadatable* const*
|
||||
XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const
|
||||
{
|
||||
if (!isValidXmlId(i_rStreamName, i_rIdref))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId"), 0, 0);
|
||||
}
|
||||
|
||||
@@ -1002,8 +1002,8 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
|
||||
|
||||
Metadatable*
|
||||
XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupElement(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const
|
||||
{
|
||||
Metadatable * const * ppEntry = LookupEntry(i_rStreamName, i_rIdref);
|
||||
return ppEntry ? *ppEntry : 0;
|
||||
@@ -1012,7 +1012,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupElement(
|
||||
bool
|
||||
XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupXmlId(
|
||||
const Metadatable& i_rObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref,
|
||||
OUString & o_rStream, OUString & o_rIdref,
|
||||
MetadatableClipboard const* &o_rpLink) const
|
||||
{
|
||||
const ClipboardXmlIdReverseMap_t::const_iterator iter(
|
||||
@@ -1037,7 +1037,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupXmlId(
|
||||
bool
|
||||
XmlIdRegistryClipboard::XmlIdRegistry_Impl::TryInsertMetadatable(
|
||||
Metadatable & i_rObject,
|
||||
const ::rtl::OUString & i_rStreamName, const ::rtl::OUString & i_rIdref)
|
||||
const OUString & i_rStreamName, const OUString & i_rIdref)
|
||||
{
|
||||
bool bContent( isContentFile(i_rStreamName) );
|
||||
OSL_ENSURE(isContentFile(i_rStreamName) || isStylesFile(i_rStreamName),
|
||||
@@ -1081,7 +1081,7 @@ XmlIdRegistryClipboard::~XmlIdRegistryClipboard()
|
||||
bool
|
||||
XmlIdRegistryClipboard::LookupXmlId(
|
||||
const Metadatable& i_rObject,
|
||||
::rtl::OUString & o_rStream, ::rtl::OUString & o_rIdref) const
|
||||
OUString & o_rStream, OUString & o_rIdref) const
|
||||
{
|
||||
const MetadatableClipboard * pLink;
|
||||
return m_pImpl->LookupXmlId(i_rObject, o_rStream, o_rIdref, pLink);
|
||||
@@ -1089,19 +1089,19 @@ XmlIdRegistryClipboard::LookupXmlId(
|
||||
|
||||
Metadatable*
|
||||
XmlIdRegistryClipboard::LookupElement(
|
||||
const ::rtl::OUString & i_rStreamName,
|
||||
const ::rtl::OUString & i_rIdref) const
|
||||
const OUString & i_rStreamName,
|
||||
const OUString & i_rIdref) const
|
||||
{
|
||||
return m_pImpl->LookupElement(i_rStreamName, i_rIdref);
|
||||
}
|
||||
|
||||
bool
|
||||
XmlIdRegistryClipboard::TryRegisterMetadatable(Metadatable & i_rObject,
|
||||
::rtl::OUString const& i_rStreamName, ::rtl::OUString const& i_rIdref)
|
||||
OUString const& i_rStreamName, OUString const& i_rIdref)
|
||||
{
|
||||
OSL_TRACE("TryRegisterMetadatable: %p (%s#%s)\n", &i_rObject,
|
||||
::rtl::OUStringToOString(i_rStreamName, RTL_TEXTENCODING_UTF8).getStr(),
|
||||
::rtl::OUStringToOString(i_rIdref, RTL_TEXTENCODING_UTF8).getStr());
|
||||
OUStringToOString(i_rStreamName, RTL_TEXTENCODING_UTF8).getStr(),
|
||||
OUStringToOString(i_rIdref, RTL_TEXTENCODING_UTF8).getStr());
|
||||
|
||||
OSL_ENSURE(!dynamic_cast<MetadatableUndo*>(&i_rObject),
|
||||
"TryRegisterMetadatable called for MetadatableUndo?");
|
||||
@@ -1110,19 +1110,19 @@ XmlIdRegistryClipboard::TryRegisterMetadatable(Metadatable & i_rObject,
|
||||
|
||||
if (!isValidXmlId(i_rStreamName, i_rIdref))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId"), 0, 0);
|
||||
}
|
||||
if (i_rObject.IsInContent()
|
||||
? !isContentFile(i_rStreamName)
|
||||
: !isStylesFile(i_rStreamName))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId: wrong stream"), 0, 0);
|
||||
}
|
||||
|
||||
::rtl::OUString old_path;
|
||||
::rtl::OUString old_idref;
|
||||
OUString old_path;
|
||||
OUString old_idref;
|
||||
const MetadatableClipboard * pLink;
|
||||
m_pImpl->LookupXmlId(i_rObject, old_path, old_idref, pLink);
|
||||
if (old_path == i_rStreamName && old_idref == i_rIdref)
|
||||
@@ -1159,11 +1159,11 @@ XmlIdRegistryClipboard::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
|
||||
"RegisterMetadatableAndCreateID called for MetadatableClipboard?");
|
||||
|
||||
bool isInContent( i_rObject.IsInContent() );
|
||||
::rtl::OUString stream( ::rtl::OUString::createFromAscii(
|
||||
OUString stream( OUString::createFromAscii(
|
||||
isInContent ? s_content : s_styles ) );
|
||||
|
||||
::rtl::OUString old_path;
|
||||
::rtl::OUString old_idref;
|
||||
OUString old_path;
|
||||
OUString old_idref;
|
||||
LookupXmlId(i_rObject, old_path, old_idref);
|
||||
if (!old_idref.isEmpty() &&
|
||||
(m_pImpl->LookupElement(old_path, old_idref) == &i_rObject))
|
||||
@@ -1172,7 +1172,7 @@ XmlIdRegistryClipboard::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
|
||||
}
|
||||
|
||||
// create id
|
||||
const ::rtl::OUString id( create_id(m_pImpl->m_XmlIdMap) );
|
||||
const OUString id( create_id(m_pImpl->m_XmlIdMap) );
|
||||
OSL_ENSURE(m_pImpl->m_XmlIdMap.find(id) == m_pImpl->m_XmlIdMap.end(),
|
||||
"created id is in use");
|
||||
m_pImpl->m_XmlIdMap.insert(::std::make_pair(id, isInContent
|
||||
@@ -1187,8 +1187,8 @@ void XmlIdRegistryClipboard::UnregisterMetadatable(const Metadatable& i_rObject)
|
||||
{
|
||||
OSL_TRACE("UnregisterMetadatable: %p", &i_rObject);
|
||||
|
||||
::rtl::OUString path;
|
||||
::rtl::OUString idref;
|
||||
OUString path;
|
||||
OUString idref;
|
||||
const MetadatableClipboard * pLink;
|
||||
if (!m_pImpl->LookupXmlId(i_rObject, path, idref, pLink))
|
||||
{
|
||||
@@ -1235,9 +1235,9 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
|
||||
{
|
||||
OSL_TRACE("RegisterCopyClipboard: %p -> "/*"%p"*/"(%s#%s) (%d)\n",
|
||||
/*&i_rSource,*/ &i_rCopy,
|
||||
::rtl::OUStringToOString(i_rReference.First,
|
||||
OUStringToOString(i_rReference.First,
|
||||
RTL_TEXTENCODING_UTF8).getStr(),
|
||||
::rtl::OUStringToOString(i_rReference.Second,
|
||||
OUStringToOString(i_rReference.Second,
|
||||
RTL_TEXTENCODING_UTF8).getStr(),
|
||||
i_isLatent);
|
||||
|
||||
@@ -1247,7 +1247,7 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
|
||||
|
||||
if (!isValidXmlId(i_rReference.First, i_rReference.Second))
|
||||
{
|
||||
throw lang::IllegalArgumentException(::rtl::OUString(
|
||||
throw lang::IllegalArgumentException(OUString(
|
||||
"illegal XmlId"), 0, 0);
|
||||
}
|
||||
|
||||
@@ -1269,8 +1269,8 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
|
||||
MetadatableClipboard const*
|
||||
XmlIdRegistryClipboard::SourceLink(Metadatable const& i_rObject)
|
||||
{
|
||||
::rtl::OUString path;
|
||||
::rtl::OUString idref;
|
||||
OUString path;
|
||||
OUString idref;
|
||||
const MetadatableClipboard * pLink( 0 );
|
||||
m_pImpl->LookupXmlId(i_rObject, path, idref, pLink);
|
||||
return pLink;
|
||||
@@ -1324,12 +1324,12 @@ Metadatable::SetMetadataReference(
|
||||
}
|
||||
else
|
||||
{
|
||||
::rtl::OUString streamName( i_rReference.First );
|
||||
OUString streamName( i_rReference.First );
|
||||
if (streamName.isEmpty())
|
||||
{
|
||||
// handle empty stream name as auto-detect.
|
||||
// necessary for importing flat file format.
|
||||
streamName = ::rtl::OUString::createFromAscii(
|
||||
streamName = OUString::createFromAscii(
|
||||
IsInContent() ? s_content : s_styles );
|
||||
}
|
||||
XmlIdRegistry & rReg( dynamic_cast<XmlIdRegistry&>( GetRegistry() ) );
|
||||
@@ -1340,7 +1340,7 @@ Metadatable::SetMetadataReference(
|
||||
else
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
::rtl::OUString("Metadatable::"
|
||||
OUString("Metadatable::"
|
||||
"SetMetadataReference: argument is invalid"), /*this*/0, 0);
|
||||
}
|
||||
}
|
||||
@@ -1563,14 +1563,14 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther,
|
||||
// XMetadatable mixin
|
||||
|
||||
// ::com::sun::star::rdf::XNode:
|
||||
::rtl::OUString SAL_CALL MetadatableMixin::getStringValue()
|
||||
OUString SAL_CALL MetadatableMixin::getStringValue()
|
||||
throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
return getNamespace() + getLocalName();
|
||||
}
|
||||
|
||||
// ::com::sun::star::rdf::XURI:
|
||||
::rtl::OUString SAL_CALL MetadatableMixin::getLocalName()
|
||||
OUString SAL_CALL MetadatableMixin::getLocalName()
|
||||
throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
@@ -1580,14 +1580,14 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther,
|
||||
ensureMetadataReference(); // N.B.: side effect!
|
||||
mdref = getMetadataReference();
|
||||
}
|
||||
::rtl::OUStringBuffer buf;
|
||||
OUStringBuffer buf;
|
||||
buf.append(mdref.First);
|
||||
buf.append(static_cast<sal_Unicode>('#'));
|
||||
buf.append(mdref.Second);
|
||||
return buf.makeStringAndClear();
|
||||
}
|
||||
|
||||
::rtl::OUString SAL_CALL MetadatableMixin::getNamespace()
|
||||
OUString SAL_CALL MetadatableMixin::getNamespace()
|
||||
throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
@@ -1607,7 +1607,7 @@ throw (uno::RuntimeException)
|
||||
if (!pObject)
|
||||
{
|
||||
throw uno::RuntimeException(
|
||||
::rtl::OUString(
|
||||
OUString(
|
||||
"MetadatableMixin: cannot get core object; not inserted?"),
|
||||
*this);
|
||||
}
|
||||
@@ -1625,7 +1625,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException)
|
||||
if (!pObject)
|
||||
{
|
||||
throw uno::RuntimeException(
|
||||
::rtl::OUString(
|
||||
OUString(
|
||||
"MetadatableMixin: cannot get core object; not inserted?"),
|
||||
*this);
|
||||
}
|
||||
@@ -1641,7 +1641,7 @@ throw (uno::RuntimeException)
|
||||
if (!pObject)
|
||||
{
|
||||
throw uno::RuntimeException(
|
||||
::rtl::OUString(
|
||||
OUString(
|
||||
"MetadatableMixin: cannot get core object; not inserted?"),
|
||||
*this);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -94,8 +94,8 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
|
||||
sal_Bool bBlock;
|
||||
|
||||
// keep track of open rubies
|
||||
::rtl::OUString sOpenRubyText;
|
||||
::rtl::OUString sOpenRubyCharStyle;
|
||||
OUString sOpenRubyText;
|
||||
OUString sOpenRubyCharStyle;
|
||||
sal_Bool bOpenRuby;
|
||||
|
||||
XMLTextListsHelper* mpTextListsHelper;
|
||||
@@ -108,92 +108,92 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
const ::rtl::OUString sActualSize;
|
||||
const OUString sActualSize;
|
||||
// Implement Title/Description Elements UI (#i73249#)
|
||||
const ::rtl::OUString sTitle;
|
||||
const ::rtl::OUString sDescription;
|
||||
const ::rtl::OUString sAnchorCharStyleName;
|
||||
const ::rtl::OUString sAnchorPageNo;
|
||||
const ::rtl::OUString sAnchorType;
|
||||
const ::rtl::OUString sBeginNotice;
|
||||
const ::rtl::OUString sBookmark;
|
||||
const ::rtl::OUString sCategory;
|
||||
const ::rtl::OUString sChainNextName;
|
||||
const ::rtl::OUString sCharStyleName;
|
||||
const ::rtl::OUString sCharStyleNames;
|
||||
const ::rtl::OUString sContourPolyPolygon;
|
||||
const ::rtl::OUString sDocumentIndex;
|
||||
const ::rtl::OUString sDocumentIndexMark;
|
||||
const ::rtl::OUString sEndNotice;
|
||||
const ::rtl::OUString sFootnote;
|
||||
const ::rtl::OUString sFootnoteCounting;
|
||||
const ::rtl::OUString sFrame;
|
||||
const ::rtl::OUString sFrameHeightAbsolute;
|
||||
const ::rtl::OUString sFrameHeightPercent;
|
||||
const ::rtl::OUString sFrameStyleName;
|
||||
const ::rtl::OUString sFrameWidthAbsolute;
|
||||
const ::rtl::OUString sFrameWidthPercent;
|
||||
const ::rtl::OUString sGraphicFilter;
|
||||
const ::rtl::OUString sGraphicRotation;
|
||||
const ::rtl::OUString sGraphicURL;
|
||||
const ::rtl::OUString sReplacementGraphicURL;
|
||||
const ::rtl::OUString sHeight;
|
||||
const ::rtl::OUString sHoriOrient;
|
||||
const ::rtl::OUString sHoriOrientPosition;
|
||||
const ::rtl::OUString sHyperLinkName;
|
||||
const ::rtl::OUString sHyperLinkTarget;
|
||||
const ::rtl::OUString sHyperLinkURL;
|
||||
const ::rtl::OUString sIsAutomaticContour;
|
||||
const ::rtl::OUString sIsCollapsed;
|
||||
const ::rtl::OUString sIsPixelContour;
|
||||
const ::rtl::OUString sIsStart;
|
||||
const ::rtl::OUString sIsSyncHeightToWidth;
|
||||
const ::rtl::OUString sIsSyncWidthToHeight;
|
||||
const ::rtl::OUString sNumberingRules;
|
||||
const ::rtl::OUString sNumberingType;
|
||||
const ::rtl::OUString sPageDescName;
|
||||
const ::rtl::OUString sPageStyleName;
|
||||
const ::rtl::OUString sParaChapterNumberingLevel;
|
||||
const ::rtl::OUString sParaConditionalStyleName;
|
||||
const ::rtl::OUString sParagraphService;
|
||||
const ::rtl::OUString sParaStyleName;
|
||||
const ::rtl::OUString sPositionEndOfDoc;
|
||||
const ::rtl::OUString sPrefix;
|
||||
const ::rtl::OUString sRedline;
|
||||
const ::rtl::OUString sReferenceId;
|
||||
const ::rtl::OUString sReferenceMark;
|
||||
const ::rtl::OUString sRelativeHeight;
|
||||
const ::rtl::OUString sRelativeWidth;
|
||||
const ::rtl::OUString sRuby;
|
||||
const ::rtl::OUString sRubyAdjust;
|
||||
const ::rtl::OUString sRubyCharStyleName;
|
||||
const ::rtl::OUString sRubyText;
|
||||
const ::rtl::OUString sServerMap;
|
||||
const ::rtl::OUString sShapeService;
|
||||
const ::rtl::OUString sSizeType;
|
||||
const ::rtl::OUString sSoftPageBreak;
|
||||
const ::rtl::OUString sStartAt;
|
||||
const ::rtl::OUString sSuffix;
|
||||
const ::rtl::OUString sTableService;
|
||||
const ::rtl::OUString sText;
|
||||
const ::rtl::OUString sTextContentService;
|
||||
const ::rtl::OUString sTextEmbeddedService;
|
||||
const ::rtl::OUString sTextEndnoteService;
|
||||
const ::rtl::OUString sTextField;
|
||||
const ::rtl::OUString sTextFieldService;
|
||||
const ::rtl::OUString sTextFrameService;
|
||||
const ::rtl::OUString sTextGraphicService;
|
||||
const ::rtl::OUString sTextPortionType;
|
||||
const ::rtl::OUString sTextSection;
|
||||
const ::rtl::OUString sUnvisitedCharStyleName;
|
||||
const ::rtl::OUString sVertOrient;
|
||||
const ::rtl::OUString sVertOrientPosition;
|
||||
const ::rtl::OUString sVisitedCharStyleName;
|
||||
const ::rtl::OUString sWidth;
|
||||
const ::rtl::OUString sWidthType;
|
||||
const ::rtl::OUString sTextFieldStart;
|
||||
const ::rtl::OUString sTextFieldEnd;
|
||||
const ::rtl::OUString sTextFieldStartEnd;
|
||||
const OUString sTitle;
|
||||
const OUString sDescription;
|
||||
const OUString sAnchorCharStyleName;
|
||||
const OUString sAnchorPageNo;
|
||||
const OUString sAnchorType;
|
||||
const OUString sBeginNotice;
|
||||
const OUString sBookmark;
|
||||
const OUString sCategory;
|
||||
const OUString sChainNextName;
|
||||
const OUString sCharStyleName;
|
||||
const OUString sCharStyleNames;
|
||||
const OUString sContourPolyPolygon;
|
||||
const OUString sDocumentIndex;
|
||||
const OUString sDocumentIndexMark;
|
||||
const OUString sEndNotice;
|
||||
const OUString sFootnote;
|
||||
const OUString sFootnoteCounting;
|
||||
const OUString sFrame;
|
||||
const OUString sFrameHeightAbsolute;
|
||||
const OUString sFrameHeightPercent;
|
||||
const OUString sFrameStyleName;
|
||||
const OUString sFrameWidthAbsolute;
|
||||
const OUString sFrameWidthPercent;
|
||||
const OUString sGraphicFilter;
|
||||
const OUString sGraphicRotation;
|
||||
const OUString sGraphicURL;
|
||||
const OUString sReplacementGraphicURL;
|
||||
const OUString sHeight;
|
||||
const OUString sHoriOrient;
|
||||
const OUString sHoriOrientPosition;
|
||||
const OUString sHyperLinkName;
|
||||
const OUString sHyperLinkTarget;
|
||||
const OUString sHyperLinkURL;
|
||||
const OUString sIsAutomaticContour;
|
||||
const OUString sIsCollapsed;
|
||||
const OUString sIsPixelContour;
|
||||
const OUString sIsStart;
|
||||
const OUString sIsSyncHeightToWidth;
|
||||
const OUString sIsSyncWidthToHeight;
|
||||
const OUString sNumberingRules;
|
||||
const OUString sNumberingType;
|
||||
const OUString sPageDescName;
|
||||
const OUString sPageStyleName;
|
||||
const OUString sParaChapterNumberingLevel;
|
||||
const OUString sParaConditionalStyleName;
|
||||
const OUString sParagraphService;
|
||||
const OUString sParaStyleName;
|
||||
const OUString sPositionEndOfDoc;
|
||||
const OUString sPrefix;
|
||||
const OUString sRedline;
|
||||
const OUString sReferenceId;
|
||||
const OUString sReferenceMark;
|
||||
const OUString sRelativeHeight;
|
||||
const OUString sRelativeWidth;
|
||||
const OUString sRuby;
|
||||
const OUString sRubyAdjust;
|
||||
const OUString sRubyCharStyleName;
|
||||
const OUString sRubyText;
|
||||
const OUString sServerMap;
|
||||
const OUString sShapeService;
|
||||
const OUString sSizeType;
|
||||
const OUString sSoftPageBreak;
|
||||
const OUString sStartAt;
|
||||
const OUString sSuffix;
|
||||
const OUString sTableService;
|
||||
const OUString sText;
|
||||
const OUString sTextContentService;
|
||||
const OUString sTextEmbeddedService;
|
||||
const OUString sTextEndnoteService;
|
||||
const OUString sTextField;
|
||||
const OUString sTextFieldService;
|
||||
const OUString sTextFrameService;
|
||||
const OUString sTextGraphicService;
|
||||
const OUString sTextPortionType;
|
||||
const OUString sTextSection;
|
||||
const OUString sUnvisitedCharStyleName;
|
||||
const OUString sVertOrient;
|
||||
const OUString sVertOrientPosition;
|
||||
const OUString sVisitedCharStyleName;
|
||||
const OUString sWidth;
|
||||
const OUString sWidthType;
|
||||
const OUString sTextFieldStart;
|
||||
const OUString sTextFieldEnd;
|
||||
const OUString sTextFieldStartEnd;
|
||||
|
||||
SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
|
||||
|
||||
@@ -232,7 +232,7 @@ protected:
|
||||
const SvXMLAutoStylePoolP& GetAutoStylePool() const { return rAutoStylePool; }
|
||||
|
||||
public:
|
||||
::rtl::OUString FindTextStyleAndHyperlink(
|
||||
OUString FindTextStyleAndHyperlink(
|
||||
const ::com::sun::star::uno::Reference <
|
||||
::com::sun::star::beans::XPropertySet > & rPropSet,
|
||||
sal_Bool& rbHyperlink,
|
||||
@@ -259,8 +259,8 @@ protected:
|
||||
const ::com::sun::star::uno::Reference <
|
||||
::com::sun::star::beans::XPropertySet >& rPropSet,
|
||||
sal_Bool bShape,
|
||||
::rtl::OUString *pMinHeightValue = 0,
|
||||
::rtl::OUString *pMinWidthValue = 0 );
|
||||
OUString *pMinHeightValue = 0,
|
||||
OUString *pMinWidthValue = 0 );
|
||||
|
||||
virtual void exportStyleAttributes(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
@@ -378,13 +378,13 @@ protected:
|
||||
virtual void setTextEmbeddedGraphicURL(
|
||||
const ::com::sun::star::uno::Reference <
|
||||
::com::sun::star::beans::XPropertySet >& rPropSet,
|
||||
::rtl::OUString& rStreamName ) const;
|
||||
OUString& rStreamName ) const;
|
||||
|
||||
/// export a footnote and styles
|
||||
void exportTextFootnote(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::beans::XPropertySet > & rPropSet,
|
||||
const ::rtl::OUString& sString,
|
||||
const OUString& sString,
|
||||
sal_Bool bAutoStyles, sal_Bool bProgress );
|
||||
|
||||
/// helper for exportTextFootnote
|
||||
@@ -393,7 +393,7 @@ protected:
|
||||
::com::sun::star::text::XFootnote > & rPropSet,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::text::XText> & rText,
|
||||
const ::rtl::OUString& sString,
|
||||
const OUString& sString,
|
||||
sal_Bool bAutoStyles,
|
||||
sal_Bool bIsEndnote, sal_Bool bProgress );
|
||||
|
||||
@@ -408,7 +408,7 @@ protected:
|
||||
void exportTextMark(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::beans::XPropertySet> & xPropSet,
|
||||
const ::rtl::OUString& rProperty,
|
||||
const OUString& rProperty,
|
||||
const enum ::xmloff::token::XMLTokenEnum pElements[],
|
||||
sal_Bool bAutoStyles);
|
||||
|
||||
@@ -504,11 +504,11 @@ public:
|
||||
const XMLPropertyState** pAddState = NULL, bool bDontSeek = false );
|
||||
|
||||
/// find style name for specified family and parent
|
||||
::rtl::OUString Find(
|
||||
OUString Find(
|
||||
sal_uInt16 nFamily,
|
||||
const ::com::sun::star::uno::Reference <
|
||||
::com::sun::star::beans::XPropertySet > & rPropSet,
|
||||
const ::rtl::OUString& rParent,
|
||||
const OUString& rParent,
|
||||
const XMLPropertyState** pAddState = NULL ) const;
|
||||
|
||||
static SvXMLExportPropertyMapper *CreateShapeExtPropMapper(
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
|
||||
// This method exports the given OUString
|
||||
void exportText(
|
||||
const ::rtl::OUString& rText,
|
||||
const OUString& rText,
|
||||
bool& rPrevCharWasSpace );
|
||||
|
||||
// This method collects all automatic styles for the given XText
|
||||
|
Reference in New Issue
Block a user