diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-10-11 17:52:52 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-12 13:12:04 +0200 |
commit | bd7e427ce5cef0c9c1a9ce8c02cac4ebf5217f2d (patch) | |
tree | 4883f6b3014d68dea54c31f475b355ec9a095ac4 /xmloff/source | |
parent | d1eee073ebcd2d4a99209bb12ab13a7cafbb5a89 (diff) |
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: I37ab7e25d1a9fcce2009b8e35535fc1d0b02013b
Diffstat (limited to 'xmloff/source')
34 files changed, 206 insertions, 207 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index ac778fa1fb91..e4b74439c282 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -147,7 +147,7 @@ SchXMLAxisContext::SchXMLAxisContext( SchXMLImportHelper& rImpHelper, SchXMLAxisContext::~SchXMLAxisContext() {} -Reference< chart::XAxis > lcl_getChartAxis( SchXMLAxis aCurrentAxis, const Reference< chart::XDiagram > xDiagram ) +static Reference< chart::XAxis > lcl_getChartAxis( SchXMLAxis aCurrentAxis, const Reference< chart::XDiagram > xDiagram ) { Reference< chart::XAxis > xAxis; Reference< chart::XAxisSupplier > xAxisSuppl( xDiagram, uno::UNO_QUERY ); diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 7e842d7f9fe9..ae1a3806e02a 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -592,7 +592,7 @@ bool lcl_SpecialHandlingForDonutChartNeeded( } // anonymous namespace -void lcl_ApplyDataFromRectangularRangeToDiagram( +static void lcl_ApplyDataFromRectangularRangeToDiagram( const uno::Reference< chart2::XChartDocument >& xNewDoc , const rtl::OUString& rRectangularRange , ::com::sun::star::chart::ChartDataRowSource eDataRowSource diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 4640b85eda55..68f2d04cda88 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1163,7 +1163,7 @@ void SchXMLExportHelper_Impl::exportChart( Reference< chart::XChartDocument > rC DBG_ASSERT( maAutoStyleNameQueue.empty(), "There are still remaining autostyle names in the queue" ); } -::rtl::OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping, bool bRemoveOneFromEachIndex /*should be true if having categories*/ ) +static ::rtl::OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping, bool bRemoveOneFromEachIndex /*should be true if having categories*/ ) { const sal_Int32* pArray = rSequenceMapping.getConstArray(); const sal_Int32 nSize = rSequenceMapping.getLength(); @@ -1622,7 +1622,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& delete pElChart; } -void lcl_exportComplexLabel( const Sequence< uno::Any >& rComplexLabel, SvXMLExport& rExport ) +static void lcl_exportComplexLabel( const Sequence< uno::Any >& rComplexLabel, SvXMLExport& rExport ) { sal_Int32 nLength = rComplexLabel.getLength(); if( nLength<=1 ) diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 2d9ff9a117d3..51f8cd2c872c 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -964,7 +964,7 @@ void SchXMLStockContext::StartElement( const uno::Reference< xml::sax::XAttribut // ======================================== -void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocument > &xDoc, +static void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocument > &xDoc, const uno::Reference< beans::XPropertySet > &xBarProp, const rtl::OUString &aRange, bool bPositiveValue, bool bYError ) diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index c4edfca6f461..21c1aeb8b8e0 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -114,7 +114,7 @@ using ::rtl::OUString; return aRet; } -uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( +static uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( const uno::Reference< chart2::XDiagram >& xDiagram , const Reference< chart2::XDataSeries >& xSeries ) { diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index bf7e95ab120b..c9c58579535a 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -763,7 +763,7 @@ void SchXMLTableCellContext::EndElement() // ======================================== -void lcl_ApplyCellToComplexLabel( const SchXMLCell& rCell, Sequence< uno::Any >& rComplexLabel ) +static void lcl_ApplyCellToComplexLabel( const SchXMLCell& rCell, Sequence< uno::Any >& rComplexLabel ) { if( rCell.eType == SCH_CELL_TYPE_STRING ) { diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index a8ce3bea1ea5..7325137330df 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -67,8 +67,8 @@ using rtl::OUString; // helper functions; implemented below -Reference<XNode> lcl_createDomInstance(); -Reference<XNode> lcl_createElement( SvXMLImport& rImport, +static Reference<XNode> lcl_createDomInstance(); +static Reference<XNode> lcl_createElement( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString rLocalName, Reference<XNode> xParent); @@ -193,7 +193,7 @@ void DomBuilderContext::Characters( const OUString& rCharacters ) // helper function implementations // -Reference<XNode> lcl_createDomInstance() +static Reference<XNode> lcl_createDomInstance() { Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); DBG_ASSERT( xContext.is(), "can't get service factory" ); @@ -203,7 +203,7 @@ Reference<XNode> lcl_createDomInstance() return Reference<XNode>( xBuilder->newDocument(), UNO_QUERY_THROW ); } -Reference<XNode> lcl_createElement( SvXMLImport& rImport, +static Reference<XNode> lcl_createElement( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString rLocalName, Reference<XNode> xParent) diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 45e67fb41ad1..7aa93280c769 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -264,7 +264,7 @@ sal_Bool SvXMLUnitConverter::convertEnum( return (eTok != XML_TOKEN_INVALID); } -int lcl_gethex( int nChar ) +static int lcl_gethex( int nChar ) { if( nChar >= '0' && nChar <= '9' ) return nChar - '0'; @@ -498,7 +498,7 @@ sal_Bool SvXMLTokenEnumerator::getNextToken( OUString& rToken ) return sal_True; } -bool lcl_getPositions(const OUString& _sValue,OUString& _rContentX,OUString& _rContentY,OUString& _rContentZ) +static bool lcl_getPositions(const OUString& _sValue,OUString& _rContentX,OUString& _rContentY,OUString& _rContentZ) { if(_sValue.isEmpty() || _sValue[0] != '(') return false; diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index 8d8597275606..2ce82879e641 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -55,7 +55,7 @@ using namespace ::xmloff::token; //------------------------------------------------------------------------- -void lcl_AddTwoDigits( rtl::OUStringBuffer& rStr, sal_Int32 nVal ) +static void lcl_AddTwoDigits( rtl::OUStringBuffer& rStr, sal_Int32 nVal ) { if ( nVal < 10 ) rStr.append( sal_Unicode('0') ); diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index eedb4a4a9396..3b4db9324b0d 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -44,7 +44,7 @@ using namespace ::xmloff::token; //______________________________________________________________________________ -inline sal_Bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 ) +static inline sal_Bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 ) { return (rLine1.InnerLineWidth == rLine2.InnerLineWidth) && (rLine1.OuterLineWidth == rLine2.OuterLineWidth) && @@ -59,20 +59,20 @@ inline sal_Bool operator==( const table::BorderLine2& rLine1, const table::Borde ( rLine1.LineStyle == rLine2.LineStyle ); } -inline void lcl_RemoveState( XMLPropertyState* pState ) +static inline void lcl_RemoveState( XMLPropertyState* pState ) { pState->mnIndex = -1; pState->maValue.clear(); } -void lcl_RemoveStateIfZero16( XMLPropertyState* pState ) +static void lcl_RemoveStateIfZero16( XMLPropertyState* pState ) { sal_Int16 nValue = sal_Int16(); if( (pState->maValue >>= nValue) && !nValue ) lcl_RemoveState( pState ); } -void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const rtl::OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps) +static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const rtl::OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps) { if(::cppu::any2bool(xProps->getPropertyValue(rProperty))) rPropState.push_back(XMLPropertyState (nIndex, cppu::bool2any(sal_True))); diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index ae1e77b356cf..4d741201f59b 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -63,7 +63,7 @@ enum SvXMLTokenMapAttrs XML_TOK_BGIMG_OPACITY, XML_TOK_NGIMG_END=XML_TOK_UNKNOWN }; -const SvXMLTokenMapEntry* lcl_getBGImgAttributesAttrTokenMap() +static const SvXMLTokenMapEntry* lcl_getBGImgAttributesAttrTokenMap() { static SvXMLTokenMapEntry aBGImgAttributesAttrTokenMap[] = { @@ -96,7 +96,7 @@ static SvXMLEnumMapEntry psXML_BrushVertPos[] = { XML_TOKEN_INVALID, 0 } }; -void lcl_xmlbic_MergeHoriPos( GraphicLocation& ePos, +static void lcl_xmlbic_MergeHoriPos( GraphicLocation& ePos, GraphicLocation eHori ) { DBG_ASSERT( GraphicLocation_LEFT_MIDDLE==eHori || @@ -136,7 +136,7 @@ void lcl_xmlbic_MergeHoriPos( GraphicLocation& ePos, } } -void lcl_xmlbic_MergeVertPos( GraphicLocation& ePos, +static void lcl_xmlbic_MergeVertPos( GraphicLocation& ePos, GraphicLocation eVert ) { DBG_ASSERT( GraphicLocation_MIDDLE_TOP==eVert || diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 290dfe6a3640..a5052d021816 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -67,7 +67,7 @@ enum XMLFontStyleAttrTokens XML_TOK_FONT_STYLE_ATTR_END=XML_TOK_UNKNOWN }; -const SvXMLTokenMapEntry* lcl_getFontStyleAttrTokenMap() +static const SvXMLTokenMapEntry* lcl_getFontStyleAttrTokenMap() { static SvXMLTokenMapEntry aFontStyleAttrTokenMap[] = { diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx index 385f82447951..2e0af30537b9 100644 --- a/xmloff/source/style/bordrhdl.cxx +++ b/xmloff/source/style/bordrhdl.cxx @@ -101,7 +101,7 @@ static sal_uInt16 const aBorderWidths[] = DEF_LINE_WIDTH_2 }; -void lcl_frmitems_setXMLBorderStyle( table::BorderLine2 & rBorderLine, sal_uInt16 nStyle ) +static void lcl_frmitems_setXMLBorderStyle( table::BorderLine2 & rBorderLine, sal_uInt16 nStyle ) { sal_Int16 eStyle = -1; // None if ( nStyle != API_LINE_NONE ) diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index f4d1705fa357..3bac8798b09f 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -43,7 +43,7 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::xmloff::token; -const SvXMLEnumMapEntry* lcl_getFontFamilyGenericMapping() +static const SvXMLEnumMapEntry* lcl_getFontFamilyGenericMapping() { static SvXMLEnumMapEntry const aFontFamilyGenericMapping[] = { diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index f4892fffc5c9..cce3e657de5d 100644 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -41,7 +41,7 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star::uno; using namespace ::xmloff::token; -void lcl_xmloff_setAny( Any& rValue, sal_Int32 nValue, sal_Int8 nBytes ) +static void lcl_xmloff_setAny( Any& rValue, sal_Int32 nValue, sal_Int8 nBytes ) { switch( nBytes ) { @@ -65,7 +65,7 @@ void lcl_xmloff_setAny( Any& rValue, sal_Int32 nValue, sal_Int8 nBytes ) } } -sal_Bool lcl_xmloff_getAny( const Any& rValue, sal_Int32& nValue, +static sal_Bool lcl_xmloff_getAny( const Any& rValue, sal_Int32& nValue, sal_Int8 nBytes ) { sal_Bool bRet = sal_False; diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 63f8f8ecad5a..aef97f500b51 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -309,7 +309,7 @@ SvXMLNumFmtExport::~SvXMLNumFmtExport() // helper methods // -OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool bDefPart, const rtl::OUString& rPrefix ) +static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool bDefPart, const rtl::OUString& rPrefix ) { OUStringBuffer aFmtName( 10L ); aFmtName.append( rPrefix ); @@ -836,7 +836,7 @@ sal_Bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, //------------------------------------------------------------------------- -OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLang ) +static OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLang ) { // get name of first non-gregorian calendar for the language @@ -863,7 +863,7 @@ OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLa //------------------------------------------------------------------------- -sal_Bool lcl_IsInEmbedded( const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries, sal_uInt16 nPos ) +static sal_Bool lcl_IsInEmbedded( const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries, sal_uInt16 nPos ) { sal_uInt16 nCount = rEmbeddedEntries.size(); for (sal_uInt16 i=0; i<nCount; i++) @@ -873,7 +873,7 @@ sal_Bool lcl_IsInEmbedded( const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries, sa return sal_False; // not found } -sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool bSystemDate, NfIndexTableOffset eBuiltIn ) +static sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool bSystemDate, NfIndexTableOffset eBuiltIn ) { // make an extra loop to collect date elements, to check if it is a default format // before adding the automatic-order attribute @@ -1769,7 +1769,7 @@ void SvXMLNumFmtExport::SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed) -const SvNumberformat* lcl_GetFormat( SvNumberFormatter* pFormatter, +static const SvNumberformat* lcl_GetFormat( SvNumberFormatter* pFormatter, sal_uInt32 nKey ) { return ( pFormatter != NULL ) ? pFormatter->GetEntry( nKey ) : NULL; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index c0035bbd493a..fb126139fa8e 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -770,7 +770,7 @@ void SvXMLNumFmtEmbeddedTextContext::EndElement() //------------------------------------------------------------------------- -sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rParent ) +static sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rParent ) { sal_uInt16 nFormatType = rParent.GetType(); @@ -816,7 +816,7 @@ sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rParent return sal_False; } -void lcl_EnquoteIfNecessary( rtl::OUStringBuffer& rContent, const SvXMLNumFormatContext& rParent ) +static void lcl_EnquoteIfNecessary( rtl::OUStringBuffer& rContent, const SvXMLNumFormatContext& rParent ) { sal_Bool bQuote = sal_True; sal_Int32 nLength = rContent.getLength(); @@ -1978,7 +1978,7 @@ void SvXMLNumFormatContext::AddNfKeyword( sal_uInt16 nIndex ) } } -sal_Bool lcl_IsAtEnd( rtl::OUStringBuffer& rBuffer, const String& rToken ) +static sal_Bool lcl_IsAtEnd( rtl::OUStringBuffer& rBuffer, const String& rToken ) { sal_Int32 nBufLen = rBuffer.getLength(); xub_StrLen nTokLen = rToken.Len(); diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 023059033827..d4af1ab982f9 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -169,7 +169,7 @@ enum SvxXMLTextListLevelStyleAttrTokens XML_TOK_TEXT_LEVEL_ATTR_END=XML_TOK_UNKNOWN }; -const SvXMLTokenMapEntry* lcl_getLevelAttrTokenMap() +static const SvXMLTokenMapEntry* lcl_getLevelAttrTokenMap() { static SvXMLTokenMapEntry aLevelAttrTokenMap[] = { @@ -680,7 +680,7 @@ enum SvxXMLStyleAttributesAttrTokens XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE, XML_TOK_STYLE_ATTRIBUTES_ATTR_END=XML_TOK_UNKNOWN }; -const SvXMLTokenMapEntry* lcl_getStyleAttributesAttrTokenMap() +static const SvXMLTokenMapEntry* lcl_getStyleAttributesAttrTokenMap() { static SvXMLTokenMapEntry aStyleAttributesAttrTokenMap[] = { @@ -1004,7 +1004,7 @@ enum SvxXMLStyleAttributesLabelAlignmentAttrTokens XML_TOK_STYLE_ATTRIBUTES_LABEL_ALIGNMENT_ATTR_END=XML_TOK_UNKNOWN }; -const SvXMLTokenMapEntry* lcl_getStyleAlignmentAttributesAttrTokenMap() +static const SvXMLTokenMapEntry* lcl_getStyleAlignmentAttributesAttrTokenMap() { static SvXMLTokenMapEntry aStyleAlignmentAttributesAttrTokenMap[] = { diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx index 3c24b4e47e8e..1365237aab7b 100644 --- a/xmloff/source/text/XMLIndexMarkExport.cxx +++ b/xmloff/source/text/XMLIndexMarkExport.cxx @@ -190,7 +190,7 @@ void XMLIndexMarkExport::ExportTOCMarkAttributes( sBuf.makeStringAndClear()); } -void lcl_ExportPropertyString( SvXMLExport& rExport, +static void lcl_ExportPropertyString( SvXMLExport& rExport, const Reference<XPropertySet> & rPropSet, const OUString & sProperty, XMLTokenEnum eToken, @@ -208,7 +208,7 @@ void lcl_ExportPropertyString( SvXMLExport& rExport, } } -void lcl_ExportPropertyBool( SvXMLExport& rExport, +static void lcl_ExportPropertyBool( SvXMLExport& rExport, const Reference<XPropertySet> & rPropSet, const OUString & sProperty, XMLTokenEnum eToken, diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index 67341bd0fc7b..06c9ed2a28ce 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -301,7 +301,7 @@ void XMLTextExportPropertySetMapper::ContextFontHeightFilter( } // helper method; implementation below -bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&); +static bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&); static void lcl_checkMultiProperty(XMLPropertyState *const pState, @@ -970,7 +970,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( } -bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName) +static bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName) { Reference< XChapterNumberingSupplier > xCNSupplier(rExport.GetModel(), UNO_QUERY); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index bf55333e2c3d..6c0409729ad2 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -3996,7 +3996,7 @@ XMLDropDownFieldImportContext::XMLDropDownFieldImportContext( bValid = sal_True; } -bool lcl_ProcessLabel( const SvXMLImport& rImport, +static bool lcl_ProcessLabel( const SvXMLImport& rImport, const Reference<XAttributeList>& xAttrList, OUString& rLabel, bool& rIsSelected ) diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx index 2297b5ab0055..34af1d0cf26d 100644 --- a/xmloff/source/text/txtftne.cxx +++ b/xmloff/source/text/txtftne.cxx @@ -234,7 +234,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfiguration() } -void lcl_exportString( +static void lcl_exportString( SvXMLExport& rExport, const Reference<XPropertySet> & rPropSet, const OUString& sProperty, diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 9b79c81c046f..0d4ca6ef2cc1 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1312,7 +1312,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, /* Apply special case, that found list style equals the chapter numbering, also to the found list styles of the parent styles. (#i73973#) */ -sal_Bool lcl_HasListStyle( OUString sStyleName, +static sal_Bool lcl_HasListStyle( OUString sStyleName, const Reference < XNameContainer >& xParaStyles, SvXMLImport& rImport, const OUString& sNumberingStyleName, diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 83ba6b3d3209..14d2cca3e3ff 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -600,7 +600,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, } } -bool lcl_validPropState( const XMLPropertyState& rState ) +static bool lcl_validPropState( const XMLPropertyState& rState ) { return rState.mnIndex != -1; } @@ -2576,7 +2576,7 @@ void XMLTextParagraphExport::exportTextMark( // else: no styles. (see above) } -sal_Bool lcl_txtpara_isBoundAsChar( +static sal_Bool lcl_txtpara_isBoundAsChar( const Reference < XPropertySet > & rPropSet, const Reference < XPropertySetInfo > & rPropSetInfo ) { diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index 635d5e23742b..32bb19b27670 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -843,7 +843,7 @@ XMLPropertyMapEntry aXMLTableRowDefaultsMap[] = M_END() }; -XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType ) +static XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType ) { XMLPropertyMapEntry *pMap = 0; switch( nType ) diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index b8c6027d2a13..6c8746f4ed26 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx @@ -125,7 +125,7 @@ void SchemaRestrictionContext::CreateDataType() mxDataType = Reference<XPropertySet>( mxRepository->cloneDataType( - lcl_getBasicTypeName( mxRepository, + xforms_getBasicTypeName( mxRepository, GetImport().GetNamespaceMap(), msBaseName ), msTypeName ), @@ -150,26 +150,26 @@ void SchemaRestrictionContext::HandleAttribute( typedef Any (*convert_t)( const OUString& ); -Any lcl_string( const OUString& rValue ) +Any xforms_string( const OUString& rValue ) { return makeAny( rValue ); } -Any lcl_int32( const OUString& rValue ) +Any xforms_int32( const OUString& rValue ) { sal_Int32 nValue; bool bSuccess = ::sax::Converter::convertNumber( nValue, rValue ); return bSuccess ? makeAny( nValue ) : Any(); } -Any lcl_int16( const OUString& rValue ) +Any xforms_int16( const OUString& rValue ) { sal_Int32 nValue; bool bSuccess = ::sax::Converter::convertNumber( nValue, rValue ); return bSuccess ? makeAny( static_cast<sal_Int16>( nValue ) ) : Any(); } -Any lcl_whitespace( const OUString& rValue ) +Any xforms_whitespace( const OUString& rValue ) { Any aValue; if( IsXMLToken( rValue, XML_PRESERVE ) ) @@ -181,14 +181,14 @@ Any lcl_whitespace( const OUString& rValue ) return aValue; } -Any lcl_double( const OUString& rValue ) +Any xforms_double( const OUString& rValue ) { double fValue; bool bSuccess = ::sax::Converter::convertDouble( fValue, rValue ); return bSuccess ? makeAny( fValue ) : Any(); } -Any lcl_date( const OUString& rValue ) +Any xforms_date( const OUString& rValue ) { Any aAny; @@ -209,14 +209,14 @@ Any lcl_date( const OUString& rValue ) return aAny; } -Any lcl_dateTime( const OUString& rValue ) +Any xforms_dateTime( const OUString& rValue ) { DateTime aDateTime; bool const bSuccess = ::sax::Converter::convertDateTime(aDateTime, rValue); return bSuccess ? makeAny( aDateTime ) : Any(); } -Any lcl_time( const OUString& rValue ) +Any xforms_time( const OUString& rValue ) { Any aAny; Duration aDuration; @@ -255,31 +255,31 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( { case XML_LENGTH: sPropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("Length")); - pConvert = &lcl_int32; + pConvert = &xforms_int32; break; case XML_MINLENGTH: sPropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("MinLength")); - pConvert = &lcl_int32; + pConvert = &xforms_int32; break; case XML_MAXLENGTH: sPropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("MaxLength")); - pConvert = &lcl_int32; + pConvert = &xforms_int32; break; case XML_TOTALDIGITS: sPropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("TotalDigits")); - pConvert = &lcl_int32; + pConvert = &xforms_int32; break; case XML_FRACTIONDIGITS: sPropertyName =OUString(RTL_CONSTASCII_USTRINGPARAM("FractionDigits")); - pConvert = &lcl_int32; + pConvert = &xforms_int32; break; case XML_PATTERN: sPropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("Pattern")); - pConvert = &lcl_string; + pConvert = &xforms_string; break; case XML_WHITESPACE: sPropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("WhiteSpace")); - pConvert = &lcl_whitespace; + pConvert = &xforms_whitespace; break; case XML_MININCLUSIVE: case XML_MINEXCLUSIVE: @@ -309,7 +309,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( } // second, type-dependent suffix + converter - switch( lcl_getTypeClass( mxRepository, + switch( xforms_getTypeClass( mxRepository, GetImport().GetNamespaceMap(), msBaseName ) ) { @@ -317,25 +317,25 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( case com::sun::star::xsd::DataTypeClass::DOUBLE: case com::sun::star::xsd::DataTypeClass::FLOAT: sPropertyName += OUString(RTL_CONSTASCII_USTRINGPARAM("Double")); - pConvert = &lcl_double; + pConvert = &xforms_double; break; case com::sun::star::xsd::DataTypeClass::DATETIME: sPropertyName += OUString(RTL_CONSTASCII_USTRINGPARAM("DateTime")); - pConvert = &lcl_dateTime; + pConvert = &xforms_dateTime; break; case com::sun::star::xsd::DataTypeClass::DATE: sPropertyName += OUString(RTL_CONSTASCII_USTRINGPARAM("Date")); - pConvert = &lcl_date; + pConvert = &xforms_date; break; case com::sun::star::xsd::DataTypeClass::TIME: sPropertyName += OUString(RTL_CONSTASCII_USTRINGPARAM("Time")); - pConvert = &lcl_time; + pConvert = &xforms_time; break; case com::sun::star::xsd::DataTypeClass::gYear: case com::sun::star::xsd::DataTypeClass::gDay: case com::sun::star::xsd::DataTypeClass::gMonth: sPropertyName += OUString(RTL_CONSTASCII_USTRINGPARAM("Int")); - pConvert = &lcl_int16; + pConvert = &xforms_int16; break; case com::sun::star::xsd::DataTypeClass::STRING: diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index c88b700aade8..24f3fe2fd7f8 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.cxx @@ -116,7 +116,7 @@ SvXMLImportContext* TokenContext::CreateChildContext( return pContext; } -bool lcl_IsWhiteSpace( sal_Unicode c ) +static bool lcl_IsWhiteSpace( sal_Unicode c ) { return c == sal_Unicode( ' ' ) || c == sal_Unicode( 0x09 ) diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index 1102cc44ec78..3f5f795b0819 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.cxx @@ -71,7 +71,7 @@ static struct SvXMLTokenMapEntry aAttributeMap[] = }; // helper function; see below -void lcl_fillNamespaceContainer( const SvXMLNamespaceMap&, +static void lcl_fillNamespaceContainer( const SvXMLNamespaceMap&, Reference<XNameContainer>& ); XFormsBindContext::XFormsBindContext( @@ -99,29 +99,29 @@ void XFormsBindContext::HandleAttribute( sal_uInt16 nToken, switch( nToken ) { case XML_NODESET: - lcl_setValue( mxBinding, OUSTRING("BindingExpression"), rValue ); + xforms_setValue( mxBinding, OUSTRING("BindingExpression"), rValue ); break; case XML_ID: - lcl_setValue( mxBinding, OUSTRING("BindingID"), rValue ); + xforms_setValue( mxBinding, OUSTRING("BindingID"), rValue ); break; case XML_READONLY: - lcl_setValue( mxBinding, OUSTRING("ReadonlyExpression"), rValue ); + xforms_setValue( mxBinding, OUSTRING("ReadonlyExpression"), rValue ); break; case XML_RELEVANT: - lcl_setValue( mxBinding, OUSTRING("RelevantExpression"), rValue ); + xforms_setValue( mxBinding, OUSTRING("RelevantExpression"), rValue ); break; case XML_REQUIRED: - lcl_setValue( mxBinding, OUSTRING("RequiredExpression"), rValue ); + xforms_setValue( mxBinding, OUSTRING("RequiredExpression"), rValue ); break; case XML_CONSTRAINT: - lcl_setValue( mxBinding, OUSTRING("ConstraintExpression"), rValue ); + xforms_setValue( mxBinding, OUSTRING("ConstraintExpression"), rValue ); break; case XML_CALCULATE: - lcl_setValue( mxBinding, OUSTRING("CalculateExpression"), rValue ); + xforms_setValue( mxBinding, OUSTRING("CalculateExpression"), rValue ); break; case XML_TYPE: - lcl_setValue( mxBinding, OUSTRING("Type"), - makeAny( lcl_getTypeName( mxModel->getDataTypeRepository(), + xforms_setValue( mxBinding, OUSTRING("Type"), + makeAny( xforms_getTypeName( mxModel->getDataTypeRepository(), GetImport().GetNamespaceMap(), rValue ) ) ); break; @@ -159,7 +159,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild( } -void lcl_fillNamespaceContainer( +static void lcl_fillNamespaceContainer( const SvXMLNamespaceMap& aMap, Reference<XNameContainer>& xContainer ) { diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx index e526dc57c03f..8ec7753d7947 100644 --- a/xmloff/source/xforms/XFormsModelContext.cxx +++ b/xmloff/source/xforms/XFormsModelContext.cxx @@ -78,7 +78,7 @@ XFormsModelContext::XFormsModelContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName ) : TokenContext( rImport, nPrefix, rLocalName, aAttributes, aChildren ), - mxModel( lcl_createXFormsModel() ) + mxModel( xforms_createXFormsModel() ) { } @@ -156,7 +156,7 @@ void XFormsModelContext::EndElement() xUpdate->update(); GetImport().initXForms(); - lcl_addXFormsModel( GetImport().GetModel(), getModel() ); + xforms_addXFormsModel( GetImport().GetModel(), getModel() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index 2ee8c6fd0cf5..f4f16d770319 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx @@ -115,50 +115,50 @@ void XFormsSubmissionContext::HandleAttribute( sal_uInt16 nToken, switch( nToken ) { case XML_ID: - lcl_setValue( mxSubmission, OUSTRING("ID"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("ID"), rValue ); break; case XML_BIND: - lcl_setValue( mxSubmission, OUSTRING("Bind"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Bind"), rValue ); break; case XML_REF: - lcl_setValue( mxSubmission, OUSTRING("Ref"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Ref"), rValue ); break; case XML_ACTION: - lcl_setValue( mxSubmission, OUSTRING("Action"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Action"), rValue ); break; case XML_METHOD: - lcl_setValue( mxSubmission, OUSTRING("Method"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Method"), rValue ); break; case XML_VERSION: - lcl_setValue( mxSubmission, OUSTRING("Version"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Version"), rValue ); break; case XML_INDENT: - lcl_setValue( mxSubmission, OUSTRING("Indent"), toBool( rValue ) ); + xforms_setValue( mxSubmission, OUSTRING("Indent"), toBool( rValue ) ); break; case XML_MEDIATYPE: - lcl_setValue( mxSubmission, OUSTRING("MediaType"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("MediaType"), rValue ); break; case XML_ENCODING: - lcl_setValue( mxSubmission, OUSTRING("Encoding"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Encoding"), rValue ); break; case XML_OMIT_XML_DECLARATION: - lcl_setValue( mxSubmission, OUSTRING("OmitXmlDeclaration"), + xforms_setValue( mxSubmission, OUSTRING("OmitXmlDeclaration"), toBool( rValue ) ); break; case XML_STANDALONE: - lcl_setValue( mxSubmission, OUSTRING("Standalone"), toBool( rValue ) ); + xforms_setValue( mxSubmission, OUSTRING("Standalone"), toBool( rValue ) ); break; case XML_CDATA_SECTION_ELEMENTS: - lcl_setValue( mxSubmission, OUSTRING("CDataSectionElement"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("CDataSectionElement"), rValue ); break; case XML_REPLACE: - lcl_setValue( mxSubmission, OUSTRING("Replace"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Replace"), rValue ); break; case XML_SEPARATOR: - lcl_setValue( mxSubmission, OUSTRING("Separator"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("Separator"), rValue ); break; case XML_INCLUDENAMESPACEPREFIXES: - lcl_setValue( mxSubmission, OUSTRING("IncludeNamespacePrefixes"), rValue ); + xforms_setValue( mxSubmission, OUSTRING("IncludeNamespacePrefixes"), rValue ); break; default: OSL_FAIL( "unknown attribute" ); diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index f134b074c096..0e4f76eb5630 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -66,7 +66,7 @@ using com::sun::star::uno::Exception; using namespace com::sun::star; using namespace xmloff::token; -Reference<XPropertySet> lcl_createPropertySet( const OUString& rServiceName ) +static Reference<XPropertySet> lcl_createPropertySet( const OUString& rServiceName ) { Reference<XMultiServiceFactory> xFactory = getProcessServiceFactory(); DBG_ASSERT( xFactory.is(), "can't get service factory" ); @@ -78,12 +78,12 @@ Reference<XPropertySet> lcl_createPropertySet( const OUString& rServiceName ) return xModel; } -Reference<XPropertySet> lcl_createXFormsModel() +Reference<XPropertySet> xforms_createXFormsModel() { return lcl_createPropertySet( OUSTRING( "com.sun.star.xforms.Model" ) ); } -void lcl_addXFormsModel( +void xforms_addXFormsModel( const Reference<frame::XModel>& xDocument, const Reference<XPropertySet>& xModel ) { @@ -113,7 +113,7 @@ void lcl_addXFormsModel( (void)bSuccess; } -Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( +static Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( Reference<frame::XModel>& xDocument, const rtl::OUString& rBindingID, bool bBinding ) @@ -168,21 +168,21 @@ Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( return xRet; } -Reference<XPropertySet> lcl_findXFormsBinding( +Reference<XPropertySet> xforms_findXFormsBinding( Reference<frame::XModel>& xDocument, const rtl::OUString& rBindingID ) { return lcl_findXFormsBindingOrSubmission( xDocument, rBindingID, true ); } -Reference<XPropertySet> lcl_findXFormsSubmission( +Reference<XPropertySet> xforms_findXFormsSubmission( Reference<frame::XModel>& xDocument, const rtl::OUString& rBindingID ) { return lcl_findXFormsBindingOrSubmission( xDocument, rBindingID, false ); } -void lcl_setValue( Reference<XPropertySet>& xPropertySet, +void xforms_setValue( Reference<XPropertySet>& xPropertySet, const OUString& rName, const Any rAny ) { @@ -207,7 +207,7 @@ static SvXMLTokenMapEntry aTypes[] = XML_TOKEN_MAP_END }; -sal_uInt16 lcl_getTypeClass( +sal_uInt16 xforms_getTypeClass( const Reference<XDataTypeRepository>& #ifdef DBG_UTIL xRepository @@ -282,7 +282,7 @@ sal_uInt16 lcl_getTypeClass( } -rtl::OUString lcl_getTypeName( +rtl::OUString xforms_getTypeName( const Reference<XDataTypeRepository>& xRepository, const SvXMLNamespaceMap& rNamespaceMap, const OUString& rXMLName ) @@ -293,10 +293,10 @@ rtl::OUString lcl_getTypeName( sal_uInt16 mnToken = aMap.Get( nPrefix, sLocalName ); return ( mnToken == XML_TOK_UNKNOWN ) ? rXMLName - : lcl_getBasicTypeName( xRepository, rNamespaceMap, rXMLName ); + : xforms_getBasicTypeName( xRepository, rNamespaceMap, rXMLName ); } -rtl::OUString lcl_getBasicTypeName( +rtl::OUString xforms_getBasicTypeName( const Reference<XDataTypeRepository>& xRepository, const SvXMLNamespaceMap& rNamespaceMap, const OUString& rXMLName ) @@ -306,7 +306,7 @@ rtl::OUString lcl_getBasicTypeName( { sTypeName = xRepository->getBasicDataType( - lcl_getTypeClass( xRepository, rNamespaceMap, rXMLName ) ) + xforms_getTypeClass( xRepository, rNamespaceMap, rXMLName ) ) ->getName(); } catch( const Exception& ) diff --git a/xmloff/source/xforms/xformsapi.hxx b/xmloff/source/xforms/xformsapi.hxx index bfe2fd51a7a0..2df567c95463 100644 --- a/xmloff/source/xforms/xformsapi.hxx +++ b/xmloff/source/xforms/xformsapi.hxx @@ -47,41 +47,41 @@ class SvXMLNamespaceMap; #define OUSTRING(msg) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(msg)) -com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> lcl_createXFormsModel(); +com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xforms_createXFormsModel(); -void lcl_addXFormsModel( +void xforms_addXFormsModel( const com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xDocument, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xModel ); -com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> lcl_findXFormsBinding( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const rtl::OUString& ); +com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xforms_findXFormsBinding( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const rtl::OUString& ); -com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> lcl_findXFormsSubmission( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const rtl::OUString& ); +com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xforms_findXFormsSubmission( com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, const rtl::OUString& ); -void lcl_setValue( +void xforms_setValue( com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet, const rtl::OUString& rName, const com::sun::star::uno::Any rAny ); template<typename T> -void lcl_setValue( +void xforms_setValue( com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet, const rtl::OUString& rName, T& aValue ) { - lcl_setValue( xPropSet, rName, com::sun::star::uno::makeAny( aValue ) ); + xforms_setValue( xPropSet, rName, com::sun::star::uno::makeAny( aValue ) ); } -sal_uInt16 lcl_getTypeClass( +sal_uInt16 xforms_getTypeClass( const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository, const SvXMLNamespaceMap& rNamespaceMap, const rtl::OUString& rXMLName ); -rtl::OUString lcl_getTypeName( +rtl::OUString xforms_getTypeName( const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository, const SvXMLNamespaceMap& rNamespaceMap, const rtl::OUString& rXMLName ); -rtl::OUString lcl_getBasicTypeName( +rtl::OUString xforms_getBasicTypeName( const com::sun::star::uno::Reference<com::sun::star::xforms::XDataTypeRepository>& xRepository, const SvXMLNamespaceMap& rNamespaceMap, const rtl::OUString& rXMLName ); diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 7016f6255ebe..53239c884528 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -132,33 +132,32 @@ typedef struct sal_uInt16 nToken; convert_t aConverter; } ExportTable; -void lcl_export( const Reference<XPropertySet>& rPropertySet, +static void lcl_export( const Reference<XPropertySet>& rPropertySet, SvXMLExport& rExport, const ExportTable* pTable ); #define TABLE_ENTRY(NAME,NAMESPACE,TOKEN,CONVERTER) { NAME,sizeof(NAME)-1,XML_NAMESPACE_##NAMESPACE,xmloff::token::XML_##TOKEN, CONVERTER } #define TABLE_END { NULL, 0, 0, 0, NULL } - // any conversion functions -OUString lcl_string( const Any& ); -OUString lcl_bool( const Any& ); -OUString lcl_whitespace( const Any& ); -template<typename T, void (*FUNC)( OUStringBuffer&, T )> OUString lcl_convert( const Any& ); -template<typename T, void (*FUNC)( OUStringBuffer&, const T& )> OUString lcl_convertRef( const Any& ); - -void lcl_formatDate( OUStringBuffer& aBuffer, const Date& aDate ); -void lcl_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Time& aTime ); -void lcl_formatDateTime( OUStringBuffer& aBuffer, const DateTime& aDateTime ); - -convert_t lcl_int32 = &lcl_convert<sal_Int32,&::sax::Converter::convertNumber>; -convert_t lcl_double = &lcl_convert<double,&::sax::Converter::convertDouble>; -convert_t lcl_dateTime = &lcl_convertRef<DateTime,&lcl_formatDateTime>; -convert_t lcl_date = &lcl_convertRef<Date,&lcl_formatDate>; -convert_t lcl_time = &lcl_convertRef<com::sun::star::util::Time,&lcl_formatTime>; +OUString xforms_string( const Any& ); +OUString xforms_bool( const Any& ); +OUString xforms_whitespace( const Any& ); +template<typename T, void (*FUNC)( OUStringBuffer&, T )> OUString xforms_convert( const Any& ); +template<typename T, void (*FUNC)( OUStringBuffer&, const T& )> OUString xforms_convertRef( const Any& ); + +void xforms_formatDate( OUStringBuffer& aBuffer, const Date& aDate ); +void xforms_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Time& aTime ); +void xforms_formatDateTime( OUStringBuffer& aBuffer, const DateTime& aDateTime ); + +convert_t xforms_int32 = &xforms_convert<sal_Int32,&::sax::Converter::convertNumber>; +convert_t xforms_double = &xforms_convert<double,&::sax::Converter::convertDouble>; +convert_t xforms_dateTime = &xforms_convertRef<DateTime,&xforms_formatDateTime>; +convert_t xforms_date = &xforms_convertRef<Date,&xforms_formatDate>; +convert_t xforms_time = &xforms_convertRef<com::sun::star::util::Time,&xforms_formatTime>; // other functions -OUString lcl_getXSDType( SvXMLExport& rExport, +static OUString lcl_getXSDType( SvXMLExport& rExport, const Reference<XPropertySet>& xType ); @@ -168,8 +167,8 @@ OUString lcl_getXSDType( SvXMLExport& rExport, static const ExportTable aXFormsModelTable[] = { - TABLE_ENTRY( "ID", NONE, ID, lcl_string ), - TABLE_ENTRY( "SchemaRef", NONE, SCHEMA, lcl_string ), + TABLE_ENTRY( "ID", NONE, ID, xforms_string ), + TABLE_ENTRY( "SchemaRef", NONE, SCHEMA, xforms_string ), TABLE_END }; @@ -229,7 +228,7 @@ void exportXFormsModel( SvXMLExport& rExport, static const ExportTable aXFormsInstanceTable[] = { - TABLE_ENTRY( "InstanceURL", NONE, SRC, lcl_string ), + TABLE_ENTRY( "InstanceURL", NONE, SRC, xforms_string ), TABLE_END }; @@ -276,15 +275,15 @@ void exportXFormsInstance( SvXMLExport& rExport, static const ExportTable aXFormsBindingTable[] = { - TABLE_ENTRY( "BindingID", NONE, ID, lcl_string ), - TABLE_ENTRY( "BindingExpression", NONE, NODESET, lcl_string ), - TABLE_ENTRY( "ReadonlyExpression", NONE, READONLY, lcl_string ), - TABLE_ENTRY( "RelevantExpression", NONE, RELEVANT, lcl_string ), - TABLE_ENTRY( "RequiredExpression", NONE, REQUIRED, lcl_string ), - TABLE_ENTRY( "ConstraintExpression", NONE, CONSTRAINT, lcl_string ), - TABLE_ENTRY( "CalculateExpression", NONE, CALCULATE, lcl_string ), + TABLE_ENTRY( "BindingID", NONE, ID, xforms_string ), + TABLE_ENTRY( "BindingExpression", NONE, NODESET, xforms_string ), + TABLE_ENTRY( "ReadonlyExpression", NONE, READONLY, xforms_string ), + TABLE_ENTRY( "RelevantExpression", NONE, RELEVANT, xforms_string ), + TABLE_ENTRY( "RequiredExpression", NONE, REQUIRED, xforms_string ), + TABLE_ENTRY( "ConstraintExpression", NONE, CONSTRAINT, xforms_string ), + TABLE_ENTRY( "CalculateExpression", NONE, CALCULATE, xforms_string ), // type handled separatly, for type name <-> XSD type conversion - // TABLE_ENTRY( "Type", NONE, TYPE, lcl_string ), + // TABLE_ENTRY( "Type", NONE, TYPE, xforms_string ), TABLE_END }; @@ -390,21 +389,21 @@ void exportXFormsBinding( SvXMLExport& rExport, static const ExportTable aXFormsSubmissionTable[] = { - TABLE_ENTRY( "ID", NONE, ID, lcl_string ), - TABLE_ENTRY( "Bind", NONE, BIND, lcl_string ), - TABLE_ENTRY( "Ref", NONE, REF, lcl_string ), - TABLE_ENTRY( "Action", NONE, ACTION, lcl_string ), - TABLE_ENTRY( "Method", NONE, METHOD, lcl_string ), - TABLE_ENTRY( "Version", NONE, VERSION, lcl_string ), - TABLE_ENTRY( "Indent", NONE, INDENT, lcl_bool ), - TABLE_ENTRY( "MediaType", NONE, MEDIATYPE, lcl_string ), - TABLE_ENTRY( "Encoding", NONE, ENCODING, lcl_string ), - TABLE_ENTRY( "OmitXmlDeclaration", NONE, OMIT_XML_DECLARATION, lcl_bool ), - TABLE_ENTRY( "Standalone", NONE, STANDALONE, lcl_bool ), - TABLE_ENTRY( "CDataSectionElement", NONE, CDATA_SECTION_ELEMENTS, lcl_string ), - TABLE_ENTRY( "Replace", NONE, REPLACE, lcl_string ), - TABLE_ENTRY( "Separator", NONE, SEPARATOR, lcl_string ), - TABLE_ENTRY( "IncludeNamespacePrefixes", NONE, INCLUDENAMESPACEPREFIXES, lcl_string ), + TABLE_ENTRY( "ID", NONE, ID, xforms_string ), + TABLE_ENTRY( "Bind", NONE, BIND, xforms_string ), + TABLE_ENTRY( "Ref", NONE, REF, xforms_string ), + TABLE_ENTRY( "Action", NONE, ACTION, xforms_string ), + TABLE_ENTRY( "Method", NONE, METHOD, xforms_string ), + TABLE_ENTRY( "Version", NONE, VERSION, xforms_string ), + TABLE_ENTRY( "Indent", NONE, INDENT, xforms_bool ), + TABLE_ENTRY( "MediaType", NONE, MEDIATYPE, xforms_string ), + TABLE_ENTRY( "Encoding", NONE, ENCODING, xforms_string ), + TABLE_ENTRY( "OmitXmlDeclaration", NONE, OMIT_XML_DECLARATION, xforms_bool ), + TABLE_ENTRY( "Standalone", NONE, STANDALONE, xforms_bool ), + TABLE_ENTRY( "CDataSectionElement", NONE, CDATA_SECTION_ELEMENTS, xforms_string ), + TABLE_ENTRY( "Replace", NONE, REPLACE, xforms_string ), + TABLE_ENTRY( "Separator", NONE, SEPARATOR, xforms_string ), + TABLE_ENTRY( "IncludeNamespacePrefixes", NONE, INCLUDENAMESPACEPREFIXES, xforms_string ), TABLE_END }; @@ -424,39 +423,39 @@ void exportXFormsSubmission( SvXMLExport& rExport, static const ExportTable aDataTypeFacetTable[] = { - TABLE_ENTRY( "Length", XSD, LENGTH, lcl_int32 ), - TABLE_ENTRY( "MinLength", XSD, MINLENGTH, lcl_int32 ), - TABLE_ENTRY( "MaxLength", XSD, MAXLENGTH, lcl_int32 ), - TABLE_ENTRY( "MinInclusiveInt", XSD, MININCLUSIVE, lcl_int32 ), - TABLE_ENTRY( "MinExclusiveInt", XSD, MINEXCLUSIVE, lcl_int32 ), - TABLE_ENTRY( "MaxInclusiveInt", XSD, MAXINCLUSIVE, lcl_int32 ), - TABLE_ENTRY( "MaxExclusiveInt", XSD, MAXEXCLUSIVE, lcl_int32 ), - TABLE_ENTRY( "MinInclusiveDouble", XSD, MININCLUSIVE, lcl_double ), - TABLE_ENTRY( "MinExclusiveDouble", XSD, MINEXCLUSIVE, lcl_double ), - TABLE_ENTRY( "MaxInclusiveDouble", XSD, MAXINCLUSIVE, lcl_double ), - TABLE_ENTRY( "MaxExclusiveDouble", XSD, MAXEXCLUSIVE, lcl_double ), - TABLE_ENTRY( "MinInclusiveDate", XSD, MININCLUSIVE, lcl_date ), - TABLE_ENTRY( "MinExclusiveDate", XSD, MINEXCLUSIVE, lcl_date ), - TABLE_ENTRY( "MaxInclusiveDate", XSD, MAXINCLUSIVE, lcl_date ), - TABLE_ENTRY( "MaxExclusiveDate", XSD, MAXEXCLUSIVE, lcl_date ), - TABLE_ENTRY( "MinInclusiveTime", XSD, MININCLUSIVE, lcl_time ), - TABLE_ENTRY( "MinExclusiveTime", XSD, MINEXCLUSIVE, lcl_time ), - TABLE_ENTRY( "MaxInclusiveTime", XSD, MAXINCLUSIVE, lcl_time ), - TABLE_ENTRY( "MaxExclusiveTime", XSD, MAXEXCLUSIVE, lcl_time ), - TABLE_ENTRY( "MinInclusiveDateTime", XSD, MININCLUSIVE, lcl_dateTime ), - TABLE_ENTRY( "MinExclusiveDateTime", XSD, MINEXCLUSIVE, lcl_dateTime ), - TABLE_ENTRY( "MaxInclusiveDateTime", XSD, MAXINCLUSIVE, lcl_dateTime ), - TABLE_ENTRY( "MaxExclusiveDateTime", XSD, MAXEXCLUSIVE, lcl_dateTime ), - TABLE_ENTRY( "Pattern", XSD, PATTERN, lcl_string ), + TABLE_ENTRY( "Length", XSD, LENGTH, xforms_int32 ), + TABLE_ENTRY( "MinLength", XSD, MINLENGTH, xforms_int32 ), + TABLE_ENTRY( "MaxLength", XSD, MAXLENGTH, xforms_int32 ), + TABLE_ENTRY( "MinInclusiveInt", XSD, MININCLUSIVE, xforms_int32 ), + TABLE_ENTRY( "MinExclusiveInt", XSD, MINEXCLUSIVE, xforms_int32 ), + TABLE_ENTRY( "MaxInclusiveInt", XSD, MAXINCLUSIVE, xforms_int32 ), + TABLE_ENTRY( "MaxExclusiveInt", XSD, MAXEXCLUSIVE, xforms_int32 ), + TABLE_ENTRY( "MinInclusiveDouble", XSD, MININCLUSIVE, xforms_double ), + TABLE_ENTRY( "MinExclusiveDouble", XSD, MINEXCLUSIVE, xforms_double ), + TABLE_ENTRY( "MaxInclusiveDouble", XSD, MAXINCLUSIVE, xforms_double ), + TABLE_ENTRY( "MaxExclusiveDouble", XSD, MAXEXCLUSIVE, xforms_double ), + TABLE_ENTRY( "MinInclusiveDate", XSD, MININCLUSIVE, xforms_date ), + TABLE_ENTRY( "MinExclusiveDate", XSD, MINEXCLUSIVE, xforms_date ), + TABLE_ENTRY( "MaxInclusiveDate", XSD, MAXINCLUSIVE, xforms_date ), + TABLE_ENTRY( "MaxExclusiveDate", XSD, MAXEXCLUSIVE, xforms_date ), + TABLE_ENTRY( "MinInclusiveTime", XSD, MININCLUSIVE, xforms_time ), + TABLE_ENTRY( "MinExclusiveTime", XSD, MINEXCLUSIVE, xforms_time ), + TABLE_ENTRY( "MaxInclusiveTime", XSD, MAXINCLUSIVE, xforms_time ), + TABLE_ENTRY( "MaxExclusiveTime", XSD, MAXEXCLUSIVE, xforms_time ), + TABLE_ENTRY( "MinInclusiveDateTime", XSD, MININCLUSIVE, xforms_dateTime ), + TABLE_ENTRY( "MinExclusiveDateTime", XSD, MINEXCLUSIVE, xforms_dateTime ), + TABLE_ENTRY( "MaxInclusiveDateTime", XSD, MAXINCLUSIVE, xforms_dateTime ), + TABLE_ENTRY( "MaxExclusiveDateTime", XSD, MAXEXCLUSIVE, xforms_dateTime ), + TABLE_ENTRY( "Pattern", XSD, PATTERN, xforms_string ), // ??? XML_ENUMERATION, - TABLE_ENTRY( "WhiteSpace", XSD, WHITESPACE, lcl_whitespace ), - TABLE_ENTRY( "TotalDigits", XSD, TOTALDIGITS, lcl_int32 ), - TABLE_ENTRY( "FractionDigits", XSD, FRACTIONDIGITS, lcl_int32 ), + TABLE_ENTRY( "WhiteSpace", XSD, WHITESPACE, xforms_whitespace ), + TABLE_ENTRY( "TotalDigits", XSD, TOTALDIGITS, xforms_int32 ), + TABLE_ENTRY( "FractionDigits", XSD, FRACTIONDIGITS, xforms_int32 ), TABLE_END }; // export facets through table; use the same table as lcl_export does -void lcl_exportDataTypeFacets( SvXMLExport& rExport, +static void lcl_exportDataTypeFacets( SvXMLExport& rExport, const Reference<XPropertySet>& rPropertySet, const ExportTable* pTable ) { @@ -484,7 +483,7 @@ void lcl_exportDataTypeFacets( SvXMLExport& rExport, } } -OUString lcl_getXSDType( SvXMLExport& rExport, +static OUString lcl_getXSDType( SvXMLExport& rExport, const Reference<XPropertySet>& xType ) { // we use string as default... @@ -545,7 +544,7 @@ OUString lcl_getXSDType( SvXMLExport& rExport, GetXMLToken( eToken ) ); } -void lcl_exportDataType( SvXMLExport& rExport, +static void lcl_exportDataType( SvXMLExport& rExport, const Reference<XPropertySet>& xType ) { // we do not need to export basic types; exit if we have one @@ -620,7 +619,7 @@ void exportXFormsSchemas( SvXMLExport& rExport, // helper functions // -void lcl_export( const Reference<XPropertySet>& rPropertySet, +static void lcl_export( const Reference<XPropertySet>& rPropertySet, SvXMLExport& rExport, const ExportTable* pTable ) { @@ -647,7 +646,7 @@ void lcl_export( const Reference<XPropertySet>& rPropertySet, // template<typename T, void (*FUNC)( OUStringBuffer&, T )> -OUString lcl_convert( const Any& rAny ) +OUString xforms_convert( const Any& rAny ) { OUStringBuffer aBuffer; T aData = T(); @@ -659,7 +658,7 @@ OUString lcl_convert( const Any& rAny ) } template<typename T, void (*FUNC)( OUStringBuffer&, const T& )> -OUString lcl_convertRef( const Any& rAny ) +OUString xforms_convertRef( const Any& rAny ) { OUStringBuffer aBuffer; T aData; @@ -670,14 +669,14 @@ OUString lcl_convertRef( const Any& rAny ) return aBuffer.makeStringAndClear(); } -OUString lcl_string( const Any& rAny ) +OUString xforms_string( const Any& rAny ) { OUString aResult; rAny >>= aResult; return aResult; } -OUString lcl_bool( const Any& rAny ) +OUString xforms_bool( const Any& rAny ) { bool bResult = bool(); if( rAny >>= bResult ) @@ -686,7 +685,7 @@ OUString lcl_bool( const Any& rAny ) return OUString(); } -void lcl_formatDate( OUStringBuffer& aBuffer, const Date& rDate ) +void xforms_formatDate( OUStringBuffer& aBuffer, const Date& rDate ) { aBuffer.append( static_cast<sal_Int32>( rDate.Year ) ); aBuffer.append( sal_Unicode('-') ); @@ -695,7 +694,7 @@ void lcl_formatDate( OUStringBuffer& aBuffer, const Date& rDate ) aBuffer.append( static_cast<sal_Int32>( rDate.Day ) ); } -void lcl_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Time& rTime ) +void xforms_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Time& rTime ) { Duration aDuration; aDuration.Hours = rTime.Hours; @@ -705,12 +704,12 @@ void lcl_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Time& ::sax::Converter::convertDuration( aBuffer, aDuration ); } -void lcl_formatDateTime( OUStringBuffer& aBuffer, const DateTime& aDateTime ) +void xforms_formatDateTime( OUStringBuffer& aBuffer, const DateTime& aDateTime ) { ::sax::Converter::convertDateTime( aBuffer, aDateTime ); } -OUString lcl_whitespace( const Any& rAny ) +OUString xforms_whitespace( const Any& rAny ) { OUString sResult; sal_uInt16 n = sal_uInt16(); @@ -734,7 +733,7 @@ OUString lcl_whitespace( const Any& rAny ) /// return name of Binding -OUString lcl_getXFormsBindName( const Reference<XPropertySet>& xBinding ) +static OUString lcl_getXFormsBindName( const Reference<XPropertySet>& xBinding ) { OUString sProp( OUSTRING( "BindingID" ) ); diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index e8eebd5fd560..222318adbc85 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.cxx @@ -81,7 +81,7 @@ void bindXFormsValueBinding( aPair.first, UNO_QUERY ); Reference<XValueBinding> xBinding( - lcl_findXFormsBinding( xModel, aPair.second ), + xforms_findXFormsBinding( xModel, aPair.second ), UNO_QUERY ); if( xBindable.is() && xBinding.is() ) @@ -106,7 +106,7 @@ void bindXFormsListBinding( aPair.first, UNO_QUERY ); Reference<XListEntrySource> xListEntrySource( - lcl_findXFormsBinding( xModel, aPair.second ), + xforms_findXFormsBinding( xModel, aPair.second ), UNO_QUERY ); if( xListEntrySink.is() && xListEntrySource.is() ) @@ -129,7 +129,7 @@ void bindXFormsSubmission( { Reference<XSubmissionSupplier> xSubmissionSupp( aPair.first, UNO_QUERY ); Reference<XSubmission> xSubmission( - lcl_findXFormsSubmission( xModel, aPair.second ), + xforms_findXFormsSubmission( xModel, aPair.second ), UNO_QUERY ); if( xSubmissionSupp.is() && xSubmission.is() ) |