Kaydet (Commit) 71a61ab2 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:indentation in unotools..vbahelper

Change-Id: I76de5678dd21f207e9e9c2a0c446f2c0b9be974e
Reviewed-on: https://gerrit.libreoffice.org/67609
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 30e99b79
......@@ -302,7 +302,7 @@ void ConfigItem::impl_unpackLocalizedProperties( const Sequence< OUString >
for( nPropertyCounter=0; nPropertyCounter<nPropertiesSize; ++nPropertyCounter )
{
lOutNames [nDestinationCounter] = sNodeName + lProperties[nPropertyCounter].Name;
lOutNames [nDestinationCounter] = sNodeName + lProperties[nPropertyCounter].Name;
lOutValues[nDestinationCounter] = lProperties[nPropertyCounter].Value;
++nDestinationCounter;
}
......
......@@ -634,19 +634,20 @@ void SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
{ rOpt.bROIsAutoReplaceUniqueEntries = pROStates[i]; rVal >>= rOpt.bIsAutoReplaceUniqueEntries; } break;
case UPH_IS_DIRECTION_TO_SIMPLIFIED :
{ rOpt.bROIsDirectionToSimplified = pROStates[i];
if( ! (rVal >>= rOpt.bIsDirectionToSimplified) )
{
rOpt.bROIsDirectionToSimplified = pROStates[i];
if( ! (rVal >>= rOpt.bIsDirectionToSimplified) )
{
//default is locale dependent:
if (MsLangId::isTraditionalChinese(rOpt.nDefaultLanguage_CJK))
{
//default is locale dependent:
if (MsLangId::isTraditionalChinese(rOpt.nDefaultLanguage_CJK))
{
rOpt.bIsDirectionToSimplified = false;
}
else
{
rOpt.bIsDirectionToSimplified = true;
}
rOpt.bIsDirectionToSimplified = false;
}
else
{
rOpt.bIsDirectionToSimplified = true;
}
}
} break;
case UPH_IS_USE_CHARACTER_VARIANTS :
{ rOpt.bROIsUseCharacterVariants = pROStates[i]; rVal >>= rOpt.bIsUseCharacterVariants; } break;
......
......@@ -744,8 +744,8 @@ SvtSaveOptions::SvtSaveOptions()
pOptions.reset(new SvtLoadSaveOptions_Impl);
pOptions->pSaveOpt.reset(new SvtSaveOptions_Impl);
pOptions->pLoadOpt.reset( new SvtLoadOptions_Impl);
}
++nRefCount;
}
++nRefCount;
pImp = pOptions.get();
}
......
......@@ -358,8 +358,8 @@ void SvtViewOptionsBase_Impl::SetUserData( const OUString&
if (xUserData.is())
{
const css::beans::NamedValue* pData = lData.getConstArray();
sal_Int32 c = lData.getLength();
sal_Int32 i = 0;
sal_Int32 c = lData.getLength();
sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
if (xUserData->hasByName(pData[i].Name))
......
......@@ -313,7 +313,7 @@ OUString CharClass::lowercase( const OUString& rStr, sal_Int32 nPos, sal_Int32 n
{
SAL_WARN( "unotools.i18n", "lowercase: Exception caught!" );
}
return rStr.copy( nPos, nCount );
return rStr.copy( nPos, nCount );
}
sal_Int16 CharClass::getType( const OUString& rStr, sal_Int32 nPos ) const
......
......@@ -647,7 +647,7 @@ void SAL_CALL Moderator::onTerminated()
{
salhelper::ConditionWaiter aWaiter(m_aRep);
}
delete this;
delete this;
}
/**
......@@ -1350,7 +1350,7 @@ UcbLockBytesRef UcbLockBytes::CreateLockBytes( const Reference < XContent >& xCo
if ( xLockBytes->GetError() == ERRCODE_NONE && ( bError || !xLockBytes->getInputStream().is() ) )
{
OSL_FAIL("No InputStream, but no error set!" );
xLockBytes->SetError( ERRCODE_IO_GENERAL );
xLockBytes->SetError( ERRCODE_IO_GENERAL );
}
return xLockBytes;
......
......@@ -659,7 +659,7 @@ namespace DOM
if (result != nullptr)
return result;
result = lcl_search_element_by_id(cur->next, id);
return result;
return result;
}
// Returns the Element whose ID is given by elementId.
......
......@@ -95,7 +95,7 @@ namespace DOM
{
::osl::MutexGuard const g(m_rMutex);
OUString aName;
OUString aName;
if (m_aNodePtr != nullptr)
{
const xmlChar* pName = m_aNodePtr->name;
......
......@@ -53,7 +53,7 @@ namespace DOM
{
::osl::MutexGuard const g(m_rMutex);
OUString aName;
OUString aName;
if (m_aNodePtr != nullptr)
{
const xmlChar* pName = m_aNodePtr->name;
......
......@@ -783,7 +783,7 @@ namespace DOM
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
"DOMNodeRemoved"), UNO_QUERY);
event->initMutationEvent("DOMNodeRemoved",
event->initMutationEvent("DOMNodeRemoved",
true,
false,
this,
......
......@@ -57,7 +57,7 @@ namespace DOM
{
::osl::MutexGuard const g(m_rMutex);
OUString aName;
OUString aName;
if (m_aNodePtr != nullptr)
{
const xmlChar* pName = m_aNodePtr->name;
......
......@@ -359,12 +359,12 @@ namespace DOM
::osl::MutexGuard g(m_Mutex);
// append text node to the current top element
if (m_aState != SAXDocumentBuilderState_BUILDING_DOCUMENT &&
if (m_aState != SAXDocumentBuilderState_BUILDING_DOCUMENT &&
m_aState != SAXDocumentBuilderState_BUILDING_FRAGMENT)
throw SAXException();
Reference< XText > aText = m_aDocument->createTextNode(rChars);
m_aNodeStack.top()->appendChild(aText);
Reference< XText > aText = m_aDocument->createTextNode(rChars);
m_aNodeStack.top()->appendChild(aText);
}
}
......
......@@ -199,7 +199,7 @@ OUString FilterDialog::impl_buildUIFileName( const OUString& sName )
{
INetURLObject aBuilder ( sName );
Size aSize = m_xLbFilters->get_preferred_size();
sShortName = aBuilder.getAbbreviated( xStringCalculator, aSize.Width(), INetURLObject::DecodeMechanism::Unambiguous );
sShortName = aBuilder.getAbbreviated( xStringCalculator, aSize.Width(), INetURLObject::DecodeMechanism::Unambiguous );
}
}
......
......@@ -83,7 +83,7 @@ isDomainMatch(
const OUString& hostName, const uno::Sequence< OUString >& certHostNames)
{
for ( int i = 0; i < certHostNames.getLength(); i++){
OUString element = certHostNames[i];
OUString element = certHostNames[i];
if (element.isEmpty())
continue;
......
......@@ -35,10 +35,10 @@ extern "C"
const sal_Char * pImplName, void *, void *)
{
SAL_INFO("vbahelper", "In component_getFactory for " << pImplName );
void* pRet = sdecl::component_getFactoryHelper(
void* pRet = sdecl::component_getFactoryHelper(
pImplName, {&controlprovider::serviceDecl, &userform::serviceDecl} );
SAL_INFO("vbahelper", "Ret is 0x" << std::hex << pRet);
return pRet;
SAL_INFO("vbahelper", "Ret is 0x" << std::hex << pRet);
return pRet;
}
}
......
......@@ -79,7 +79,7 @@ ScVbaControl::getWindowPeer()
// would seem to be a Userform control
uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY_THROW );
xWinPeer = xControl->getPeer();
return xWinPeer;
return xWinPeer;
}
// form control
xControlModel.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
......@@ -153,10 +153,10 @@ ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, c
ScVbaControl::~ScVbaControl()
{
if( m_xControl.is() )
{
{
uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
xComponent->removeEventListener( m_xEventListener );
}
xComponent->removeEventListener( m_xEventListener );
}
}
void
......@@ -305,7 +305,7 @@ ScVbaControl::getControlSource()
table::CellAddress aAddress;
xProps->getPropertyValue( "BoundCell" ) >>= aAddress;
xConvertor->setPropertyValue( "Address" , uno::makeAny( aAddress ) );
xConvertor->getPropertyValue( "XLA1Representation" ) >>= sControlSource;
xConvertor->getPropertyValue( "XLA1Representation" ) >>= sControlSource;
}
catch(const uno::Exception&)
{
......@@ -321,7 +321,7 @@ ScVbaControl::setControlSource( const OUString& _controlsource )
// reference tab in case no Sheet is specified in "_controlsource"
// Can't use the active sheet either, code may of course access
uno::Reference< drawing::XDrawPagesSupplier > xSupplier( m_xModel, uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPages(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPages(), uno::UNO_QUERY_THROW );
sal_Int32 nLen = xIndex->getCount();
bool bMatched = false;
sal_Int16 nRefTab = 0;
......@@ -527,7 +527,7 @@ void SAL_CALL ScVbaControl::fireEvent( const script::ScriptEvent& rEvt )
lang::EventObject aEvt;
uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY ) ;
uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY ) ;
uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY ) ;
if ( xControlShape.is() )
{
......
......@@ -207,7 +207,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
nList.realloc( nLength - 1 );
//m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
fireClickEvent();
m_xProps->setPropertyValue( "SelectedItems", uno::makeAny( nList ) );
m_xProps->setPropertyValue( "SelectedItems", uno::makeAny( nList ) );
return;
}
}
......
......@@ -55,8 +55,8 @@ uno::Any SAL_CALL
ScVbaToggleButton::getValue()
{
sal_Int16 nState = 0;
m_xProps->getPropertyValue( "State" ) >>= nState;
return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
m_xProps->getPropertyValue( "State" ) >>= nState;
return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
}
......
......@@ -258,8 +258,8 @@ uno::Any VbaDocumentsBase::openDocument( const OUString& rFileName, const uno::A
bool bInteractive = !xApplication.is() || xApplication->getInteractive();
// we need to detect if this is a URL, if not then assume it's a file path
OUString aURL;
INetURLObject aObj;
OUString aURL;
INetURLObject aObj;
aObj.SetURL( rFileName );
bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid;
if ( bIsURL )
......
......@@ -100,7 +100,7 @@ VbaFontBase::setSubscript( const uno::Any& aValue )
nValue2 = SUBSCRIPTHEIGHT;
}
mxFont->setPropertyValue( "CharEscapementHeight" , uno::Any(nValue2) );
mxFont->setPropertyValue( "CharEscapementHeight" , uno::Any(nValue2) );
mxFont->setPropertyValue( "CharEscapement" , uno::Any(nValue) );
}
......
......@@ -114,7 +114,7 @@ getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext )
const uno::Any&
aNULL()
{
static uno::Any aNULLL = uno::makeAny( uno::Reference< uno::XInterface >() );
static uno::Any aNULLL = uno::makeAny( uno::Reference< uno::XInterface >() );
return aNULLL;
}
......@@ -232,10 +232,10 @@ static uno::Reference< frame::XModel >
getCurrentDocCtx( const OUString& ctxName, const uno::Reference< uno::XComponentContext >& xContext )
{
uno::Reference< frame::XModel > xModel;
// try fallback to calling doc
css::uno::Reference< css::container::XNameAccess > xNameAccess( xContext, css::uno::UNO_QUERY_THROW );
xModel.set( xNameAccess->getByName( ctxName ), uno::UNO_QUERY_THROW );
return xModel;
// try fallback to calling doc
css::uno::Reference< css::container::XNameAccess > xNameAccess( xContext, css::uno::UNO_QUERY_THROW );
xModel.set( xNameAccess->getByName( ctxName ), uno::UNO_QUERY_THROW );
return xModel;
}
uno::Reference< frame::XModel >
......@@ -295,8 +295,8 @@ getCurrentWordDoc( const uno::Reference< uno::XComponentContext >& xContext )
sal_Int32
OORGBToXLRGB( sal_Int32 nCol )
{
sal_Int32 nAutoBits = nCol;
nAutoBits &= 0xFF000000;
sal_Int32 nAutoBits = nCol;
nAutoBits &= 0xFF000000;
sal_Int32 nRed = nCol;
nRed &= 0x00FF0000;
nRed >>= 16;
......@@ -312,8 +312,8 @@ OORGBToXLRGB( sal_Int32 nCol )
sal_Int32
XLRGBToOORGB( sal_Int32 nCol )
{
sal_Int32 nAutoBits = nCol;
nAutoBits &= 0xFF000000;
sal_Int32 nAutoBits = nCol;
nAutoBits &= 0xFF000000;
sal_Int32 nBlue = nCol;
nBlue &= 0x00FF0000;
......@@ -779,14 +779,14 @@ bool setPropertyValue( uno::Sequence< beans::PropertyValue >& aProp, const OUStr
void setOrAppendPropertyValue( uno::Sequence< beans::PropertyValue >& aProp, const OUString& aName, const uno::Any& aValue )
{
if( setPropertyValue( aProp, aName, aValue ) )
return;
if( setPropertyValue( aProp, aName, aValue ) )
return;
// append the property
sal_Int32 nLength = aProp.getLength();
aProp.realloc( nLength + 1 );
aProp[ nLength ].Name = aName;
aProp[ nLength ].Value = aValue;
// append the property
sal_Int32 nLength = aProp.getLength();
aProp.realloc( nLength + 1 );
aProp[ nLength ].Name = aName;
aProp[ nLength ].Value = aValue;
}
// ====UserFormGeomentryHelper====
......
......@@ -394,7 +394,7 @@ ScVbaShapeRange:: createCollectionObject( const css::uno::Any& aSource )
// #TODO #FIXME Shape parent should always be the sheet the shapes belong
// to
uno::Reference< msforms::XShape > xVbShape( new ScVbaShape( uno::Reference< XHelperInterface >(), mxContext, xShape, getShapes(), m_xModel, ScVbaShape::getType( xShape ) ) );
return uno::makeAny( xVbShape );
return uno::makeAny( xVbShape );
}
OUString
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment