summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-10 12:29:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-11 07:01:05 +0100
commit71a61ab2d8b650ebe0655cebd7233959a5a3811e (patch)
tree80cc6403e59e77853b0f40b4f49bc9ba9950f432
parent30e99b793fc26d2c86363bf8c023cdd2c05940b1 (diff)
loplugin:indentation in unotools..vbahelper
Change-Id: I76de5678dd21f207e9e9c2a0c446f2c0b9be974e Reviewed-on: https://gerrit.libreoffice.org/67609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--unotools/source/config/configitem.cxx2
-rw-r--r--unotools/source/config/lingucfg.cxx23
-rw-r--r--unotools/source/config/saveopt.cxx4
-rw-r--r--unotools/source/config/viewoptions.cxx4
-rw-r--r--unotools/source/i18n/charclass.cxx2
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx4
-rw-r--r--unoxml/source/dom/document.cxx2
-rw-r--r--unoxml/source/dom/entity.cxx2
-rw-r--r--unoxml/source/dom/entityreference.cxx2
-rw-r--r--unoxml/source/dom/node.cxx2
-rw-r--r--unoxml/source/dom/notation.cxx2
-rw-r--r--unoxml/source/dom/saxbuilder.cxx6
-rw-r--r--uui/source/fltdlg.cxx2
-rw-r--r--uui/source/iahndl-ssl.cxx2
-rw-r--r--vbahelper/source/msforms/service.cxx6
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx14
-rw-r--r--vbahelper/source/msforms/vbalistbox.cxx2
-rw-r--r--vbahelper/source/msforms/vbatogglebutton.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbafontbase.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx32
-rw-r--r--vbahelper/source/vbahelper/vbashaperange.cxx2
22 files changed, 63 insertions, 62 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index b9aec85c5a2a..fd4fd3dc0fcb 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -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;
}
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index e32e2f05a47d..0ebbf953a712 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -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;
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 19a39049e6bc..6ef1403d020f 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -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();
}
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index 3eb5584a6dcd..25d8d21f7ecf 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -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))
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx
index 4be3ad89c3b8..0fdb80075c68 100644
--- a/unotools/source/i18n/charclass.cxx
+++ b/unotools/source/i18n/charclass.cxx
@@ -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
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index c851a408b736..24e768e717da 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -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;
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index c05e0a0b6b21..7380bcdc4a9b 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -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.
diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
index cbea7bd362b6..74b1faaf7e75 100644
--- a/unoxml/source/dom/entity.cxx
+++ b/unoxml/source/dom/entity.cxx
@@ -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;
diff --git a/unoxml/source/dom/entityreference.cxx b/unoxml/source/dom/entityreference.cxx
index 4b328cc2ee46..f94496d7b705 100644
--- a/unoxml/source/dom/entityreference.cxx
+++ b/unoxml/source/dom/entityreference.cxx
@@ -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;
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index c77b761bbf1a..73e2b5985f48 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -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,
diff --git a/unoxml/source/dom/notation.cxx b/unoxml/source/dom/notation.cxx
index dd94509f3028..352d5b0029f1 100644
--- a/unoxml/source/dom/notation.cxx
+++ b/unoxml/source/dom/notation.cxx
@@ -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;
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index a6e189b4b475..a8d1210c9c83 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -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);
}
}
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index fb9516a50498..325bdb2d272e 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -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 );
}
}
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 6db6695671d9..7c46810def31 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -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;
diff --git a/vbahelper/source/msforms/service.cxx b/vbahelper/source/msforms/service.cxx
index 3da00781514c..1014966f323a 100644
--- a/vbahelper/source/msforms/service.cxx
+++ b/vbahelper/source/msforms/service.cxx
@@ -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;
}
}
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 8f60a67af807..de81fc5d9fdc 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -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() )
{
diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx
index c91996c6d6f4..da919b42dad1 100644
--- a/vbahelper/source/msforms/vbalistbox.cxx
+++ b/vbahelper/source/msforms/vbalistbox.cxx
@@ -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;
}
}
diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx
index 66106e9266d8..61b6562f0beb 100644
--- a/vbahelper/source/msforms/vbatogglebutton.cxx
+++ b/vbahelper/source/msforms/vbatogglebutton.cxx
@@ -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 ) );
}
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index d188812e89cd..fc20c882f092 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -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 )
diff --git a/vbahelper/source/vbahelper/vbafontbase.cxx b/vbahelper/source/vbahelper/vbafontbase.cxx
index d83d217be40b..408801e947d0 100644
--- a/vbahelper/source/vbahelper/vbafontbase.cxx
+++ b/vbahelper/source/vbahelper/vbafontbase.cxx
@@ -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) );
}
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 3297bbec5fd0..5ec3311899f1 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -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====
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index dd5954fb0284..6cb5fdbf621e 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -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