[Libreoffice-commits] core.git: 2 commits - sw/source
Miklos Vajna
vmiklos at suse.cz
Thu Jul 11 04:14:14 PDT 2013
sw/source/filter/ww8/attributeoutputbase.hxx | 2 +-
sw/source/filter/ww8/docxattributeoutput.cxx | 7 +++----
sw/source/filter/ww8/docxattributeoutput.hxx | 2 +-
sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +-
sw/source/filter/ww8/rtfattributeoutput.hxx | 2 +-
sw/source/filter/ww8/wrtw8nds.cxx | 12 ++++++------
sw/source/filter/ww8/ww8atr.cxx | 2 +-
sw/source/filter/ww8/ww8attributeoutput.hxx | 2 +-
8 files changed, 15 insertions(+), 16 deletions(-)
New commits:
commit 3a58a0f9d3600d0475e1a2c6595785cfcf5f362e
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Jul 11 13:02:43 2013 +0200
AttributeOutputBase::RunText: String -> OUString
Change-Id: I413f0c4a270c5246dc87c5ff4f7042bc16330ed7
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index baad6ac..25ee2a0 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -176,7 +176,7 @@ public:
virtual void WritePostitFieldEnd() {};
/// Output text (inside a run).
- virtual void RunText( const String& rText, rtl_TextEncoding eCharSet ) = 0;
+ virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet ) = 0;
/// Output text (without markup).
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) = 0;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9957ff4..d7697ca 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1133,18 +1133,17 @@ static void impl_WriteRunText( FSHelperPtr pSerializer, sal_Int32 nTextToken,
pSerializer->endElementNS( XML_w, nTextToken );
}
-void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eCharSet*/ )
+void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCharSet*/ )
{
if( m_closeHyperlinkInThisRun )
{
m_closeHyperlinkInPreviousRun = true;
m_closeHyperlinkInThisRun = false;
}
- OUString aText( rText );
// one text can be split into more <w:t>blah</w:t>'s by line breaks etc.
- const sal_Unicode *pBegin = aText.getStr();
- const sal_Unicode *pEnd = pBegin + aText.getLength();
+ const sal_Unicode *pBegin = rText.getStr();
+ const sal_Unicode *pEnd = pBegin + rText.getLength();
// the text run is usually XML_t, with the exception of the deleted text
sal_Int32 nTextToken = XML_t;
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 06f12fa..83913a6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -127,7 +127,7 @@ public:
virtual void WritePostitFieldEnd();
/// Output text (inside a run).
- virtual void RunText( const String& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 );
+ virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 );
/// Output text (without markup).
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 9890f0b..bb88c28 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -415,7 +415,7 @@ void RtfAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/
m_aRun->append(m_aStyles.makeStringAndClear());
}
-void RtfAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eCharSet*/ )
+void RtfAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCharSet*/ )
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC << ", rText: " << rText);
RawText( rText, 0, m_rExport.eCurrentEncoding );
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index b13be12..ec5002f 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -73,7 +73,7 @@ public:
virtual void WritePostitFieldEnd() SAL_OVERRIDE;
/// Output text (inside a run).
- virtual void RunText( const String& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 );
+ virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 );
// Access to (anyway) private buffers, used by the sdr exporter
OStringBuffer& RunText();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e0d9140..fb0f24d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -988,7 +988,7 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
m_rWW8Export.pO->clear();
}
-void WW8AttributeOutput::RunText( const String& rText, rtl_TextEncoding eCharSet )
+void WW8AttributeOutput::RunText( const OUString& rText, rtl_TextEncoding eCharSet )
{
RawText( rText, m_rWW8Export.bWrtWW8, eCharSet );
}
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index 4c64635..d471101 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -60,7 +60,7 @@ public:
virtual void EndRunProperties( const SwRedlineData* pRedlineData );
/// Output text.
- virtual void RunText( const String& rText, rtl_TextEncoding eCharSet );
+ virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet );
/// Output text (without markup).
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
commit 4785fe1982837c0dc047158323e4c88701239790
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Jul 11 12:51:30 2013 +0200
MSWordExportBase::OutputTextNode: String -> OUString
Change-Id: I20da47b7a2aadd11199547673521332afbf23387
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 62b43a5..e92b2ae 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1795,10 +1795,10 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
AppendWordBookmark( sBkmkName );
}
- String aStr( rNode.GetTxt() );
+ OUString aStr( rNode.GetTxt() );
- xub_StrLen nAktPos = 0;
- xub_StrLen const nEnd = aStr.Len();
+ sal_Int32 nAktPos = 0;
+ sal_Int32 const nEnd = aStr.getLength();
bool bRedlineAtEnd = false;
int nOpenAttrWithRange = 0;
@@ -1829,7 +1829,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
xub_StrLen nLen = nNextAttr - nAktPos;
if ( !bTxtAtr && nLen )
{
- sal_Unicode ch = aStr.GetChar( nAktPos );
+ sal_Unicode ch = aStr[nAktPos];
int ofs = ( ch == CH_TXT_ATR_FIELDSTART || ch == CH_TXT_ATR_FIELDEND || ch == CH_TXT_ATR_FORMELEMENT? 1: 0 );
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
@@ -1936,9 +1936,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), false );
}
- nLen -= static_cast< sal_uInt16 >( ofs );
+ nLen -= static_cast< sal_Int32 >( ofs );
- String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< sal_uInt16 >( ofs ), nLen ) );
+ String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< sal_Int32 >( ofs ), nLen ) );
if ( ( nTxtTyp == TXT_EDN || nTxtTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 )
{
// Insert tab for aesthetic puposes #i24762#
More information about the Libreoffice-commits
mailing list