diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-21 08:15:32 -0800 |
---|---|---|
committer | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-25 15:26:43 -0800 |
commit | 1abd8d9e00497940c45ed70154ecb10dd806fe7b (patch) | |
tree | 065100f9919bd6cd1974a4ad1e12ef6641a16485 /svx | |
parent | 96ee91aea6710dcc1797d677f8faef453ba919b2 (diff) |
Convert to range based for
(This was also used for testing loplugin:rangedforcopy)
Change-Id: I246994feb7bf66d337b76e3f02d7fea2cb13d42a
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index ce7d8777273b..ae696ae170d9 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2025,7 +2025,7 @@ struct SvxStyleToolBoxControl::Impl Reference<container::XNameAccess> xParaStyles; xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= xParaStyles; - static const sal_Char* aWriterStyles[] = + static const std::vector<OUString> aWriterStyles = { "Text body", "Quotations", @@ -2035,12 +2035,12 @@ struct SvxStyleToolBoxControl::Impl "Heading 2", "Heading 3" }; - for( sal_uInt32 nStyle = 0; nStyle < sizeof( aWriterStyles ) / sizeof( sal_Char*); ++nStyle ) + for( const OUString& aStyle: aWriterStyles ) { try { Reference< beans::XPropertySet > xStyle; - xParaStyles->getByName( OUString::createFromAscii( aWriterStyles[nStyle] )) >>= xStyle; + xParaStyles->getByName( aStyle ) >>= xStyle; OUString sName; xStyle->getPropertyValue("DisplayName") >>= sName; if( !sName.isEmpty() ) |