summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-22 18:24:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-24 08:08:00 +0100
commitb7259532d83ea1263f6944974d71162c47203939 (patch)
tree19d6a840d86070831573a583dd45a2b828218323 /xmloff
parentad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca (diff)
Remove unnecessary bool2any
Change-Id: Ie2caee1d5a7912011d76172539c2f8f37eaee5cf
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/animimp.cxx7
-rw-r--r--xmloff/source/draw/eventimp.cxx3
-rw-r--r--xmloff/source/draw/ximpshap.cxx25
-rw-r--r--xmloff/source/draw/ximpshow.cxx23
-rw-r--r--xmloff/source/forms/propertyimport.cxx2
-rw-r--r--xmloff/source/style/NamedBoolPropertyHdl.cxx4
-rw-r--r--xmloff/source/style/PageMasterExportPropMapper.cxx2
-rw-r--r--xmloff/source/style/PageMasterPropHdl.cxx4
-rw-r--r--xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx3
11 files changed, 36 insertions, 41 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index eaf3d8ec6013..2228bd05cbe6 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -561,7 +561,7 @@ SvXMLExport::~SvXMLExport()
mxExportInfo->setPropertyValue(sProgressCurrent, aAny);
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
- mxExportInfo->setPropertyValue(sRepeat, cppu::bool2any(mpProgressBarHelper->GetRepeat()));
+ mxExportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
}
if (mpNumExport && (mnExportFlags & (EXPORT_AUTOSTYLES | EXPORT_STYLES)))
{
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index bb88bfbd4604..4c361e503fc9 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -548,7 +548,7 @@ void SAL_CALL SvXMLImport::endDocument()
mxImportInfo->setPropertyValue(sProgressCurrent, aAny);
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
- mxImportInfo->setPropertyValue(sRepeat, cppu::bool2any(mpProgressBarHelper->GetRepeat()));
+ mxImportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
// pProgressBarHelper is deleted in dtor
}
OUString sNumberStyles(XML_NUMBERSTYLES);
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 154d61b04cc5..925e437fd823 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -27,7 +27,6 @@
#include <sax/tools/converter.hxx>
#include <list>
-#include <comphelper/extract.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -605,7 +604,7 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none )
{
- aAny = bool2any( true );
+ aAny <<= true;
xSet->setPropertyValue( mpImpl->msDimHide, aAny );
}
else
@@ -631,10 +630,10 @@ void XMLAnimationsEffectContext::EndElement()
aAny <<= maSoundURL;
xSet->setPropertyValue( mpImpl->msSound, aAny );
- aAny <<= bool2any( mbPlayFull );
+ aAny <<= mbPlayFull;
xSet->setPropertyValue( mpImpl->msPlayFull, aAny );
- aAny <<= bool2any( true );
+ aAny <<= true;
xSet->setPropertyValue( mpImpl->msSoundOn, aAny );
}
else
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 3de70c97a674..f7158ff9c5c8 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/presentation/ClickAction.hpp>
#include <tools/urlobj.hxx>
-#include <comphelper/extract.hxx>
#include <sax/tools/converter.hxx>
@@ -462,7 +461,7 @@ void SdXMLEventContext::EndElement()
pProperties->Name = "PlayFull";
pProperties->Handle = -1;
- pProperties->Value = ::cppu::bool2any(mbPlayFull);
+ pProperties->Value <<= mbPlayFull;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
break;
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 49fe17c2b84d..d9c95a03b671 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -35,7 +35,6 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-#include <comphelper/extract.hxx>
#include "ximpshap.hxx"
#include <xmloff/XMLBase64ImportContext.hxx>
#include <xmloff/XMLShapeStyleContext.hxx>
@@ -1680,10 +1679,10 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -2429,7 +2428,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xPropset->getPropertySetInfo() );
if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xPropset->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( mbIsPlaceholder ) );
+ xPropset->setPropertyValue("IsEmptyPresentationObject", css::uno::makeAny( mbIsPlaceholder ) );
if( !mbIsPlaceholder )
{
@@ -2458,7 +2457,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
if( xPropsInfo.is() )
{
if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -2569,7 +2568,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
{
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
uno::Any aAny;
@@ -2596,7 +2595,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
if( xPropsInfo.is() )
{
if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -2700,10 +2699,10 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -3080,10 +3079,10 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -3887,10 +3886,10 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index affe7823a804..055ccf3ef3f6 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <sax/tools/converter.hxx>
#include <xmloff/xmltoken.hxx>
-#include <comphelper/extract.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmluconv.hxx>
@@ -125,57 +124,57 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) );
+ aAny <<= IsXMLToken( sValue, XML_ENABLED );
mpImpl->mxPresProps->setPropertyValue("AllowAnimations", aAny );
}
else if( IsXMLToken( aLocalName, XML_STAY_ON_TOP ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsAlwaysOnTop", aAny );
}
else if( IsXMLToken( aLocalName, XML_FORCE_MANUAL ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsAutomatic", aAny );
}
else if( IsXMLToken( aLocalName, XML_ENDLESS ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsEndless", aAny );
}
else if( IsXMLToken( aLocalName, XML_FULL_SCREEN ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsFullScreen", aAny );
}
else if( IsXMLToken( aLocalName, XML_MOUSE_VISIBLE ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsMouseVisible", aAny );
}
else if( IsXMLToken( aLocalName, XML_START_WITH_NAVIGATOR ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("StartWithNavigator", aAny );
}
else if( IsXMLToken( aLocalName, XML_MOUSE_AS_PEN ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("UsePen", aAny );
}
else if( IsXMLToken( aLocalName, XML_TRANSITION_ON_CLICK ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) );
+ aAny <<= IsXMLToken( sValue, XML_ENABLED );
mpImpl->mxPresProps->setPropertyValue("IsTransitionOnClick", aAny );
}
else if( IsXMLToken( aLocalName, XML_SHOW_LOGO ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsShowLogo", aAny );
}
}
}
- aAny = bool2any( bAll );
+ aAny <<= bAll;
mpImpl->mxPresProps->setPropertyValue("IsShowAll", aAny );
}
}
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 502f8c3d2caa..128b90d32e6c 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -101,7 +101,7 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun
OStringBuffer("PropertyConversion::convertString: could not convert \"").
append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
append("\" into a boolean!").getStr());
- aReturn = ::cppu::bool2any(_bInvertBoolean ? !bValue : bValue);
+ aReturn <<= (_bInvertBoolean ? !bValue : bValue);
}
break;
case TypeClass_SHORT: // sal_Int16
diff --git a/xmloff/source/style/NamedBoolPropertyHdl.cxx b/xmloff/source/style/NamedBoolPropertyHdl.cxx
index 8d3273ef65e9..98eb63fe1d68 100644
--- a/xmloff/source/style/NamedBoolPropertyHdl.cxx
+++ b/xmloff/source/style/NamedBoolPropertyHdl.cxx
@@ -39,13 +39,13 @@ bool XMLNamedBoolPropertyHdl::importXML( const OUString& rStrImpValue, Any& rVal
{
if( rStrImpValue == maTrueStr )
{
- rValue = ::cppu::bool2any( true );
+ rValue <<= true;
return true;
}
if( rStrImpValue == maFalseStr )
{
- rValue = ::cppu::bool2any( false );
+ rValue <<= false;
return true;
}
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index a3396617f622..b8b2ada6dcb3 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -63,7 +63,7 @@ static void lcl_RemoveStateIfZero16( XMLPropertyState* pState )
static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps)
{
if(::cppu::any2bool(xProps->getPropertyValue(rProperty)))
- rPropState.push_back(XMLPropertyState (nIndex, cppu::bool2any(true)));
+ rPropState.push_back(XMLPropertyState (nIndex, css::uno::Any(true)));
}
// helper struct to handle equal XMLPropertyState's for page, header and footer
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx
index a171f0c274d5..715aab239b0e 100644
--- a/xmloff/source/style/PageMasterPropHdl.cxx
+++ b/xmloff/source/style/PageMasterPropHdl.cxx
@@ -331,7 +331,7 @@ bool XMLPMPropHdl_CenterHorizontal::importXML(
if (IsXMLToken( rStrImpValue, XML_BOTH) ||
IsXMLToken( rStrImpValue, XML_HORIZONTAL))
{
- rValue = ::cppu::bool2any(true);
+ rValue <<= true;
bRet = true;
}
@@ -372,7 +372,7 @@ bool XMLPMPropHdl_CenterVertical::importXML(
if (IsXMLToken(rStrImpValue, XML_BOTH) ||
IsXMLToken(rStrImpValue, XML_VERTICAL) )
{
- rValue = ::cppu::bool2any(true);
+ rValue <<= true;
bRet = true;
}
diff --git a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
index 51b4084dbf93..9c3416f4aff6 100644
--- a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
+++ b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
@@ -21,7 +21,6 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/uno/Any.hxx>
#include "XMLBitmapLogicalSizePropertyHandler.hxx"
-#include <comphelper/extract.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -40,7 +39,7 @@ bool XMLBitmapLogicalSizePropertyHandler::importXML(
Any& rValue,
const SvXMLUnitConverter& ) const
{
- rValue = ::cppu::bool2any( rStrImpValue.indexOf( '%' ) == -1 );
+ rValue <<= ( rStrImpValue.indexOf( '%' ) == -1 );
return true;
}