diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-01 08:37:46 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-04 09:09:16 +0200 |
commit | 38d967bc53d30628cfb6e67c3c3c38885209436f (patch) | |
tree | 5f3cb8d03f2c1611941bd779adb6e4d833a64e6f | |
parent | convert sc/source/filter/inc/html*.hxx from String to OUString (diff) | |
download | core-38d967bc53d30628cfb6e67c3c3c38885209436f.tar.gz core-38d967bc53d30628cfb6e67c3c3c38885209436f.zip |
convert sc/source/filter/inc/f*.hxx from String to OUString
Change-Id: I9ccc22bcafe98ec06acefb1fcea672ce15ef0dd5
-rw-r--r-- | sc/inc/filter.hxx | 12 | ||||
-rw-r--r-- | sc/source/filter/excel/xlstyle.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/ftools/fapihelper.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/ftools/fprogressbar.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/html/htmlimp.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/fapihelper.hxx | 9 | ||||
-rw-r--r-- | sc/source/filter/inc/fprogressbar.hxx | 8 | ||||
-rw-r--r-- | sc/source/filter/inc/ftools.hxx | 18 | ||||
-rw-r--r-- | sc/source/filter/rtf/rtfimp.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 12 |
12 files changed, 46 insertions, 59 deletions
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx index 6ff8a89b83ca..8953892c3a24 100644 --- a/sc/inc/filter.hxx +++ b/sc/inc/filter.hxx @@ -94,14 +94,14 @@ class ScFormatFilterPlugin { virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) = 0; virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos, const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; - virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange ) = 0; - virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, + virtual FltError ScImportRTF( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange ) = 0; + virtual FltError ScImportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, bool bCalcWidthHeight = true, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0; // various import helpers virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) = 0; - virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ) = 0; - virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ) = 0; + virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ) = 0; + virtual OUString GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName ) = 0; // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest ) = 0; @@ -109,8 +109,8 @@ class ScFormatFilterPlugin { sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; - virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, bool bAll, - const String& rStreamPath, OUString& rNonConvertibleChars ) = 0; + virtual FltError ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, bool bAll, + const OUString& rStreamPath, OUString& rNonConvertibleChars ) = 0; virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest ) = 0; virtual ScOrcusFilters* GetOrcusFilters() = 0; diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 5db4602486e2..05712a097f4b 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -635,7 +635,7 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData, { case EXC_FONTPROPSET_CHART: { - String aApiFontName; + OUString aApiFontName; float fApiHeight, fApiWeight; sal_Int16 nApiUnderl = 0, nApiStrikeout = 0; Awt::FontSlant eApiPosture; @@ -669,7 +669,7 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData, case EXC_FONTPROPSET_CONTROL: { - String aApiFontName; + OUString aApiFontName; float fApiHeight, fApiWeight; sal_Int16 nApiFamily, nApiCharSet, nApiPosture, nApiUnderl, nApiStrikeout; diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 3bf0f3e17319..7868c204eb18 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -331,14 +331,6 @@ bool ScfPropSetHelper::ReadValue( Any& rAny ) return pAny != 0; } -bool ScfPropSetHelper::ReadValue( String& rString ) -{ - OUString aOUString; - bool bRet = ReadValue( aOUString ); - rString = aOUString; - return bRet; -} - bool ScfPropSetHelper::ReadValue( Color& rColor ) { sal_Int32 nApiColor(0); diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx index 4a02bab3a666..cd23f69cbccd 100644 --- a/sc/source/filter/ftools/fprogressbar.cxx +++ b/sc/source/filter/ftools/fprogressbar.cxx @@ -36,7 +36,7 @@ ScfProgressBar::ScfProgressSegment::~ScfProgressSegment() // ============================================================================ -ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, const String& rText ) : +ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, const OUString& rText ) : maText( rText ) { Init( pDocShell ); @@ -196,7 +196,7 @@ void ScfProgressBar::Progress( sal_Size nDelta ) // ============================================================================ -ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const String& rText ) : +ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const OUString& rText ) : maProgress( pDocShell, rText ) { Init( nSize ); @@ -226,7 +226,7 @@ void ScfStreamProgressBar::Progress() mxProgress->ProgressAbs( mrStrm.Tell() ); } -void ScfStreamProgressBar::Init( SfxObjectShell* pDocShell, const String& rText ) +void ScfStreamProgressBar::Init( SfxObjectShell* pDocShell, const OUString& rText ) { sal_Size nPos = mrStrm.Tell(); mrStrm.Seek( STREAM_SEEK_TO_END ); diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index eb1401b7a273..e0148bca6f0e 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -295,16 +295,16 @@ const OUString& ScfTools::GetHTMLTablesName() return saHTMLTables; } -const String& ScfTools::GetHTMLIndexPrefix() +const OUString& ScfTools::GetHTMLIndexPrefix() { - static const String saHTMLIndexPrefix( "HTML_" ); + static const OUString saHTMLIndexPrefix( "HTML_" ); return saHTMLIndexPrefix; } -const String& ScfTools::GetHTMLNamePrefix() +const OUString& ScfTools::GetHTMLNamePrefix() { - static const String saHTMLNamePrefix( "HTML__" ); + static const OUString saHTMLNamePrefix( "HTML__" ); return saHTMLNamePrefix; } @@ -315,9 +315,9 @@ OUString ScfTools::GetNameFromHTMLIndex( sal_uInt32 nIndex ) return aName; } -String ScfTools::GetNameFromHTMLName( const String& rTabName ) +OUString ScfTools::GetNameFromHTMLName( const OUString& rTabName ) { - String aName( GetHTMLNamePrefix() ); + OUString aName( GetHTMLNamePrefix() ); aName += rTabName; return aName; } @@ -337,12 +337,12 @@ bool ScfTools::GetHTMLNameFromName( const OUString& rSource, OUString& rName ) rName = ""; if( rSource.startsWithIgnoreAsciiCase( GetHTMLNamePrefix() ) ) { - rName = rSource.copy( GetHTMLNamePrefix().Len() ); + rName = rSource.copy( GetHTMLNamePrefix().getLength() ); ScGlobal::AddQuotes( rName, '"', false ); } else if( rSource.startsWithIgnoreAsciiCase( GetHTMLIndexPrefix() ) ) { - OUString aIndex( rSource.copy( GetHTMLIndexPrefix().Len() ) ); + OUString aIndex( rSource.copy( GetHTMLIndexPrefix().getLength() ) ); if( CharClass::isAsciiNumeric( aIndex ) && (aIndex.toInt32() > 0) ) rName = aIndex; } diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 3e0fbaa84c82..7239885fcf31 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -132,9 +132,9 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = //======================================================================== -FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const String& rBaseURL, ScDocument* pDoc, +FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc, const ScRange& rRange, const CharSet /*eNach*/, bool bAll, - const String& rStreamPath, OUString& rNonConvertibleChars ) + const OUString& rStreamPath, OUString& rNonConvertibleChars ) { ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath ); FltError nErr = aEx.Write(); diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 0bb62f7f8e03..68a326d1690c 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -45,7 +45,7 @@ //------------------------------------------------------------------------ -FltError ScFormatFilterPluginImpl::ScImportHTML( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc, +FltError ScFormatFilterPluginImpl::ScImportHTML( SvStream &rStream, const OUString& rBaseURL, ScDocument *pDoc, ScRange& rRange, double nOutputFactor, bool bCalcWidthHeight, SvNumberFormatter* pFormatter, bool bConvertDate ) { @@ -57,7 +57,7 @@ FltError ScFormatFilterPluginImpl::ScImportHTML( SvStream &rStream, const String return nErr; } -ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ) +ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ) { return new ScHTMLImport( pDocP, rBaseURL, rRange, bCalcWidthHeight ); } @@ -199,7 +199,7 @@ void ScHTMLImport::WriteToDocument( } } -String ScFormatFilterPluginImpl::GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ) +OUString ScFormatFilterPluginImpl::GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName ) { return ScHTMLImport::GetHTMLRangeNameList( pDoc, rOrigName ); } diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index 1238220d70ec..40e4b93256c6 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -182,8 +182,8 @@ public: { SetAnyProperty( rPropName, ::comphelper::makeBoolAny( bValue ) ); } /** Puts the passed string into the property set. */ - inline void SetStringProperty( const OUString& rPropName, const String& rValue ) - { SetProperty( rPropName, OUString( rValue ) ); } + inline void SetStringProperty( const OUString& rPropName, const OUString& rValue ) + { SetProperty( rPropName, rValue ); } /** Puts the passed color into the property set. */ inline void SetColorProperty( const OUString& rPropName, const Color& rColor ) @@ -232,8 +232,6 @@ public: bool ReadValue( Type& rValue ); /** Reads an Any from the value sequence. */ bool ReadValue( css::uno::Any& rAny ); - /** Reads a tools string from the value sequence. */ - bool ReadValue( String& rString ); /** Reads a color value from the value sequence. */ bool ReadValue( Color& rColor ); /** Reads a C++ boolean value from the value sequence. */ @@ -249,9 +247,6 @@ public: void WriteValue( const Type& rValue ); /** Writes an Any to the value sequence. */ void WriteValue( const css::uno::Any& rAny ); - /** Writes a tools string to the value sequence. */ - inline void WriteValue( const String& rString ) - { WriteValue( OUString( rString ) ); } /** Writes a color value to the value sequence. */ inline void WriteValue( const Color& rColor ) { WriteValue( ScfApiHelper::ConvertToApiColor( rColor ) ); } diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx index c20fcd1404d2..4c2833a1220a 100644 --- a/sc/source/filter/inc/fprogressbar.hxx +++ b/sc/source/filter/inc/fprogressbar.hxx @@ -107,7 +107,7 @@ const sal_Int32 SCF_INV_SEGMENT = -1; class ScfProgressBar : private boost::noncopyable { public: - explicit ScfProgressBar( SfxObjectShell* pDocShell, const String& rText ); + explicit ScfProgressBar( SfxObjectShell* pDocShell, const OUString& rText ); explicit ScfProgressBar( SfxObjectShell* pDocShell, sal_uInt16 nResId ); virtual ~ScfProgressBar(); @@ -170,7 +170,7 @@ private: typedef boost::ptr_vector< ScfProgressSegment > ScfSegmentList; ScfSegmentList maSegments; /// List of progress segments. - String maText; /// UI string for system progress. + OUString maText; /// UI string for system progress. ScProgressPtr mxSysProgress; /// System progress bar. SfxObjectShell* mpDocShell; /// The document shell for the progress bar. @@ -192,7 +192,7 @@ private: class ScfSimpleProgressBar { public: - explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const String& rText ); + explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const OUString& rText ); explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId ); /** Set progress bar to the specified position. */ @@ -221,7 +221,7 @@ public: private: /** Initializes and starts the progress bar. */ - void Init( SfxObjectShell* pDocShell, const String& rText ); + void Init( SfxObjectShell* pDocShell, const OUString& rText ); private: typedef ::std::auto_ptr< ScfSimpleProgressBar > ScfSimpleProgressBarPtr; diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index 99a588a912f6..007094acbf9a 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -240,7 +240,7 @@ public: /** Returns the built-in range name for an HTML table, specified by table index. */ static OUString GetNameFromHTMLIndex( sal_uInt32 nIndex ); /** Returns the built-in range name for an HTML table, specified by table name. */ - static String GetNameFromHTMLName( const String& rTabName ); + static OUString GetNameFromHTMLName( const OUString& rTabName ); /** Returns true, if rSource is the built-in range name for an HTML document. */ static bool IsHTMLDocName( const OUString& rSource ); @@ -254,9 +254,9 @@ public: private: /** Returns the prefix for table index names. */ - static const String& GetHTMLIndexPrefix(); + static const OUString& GetHTMLIndexPrefix(); /** Returns the prefix for table names. */ - static const String& GetHTMLNamePrefix(); + static const OUString& GetHTMLNamePrefix(); /** We don't want anybody to instantiate this class, since it is just a collection of static items. To enforce this, the default constructor is made private */ @@ -290,14 +290,14 @@ public: virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ); virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos, const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ); - virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange ); - virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, + virtual FltError ScImportRTF( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange ); + virtual FltError ScImportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, bool bCalcWidthHeight = true, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ); virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ); - virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ); - virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ); + virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ); + virtual OUString GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName ); // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest ); @@ -305,8 +305,8 @@ public: sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ); virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ); - virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, bool bAll, - const String& rStreamPath, OUString& rNonConvertibleChars ); + virtual FltError ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, bool bAll, + const OUString& rStreamPath, OUString& rNonConvertibleChars ); virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest ); virtual ScOrcusFilters* GetOrcusFilters(); diff --git a/sc/source/filter/rtf/rtfimp.cxx b/sc/source/filter/rtf/rtfimp.cxx index b71210460232..268f8f184e74 100644 --- a/sc/source/filter/rtf/rtfimp.cxx +++ b/sc/source/filter/rtf/rtfimp.cxx @@ -26,7 +26,7 @@ #include "ftools.hxx" -FltError ScFormatFilterPluginImpl::ScImportRTF( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc, ScRange& rRange ) +FltError ScFormatFilterPluginImpl::ScImportRTF( SvStream &rStream, const OUString& rBaseURL, ScDocument *pDoc, ScRange& rRange ) { ScRTFImport aImp( pDoc, rRange ); FltError nErr = (FltError) aImp.Read( rStream, rBaseURL ); diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index d44c9f40ad75..75bd6ace2454 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2216,18 +2216,18 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) RETURN_ERROR virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, sal_uInt32 ) RETURN_ERROR - virtual FltError ScImportRTF( SvStream&, const String&, ScDocument*, ScRange& ) RETURN_ERROR - virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, bool, SvNumberFormatter*, bool ) RETURN_ERROR + virtual FltError ScImportRTF( SvStream&, const OUString&, ScDocument*, ScRange& ) RETURN_ERROR + virtual FltError ScImportHTML( SvStream&, const OUString&, ScDocument*, ScRange&, double, bool, SvNumberFormatter*, bool ) RETURN_ERROR virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) { return NULL; } - virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, bool ) { return NULL; } - virtual String GetHTMLRangeNameList( ScDocument*, const String& ) { return String(); } + virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const OUString&, const ScRange&, bool ) { return NULL; } + virtual OUString GetHTMLRangeNameList( ScDocument*, const OUString& ) { return OUString(); } virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, CharSet ) RETURN_ERROR virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, sal_uInt32 ) RETURN_ERROR virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, sal_uInt32 ) RETURN_ERROR - virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, bool, - const String&, OUString& ) RETURN_ERROR + virtual FltError ScExportHTML( SvStream&, const OUString&, ScDocument*, const ScRange&, const CharSet, bool, + const OUString&, OUString& ) RETURN_ERROR virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const CharSet ) RETURN_ERROR virtual ScOrcusFilters* GetOrcusFilters() { return NULL; } |