diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-10-12 13:26:46 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-12 13:34:47 +0200 |
commit | f7a24eff2d40ca30c6f299ab6534393c5c146b95 (patch) | |
tree | 41639f5f6d1f02968d888051e7aeaedbb397d272 /cui | |
parent | print something when compiling clang plugin too (diff) | |
download | core-f7a24eff2d40ca30c6f299ab6534393c5c146b95.tar.gz core-f7a24eff2d40ca30c6f299ab6534393c5c146b95.zip |
mark lcl_ functions static or rename them if they are not local at all
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html
Change-Id: I231f0b367bf0b513c6c1ce4c4cfdb7c3dc8660d5
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 14 | ||||
-rw-r--r-- | cui/source/options/optsave.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/border.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/swpossizetabpage.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/transfrm.cxx | 4 |
13 files changed, 33 insertions, 33 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 1a43828a353c..54f94cfdfc64 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1925,7 +1925,7 @@ struct LanguagePosition_Impl }; typedef std::vector<LanguagePosition_Impl> LanguagePositions_Impl; -void lcl_InsertBreakPosition_Impl( +static void lcl_InsertBreakPosition_Impl( LanguagePositions_Impl& rBreakPositions, sal_uInt16 nInsert, LanguageType eLanguage) { LanguagePositions_Impl::iterator aStart = rBreakPositions.begin(); diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 5484fd832fa4..6567e7bbffc5 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1359,7 +1359,7 @@ SfxTabPage* OfaLanguagesTabPage::Create( Window* pParent, const SfxItemSet& rAtt return new OfaLanguagesTabPage(pParent, rAttrSet); } -LanguageType lcl_LangStringToLangType(const OUString& rLang) +static LanguageType lcl_LangStringToLangType(const OUString& rLang) { Locale aLocale; sal_Int32 nSep = rLang.indexOf('-'); @@ -1375,7 +1375,7 @@ LanguageType lcl_LangStringToLangType(const OUString& rLang) return eLangType; } -void lcl_UpdateAndDelete(SfxVoidItem* pInvalidItems[], SfxBoolItem* pBoolItems[], sal_uInt16 nCount) +static void lcl_UpdateAndDelete(SfxVoidItem* pInvalidItems[], SfxBoolItem* pBoolItems[], sal_uInt16 nCount) { SfxViewFrame* pCurrentFrm = SfxViewFrame::Current(); SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index cae53775497a..dab862d7ac71 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -261,7 +261,7 @@ void DicUserData::SetChecked( sal_Bool bVal ) // class BrwString_Impl ------------------------------------------------- -void lcl_SetCheckButton( SvLBoxEntry* pEntry, sal_Bool bCheck ) +static void lcl_SetCheckButton( SvLBoxEntry* pEntry, sal_Bool bCheck ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON)); @@ -566,7 +566,7 @@ public: }; -sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) +static sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) { sal_Int32 nRes = -1; sal_Int32 nLen = rSeq.getLength(); @@ -644,7 +644,7 @@ ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( const OUString &rSvcImp //----------------------------------------------------------------------------- -void lcl_MergeLocales(Sequence< Locale >& aAllLocales, const Sequence< Locale >& rAdd) +static void lcl_MergeLocales(Sequence< Locale >& aAllLocales, const Sequence< Locale >& rAdd) { const Locale* pAdd = rAdd.getConstArray(); Sequence<Locale> aLocToAdd(rAdd.getLength()); @@ -672,7 +672,7 @@ void lcl_MergeLocales(Sequence< Locale >& aAllLocales, const Sequence< Locale >& pAllLocales2[nLength++] = pLocToAdd[i]; } -void lcl_MergeDisplayArray( +static void lcl_MergeDisplayArray( SvxLinguData_Impl &rData, const ServiceInfo_Impl &rToAdd ) { @@ -1195,14 +1195,14 @@ SfxTabPage* SvxLinguTabPage::Create( Window* pParent, //------------------------------------------------------------------------ -Any lcl_Bool2Any(sal_Bool bVal) +static Any lcl_Bool2Any(sal_Bool bVal) { Any aRet(&bVal, ::getBooleanCppuType()); return aRet; } -sal_Bool lcl_Bool2Any(Any& rVal) +static sal_Bool lcl_Bool2Any(Any& rVal) { return *(sal_Bool*)rVal.getValue(); } @@ -2120,7 +2120,7 @@ IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) return 0; } -OUString lcl_GetServiceName(sal_uInt8 nType) +static OUString lcl_GetServiceName(sal_uInt8 nType) { switch(nType) { diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index f8a5b0192db9..d818d9199aa0 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -542,7 +542,7 @@ IMPL_LINK( SfxSaveTabPage, AutoClickHdl_Impl, CheckBox *, pBox ) return 0; } -OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties) +static OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties) { OUString sRet; const PropertyValue* pProperties = rProperties.getConstArray(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 0403d1a31199..3f57e56300c9 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -2162,7 +2162,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( return aOutNodeList; } -sal_uInt16 lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTreeLB ) +static sal_uInt16 lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTreeLB ) { String sGroupName( rGroupName ); sal_uInt16 nRet = 0; @@ -2182,7 +2182,7 @@ sal_uInt16 lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& return USHRT_MAX; } -void lcl_insertLeaf( +static void lcl_insertLeaf( OfaTreeOptionsDialog* pDlg, OptionsNode* pNode, OptionsLeaf* pLeaf, const SvTreeListBox& rTreeLB ) { sal_uInt16 nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 646e48b8fdd0..1c6e725ea500 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -152,7 +152,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : SetCurPageId( RID_OFAPAGE_SMARTTAG_OPTIONS ); } -sal_Bool lcl_FindEntry( ListBox& rLB, const String& rEntry, +static sal_Bool lcl_FindEntry( ListBox& rLB, const String& rEntry, CollatorWrapper& rCmpClass ) { sal_uInt16 nCount = rLB.GetEntryCount(); @@ -1342,7 +1342,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) return 0; } -sal_Bool lcl_FindInArray(std::vector<rtl::OUString>& rStrings, const String& rString) +static sal_Bool lcl_FindInArray(std::vector<rtl::OUString>& rStrings, const String& rString) { for(std::vector<rtl::OUString>::iterator i = rStrings.begin(); i != rStrings.end(); ++i) { diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 930e380be207..76feb79d27dc 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -100,16 +100,16 @@ struct SvxBackgroundPage_Impl pLoadTimer(NULL), bIsImportDlgInExecute(sal_False) {} }; -inline sal_uInt8 lcl_PercentToTransparency(long nPercent) +static inline sal_uInt8 lcl_PercentToTransparency(long nPercent) { //0xff must not be returned! return sal_uInt8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); } -inline sal_uInt8 lcl_TransparencyToPercent(sal_uInt8 nTrans) +static inline sal_uInt8 lcl_TransparencyToPercent(sal_uInt8 nTrans) { return (nTrans * 100 + 127) / 254; } -void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) +static void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) { uno::Any aTransparency; aTransparency <<= (sal_Int8)nTransparency; diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 89bd14f69b3d..8a44475b5001 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -75,7 +75,7 @@ static sal_uInt16 pRanges[] = }; // ----------------------------------------------------------------------- -void lcl_SetDecimalDigitsTo1(MetricField& rField) +static void lcl_SetDecimalDigitsTo1(MetricField& rField) { sal_Int64 nMin = rField.Denormalize( rField.GetMin( FUNIT_TWIP ) ); rField.SetDecimalDigits(1); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 84de225d2471..2297dd8589f5 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -36,7 +36,7 @@ #define TWIP_TO_INCH 1440 -inline long lcl_GetValue( MetricField& rMetric, FieldUnit eUnit ) +static inline long lcl_GetValue( MetricField& rMetric, FieldUnit eUnit ) { return static_cast<long>(rMetric.Denormalize( rMetric.GetValue( eUnit ))); } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 808c6cb33687..b4ee86b26a48 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -101,14 +101,14 @@ static const sal_Char cSuffix[] = "Suffix"; static const sal_Char cBulletChar[] = "BulletChar"; static const sal_Char cBulletFontName[] = "BulletFontName"; -Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider() +static Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider() { Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); Reference<XDefaultNumberingProvider> xRet = text::DefaultNumberingProvider::create(xContext); return xRet; } -SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValue>& rLevelProps) +static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValue>& rLevelProps) { const PropertyValue* pValues = rLevelProps.getConstArray(); SvxNumSettings_Impl* pNew = new SvxNumSettings_Impl; @@ -154,7 +154,7 @@ static sal_Char const aNumChar[] = }; // Is one of the masked formats set? -sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) +static sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) { sal_Bool bRet = sal_False; sal_uInt16 nMask = 1; @@ -167,7 +167,7 @@ sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) return bRet; } -Font& lcl_GetDefaultBulletFont() +static Font& lcl_GetDefaultBulletFont() { static sal_Bool bInit = 0; static Font aDefBulletFont( rtl::OUString("StarSymbol"), @@ -2257,7 +2257,7 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) return 0; } -sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart, +static sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart, sal_uInt16 nYStart, sal_uInt16 nDivision) { const SvxBrushItem* pBrushItem = rFmt.GetBrush(); @@ -2279,7 +2279,7 @@ sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sa } -sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, +static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, const SvxNumberFormat& rFmt, sal_uInt16 nXStart, sal_uInt16 nYStart, const Size& rSize) { diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 7a8348f9a44a..91a376cf4e85 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -2291,7 +2291,7 @@ sal_Bool SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) return bRet; } -void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, TriStateBox& rBox) +static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, TriStateBox& rBox) { sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId); SfxItemState eState = rSet.GetItemState(_nWhich, sal_True); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index db448376951d..73c0e0fc58ff 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -354,7 +354,7 @@ static FrmMap aVAsCharHtmlMap[] = {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, VertOrientation::LINE_CENTER, LB_REL_ROW} }; -std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) +static std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) { if( pMap ) { @@ -407,7 +407,7 @@ std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) return 0; } -SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( +static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL) { //special handling of STR_FROMLEFT @@ -466,7 +466,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( } // #i22341# - helper method in order to determine all possible // listbox relations in a relation map for a given relation -sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) +static sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) { sal_uLong nLBRelations = 0L; @@ -483,7 +483,7 @@ sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) // #i22341# - helper method on order to determine all possible // listbox relations in a relation map for a given string ID -sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +static sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 93d83aee0aaa..752a5b0a57cb 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -80,7 +80,7 @@ static sal_uInt16 pSlantRanges[] = 0 }; -void lcl_ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit) +static void lcl_ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit) { const basegfx::B2DPoint aTopLeft( (double)MetricField::ConvertValue(basegfx::fround(rRange.getMinX()), nDigits, ePoolUnit, eDlgUnit), @@ -92,7 +92,7 @@ void lcl_ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, const rRange = basegfx::B2DRange(aTopLeft, aBottomRight); } -void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) +static void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) { const double fFactor(1.0 / double(aUIScale)); rRange = basegfx::B2DRange(rRange.getMinimum() * fFactor, rRange.getMaximum() * fFactor); |