summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-10 12:27:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-11 07:00:45 +0100
commit9e03f6820417c9fcda27b49d9fa5a464f1255c84 (patch)
tree2736cfcb5fee7b0d397581faf380efc589155eb7
parentremove ControlDependencyManager (diff)
downloadcore-9e03f6820417c9fcda27b49d9fa5a464f1255c84.tar.gz
core-9e03f6820417c9fcda27b49d9fa5a464f1255c84.zip
loplugin:indentation in lingucomponent..tools
Change-Id: I96ed4c51ce3fe45c1cb69a7d7ff917f1e152462e Reviewed-on: https://gerrit.libreoffice.org/67607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/tools/solar.h41
-rw-r--r--lingucomponent/source/languageguessing/simpleguesser.cxx2
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx4
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesdta.cxx2
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx2
-rw-r--r--toolkit/source/awt/vclxmenu.cxx2
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx14
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx6
-rw-r--r--toolkit/source/controls/geometrycontrolmodel.cxx2
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx16
-rw-r--r--toolkit/source/controls/stdtabcontroller.cxx2
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx2
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx4
-rw-r--r--toolkit/source/controls/unocontrols.cxx10
-rw-r--r--tools/source/datetime/ttime.cxx4
-rw-r--r--tools/source/fsys/urlobj.cxx2
18 files changed, 63 insertions, 56 deletions
diff --git a/include/tools/solar.h b/include/tools/solar.h
index 9ee55c4ad5de..5ea3be835525 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -55,16 +55,19 @@ inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return static_cast<sal_uIn
+ (static_cast<sal_uInt32>(p[2]) << 16)
+ (static_cast<sal_uInt32>(p[3]) << 24)); }
#if defined OSL_LITENDIAN
-inline double SVBT64ToDouble( const SVBT64 p ) { double n;
- reinterpret_cast<sal_uInt8*>(&n)[0] = p[0];
- reinterpret_cast<sal_uInt8*>(&n)[1] = p[1];
- reinterpret_cast<sal_uInt8*>(&n)[2] = p[2];
- reinterpret_cast<sal_uInt8*>(&n)[3] = p[3];
- reinterpret_cast<sal_uInt8*>(&n)[4] = p[4];
- reinterpret_cast<sal_uInt8*>(&n)[5] = p[5];
- reinterpret_cast<sal_uInt8*>(&n)[6] = p[6];
- reinterpret_cast<sal_uInt8*>(&n)[7] = p[7];
- return n; }
+inline double SVBT64ToDouble( const SVBT64 p )
+{
+ double n;
+ reinterpret_cast<sal_uInt8*>(&n)[0] = p[0];
+ reinterpret_cast<sal_uInt8*>(&n)[1] = p[1];
+ reinterpret_cast<sal_uInt8*>(&n)[2] = p[2];
+ reinterpret_cast<sal_uInt8*>(&n)[3] = p[3];
+ reinterpret_cast<sal_uInt8*>(&n)[4] = p[4];
+ reinterpret_cast<sal_uInt8*>(&n)[5] = p[5];
+ reinterpret_cast<sal_uInt8*>(&n)[6] = p[6];
+ reinterpret_cast<sal_uInt8*>(&n)[7] = p[7];
+ return n;
+}
#else
inline double SVBT64ToDouble( const SVBT64 p ) { double n;
reinterpret_cast<sal_uInt8*>(&n)[0] = p[7];
@@ -78,12 +81,18 @@ inline double SVBT64ToDouble( const SVBT64 p ) { double n;
return n; }
#endif
-inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = static_cast<sal_uInt8>(n);
- p[1] = static_cast<sal_uInt8>(n >> 8); }
-inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = static_cast<sal_uInt8>(n);
- p[1] = static_cast<sal_uInt8>(n >> 8);
- p[2] = static_cast<sal_uInt8>(n >> 16);
- p[3] = static_cast<sal_uInt8>(n >> 24); }
+inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p )
+{
+ p[0] = static_cast<sal_uInt8>(n);
+ p[1] = static_cast<sal_uInt8>(n >> 8);
+}
+inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p )
+{
+ p[0] = static_cast<sal_uInt8>(n);
+ p[1] = static_cast<sal_uInt8>(n >> 8);
+ p[2] = static_cast<sal_uInt8>(n >> 16);
+ p[3] = static_cast<sal_uInt8>(n >> 24);
+}
#if defined OSL_LITENDIAN
inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = reinterpret_cast<sal_uInt8*>(&n)[0];
p[1] = reinterpret_cast<sal_uInt8*>(&n)[1];
diff --git a/lingucomponent/source/languageguessing/simpleguesser.cxx b/lingucomponent/source/languageguessing/simpleguesser.cxx
index 589fbeb54f2b..3220935e1688 100644
--- a/lingucomponent/source/languageguessing/simpleguesser.cxx
+++ b/lingucomponent/source/languageguessing/simpleguesser.cxx
@@ -65,7 +65,7 @@ static int startsAsciiCaseInsensitive(const std::string &s1, const std::string &
- rtl::toAsciiUpperCase(static_cast<unsigned char>(s2[i]));
if(s1[i] == '.' || s2[i] == '.') {ret = 0;} //. is a neutral character
}
- return ret;
+ return ret;
}
/**
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index e62dfe5c6194..1a6bb0390f9d 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -382,7 +382,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
{
MutexGuard aGuard( GetLinguMutex() );
- if (rLocale == Locale() || rWord.isEmpty())
+ if (rLocale == Locale() || rWord.isEmpty())
return true;
if (!hasLocale( rLocale ))
@@ -507,7 +507,7 @@ Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
{
MutexGuard aGuard( GetLinguMutex() );
- if (rLocale == Locale() || rWord.isEmpty())
+ if (rLocale == Locale() || rWord.isEmpty())
return nullptr;
if (!hasLocale( rLocale ))
diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx
index 7e23f023c4e5..c01584eff8c5 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx
@@ -59,7 +59,7 @@ OUString SAL_CALL Meaning::getMeaning()
Sequence< OUString > SAL_CALL Meaning::querySynonyms()
{
MutexGuard aGuard( GetLinguMutex() );
- return aSyn;
+ return aSyn;
}
void Meaning::SetSynonyms( const Sequence< OUString > &rSyn )
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 80d40dd87f96..26b128e5d41e 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -301,7 +301,7 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa
BitmapEx aBmpEx = VCLUnoHelper::GetBitmap( xBitmap );
Point aPos(nDestX - nSourceX, nDestY - nSourceY);
- Size aSz = aBmpEx.GetSizePixel();
+ Size aSz = aBmpEx.GetSizePixel();
if(nDestWidth != nSourceWidth)
{
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 38d3a6c6dd88..d9ec3a6487f7 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -60,7 +60,7 @@ VCLXMenu::~VCLXMenu()
if ( mpMenu )
{
mpMenu->RemoveEventListener( LINK( this, VCLXMenu, MenuEventListener ) );
- mpMenu.disposeAndClear();
+ mpMenu.disposeAndClear();
}
}
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 14727b21d7e9..fc46f5d3c51a 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1194,7 +1194,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
*ppNewComp = new VCLXFrame;
// Frame control needs to receive
// Mouse events
- pGroupBox->SetMouseTransparent( false );
+ pGroupBox->SetMouseTransparent( false );
}
break;
case WindowType::HELPBUTTON:
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 8d73de9c9e7c..2a296cda4ab2 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2039,7 +2039,7 @@ namespace
{
Image lcl_getImageFromURL( const OUString& i_rImageURL )
{
- if ( i_rImageURL.isEmpty() )
+ if ( i_rImageURL.isEmpty() )
return Image();
try
@@ -2050,12 +2050,12 @@ namespace
aMediaProperties.put( "URL", i_rImageURL );
Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
return Image( xGraphic );
- }
- catch( const uno::Exception& )
- {
+ }
+ catch( const uno::Exception& )
+ {
DBG_UNHANDLED_EXCEPTION("toolkit");
- }
- return Image();
+ }
+ return Image();
}
}
void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent )
@@ -6433,7 +6433,7 @@ void VCLXPatternField::setProperty( const OUString& PropertyName, const css::uno
aEditMask = aString;
else
aLiteralMask = aString;
- setMasks( aEditMask, aLiteralMask );
+ setMasks( aEditMask, aLiteralMask );
}
}
break;
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 514cfccec5b9..80a526d3ae20 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -538,7 +538,7 @@ void ControlModelContainerBase::insertByName( const OUString& aName, const Any&
if ( xM.is() )
{
Reference< beans::XPropertySet > xProps( xM, UNO_QUERY );
- if ( xProps.is() )
+ if ( xProps.is() )
{
Reference< beans::XPropertySetInfo > xPropInfo = xProps.get()->getPropertySetInfo();
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 035822570ecf..1d4b9fe735df 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -338,7 +338,7 @@ sal_Bool UnoDialogControl::setModel( const Reference< XControlModel >& rxModel )
{
// #Can we move all the Resource stuff to the ControlContainerBase ?
SolarMutexGuard aGuard;
- bool bRet = ControlContainerBase::setModel( rxModel );
+ bool bRet = ControlContainerBase::setModel( rxModel );
ImplStartListingForResourceEvents();
return bRet;
}
@@ -767,8 +767,8 @@ void UnoMultiPageControl::bindPage( const uno::Reference< awt::XControl >& _rxCo
uno::Reference< awt::XSimpleTabController > xTabCntrl( getPeer(), uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xProps( _rxControl->getModel(), uno::UNO_QUERY );
- VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() );
- TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
+ VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() );
+ TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
if ( xTabCntrl.is() && pPage )
{
VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() );
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index 62c1d53b161a..8f576dc7c312 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -476,7 +476,7 @@
throw IllegalArgumentException();
}
- HashMapString2Int &rMap = ServiceSpecifierMap::get();
+ HashMapString2Int &rMap = ServiceSpecifierMap::get();
HashMapString2Int::iterator aPropMapIdPos = rMap.find( m_sServiceSpecifier );
if ( rMap.end() == aPropMapIdPos )
{
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index 8c38d0f3f8d5..230980f46e31 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -152,7 +152,7 @@ static void lcl_throwIndexOutOfBoundsException( )
Any aRet = UnoControlRoadmapModel_Base::queryAggregation( rType );
if ( !aRet.hasValue() )
aRet = UnoControlRoadmapModel_IBase::queryInterface( rType );
- return aRet;
+ return aRet;
}
@@ -220,7 +220,7 @@ static void lcl_throwIndexOutOfBoundsException( )
// As long as only vectors with up to 10 elements are
// involved it should be sufficient
sal_Int32 UnoControlRoadmapModel::GetUniqueID()
- {
+ {
Any aAny;
bool bIncrement = true;
sal_Int32 CurID = 0;
@@ -241,10 +241,10 @@ static void lcl_throwIndexOutOfBoundsException( )
CurID++;
break;
}
- }
- }
- return CurID;
- }
+ }
+ }
+ return CurID;
+ }
ContainerEvent UnoControlRoadmapModel::GetContainerEvent(sal_Int32 Index, const Reference< XInterface >& xRoadmapItem)
@@ -369,9 +369,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( UnoRoadmapControl, UnoControlRoadmap_Base, UnoCon
sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >& _rModel)
{
-
-
- Reference< XContainer > xC( getModel(), UNO_QUERY );
+ Reference< XContainer > xC( getModel(), UNO_QUERY );
if ( xC.is() )
xC->removeContainerListener( this );
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index 394364eea74a..eed32b9f889e 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -309,7 +309,7 @@ void StdTabController::activateTabOrder( )
Reference< XVclContainerPeer > xVclContainerPeer;
if ( xC.is() )
xVclContainerPeer.set(xC->getPeer(), css::uno::UNO_QUERY);
- if ( !xC.is() || !xVclContainerPeer.is() )
+ if ( !xC.is() || !xVclContainerPeer.is() )
return;
// This may return a TabController, which returns desired list of controls faster
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index 738b526568b3..f3538c5ddda5 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -115,7 +115,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument
sal_Int16 nPageId = -1;
if ( rArguments.getLength() == 1 )
{
- if ( !( rArguments[ 0 ] >>= nPageId ))
+ if ( !( rArguments[ 0 ] >>= nPageId ))
throw lang::IllegalArgumentException();
m_nTabPageId = nPageId;
}
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index ffe7363bd9f7..37b185438867 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -943,7 +943,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
{
if ( nVersion < 2 )
{
- if ( !pFD )
+ if ( !pFD )
{
pFD.reset(new css::awt::FontDescriptor);
if ( maData.find(BASEPROPERTY_FONTDESCRIPTOR) != maData.end() ) // due to defaults...
@@ -1331,7 +1331,7 @@ void UnoControlModel::setPropertyValues( const css::uno::Sequence< OUString >& r
// will implicitly call property listeners, and this should not happen with
// our mutex locked
// #i23451#
- setFastPropertyValues( nProps, pHandles, pValues, nValidHandles );
+ setFastPropertyValues( nProps, pHandles, pValues, nValidHandles );
}
else
aGuard.clear();
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 6c01ea0736be..7fe06b1119ef 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -313,7 +313,7 @@ void UnoEditControl::setText( const OUString& aText )
{
maText = aText;
mbSetTextInPeer = true;
- uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
+ uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
if ( xText.is() )
xText->setText( maText );
}
@@ -382,7 +382,7 @@ OUString UnoEditControl::getText()
OUString UnoEditControl::getSelectedText()
{
OUString sSelected;
- uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
+ uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
if ( xText.is() )
sSelected = xText->getSelectedText();
@@ -391,7 +391,7 @@ OUString UnoEditControl::getSelectedText()
void UnoEditControl::setSelection( const awt::Selection& aSelection )
{
- uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
+ uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
if ( xText.is() )
xText->setSelection( aSelection );
}
@@ -399,7 +399,7 @@ void UnoEditControl::setSelection( const awt::Selection& aSelection )
awt::Selection UnoEditControl::getSelection()
{
awt::Selection aSel;
- uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
+ uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
if ( xText.is() )
aSel = xText->getSelection();
return aSel;
@@ -435,7 +435,7 @@ void UnoEditControl::setMaxTextLen( sal_Int16 nLen )
{
mnMaxTextLen = nLen;
mbSetMaxTextLenInPeer = true;
- uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
+ uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY );
if ( xText.is() )
xText->setMaxTextLen( mnMaxTextLen );
}
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index a843949ee3f0..b5b3e1c533a0 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -429,8 +429,8 @@ Time tools::Time::GetUTCOffset()
gmtime_r( &nTime, &aTM );
nUTC = mktime( &aTM );
#endif
- nCacheTicks = nTicks;
- nCacheSecOffset = (nLocalTime-nUTC) / 60;
+ nCacheTicks = nTicks;
+ nCacheSecOffset = (nLocalTime-nUTC) / 60;
}
nTempTime = abs( nCacheSecOffset );
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 445e27772955..bd6c25fa66ee 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -3246,7 +3246,7 @@ bool INetURLObject::insertName(OUString const & rTheName,
bool bSkip = pPrefixEnd < pEnd && *pPrefixEnd == '/';
bInsertSlash = false;
pSuffixBegin = pPathEnd;
- while (nIndex-- > 0)
+ while (nIndex-- > 0)
for (;;)
{
if (bSkip)