[Libreoffice-commits] .: 12 commits - cui/source editeng/source extensions/source l10ntools/inc l10ntools/source sc/source sfx2/source sot/source svl/inc svtools/source svx/source sw/source tools/inc tools/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Sep 13 02:16:10 PDT 2011
cui/source/dialogs/SpellDialog.src | 3
cui/source/dialogs/cuiimapdlg.src | 3
cui/source/options/fontsubs.src | 7
cui/source/options/optcolor.src | 3
cui/source/options/optdict.src | 3
cui/source/options/optfltr.src | 3
cui/source/options/optinet2.src | 3
cui/source/tabpages/autocdlg.src | 3
cui/source/tabpages/backgrnd.src | 4
cui/source/tabpages/connect.src | 2
cui/source/tabpages/measure.src | 3
cui/source/tabpages/textanim.src | 1
editeng/source/items/svxitems.src | 3
editeng/source/misc/lingu.src | 3
extensions/source/bibliography/sections.src | 1
l10ntools/inc/export.hxx | 4
l10ntools/inc/wtratree.hxx | 161 ----------
l10ntools/source/cfgmerge.cxx | 2
l10ntools/source/export.cxx | 33 --
l10ntools/source/merge.cxx | 7
l10ntools/source/wtratree.cxx | 420 ----------------------------
l10ntools/source/xrmmerge.cxx | 2
sc/source/ui/formdlg/dwfunctr.src | 4
sfx2/source/dialog/mgetempl.src | 3
sfx2/source/doc/docvor.src | 3
sfx2/source/doc/new.src | 4
sot/source/sdstor/stgelem.cxx | 28 -
svl/inc/svl/svldata.hxx | 9
svtools/source/misc/ehdl.src | 2
svx/source/dialog/fontwork.src | 3
svx/source/dialog/hdft.src | 3
svx/source/dialog/imapdlg.src | 3
svx/source/dialog/language.src | 2
svx/source/dialog/optgrid.src | 3
svx/source/dialog/passwd.src | 3
svx/source/dialog/sdstring.src | 3
svx/source/engine3d/string3d.src | 3
svx/source/inc/DGColorNameLookUp.hxx | 5
svx/source/items/svxerr.src | 4
svx/source/src/errtxt.src | 1
svx/source/stbctrls/stbctrls.src | 3
svx/source/tbxctrls/colrctrl.src | 1
svx/source/tbxctrls/tbcontrl.src | 3
sw/source/core/inc/UndoTable.hxx | 5
sw/source/filter/html/htmlbas.cxx | 26 -
sw/source/filter/html/htmlfly.cxx | 34 +-
sw/source/filter/html/htmlftn.cxx | 67 ++--
sw/source/filter/html/htmlplug.cxx | 67 ++--
sw/source/filter/ww8/escher.hxx | 2
sw/source/ui/chrdlg/ccoll.src | 1
sw/source/ui/chrdlg/numpara.src | 1
sw/source/ui/dbui/dbui.src | 1
sw/source/ui/envelp/envelp.src | 1
sw/source/ui/envelp/envfmt.src | 1
sw/source/ui/envelp/envlop.src | 1
sw/source/ui/envelp/envprt.src | 1
sw/source/ui/envelp/label.src | 1
sw/source/ui/envelp/labfmt.src | 1
sw/source/ui/envelp/labprt.src | 1
sw/source/ui/fldui/javaedit.src | 3
sw/source/ui/frmdlg/cption.src | 1
tools/inc/tools/string.hxx | 4
tools/source/string/strcvt.cxx | 31 --
63 files changed, 149 insertions(+), 868 deletions(-)
New commits:
commit a558a8da5650da5453a517214fc721a65de4f3ee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 13 08:49:03 2011 +0100
can remove ByteString::Convert now
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 62d55b2..091a5ab 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -181,11 +181,6 @@ private:
// Append(char)
void operator +=(int); // not implemented; to detect misuses
// of operator +=(sal_Char)
-
- ByteString& Convert( rtl_TextEncoding eSource,
- rtl_TextEncoding eTarget,
- sal_Bool bReplace = sal_True );
-
public:
ByteString();
ByteString( const ByteString& rStr );
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index 58717bc..b61b007 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -299,37 +299,6 @@ void ByteString::ImplStringConvert(
// =======================================================================
-ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, sal_Bool bReplace )
-{
- DBG_CHKTHIS( ByteString, DbgCheckByteString );
-
- // rtl_TextEncoding Dontknow kann nicht konvertiert werden
- if ( (eSource == RTL_TEXTENCODING_DONTKNOW) || (eTarget == RTL_TEXTENCODING_DONTKNOW) )
- return *this;
-
- // Wenn Source und Target gleich sind, muss nicht konvertiert werden
- if ( eSource == eTarget )
- return *this;
-
- // rtl_TextEncoding Symbol nur nach Unicode oder von Unicode wandeln, ansonsten
- // wollen wir die Zeichencodes beibehalten
- if ( (eSource == RTL_TEXTENCODING_SYMBOL) &&
- (eTarget != RTL_TEXTENCODING_UTF7) &&
- (eTarget != RTL_TEXTENCODING_UTF8) )
- return *this;
- if ( (eTarget == RTL_TEXTENCODING_SYMBOL) &&
- (eSource != RTL_TEXTENCODING_UTF7) &&
- (eSource != RTL_TEXTENCODING_UTF8) )
- return *this;
-
- // Zeichensatz umwandeln
- ImplStringConvert( eSource, eTarget, bReplace );
-
- return *this;
-}
-
-// =======================================================================
-
ByteString::ByteString( const rtl::OString& rStr )
: mpData(NULL)
{
commit 7a16bd69d07ac995b6baaecc958ea6811c173bb5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 13 00:01:31 2011 +0100
not sure if this is copyable
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 550e22f..7691bc0 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -93,7 +93,7 @@ private:
virtual SvStream* ImplQueryPictureStream();
private:
- ::std::auto_ptr< SvStream > mxPicStrm;
+ boost::shared_ptr< SvStream > mxPicStrm;
};
class SwBasicEscherEx : public EscherEx
commit ba2ec933db81fc178b3661291fb4949ec677575c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 23:52:36 2011 +0100
make ByteString::Convert private
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 0ddeef0..62d55b2 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -181,6 +181,11 @@ private:
// Append(char)
void operator +=(int); // not implemented; to detect misuses
// of operator +=(sal_Char)
+
+ ByteString& Convert( rtl_TextEncoding eSource,
+ rtl_TextEncoding eTarget,
+ sal_Bool bReplace = sal_True );
+
public:
ByteString();
ByteString( const ByteString& rStr );
@@ -245,10 +250,6 @@ public:
ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' );
ByteString& EraseAllChars( sal_Char c = ' ' );
- ByteString& Convert( rtl_TextEncoding eSource,
- rtl_TextEncoding eTarget,
- sal_Bool bReplace = sal_True );
-
ByteString& ConvertLineEnd( LineEnd eLineEnd );
ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); }
commit ddf93e2c09481609c4f5fe4ab6750379146379cc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 23:52:07 2011 +0100
try better template friend class syntax
diff --git a/svl/inc/svl/svldata.hxx b/svl/inc/svl/svldata.hxx
index b51a368..bfafb84 100644
--- a/svl/inc/svl/svldata.hxx
+++ b/svl/inc/svl/svldata.hxx
@@ -45,11 +45,10 @@ public:
// further request for any other language supply the resmgr of the first call.
// For the simple resmgr we have a mgr for each language ever requested).
-public:
- ImpSvlData():
- pStoringPool(0), m_pThreadsafeRMs(NULL)
- {}
-
+private:
+ /// Can only construct via singleton
+ template<typename T, typename Unique> friend class rtl::Static;
+ ImpSvlData() : pStoringPool(0), m_pThreadsafeRMs(NULL) {}
~ImpSvlData();
public:
diff --git a/svx/source/inc/DGColorNameLookUp.hxx b/svx/source/inc/DGColorNameLookUp.hxx
index 9fd8dc4..98b72c7 100644
--- a/svx/source/inc/DGColorNameLookUp.hxx
+++ b/svx/source/inc/DGColorNameLookUp.hxx
@@ -79,8 +79,9 @@ private:
/// This ma translates from numerical color values to names.
tColorValueToNameMap maColorValueToNameMap;
-public:
- /// Create a new (the only) instance of this class.
+private:
+ /// Can only construct via singleton
+ template<typename T, typename Unique> friend class rtl::Static;
DGColorNameLookUp();
~DGColorNameLookUp();
};
commit 1cf8e70f78ae177114a1aabb69750acee127e906
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 23:51:25 2011 +0100
ByteString->rtl::OStringBuffer
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 339b4da..fdba9b1 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -29,11 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
-
+#include <rtl/strbuf.hxx>
#include <sfx2/sfx.hrc>
-
#define _SVSTDARR_STRINGSSORTDTOR
#include <svl/svstdarr.hxx>
#include <basic/sbx.hxx>
@@ -305,19 +303,17 @@ void SwHTMLWriter::OutBasic()
if( 0==i && 0==j )
{
OutNewLine();
- ByteString sOut( '<' );
- sOut.Append( OOO_STRING_SVTOOLS_HTML_meta );
- sOut.Append( ' ' );
- sOut.Append( OOO_STRING_SVTOOLS_HTML_O_httpequiv );
- sOut.Append( "=\"" );
- sOut.Append( OOO_STRING_SVTOOLS_HTML_META_content_script_type );
- sOut.Append( "\" " );
- sOut.Append( OOO_STRING_SVTOOLS_HTML_O_content );
- sOut.Append( "=\"text/x-" );
- Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta)
+ .append(' ').append(OOO_STRING_SVTOOLS_HTML_O_httpequiv)
+ .append("=\"")
+ .append(OOO_STRING_SVTOOLS_HTML_META_content_script_type)
+ .append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_content)
+ .append("=\"text/x-");
+ Strm() << sOut.getStr();
// Entities aren't welcome here
- ByteString sLang8( sLang, eDestEnc );
- Strm() << sLang8.GetBuffer() << "\">";
+ Strm() << rtl::OUStringToOString(sLang, eDestEnc).getStr()
+ << "\">";
}
const String& rModName = pModule->GetName();
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 5436ac2..b3dade8 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -456,14 +456,14 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
if( bLFPossible && HTML_CNTNR_DIV == nCntnrMode )
OutNewLine();
- ByteString sOut( '<' );
+ rtl::OStringBuffer sOut;
pCntnrStr = (HTML_CNTNR_DIV == nCntnrMode)
? OOO_STRING_SVTOOLS_HTML_division
: OOO_STRING_SVTOOLS_HTML_span;
- sOut += pCntnrStr;
- ((((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_class) += "=\"")
- += sCSS1_class_abs_pos) += '\"';
- Strm() << sOut.GetBuffer();
+ sOut.append('<').append(pCntnrStr).append(' ')
+ .append(OOO_STRING_SVTOOLS_HTML_O_class).append("=\"")
+ .append(sCSS1_class_abs_pos).append('\"');
+ Strm() << sOut.makeStringAndClear().getStr();
// Fuer Nicht-Zeichenobekte eine Breite ausgeben
sal_uLong nFrmFlags = HTML_FRMOPTS_CNTNR;
@@ -1479,10 +1479,11 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine( sal_True );
- ByteString sOut('<');
- ((((sOut += OOO_STRING_SVTOOLS_HTML_spacer) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=')
- += OOO_STRING_SVTOOLS_HTML_SPTYPE_block;
- rWrt.Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_spacer).append(' ')
+ .append(OOO_STRING_SVTOOLS_HTML_O_type).append('=')
+ .append(OOO_STRING_SVTOOLS_HTML_SPTYPE_block);
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
// ALIGN, WIDTH, HEIGHT
ByteString aEndTags;
@@ -1517,10 +1518,10 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- ByteString sOut( '<' );
- sOut += pStr;
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(pStr);
- rWrt.Strm() << sOut.GetBuffer();
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
ByteString aEndTags;
sal_uLong nFrmFlags = HTML_FRMOPTS_DIV;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_BORDER_NONE ) )
@@ -1700,10 +1701,11 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// als Multicol ausgeben
rHTMLWrt.OutNewLine();
- ByteString sOut( OOO_STRING_SVTOOLS_HTML_division );
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=';
- sOut += (bHeader ? "HEADER" : "FOOTER" );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOut.GetBuffer() );
+ rtl::OStringBuffer sOut;
+ sOut.append(OOO_STRING_SVTOOLS_HTML_division).append(' ')
+ .append(OOO_STRING_SVTOOLS_HTML_O_type).append('=')
+ .append(bHeader ? "HEADER" : "FOOTER");
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOut.makeStringAndClear().getStr() );
rHTMLWrt.IncIndentLevel(); // den Inhalt von Multicol einruecken;
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 700c123..a11200a 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -28,12 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
-
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
+#include <rtl/strbuf.hxx>
#include <ndindex.hxx>
#include <fmtftn.hxx>
#include <txtftn.hxx>
@@ -42,7 +39,6 @@
#include <ndtxt.hxx>
#include <charfmt.hxx>
-
#include "swhtml.hxx"
#include "wrthtml.hxx"
@@ -319,21 +315,23 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
rHTMLWrt.pFootEndNotes = new SwHTMLTxtFtns;
rHTMLWrt.pFootEndNotes->Insert( pTxtFtn, nPos );
- ByteString sOut( '<' );
- (((sOut += OOO_STRING_SVTOOLS_HTML_anchor) += ' ') += OOO_STRING_SVTOOLS_HTML_O_class) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor).append(' ')
+ .append(OOO_STRING_SVTOOLS_HTML_O_class).append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), sClass, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- ((sOut = "\" ") += OOO_STRING_SVTOOLS_HTML_O_name) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), sFtnName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- (((sOut = OOO_STRING_SVTOOLS_HTML_FTN_anchor) += "\" ") += OOO_STRING_SVTOOLS_HTML_O_href) += "=\"#";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor).append("\" ")
+ .append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\"#");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), sFtnName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- (sOut = OOO_STRING_SVTOOLS_HTML_FTN_symbol)+= '\"';
+ sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol).append('\"');
if( rFmtFtn.GetNumStr().Len() )
- (sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_sdfixed;
- sOut += '>';
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdfixed);
+ sOut.append('>');
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_True );
HTMLOutFuncs::Out_String( rWrt.Strm(), rFmtFtn.GetViewNumStr(*rWrt.pDoc),
@@ -377,9 +375,10 @@ void SwHTMLWriter::OutFootEndNotes()
if( bLFPossible )
OutNewLine();
- ByteString sOut( '<' );
- (((sOut += OOO_STRING_SVTOOLS_HTML_division) += ' ') += OOO_STRING_SVTOOLS_HTML_O_id) += "=\"";
- Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_division)
+ .append(' ').append(OOO_STRING_SVTOOLS_HTML_O_id).append("=\"");
+ Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters );
Strm() << "\">";
@@ -484,18 +483,20 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn,
}
}
- ByteString sOut( '<' );
- (((sOut += OOO_STRING_SVTOOLS_HTML_anchor) += ' ') += OOO_STRING_SVTOOLS_HTML_O_class) += "=\"";
- Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor).append(' ')
+ .append(OOO_STRING_SVTOOLS_HTML_O_class).append("=\"");
+ Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( Strm(), sClass, eDestEnc, &aNonConvertableCharacters );
- ((sOut = "\" ") += OOO_STRING_SVTOOLS_HTML_O_name) += "=\"";
- Strm() << sOut.GetBuffer();
+ sOut.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\"");
+ Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters );
- (((sOut = OOO_STRING_SVTOOLS_HTML_FTN_symbol) +="\" ") += OOO_STRING_SVTOOLS_HTML_O_href) += "=\"#";
- Strm() << sOut.GetBuffer();
+ sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol).append("\" ")
+ .append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\"#");
+ Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters );
- (sOut = OOO_STRING_SVTOOLS_HTML_FTN_anchor) += "\">";
- Strm() << sOut.GetBuffer();
+ sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor).append("\">");
+ Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( Strm(), rNum, eDestEnc, &aNonConvertableCharacters );
HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
@@ -560,11 +561,11 @@ void lcl_html_outFootEndNoteInfo( Writer& rWrt, String *pParts,
}
rHTMLWrt.OutNewLine();
- ByteString sOut( '<' );
- (((((((sOut += OOO_STRING_SVTOOLS_HTML_meta) += ' ')
- += OOO_STRING_SVTOOLS_HTML_O_name) += "=\"") += pName) += "\" ")
- += OOO_STRING_SVTOOLS_HTML_O_content) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sOut;
+ sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta).append(' ')
+ .append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\"").append(pName)
+ .append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_content).append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), aContent, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
rWrt.Strm() << "\">";
}
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index bf93b7f..280d2ad 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include "hintids.hxx"
+#include <rtl/strbuf.hxx>
#include <svl/urihelper.hxx>
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
@@ -1028,11 +1029,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
pMarkToOLE );
uno::Any aAny;
SvGlobalName aGlobName( xObj->getClassID() );
- ByteString sOut('<');
+ rtl::OStringBuffer sOut;
+ sOut.append('<');
if( aGlobName == SvGlobalName( SO3_PLUGIN_CLASSID ) )
{
// erstmal das Plug-spezifische
- sOut += OOO_STRING_SVTOOLS_HTML_embed;
+ sOut.append(OOO_STRING_SVTOOLS_HTML_embed);
::rtl::OUString aStr;
String aURL;
@@ -1045,27 +1047,29 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
if( aURL.Len() )
{
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_src) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src)
+ .append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), aURL, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- sOut = '\"';
+ sOut.append('\"');
}
::rtl::OUString aType;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) );
if( (aAny >>= aType) && aType.getLength() )
{
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type)
+ .append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), aType, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- sOut = '\"';
+ sOut.append('\"');
}
if ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) &&
SURROUND_THROUGHT == rFrmFmt.GetSurround().GetSurround() )
{
// Das Plugin ist HIDDEN
- (sOut += ' ') += OOO_STRING_SW_HTML_O_Hidden;
+ sOut.append(' ').append(OOO_STRING_SW_HTML_O_Hidden);
nFrmOpts = HTML_FRMOPTS_HIDDEN_EMBED;
bHiddenEmbed = sal_True;
}
@@ -1079,7 +1083,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
{
// oder das Applet-Spezifische
- sOut += OOO_STRING_SVTOOLS_HTML_applet;
+ sOut.append(OOO_STRING_SVTOOLS_HTML_applet);
// CODEBASE
::rtl::OUString aCd;
@@ -1089,10 +1093,11 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
String sCodeBase( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), aCd) );
if( sCodeBase.Len() )
{
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_codebase) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_codebase)
+ .append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), sCodeBase, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- sOut = '\"';
+ sOut.append('\"');
}
}
@@ -1100,10 +1105,11 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
::rtl::OUString aClass;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) );
aAny >>= aClass;
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_code) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_code)
+ .append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), aClass, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- sOut = '\"';
+ sOut.append('\"');
// NAME
::rtl::OUString aAppletName;
@@ -1111,17 +1117,18 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aAny >>= aAppletName;
if( aAppletName.getLength() )
{
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_name) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
+ .append("=\"");
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), aAppletName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- sOut = '\"';
+ sOut.append('\"');
}
sal_Bool bScript = sal_False;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) );
aAny >>= bScript;
if( bScript )
- (sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_mayscript;
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_mayscript);
nFrmOpts = bInCntnr ? HTML_FRMOPTS_APPLET_CNTNR
: HTML_FRMOPTS_APPLET;
@@ -1130,20 +1137,19 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
{
// oder das Flating-Frame spezifische
- sOut += OOO_STRING_SVTOOLS_HTML_iframe;
- rWrt.Strm() << sOut.GetBuffer();
+ sOut.append(OOO_STRING_SVTOOLS_HTML_iframe);
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
SfxFrameHTMLWriter::Out_FrameDescriptor( rWrt.Strm(), rWrt.GetBaseURL(),
xSet,
rHTMLWrt.eDestEnc,
&rHTMLWrt.aNonConvertableCharacters );
- sOut.Erase();
nFrmOpts = bInCntnr ? HTML_FRMOPTS_IFRAME_CNTNR
: HTML_FRMOPTS_IFRAME;
}
- rWrt.Strm() << sOut.GetBuffer();
+ rWrt.Strm() << sOut.makeStringAndClear().getStr();
// ALT, WIDTH, HEIGHT, HSPACE, VSPACE, ALIGN
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed )
@@ -1196,12 +1202,15 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const String& rName = rCommand.GetCommand();
const String& rValue = rCommand.GetArgument();
rHTMLWrt.OutNewLine();
- ((((sOut = '<') += OOO_STRING_SVTOOLS_HTML_param) += ' ') += OOO_STRING_SVTOOLS_HTML_O_name)
- += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ rtl::OStringBuffer sBuf;
+ sBuf.append('<').append(OOO_STRING_SVTOOLS_HTML_param)
+ .append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
+ .append("=\"");
+ rWrt.Strm() << sBuf.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), rName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- ((sOut = "\" ") += OOO_STRING_SVTOOLS_HTML_O_value) += "=\"";
- rWrt.Strm() << sOut.GetBuffer();
+ sBuf.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_value)
+ .append("=\"");
+ rWrt.Strm() << sBuf.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rWrt.Strm(), rValue, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ) << "\">";
}
commit d3f4455c54dc7594bce1f65b4d44910794c9e424
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 23:49:54 2011 +0100
let's use scoped_ptr to avoid c++0x deprecated warnings
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index d3a1a9a..b74b0ed 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -37,6 +37,7 @@
#include <itabenum.hxx>
#include "boost/noncopyable.hpp"
+#include "boost/scoped_ptr.hpp"
class SfxItemSet;
@@ -185,8 +186,8 @@ class SwUndoTblNdsChg : public SwUndo, private boost::noncopyable
_BoxMove(sal_uLong idx, bool moved=false) : index(idx), hasMoved(moved) {};
bool operator<(const _BoxMove other) const { return index < other.index; };
};
- std::auto_ptr< std::set<_BoxMove> > pNewSttNds;
- std::auto_ptr< SwUndoSaveSections > pDelSects;
+ boost::scoped_ptr< std::set<_BoxMove> > pNewSttNds;
+ boost::scoped_ptr< SwUndoSaveSections > pDelSects;
long nMin, nMax; // for redo of delete column
sal_uLong nSttNode, nCurrBox;
sal_uInt16 nCount, nRelDiff, nAbsDiff, nSetColType;
commit bebbe9724805c58f65331631d55dda325da494fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 22:15:28 2011 +0100
wtratree unbuilt
diff --git a/l10ntools/inc/wtratree.hxx b/l10ntools/inc/wtratree.hxx
deleted file mode 100644
index c06be49..0000000
--- a/l10ntools/inc/wtratree.hxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#ifndef TX3_WTRATREE_HXX
-#define TX3_WTRATREE_HXX
-
-// USED
- // Base Classes
- // Components
- // Parameters
-#include <tools/string.hxx>
-
-const INT16 C_NR_OF_WTT_RESULTS = 5;
-const INT16 C_NR_OF_POSSIBLE_CHARS = 256;
-
-
-typedef unsigned char u_char;
-typedef const char * constr;
-
-
-class WTT_Node;
-
-
-/** @task
- This class implements the functionality, that class WordTransformer
- offers.
- WordTransformer is dependant of this class, but NOT the other way!
-**/
-class WordTransTree
-{
- public:
- enum E_Result
- {
- OK = 0,
- HOTKEY_LOST,
- OUTPUT_OVERFLOW
- };
-
-
- // LIFECYCLE
- WordTransTree(
- CharSet i_nWorkingCharSet = RTL_TEXTENCODING_MS_1252);
- void SetCharSet(
- CharSet i_nWorkingCharSet);
- ~WordTransTree();
-
- void AddWordPair(
- const ByteString & i_sOldString,
- const ByteString & i_sReplaceString );
-
- // OPERATIONS
- void InitTransformation(
- const char * i_sInput, /// [!=0], a range of i_nInputLength must be valid memory for read.
- UINT32 i_nInputLength,
- UINT32 i_nOutputMaxLength = STRING_MAXLEN - 12 );
- E_Result TransformNextToken();
-
- // INQUIRY
- sal_Bool TextEndReached() const;
- const char * Output() const;
-
- // These 3 functions are valid between two calls of
- // TransformNextToken():
- E_Result CurResult() const;
- ByteString CurReplacedString() const;
- ByteString CurReplacingString() const;
- char CurHotkey() const;
-
- private:
- // SERVICE FUNCTONS
- UINT8 CalculateBranch(
- u_char i_cInputChar ) const;
-
- void Handle_Hotkey();
- void Handle_TokenToKeep();
- void Handle_TokenToTransform();
-
- // DATA
- // Fixed data
- const u_char * sInput;
- UINT32 nInputLength;
- const u_char * pInputEnd;
-
- u_char * sOutput; // DYN
- UINT32 nOutputMaxLength;
-
- WTT_Node * dpParsingTreeTop; // DYN
- WTT_Node * pUnknownAlpha;
- u_char cChar2Branch[C_NR_OF_POSSIBLE_CHARS];
- u_char c_AE, c_OE, c_UE, c_ae, c_oe, c_ue;
-
- // Working data
- const u_char * pInputCurTokenStart;
- const u_char * pInputPosition;
- u_char * pOutputPosition;
- WTT_Node * pCurParseNode;
-
- // Data which are valid only after a completed call to TransformNextToken()
- E_Result eCurResult;
- u_char cCurHotkey; // Letter wich is used as hotkey
- u_char cCurHotkeySign; // Letter which is used to assign hotkey ('~'or '&') .
-};
-
-
-
-
-
-
-
-inline sal_Bool
-WordTransTree::TextEndReached() const
- { return pInputPosition == pInputEnd; }
-inline const char *
-WordTransTree::Output() const
- { return TextEndReached() ? (constr) sOutput : ""; }
-inline WordTransTree::E_Result
-WordTransTree::CurResult() const
- { return eCurResult; }
-inline ByteString
-WordTransTree::CurReplacedString() const
- { return ByteString((constr) pInputCurTokenStart,pInputPosition-pInputCurTokenStart); }
-inline char
-WordTransTree::CurHotkey() const
- { return cCurHotkey; }
-inline UINT8
-WordTransTree::CalculateBranch(u_char i_cInputChar) const
- { return cChar2Branch[i_cInputChar]; }
-
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/wtratree.cxx b/l10ntools/source/wtratree.cxx
deleted file mode 100644
index 7e3bf4f..0000000
--- a/l10ntools/source/wtratree.cxx
+++ /dev/null
@@ -1,420 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_l10ntools.hxx"
-
-
-#include "wtratree.hxx"
-
-
-
-/** @ATTENTION
- For reasons of speed, class WordTransTree works with two simple
- char arrays, sOutput and sInput, instead of secure containers or
- streams. So be extremely careful, when changing this code!!!
-**/
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "wtranode.hxx"
-
-
-const BRANCH_T BR_END = 0;
-const BRANCH_T BR_NONALPHA = 1;
-const BRANCH_T BR_HOTKEY = 2;
-const BRANCH_T BR_BACKSLASH = 3;
-const BRANCH_T BR_ALPHABASE = 4; /// @ATTENTION All branches not valid for words must be smaller than this value!
-const BRANCH_T BR_AE = 30;
-const BRANCH_T BR_OE = 31;
-const BRANCH_T BR_UE = 32;
-const BRANCH_T BR_SZ = 33;
-const BRANCH_T BR_MAX = 34; /// @ATTENTION Must be updated always!
-
-const BRANCH_T BR_START = 0;
-
-
-
-
-
-WordTransTree::WordTransTree(CharSet i_nWorkingCharSet)
- : sInput(0),
- nInputLength(0),
- pInputEnd(0),
- sOutput(0),
- nOutputMaxLength(0),
- dpParsingTreeTop(0),
- pUnknownAlpha(0),
- // cChar2Branch
- c_AE(u_char('\xC4')), c_OE(u_char('\xD6')), c_UE(u_char('\xDC')),
- c_ae(u_char('\xE4')), c_oe(u_char('\xF6')), c_ue(u_char('\xFC')),
- pInputCurTokenStart(0),
- pInputPosition(0),
- pOutputPosition(0),
- pCurParseNode(0),
- eCurResult(OK),
- cCurHotkey(0),
- cCurHotkeySign(u_char('~'))
-{
- // Initialize parsing tree:
- pUnknownAlpha = new WTT_Node(BR_ALPHABASE,0,0); // This will be deleted as part of the parsing tree.
- for ( UINT8 i = BR_ALPHABASE; i < C_NR_OF_BRANCHES; i++)
- {
- pUnknownAlpha->SetBranch(i,pUnknownAlpha);
- } // end for
-
- dpParsingTreeTop = new WTT_Node(BR_START,0,pUnknownAlpha);
-
- WTT_Node * dpNonAlpha = new WTT_Node(BR_NONALPHA,0,0);
-
- dpNonAlpha->SetBranch(BR_NONALPHA,dpNonAlpha);
- dpParsingTreeTop->SetBranch(BR_NONALPHA,dpNonAlpha);
-
- WTT_Node * dpBackslash = new WTT_Node(BR_BACKSLASH,dpNonAlpha,dpNonAlpha);
- dpBackslash->SetBranch(BR_END,0);
-
- dpParsingTreeTop->SetBranch(BR_BACKSLASH,dpBackslash);
- dpNonAlpha->SetBranch(BR_BACKSLASH,dpBackslash);
-
-
- // Initialize character set:
- SetCharSet(i_nWorkingCharSet);
-
- if (C_BR_ALPHABASE != BR_ALPHABASE || C_NR_OF_BRANCHES != BR_MAX)
- {
- fprintf(stderr, "Assertion failed: file %s line %d.", __FILE__, __LINE__);
- exit(1);
- }
-}
-
-void
-WordTransTree::SetCharSet(CharSet i_nWorkingCharSet)
-{
- ByteString sConvert("\xC4\xD6\xDC\xE4\xF6\xFC\xDF");
- const u_char * pConvert = (const u_char * ) ( sConvert.Convert(RTL_TEXTENCODING_MS_1252, i_nWorkingCharSet).GetBuffer() );
-
- INT16 i = 0;
- for ( ; i < C_NR_OF_POSSIBLE_CHARS; ++i )
- {
- cChar2Branch[i] = BR_NONALPHA;
- } // end for
- for ( i = 'a'; i <= 'z'; ++i )
- {
- cChar2Branch[i] = BR_ALPHABASE + i - 'a';
- } // end for
- for ( i = 'A'; i <= 'Z'; ++i )
- {
- cChar2Branch[i] = BR_ALPHABASE + i - 'A';
- } // end for
- cChar2Branch[pConvert[0]] = BR_AE;
- cChar2Branch[pConvert[1]] = BR_OE;
- cChar2Branch[pConvert[2]] = BR_UE;
- cChar2Branch[pConvert[3]] = BR_AE;
- cChar2Branch[pConvert[4]] = BR_OE;
- cChar2Branch[pConvert[5]] = BR_UE;
- cChar2Branch[pConvert[6]] = BR_SZ;
-
- cChar2Branch[u_char('~')] = BR_HOTKEY;
- cChar2Branch[u_char('&')] = BR_HOTKEY;
-
-
- c_AE = pConvert[0];
- c_OE = pConvert[1];
- c_UE = pConvert[2];
- c_ae = pConvert[3];
- c_oe = pConvert[4];
- c_ue = pConvert[5];
-}
-
-WordTransTree::~WordTransTree()
-{
- delete dpParsingTreeTop;
- if (sOutput != 0)
- delete [] sOutput;
-}
-
-void
-WordTransTree::AddWordPair( const ByteString & i_sOldString,
- const ByteString & i_sReplaceString )
-{
- if (i_sOldString.Len() == 0)
- return;
-
- pCurParseNode = dpParsingTreeTop;
- WTT_Node * pBranch = 0;
- char cBranch = 0;
-
- for ( constr pOld = i_sOldString.GetBuffer();
- *pOld != 0;
- pOld++ )
- {
- cBranch = CalculateBranch(*pOld);
- pBranch = pCurParseNode->GetNextNode(cBranch);
- if (pBranch == 0 || pBranch == pUnknownAlpha)
- {
- pBranch = new WTT_Node(cBranch,0,pUnknownAlpha);
- pCurParseNode->SetBranch(cBranch,pBranch);
- }
- pCurParseNode = pBranch;
- } // end for
- pCurParseNode->SetAsTokenToReplace(i_sReplaceString);
-}
-
-void
-WordTransTree::InitTransformation( const char * i_sInput,
- UINT32 i_nInputLength,
- UINT32 i_nOutputMaxLength )
-{
- sInput = (const u_char *)i_sInput;
- nInputLength = i_nInputLength;
- pInputEnd = &sInput[i_nInputLength];
-
- pInputCurTokenStart = sInput;
- pInputPosition = sInput;
-
- if (nOutputMaxLength < i_nOutputMaxLength)
- {
- if (sOutput != 0)
- delete [] sOutput;
- sOutput = new unsigned char[i_nOutputMaxLength];
- nOutputMaxLength = i_nOutputMaxLength;
- }
- pOutputPosition = sOutput;
-}
-
-/** pInputCurTokenStart and CurParseNode are updated just when
- starting this function. After its end they must not be changed
- till this functon is called again.
- Outside this function pInputPositon and pOutputPosition are both
- on the first not transformed char in their respective array.
-**/
-WordTransTree::E_Result
-WordTransTree::TransformNextToken()
-{
- pInputCurTokenStart = pInputPosition;
- pCurParseNode = dpParsingTreeTop;
- cCurHotkey = 0;
- eCurResult = OK;
-
- WTT_Node * pBranch = 0;
- UINT8 cBranch = 0;
-
- for ( pCurParseNode = dpParsingTreeTop;
- pInputPosition != pInputEnd;
- ++pInputPosition )
- {
- cBranch = CalculateBranch(*pInputPosition);
- pBranch = pCurParseNode->GetNextNode( cBranch );
- if (pBranch != 0)
- {
- pCurParseNode = pBranch;
- }
- else
- {
- if (cBranch == BR_HOTKEY) // current letter is '~' or '&'.
- {
- // Logic of the following. There are 9 possible cases -
- // A = alphabetic letter, NA = non alphabetic, TB = token begin,
- // Eot = end of text:
- // 1. A~A set hotkey to following letter, continue
- // 2. A~NA token end
- // 3. A~Eot token end
- // 4. NA~A token end
- // 5. NA~NA continue
- // 6. A~Eof continue
- // 7. TB~A set hotkey to following letter, continue
- // 8. TB~NA continue
- // 9. TB~Eot continue
-
- // bNext and Prev are true, if there are alphabetic letters:
- sal_Bool bNext = pInputPosition + 1 != pInputEnd
- ? CalculateBranch(pInputPosition[1]) >= BR_ALPHABASE
- : sal_False;
- sal_Bool bPrev = pCurParseNode->Value() >= BR_ALPHABASE;
-
- if ( bNext && (bPrev || pCurParseNode == dpParsingTreeTop) )
- { // case 1. and 7.
- Handle_Hotkey();
- continue;
- }
- else if (!bPrev && !bNext)
- { // case 5.,6.,8.,9.
- continue;
- }
-
- // Case 2.,3.,4. :
- // so this should be handled as an end of a token.
- }
- if (pCurParseNode->TokenType() == WTT_Node::token_to_keep)
- {
- Handle_TokenToKeep();
- return eCurResult;
- }
- else
- {
- Handle_TokenToTransform();
- return eCurResult;
- } // endif (pCurParseNode->TokenType() == WTT_Node::token_to_keep)
- } // endif (pBranch == 0) else
- } // end for
-
- // If here, the text end is reached
- if (pCurParseNode->TokenType() == WTT_Node::token_to_keep)
- {
- Handle_TokenToKeep();
- return eCurResult;
- }
- else
- {
- Handle_TokenToTransform();
- return eCurResult;
- }
-}
-
-ByteString
-WordTransTree::CurReplacingString() const
-{
- return pCurParseNode->ReplaceString();
-}
-
-void
-WordTransTree::Handle_Hotkey()
-{
- if (cCurHotkey == 0) // Avoid to replace the first found hotkey by
- // a later one - though this shouldn't happen anyway.
- {
- cCurHotkey = (pInputPosition+1) != pInputEnd ? pInputPosition[1] : 0;
- cCurHotkeySign = *pInputPosition;
- }
-}
-
-void
-WordTransTree::Handle_TokenToKeep()
-{
- UINT32 nTokenLength = pInputPosition-pInputCurTokenStart;
-
- memcpy(pOutputPosition,pInputCurTokenStart,nTokenLength);
-
- pOutputPosition += nTokenLength;
- *pOutputPosition = '\0';
-}
-
-void
-WordTransTree::Handle_TokenToTransform()
-{
- sal_Bool bHaveHotkey = CalculateBranch(cCurHotkey) >= BR_ALPHABASE;
- const ByteString & rReplace = pCurParseNode->ReplaceString();
-
- // Find position of hotkey in replace-string:
- sal_uInt16 nHotkeyPos = bHaveHotkey
- ? rReplace.Search(char(cCurHotkey))
- : STRING_NOTFOUND;
- if (nHotkeyPos == STRING_NOTFOUND && bHaveHotkey)
- {
- if (cCurHotkey < 128)
- {
- if (islower(cCurHotkey))
- nHotkeyPos = rReplace.Search(toupper(char(cCurHotkey)));
- else
- nHotkeyPos = rReplace.Search(tolower(char(cCurHotkey)));
- }
- else // cCurHotkey >= 128
- {
- if (cCurHotkey == c_ae)
- nHotkeyPos = rReplace.Search(char(c_AE));
- else if (cCurHotkey == c_oe)
- nHotkeyPos = rReplace.Search(char(c_OE));
- else if (cCurHotkey == c_ue)
- nHotkeyPos = rReplace.Search(char(c_UE));
- else if (cCurHotkey == c_AE)
- nHotkeyPos = rReplace.Search(char(c_ae));
- else if (cCurHotkey == c_OE)
- nHotkeyPos = rReplace.Search(char(c_oe));
- else if (cCurHotkey == c_UE)
- nHotkeyPos = rReplace.Search(char(c_ue));
- } // endif (cCurHotkey < 128) else
-
- if (nHotkeyPos == STRING_NOTFOUND)
- {
- eCurResult = HOTKEY_LOST;
- bHaveHotkey = sal_False;
- }
- } // endif (nHotkeyPos == STRING_NOT_FOUND && bHaveHotkey)
-
-
- UINT32 nOutputTokenLength = rReplace.Len() + (bHaveHotkey ? 1 : 0);
-
- if (bHaveHotkey)
- {
- memcpy( pOutputPosition,
- pCurParseNode->ReplaceString().GetBuffer(),
- nHotkeyPos );
- *(pOutputPosition + nHotkeyPos) = cCurHotkeySign;
- memcpy( pOutputPosition + nHotkeyPos + 1,
- pCurParseNode->ReplaceString().GetBuffer() + nHotkeyPos,
- nOutputTokenLength - nHotkeyPos - 1);
- }
- else
- {
- memcpy( pOutputPosition,
- pCurParseNode->ReplaceString().GetBuffer(),
- nOutputTokenLength );
- }
-
- // Convert first letter into upper if necessary:
- u_char cInStart = CalculateBranch(*pInputCurTokenStart) == BR_HOTKEY
- ? pInputCurTokenStart[1]
- : pInputCurTokenStart[0] ;
- u_char * pOutStart = nHotkeyPos == 0
- ? pOutputPosition + 1
- : pOutputPosition ;
- if (isupper(cInStart) || cInStart > 127)
- { // Possibly cInStart is upper character:
- if (isupper(cInStart) || cInStart == c_AE || cInStart == c_OE || cInStart == c_UE)
- { // Surely cInStart is upper character:
- u_char cOutStart = *pOutStart;
- if (cOutStart < 128)
- *pOutStart = toupper(cOutStart);
- else if (cOutStart == c_ae)
- *pOutStart = c_AE;
- else if (cOutStart == c_oe)
- *pOutStart = c_OE;
- else if (cOutStart == c_ue)
- *pOutStart = c_UE;
- }
- } // endif (isupper(cInStart) || cInStart > 127)
-
- pOutputPosition += nOutputTokenLength;
- *pOutputPosition = '\0';
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit f2306b9474669226dae5ed1bb9812c7bd69c747b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 22:14:23 2011 +0100
elide conversion from MS1252 to MS1252
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index e303167..86b94d3 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -925,8 +925,6 @@ int Export::Execute( int nToken, const char * pToken )
sKey.EraseAllChars( ' ' );
sKey.EraseAllChars( '\t' );
ByteString sText( GetText( sToken, nToken ));
- if ( !bMergeMode )
- sText = sText.Convert( RTL_TEXTENCODING_MS_1252, RTL_TEXTENCODING_MS_1252 );
ByteString sLang;
if ( getToken(sToken, 0, '=').indexOf('[') != -1 )
{
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 36a46f2..d98f9ea 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -202,8 +202,6 @@ MergeDataFile::MergeDataFile(
{
xub_StrLen nToks;
aInputStream.ReadLine( sLine );
- sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, RTL_TEXTENCODING_MS_1252 );
-
nToks = sLine.GetTokenCount( '\t' );
if ( nToks == 15 )
{
commit 13caa83dca4e1507a6e0213bd122d13af570d132
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 22:09:08 2011 +0100
no route left to set encoding, only RTL_TEXTENCODING_MS_1252 is possible
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index c33960f..8c42647 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -294,8 +294,6 @@ class Export
private:
WordTransformer *pWordTransformer;
- CharSet aCharSet; // used charset in src
-
SvFileStream aOutput;
ResStack aResStack; // stack for parsing recursive
@@ -515,7 +513,7 @@ class MergeDataFile
);
ByteString Dump();
public:
- MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
+ explicit MergeDataFile( const ByteString &rFileName, const ByteString& rFile, bool bErrLog, bool bCaseSensitive = false );
~MergeDataFile();
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index cf4fe7f..047839c 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -719,7 +719,7 @@ CfgMerge::CfgMerge(
{
if ( rMergeSource.Len()){
pMergeDataFile = new MergeDataFile(
- rMergeSource, sInputFileName , bErrorLog, RTL_TEXTENCODING_MS_1252, true );
+ rMergeSource, sInputFileName, bErrorLog, true );
if( Export::sLanguages.EqualsIgnoreCaseAscii("ALL") ){
Export::SetLanguages( pMergeDataFile->GetLanguages() );
aLanguages = pMergeDataFile->GetLanguages();
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 6df2b66..e303167 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -418,7 +418,6 @@ Export::Export( const ByteString &rOutput, sal_Bool bWrite,
/*****************************************************************************/
:
pWordTransformer( NULL ),
- aCharSet( RTL_TEXTENCODING_MS_1252 ),
bDefine( sal_False ),
bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
@@ -463,7 +462,6 @@ Export::Export( const ByteString &rOutput, sal_Bool bWrite,
/*****************************************************************************/
:
pWordTransformer( NULL ),
- aCharSet( RTL_TEXTENCODING_MS_1252 ),
bDefine( sal_False ),
bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
@@ -529,7 +527,7 @@ Export::~Export()
if ( bMergeMode && !bUnmerge ) {
if ( !pMergeDataFile )
- pMergeDataFile = new MergeDataFile( sMergeSrc,sFile , bErrorLog, aCharSet);//, bUTF8 );
+ pMergeDataFile = new MergeDataFile( sMergeSrc, sFile, bErrorLog);//, bUTF8 );
delete pMergeDataFile;
}
@@ -928,7 +926,7 @@ int Export::Execute( int nToken, const char * pToken )
sKey.EraseAllChars( '\t' );
ByteString sText( GetText( sToken, nToken ));
if ( !bMergeMode )
- sText = sText.Convert( aCharSet, RTL_TEXTENCODING_MS_1252 );
+ sText = sText.Convert( RTL_TEXTENCODING_MS_1252, RTL_TEXTENCODING_MS_1252 );
ByteString sLang;
if ( getToken(sToken, 0, '=').indexOf('[') != -1 )
{
@@ -1885,7 +1883,7 @@ sal_Bool Export::PrepareTextToMerge(ByteString &rText, sal_uInt16 nTyp,
// search for merge data
if ( !pMergeDataFile ){
- pMergeDataFile = new MergeDataFile( sMergeSrc, sFile , bErrorLog, aCharSet);//, bUTF8 );
+ pMergeDataFile = new MergeDataFile( sMergeSrc, sFile, bErrorLog );//, bUTF8 );
// Init Languages
ByteString sTmp = Export::sLanguages;
@@ -1935,7 +1933,7 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
/*****************************************************************************/
{
if ( !pMergeDataFile ){
- pMergeDataFile = new MergeDataFile( sMergeSrc, sFile ,bErrorLog, aCharSet);//, bUTF8 );
+ pMergeDataFile = new MergeDataFile( sMergeSrc, sFile, bErrorLog );//, bUTF8 );
// Init Languages
ByteString sTmp = Export::sLanguages;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index f196f27..36a46f2 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -182,13 +182,12 @@ sal_Bool MergeData::operator==( ResData *pData )
MergeDataFile::MergeDataFile(
const ByteString &rFileName,
const ByteString& sFile,
- sal_Bool bErrLog,
- CharSet aCharSet,
+ bool bErrLog,
bool bCaseSensitive)
: bErrorLog( bErrLog )
{
SvFileStream aInputStream( String( rFileName, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_READ );
- aInputStream.SetStreamCharSet( aCharSet );
+ aInputStream.SetStreamCharSet( RTL_TEXTENCODING_MS_1252 );
ByteString sLine;
const ByteString sHACK("HACK");
const ::rtl::OString sFileNormalized(lcl_NormalizeFilename(sFile));
@@ -203,7 +202,7 @@ MergeDataFile::MergeDataFile(
{
xub_StrLen nToks;
aInputStream.ReadLine( sLine );
- sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, aCharSet );
+ sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, RTL_TEXTENCODING_MS_1252 );
nToks = sLine.GetTokenCount( '\t' );
if ( nToks == 15 )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 064d908..4043e6f 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -605,7 +605,7 @@ XRMResMerge::XRMResMerge(
{
if ( rMergeSource.Len())
pMergeDataFile = new MergeDataFile(
- rMergeSource, sInputFileName , bErrorLog, RTL_TEXTENCODING_MS_1252);//, bUTF8 );
+ rMergeSource, sInputFileName, bErrorLog);//, bUTF8 );
if( Export::sLanguages.EqualsIgnoreCaseAscii("ALL") ){
Export::SetLanguages( pMergeDataFile->GetLanguages() );
aLanguages = pMergeDataFile->GetLanguages();
commit c216006f0a35c812ca999d8f68eaeb8e453c58fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 21:55:05 2011 +0100
remove commented out CHARSET_ANSI foo
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index efbbc21..26091e0 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -226,34 +226,6 @@ void StgHeader::SetMasters( sal_Int32 n )
///////////////////////////// class StgEntry /////////////////////////////
-// This class is only a wrapper around teh dir entry structure
-// which retrieves and sets data.
-
-// The name must be smaller than 32 chars. Conversion into Unicode
-// is easy, since the 1st 256 characters of the Windows ANSI set
-// equal the 1st 256 Unicode characters.
-/*
-void ToUnicode_Impl( String& rName )
-{
- rName.Erase( 32 );
- rName.Convert( ::GetSystemCharSet(), CHARSET_ANSI );
- // brute force is OK
- sal_uInt8* p = (sal_uInt8*) rName.GetCharStr();
- for( sal_uInt16 i = 0; i < rName.Len(); i++, p++ )
- {
- // check each character and substitute blanks for illegal ones
- sal_uInt8 cChar = *p;
- if( cChar == '!' || cChar == ':' || cChar == '\\' || cChar == '/' )
- *p = ' ';
- }
-}
-*/
-/*
-static void FromUnicode( String& rName )
-{
- rName.Convert( CHARSET_ANSI, ::GetSystemCharSet() );
-}
-*/
sal_Bool StgEntry::Init()
{
memset( this, 0, sizeof (StgEntry) - sizeof( String ) );
commit f64dc2c9fbc81d68315ee3a2dbc69411b9087ddb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 21:53:16 2011 +0100
I believe the src charset pragma is archaic and unused
diff --git a/cui/source/dialogs/SpellDialog.src b/cui/source/dialogs/SpellDialog.src
index 663b156..88da8b7 100644
--- a/cui/source/dialogs/SpellDialog.src
+++ b/cui/source/dialogs/SpellDialog.src
@@ -24,11 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <cuires.hrc>
#include "helpid.hrc"
#include "SpellDialog.hrc"
- // pragma ----------------------------------------------------------------
// RID_SVXDLG_SPELLCHECK -------------------------------------------------
diff --git a/cui/source/dialogs/cuiimapdlg.src b/cui/source/dialogs/cuiimapdlg.src
index 05475f8..de2e020 100644
--- a/cui/source/dialogs/cuiimapdlg.src
+++ b/cui/source/dialogs/cuiimapdlg.src
@@ -24,10 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include "helpid.hrc"
#include "cuiimapdlg.hrc"
- // pragma ----------------------------------------------------------------
ModalDialog RID_SVXDLG_IMAPURL
{
diff --git a/cui/source/options/fontsubs.src b/cui/source/options/fontsubs.src
index c0fdfff..5938efe 100644
--- a/cui/source/options/fontsubs.src
+++ b/cui/source/options/fontsubs.src
@@ -25,16 +25,9 @@
*
************************************************************************/
- // include ------------------------------------------------------------------
-
#include "fontsubs.hrc"
#include "helpid.hrc"
- // pragma -------------------------------------------------------------------
-
-
-
-
/**************************************************************************/
TabPage RID_SVX_FONT_SUBSTITUTION
diff --git a/cui/source/options/optcolor.src b/cui/source/options/optcolor.src
index e058e27..4313415 100644
--- a/cui/source/options/optcolor.src
+++ b/cui/source/options/optcolor.src
@@ -24,12 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "helpid.hrc"
#include <cuires.hrc>
#include "optcolor.hrc"
- // pragma ----------------------------------------------------------------
TabPage RID_SVXPAGE_COLORCONFIG
{
diff --git a/cui/source/options/optdict.src b/cui/source/options/optdict.src
index c31c950..31a8f9a 100644
--- a/cui/source/options/optdict.src
+++ b/cui/source/options/optdict.src
@@ -24,12 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "helpid.hrc"
#include <cuires.hrc>
#include "optdict.hrc"
- // pragma ----------------------------------------------------------------
// RID_SFXDLG_NEWDICT ----------------------------------------------------
ModalDialog RID_SFXDLG_NEWDICT
diff --git a/cui/source/options/optfltr.src b/cui/source/options/optfltr.src
index b43d034..60c4030 100644
--- a/cui/source/options/optfltr.src
+++ b/cui/source/options/optfltr.src
@@ -24,10 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include -----------------------------------------------------------------
+
#include "optfltr.hrc"
#include <cuires.hrc>
- // pragma ------------------------------------------------------------------
// RID_OFAPAGE_MSFILTEROPT -----------------------------------------------------
TabPage RID_OFAPAGE_MSFILTEROPT
diff --git a/cui/source/options/optinet2.src b/cui/source/options/optinet2.src
index 64a3662..34789e7 100644
--- a/cui/source/options/optinet2.src
+++ b/cui/source/options/optinet2.src
@@ -24,12 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ------------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "helpid.hrc"
#include <cuires.hrc>
#include "optinet2.hrc"
- // pragma -------------------------------------------------------------------
/************************************************************************/
/* */
diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src
index d252bdf..f90ca91 100644
--- a/cui/source/tabpages/autocdlg.src
+++ b/cui/source/tabpages/autocdlg.src
@@ -24,13 +24,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ------------------------------------------------------------------
+
#include "autocdlg.hrc"
#include <cuires.hrc>
#include "helpid.hrc"
#include <svx/svxids.hrc> // SID_AUTOFORMAT
- // pragma -------------------------------------------------------------------
/**************************************************************************/
/* */
/* TabDialog RID_OFA_AUTOCORR_DLG */
diff --git a/cui/source/tabpages/backgrnd.src b/cui/source/tabpages/backgrnd.src
index bbf7970..98de175 100644
--- a/cui/source/tabpages/backgrnd.src
+++ b/cui/source/tabpages/backgrnd.src
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <svtools/controldims.hrc>
#include "helpid.hrc"
#include <cuires.hrc>
@@ -35,8 +35,6 @@
#define UNLINKED_IMAGE \
Text [ en-US ] = "Unlinked graphic" ; \
- // pragma ----------------------------------------------------------------
-
// RID_SVXPAGE_BACKGROUND ------------------------------------------------
TabPage RID_SVXPAGE_BACKGROUND
{
diff --git a/cui/source/tabpages/connect.src b/cui/source/tabpages/connect.src
index d2fe079..1414cf0 100644
--- a/cui/source/tabpages/connect.src
+++ b/cui/source/tabpages/connect.src
@@ -24,9 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // pragma ----------------------------------------------------------------
- // include ---------------------------------------------------------------
#include <svtools/controldims.hrc>
#include "connect.hrc"
#include <cuires.hrc>
diff --git a/cui/source/tabpages/measure.src b/cui/source/tabpages/measure.src
index f01c276..624cf3e 100644
--- a/cui/source/tabpages/measure.src
+++ b/cui/source/tabpages/measure.src
@@ -24,14 +24,13 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <cuires.hrc>
#include "measure.hrc"
#include "helpid.hrc"
#include <svx/dialogs.hrc>
#define DELTA 20
- // pragma ----------------------------------------------------------------
// RID_SVXPAGE_MEASURE ---------------------------------------------------
TabPage RID_SVXPAGE_MEASURE
diff --git a/cui/source/tabpages/textanim.src b/cui/source/tabpages/textanim.src
index 4f2ffda..f015028 100644
--- a/cui/source/tabpages/textanim.src
+++ b/cui/source/tabpages/textanim.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // pragma ----------------------------------------------------------------
#include <svtools/controldims.hrc>
#include <cuires.hrc>
diff --git a/editeng/source/items/svxitems.src b/editeng/source/items/svxitems.src
index a661aab..222fc2c 100644
--- a/editeng/source/items/svxitems.src
+++ b/editeng/source/items/svxitems.src
@@ -24,9 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ------------------------------------------------------------------
+
#include <editeng/editrids.hrc>
- // pragma -------------------------------------------------------------------
// Value strings ------------------------------------------------------------
String RID_SVXITEMS_TRUE
diff --git a/editeng/source/misc/lingu.src b/editeng/source/misc/lingu.src
index fa3ef76..0c98bda 100644
--- a/editeng/source/misc/lingu.src
+++ b/editeng/source/misc/lingu.src
@@ -24,9 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <editeng/editrids.hrc>
- // pragma ----------------------------------------------------------------
// QueryBoxen ---------------------------------------------------------------
QueryBox RID_SVXQB_CONTINUE
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index e75550d..6df2b66 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -447,7 +447,7 @@ Export::Export( const ByteString &rOutput, sal_Bool bWrite,
if ( bEnableExport ) {
aOutput.Open( String( rOutput, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_WRITE | STREAM_TRUNC );
if( !aOutput.IsOpen() ) {
- printf("ERROR : Can't open file %s\n",rOutput.GetBuffer());
+ fprintf(stderr, "ERROR : Can't open file %s\n",rOutput.GetBuffer());
exit ( -1 );
}
aOutput.SetStreamCharSet( RTL_TEXTENCODING_UTF8 );
@@ -1111,25 +1111,8 @@ int Export::Execute( int nToken, const char * pToken )
break;
case PRAGMA : {
bDontWriteOutput = sal_False;
- while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
- while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {};
- sToken.EraseLeadingChars( ' ' );
- sToken.EraseTrailingChars( ' ' );
-
- ByteString sCharset = getToken(sToken, 1, ' ');
- ByteString sSet = getToken(sToken, 2, ' ');
- if (( sCharset.ToUpperAscii() == "CHARSET_IBMPC" ) ||
- ( sCharset == "RTL_TEXTENCODING_IBM_850" ) ||
- (( sCharset == "CHARSET" ) && ( sSet.ToUpperAscii() == "IBMPC" )))
- {
- aCharSet = RTL_TEXTENCODING_IBM_850;
- }
- else if (( sCharset == "CHARSET_ANSI" ) ||
- ( sCharset == "RTL_TEXTENCODING_MS_1252" ) ||
- (( sCharset == "CHARSET" ) && ( sSet.ToUpperAscii() == "ANSI" )))
- {
- aCharSet = RTL_TEXTENCODING_MS_1252;
- }
+ fprintf(stderr, "ERROR: archaic PRAGMA %s\n", sToken.GetBuffer());
+ exit(-1);
}
break;
case TEXTREFID : {
diff --git a/sc/source/ui/formdlg/dwfunctr.src b/sc/source/ui/formdlg/dwfunctr.src
index dc50a2b..30d5fa7 100644
--- a/sc/source/ui/formdlg/dwfunctr.src
+++ b/sc/source/ui/formdlg/dwfunctr.src
@@ -24,12 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include "sc.hrc"
#include "dwfunctr.hrc"
- // pragma ----------------------------------------------------------------
-
// RID_SVXDLG_CALCFUNC --------------------------------------------------
DockingWindow FID_FUNCTION_BOX
{
diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src
index 9d35981..df024ca 100644
--- a/sfx2/source/dialog/mgetempl.src
+++ b/sfx2/source/dialog/mgetempl.src
@@ -24,11 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "helpid.hrc"
#include "mgetempl.hrc"
- // pragma ----------------------------------------------------------------
// TP_MANAGE_STYLES ------------------------------------------------------
TabPage TP_MANAGE_STYLES
diff --git a/sfx2/source/doc/docvor.src b/sfx2/source/doc/docvor.src
index 595f349..32518e7 100644
--- a/sfx2/source/doc/docvor.src
+++ b/sfx2/source/doc/docvor.src
@@ -24,12 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "doc.hrc"
#include "docvor.hrc"
#include "helpid.hrc"
-// pragma ----------------------------------------------------------------
// DLG_ORGANIZE ----------------------------------------------------------
diff --git a/sfx2/source/doc/new.src b/sfx2/source/doc/new.src
index 6737128..a524a50 100644
--- a/sfx2/source/doc/new.src
+++ b/sfx2/source/doc/new.src
@@ -24,14 +24,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "doc.hrc"
#include "new.hrc"
#include <sfx2/sfxcommands.h>
- // pragma ----------------------------------------------------------------
-
// DLG_NEW_FILE ----------------------------------------------------------
ModalDialog DLG_NEW_FILE
{
diff --git a/svtools/source/misc/ehdl.src b/svtools/source/misc/ehdl.src
index 2c2fab3..7fcbece 100644
--- a/svtools/source/misc/ehdl.src
+++ b/svtools/source/misc/ehdl.src
@@ -29,8 +29,6 @@
#include <svtools/svtools.hrc>
#include <svtools/sfxecode.hxx>
- // pragma ----------------------------------------------------------------
-
String STR_ERR_HDLMESS
{
Text = "$(ACTION)$(ERROR)" ;
diff --git a/svx/source/dialog/fontwork.src b/svx/source/dialog/fontwork.src
index 960a3b1..dc53478 100644
--- a/svx/source/dialog/fontwork.src
+++ b/svx/source/dialog/fontwork.src
@@ -24,12 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
#include "fontwork.hrc"
#include "helpid.hrc"
- // pragma ----------------------------------------------------------------
// RID_SVXDLG_FONTWORK ---------------------------------------------------
DockingWindow RID_SVXDLG_FONTWORK
diff --git a/svx/source/dialog/hdft.src b/svx/source/dialog/hdft.src
index 1cd4026..2527827 100644
--- a/svx/source/dialog/hdft.src
+++ b/svx/source/dialog/hdft.src
@@ -24,11 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include "helpid.hrc"
#include <svx/dialogs.hrc>
#include "hdft.hrc"
- // pragma ----------------------------------------------------------------
#define _TEXT_FT_LMARGIN \
Text [ en-US ] = "~Left margin" ; \
diff --git a/svx/source/dialog/imapdlg.src b/svx/source/dialog/imapdlg.src
index 8ceebde..ae06b02 100644
--- a/svx/source/dialog/imapdlg.src
+++ b/svx/source/dialog/imapdlg.src
@@ -24,10 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include "helpid.hrc"
#include "imapdlg.hrc"
- // pragma ----------------------------------------------------------------
// RID_SVXDLG_IMAP ----------------------------------------------------
ModelessDialog RID_SVXDLG_IMAP
diff --git a/svx/source/dialog/language.src b/svx/source/dialog/language.src
index aa2bee8..5520848 100644
--- a/svx/source/dialog/language.src
+++ b/svx/source/dialog/language.src
@@ -25,9 +25,7 @@
*
************************************************************************/
- // include ---------------------------------------------------------------
#include <svx/dialogs.hrc>
- // pragma ----------------------------------------------------------------
// Language-Strings ------------------------------------------------------
diff --git a/svx/source/dialog/optgrid.src b/svx/source/dialog/optgrid.src
index 0d65c63..0d5cfd0 100644
--- a/svx/source/dialog/optgrid.src
+++ b/svx/source/dialog/optgrid.src
@@ -24,12 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <sfx2/sfx.hrc>
#include "helpid.hrc"
#include <svx/dialogs.hrc>
#include "optgrid.hrc"
- // pragma ----------------------------------------------------------------
TabPage RID_SVXPAGE_GRID
{
diff --git a/svx/source/dialog/passwd.src b/svx/source/dialog/passwd.src
index 821ede7..13674df 100644
--- a/svx/source/dialog/passwd.src
+++ b/svx/source/dialog/passwd.src
@@ -24,11 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <svx/dialogs.hrc>
#include "helpid.hrc"
#include "passwd.hrc"
- // pragma ----------------------------------------------------------------
// RID_SVXDLG_PASSWORD ---------------------------------------------------
ModalDialog RID_SVXDLG_PASSWORD
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index 7be731e..05d746d 100644
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -24,9 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ------------------------------------------------------------------
+
#include <svx/dialogs.hrc>
- // pragma -------------------------------------------------------------------
// Strings for the Draw-Dialog --------------------------------------------
String RID_SVXSTR_SOLID
diff --git a/svx/source/engine3d/string3d.src b/svx/source/engine3d/string3d.src
index 9d23adc..5049b23 100644
--- a/svx/source/engine3d/string3d.src
+++ b/svx/source/engine3d/string3d.src
@@ -24,9 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ------------------------------------------------------------------
+
#include <svx/dialogs.hrc>
- // pragma -------------------------------------------------------------------
// Strings for the Draw Dialog --------------------------------------------
String RID_SVX_3D_CREATE_LATHE
diff --git a/svx/source/items/svxerr.src b/svx/source/items/svxerr.src
index a7e726f..d21187f 100644
--- a/svx/source/items/svxerr.src
+++ b/svx/source/items/svxerr.src
@@ -24,14 +24,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#define __RSC
#include "svx/svxerr.hxx"
#include <svx/dialogs.hrc>
#include <editeng/editerr.hxx>
- // pragma ----------------------------------------------------------------
-
// Error-Context ---------------------------------------------------------
Resource RID_SVXERRCTX
{
diff --git a/svx/source/src/errtxt.src b/svx/source/src/errtxt.src
index 004885c..c190a72 100644
--- a/svx/source/src/errtxt.src
+++ b/svx/source/src/errtxt.src
@@ -29,7 +29,6 @@
#include <svtools/svtools.hrc>
#include <svtools/sfxecode.hxx>
-// pragma ----------------------------------------------------------------
Resource RID_ERRCTX
{
String ERRCTX_ERROR
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index cd129d1..4e50e1f 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -24,11 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <svx/dialogs.hrc>
#include "helpid.hrc"
#include "stbctrls.h"
- // pragma ----------------------------------------------------------------
// Strings ---------------------------------------------------------------
String RID_SVXSTR_INSERT_TEXT
diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src
index 6a65615..364a0b3 100644
--- a/svx/source/tbxctrls/colrctrl.src
+++ b/svx/source/tbxctrls/colrctrl.src
@@ -27,7 +27,6 @@
#include <svx/dialogs.hrc>
#include "helpid.hrc"
- // pragma ----------------------------------------------------------------
// RID_SVXCTRL_COLOR -----------------------------------------------------
DockingWindow RID_SVXCTRL_COLOR
diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src
index 8101cd5..b75f35c 100644
--- a/svx/source/tbxctrls/tbcontrl.src
+++ b/svx/source/tbxctrls/tbcontrl.src
@@ -24,10 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include <svx/dialogs.hrc>
#include <helpid.hrc>
- // pragma ----------------------------------------------------------------
/*
* Bitmaps f"ur SvxFrameWindow
diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src
index 8247888..278019c 100644
--- a/sw/source/ui/chrdlg/ccoll.src
+++ b/sw/source/ui/chrdlg/ccoll.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "globals.hrc"
#include "chrdlg.hrc"
diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src
index 67ce361..cd27ac8 100644
--- a/sw/source/ui/chrdlg/numpara.src
+++ b/sw/source/ui/chrdlg/numpara.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "globals.hrc"
#include "chrdlg.hrc"
diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src
index 169c1b6..3286d21 100644
--- a/sw/source/ui/dbui/dbui.src
+++ b/sw/source/ui/dbui/dbui.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "dbui.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/envelp/envelp.src b/sw/source/ui/envelp/envelp.src
index 20cbceb..75c5641 100644
--- a/sw/source/ui/envelp/envelp.src
+++ b/sw/source/ui/envelp/envelp.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "envelp.hrc"
#include "globals.hrc"
diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src
index 02ea2ea..ed5b532 100644
--- a/sw/source/ui/envelp/envfmt.src
+++ b/sw/source/ui/envelp/envfmt.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "envfmt.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src
index 32bc185..05f9fb9 100644
--- a/sw/source/ui/envelp/envlop.src
+++ b/sw/source/ui/envelp/envlop.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "envlop.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src
index 7060409..5c0b606 100644
--- a/sw/source/ui/envelp/envprt.src
+++ b/sw/source/ui/envelp/envprt.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma *****************************************************************
#include "envprt.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index 7d554d2..18360ed 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "label.hrc"
#include "globals.hrc"
diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src
index 1d0c7b7..a7cbab1 100644
--- a/sw/source/ui/envelp/labfmt.src
+++ b/sw/source/ui/envelp/labfmt.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "labfmt.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src
index 35dac12..69cd336 100644
--- a/sw/source/ui/envelp/labprt.src
+++ b/sw/source/ui/envelp/labprt.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #pragma ******************************************************************
#include "labprt.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src
index a5ebb89..60f5155 100644
--- a/sw/source/ui/fldui/javaedit.src
+++ b/sw/source/ui/fldui/javaedit.src
@@ -24,11 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // include ---------------------------------------------------------------
+
#include "javaedit.hrc"
#include "fldui.hrc"
#include "helpid.h"
- // pragma ----------------------------------------------------------------
// RID_SVXDLG_POSTIT -----------------------------------------------------
ModalDialog DLG_JAVAEDIT
diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src
index ea63227..f218119 100644
--- a/sw/source/ui/frmdlg/cption.src
+++ b/sw/source/ui/frmdlg/cption.src
@@ -29,7 +29,6 @@
#include "frmui.hrc"
#include "cption.hrc"
#include "cmdid.h"
- // #pragma ******************************************************************
// ModalDialog **************************************************************
ModalDialog DLG_CAPTION
commit 3a17760c69cb8cfe84fe68baf8b51cfb63084415
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 12 21:26:20 2011 +0100
remove commented out archaic CHARSET_ANSI pragma
diff --git a/extensions/source/bibliography/sections.src b/extensions/source/bibliography/sections.src
index 19501bd..7fabab5 100644
--- a/extensions/source/bibliography/sections.src
+++ b/extensions/source/bibliography/sections.src
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//#pragma CHARSET_ANSI
#include "sections.hrc"
#include "bibliography.hrc"
More information about the Libreoffice-commits
mailing list