summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-08 13:56:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-10 11:21:00 +0100
commit9f40107620316fd04e1fe3669ed7c3a5c2b62eb3 (patch)
treeb03eab82b776167361590667251deabaee3873e9 /sw/source/ui
parent12b584e4a9695a7516f239cd33950656212ed0c8 (diff)
loplugin:indentation in sw
Change-Id: I4936284bff568b6bb47e5df3821f4ddd78260e92 Reviewed-on: https://gerrit.libreoffice.org/67568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx3
-rw-r--r--sw/source/ui/frmdlg/cption.cxx8
-rw-r--r--sw/source/ui/index/cntex.cxx52
-rw-r--r--sw/source/ui/misc/glossary.cxx4
-rw-r--r--sw/source/ui/vba/vbadocument.cxx4
-rw-r--r--sw/source/ui/vba/vbafont.cxx2
-rw-r--r--sw/source/ui/vba/vbaglobals.cxx2
7 files changed, 37 insertions, 38 deletions
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 97c0acbe8396..4f879a580f62 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -217,9 +217,8 @@ SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
AddTabPage("columns", SwColumnPage::Create, SwColumnPage::GetRanges );
AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
-
- break;
}
+ break;
default:
OSL_ENSURE(false, "wrong family");
}
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 49993753e587..ba85d16fcb5f 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -131,13 +131,13 @@ SwCaptionDialog::SwCaptionDialog(weld::Window *pParent, SwView &rV)
//#i61007# order of captions
ApplyCaptionOrder();
SwWrtShell &rSh = rView.GetWrtShell();
- uno::Reference< frame::XModel > xModel = rView.GetDocShell()->GetBaseModel();
+ uno::Reference< frame::XModel > xModel = rView.GetDocShell()->GetBaseModel();
SelectionType eType = rSh.GetSelectionType();
if ( eType & SelectionType::Ole )
{
eType = SelectionType::Graphic;
- uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY);
+ uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY);
xNameAccess = xObjs->getEmbeddedObjects();
}
@@ -179,7 +179,7 @@ SwCaptionDialog::SwCaptionDialog(weld::Window *pParent, SwView &rV)
//if not OLE
if(!xNameAccess.is())
{
- uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY);
+ uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY);
xNameAccess = xGraphics->getGraphicObjects();
}
@@ -195,7 +195,7 @@ SwCaptionDialog::SwCaptionDialog(weld::Window *pParent, SwView &rV)
{
nPoolId = RES_POOLCOLL_LABEL_FRAME;
sString = rView.GetOldFrameCat();
- uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY);
+ uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY);
xNameAccess = xFrames->getTextFrames();
}
else if( eType == SelectionType::Text )
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 17a5d1a9cb1f..d569144abec0 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -98,16 +98,16 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void
{
try
{
- uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel();
+ uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel();
uno::Reference< lang::XUnoTunnel > xDocTunnel(xModel, uno::UNO_QUERY);
SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId()));
if( pDoc )
pDoc->GetDocShell()->LoadStyles_( *m_rWrtShell.GetView().GetDocShell(), true );
- uno::Reference< text::XTextSectionsSupplier > xSectionSupplier(
+ uno::Reference< text::XTextSectionsSupplier > xSectionSupplier(
xModel, uno::UNO_QUERY);
- uno::Reference< container::XNameAccess > xSections =
+ uno::Reference< container::XNameAccess > xSections =
xSectionSupplier->getTextSections();
for(int i = 0; i < 7; ++i )
@@ -115,9 +115,9 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void
OUString sTmp = "IndexSection_" + OUString::number(i);
uno::Any aSection = xSections->getByName( sTmp );
aSection >>= m_vTypeData[i].m_pxIndexSections->xContainerSection;
- }
- uno::Reference< text::XDocumentIndexesSupplier > xIdxSupp(xModel, uno::UNO_QUERY);
- uno::Reference< container::XIndexAccess > xIdxs = xIdxSupp->getDocumentIndexes();
+ }
+ uno::Reference< text::XDocumentIndexesSupplier > xIdxSupp(xModel, uno::UNO_QUERY);
+ uno::Reference< container::XIndexAccess > xIdxs = xIdxSupp->getDocumentIndexes();
int n = xIdxs->getCount();
while(n)
{
@@ -154,13 +154,13 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
"com.sun.star.text.Bibliography"
};
- OSL_ENSURE(m_vTypeData[nTOXIndex].m_pxIndexSections &&
+ OSL_ENSURE(m_vTypeData[nTOXIndex].m_pxIndexSections &&
m_vTypeData[nTOXIndex].m_pxIndexSections->xContainerSection.is(),
"Section not created");
- uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel();
- bool bInitialCreate = true;
- if(!m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex.is())
- {
+ uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel();
+ bool bInitialCreate = true;
+ if(!m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex.is())
+ {
bInitialCreate = true;
if(!m_vTypeData[nTOXIndex].m_pxIndexSections->xContainerSection.is())
throw uno::RuntimeException();
@@ -176,22 +176,22 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
uno::Reference< text::XTextContent > xContent(m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex, uno::UNO_QUERY);
uno::Reference< text::XTextRange > xRg(xCursor, uno::UNO_QUERY);
xCursor->getText()->insertTextContent(xRg, xContent, false);
- }
- for(sal_uInt16 i = 0 ; i <= TOX_AUTHORITIES; i++)
- {
+ }
+ for(sal_uInt16 i = 0 ; i <= TOX_AUTHORITIES; i++)
+ {
uno::Reference< beans::XPropertySet > xSectPr(m_vTypeData[i].m_pxIndexSections->xContainerSection, uno::UNO_QUERY);
if(xSectPr.is())
{
xSectPr->setPropertyValue(UNO_NAME_IS_VISIBLE, makeAny(i == nTOXIndex));
}
- }
- // set properties
- uno::Reference< beans::XPropertySet > xIdxProps(m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex, uno::UNO_QUERY);
- uno::Reference< beans::XPropertySetInfo > xInfo = xIdxProps->getPropertySetInfo();
- SwTOXDescription& rDesc = GetTOXDescription(m_eCurrentTOXType);
- SwTOIOptions nIdxOptions = rDesc.GetIndexOptions();
- if(bInitialCreate || !nPage || nPage == TOX_PAGE_SELECT)
- {
+ }
+ // set properties
+ uno::Reference< beans::XPropertySet > xIdxProps(m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex, uno::UNO_QUERY);
+ uno::Reference< beans::XPropertySetInfo > xInfo = xIdxProps->getPropertySetInfo();
+ SwTOXDescription& rDesc = GetTOXDescription(m_eCurrentTOXType);
+ SwTOIOptions nIdxOptions = rDesc.GetIndexOptions();
+ if(bInitialCreate || !nPage || nPage == TOX_PAGE_SELECT)
+ {
//title
if(rDesc.GetTitle())
lcl_SetProp(xInfo, xIdxProps, UNO_NAME_TITLE, *rDesc.GetTitle());
@@ -264,10 +264,10 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_STAR_CALC, bool(SwTOOElements::Calc &nOLEOptions ));
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_STAR_DRAW, bool(SwTOOElements::DrawImpress&nOLEOptions));
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_OTHER_EMBEDDED_OBJECTS, bool(SwTOOElements::Other & nOLEOptions));
- }
- const SwForm* pForm = GetForm(m_eCurrentTOXType);
- if(bInitialCreate || !nPage || nPage == TOX_PAGE_ENTRY)
- {
+ }
+ const SwForm* pForm = GetForm(m_eCurrentTOXType);
+ if(bInitialCreate || !nPage || nPage == TOX_PAGE_ENTRY)
+ {
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_IS_COMMA_SEPARATED, pForm->IsCommaSeparated());
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_ALPHABETICAL_SEPARATORS, bool(nIdxOptions&SwTOIOptions::AlphaDelimiter));
const bool bUseCurrent = nCurrentLevel < pForm->GetFormMax();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 27c210083eaf..a29266b9de16 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -868,13 +868,13 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
if(pItem)
{
aPos = GetEntryPosition( pEntry );
- Size aSize(pItem->GetSize( this, pEntry ));
+ Size aSize(pItem->GetSize( this, pEntry ));
aPos.setX( GetTabPos( pEntry, pTab ) );
if((aPos.X() + aSize.Width()) > GetSizePixel().Width())
aSize.setWidth( GetSizePixel().Width() - aPos.X() );
aPos = OutputToScreenPixel(aPos);
- tools::Rectangle aItemRect( aPos, aSize );
+ tools::Rectangle aItemRect( aPos, aSize );
OUString sMsg;
if(!GetParent(pEntry))
{
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index 1fd1b3253b90..0cae7ab84946 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -465,7 +465,7 @@ SwVbaDocument::getControlShape( const OUString& sName )
uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY );
if( xControlShape.is() )
{
- uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
if( sName == xNamed->getName() )
{
return aUnoObj;
@@ -527,7 +527,7 @@ SwVbaDocument::getFormControls()
{
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< form::XFormsSupplier > xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
- uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
// get the www-standard container ( maybe we should access the
// 'www-standard' by name rather than index, this seems an
// implementation detail
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
index a4748c8ce218..cac6821353e2 100644
--- a/sw/source/ui/vba/vbafont.cxx
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -144,7 +144,7 @@ SwVbaFont::setColorIndex( const uno::Any& _colorindex )
uno::Any SAL_CALL
SwVbaFont::getColorIndex()
{
- sal_Int32 nColor = 0;
+ sal_Int32 nColor = 0;
XLRGBToOORGB( getColor() ) >>= nColor;
sal_Int32 nElems = mxPalette->getCount();
diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx
index a85f0c767cff..d6b89abf4448 100644
--- a/sw/source/ui/vba/vbaglobals.cxx
+++ b/sw/source/ui/vba/vbaglobals.cxx
@@ -61,7 +61,7 @@ SwVbaGlobals::getApplication()
if ( !mxApplication.is() )
mxApplication.set( new SwVbaApplication( mxContext) );
- return mxApplication;
+ return mxApplication;
}
uno::Reference<word::XSystem > SAL_CALL