[Libreoffice-commits] .: 15 commits - comphelper/source filter/inc filter/source sc/source sd/source svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk svtools/source svx/inc svx/source sw/source tools/inc tools/qa tools/source unotools/inc unotools/source unusedcode.easy vcl/inc vcl/source xmloff/inc xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Sep 5 02:54:50 PDT 2011


 comphelper/source/misc/storagehelper.cxx |   22 +-
 filter/inc/filter/msfilter/mstoolbar.hxx |   29 +-
 filter/source/msfilter/msocximex.cxx     |  323 +++++++++++++++----------------
 filter/source/msfilter/mstoolbar.cxx     |  143 ++++++-------
 sc/source/filter/excel/excimp8.cxx       |    2 
 sc/source/filter/excel/xltoolbar.cxx     |   54 ++---
 sc/source/filter/excel/xltoolbar.hxx     |   10 
 sd/source/filter/eppt/pptx-text.cxx      |   10 
 sd/source/filter/eppt/text.hxx           |    1 
 svtools/Library_svt.mk                   |    1 
 svtools/Package_inc.mk                   |    1 
 svtools/inc/svtools/filterutils.hxx      |   24 --
 svtools/inc/svtools/headbar.hxx          |    4 
 svtools/inc/svtools/taskbar.hxx          |    1 
 svtools/source/control/headbar.cxx       |   50 ----
 svtools/source/control/taskstat.cxx      |   15 -
 svtools/source/misc/filterutils.cxx      |   53 -----
 svtools/source/uno/svtxgridcontrol.cxx   |   17 -
 svtools/source/uno/svtxgridcontrol.hxx   |    1 
 svx/inc/svx/dlgctrl.hxx                  |    1 
 svx/inc/svx/galtheme.hxx                 |    1 
 svx/source/dialog/dlgctrl.cxx            |    8 
 svx/source/gallery2/galtheme.cxx         |   13 -
 sw/source/filter/rtf/swparrtf.cxx        |    6 
 sw/source/filter/ww8/ww8graf2.cxx        |    2 
 sw/source/filter/ww8/ww8par.cxx          |   23 +-
 sw/source/filter/ww8/ww8par2.cxx         |    2 
 sw/source/filter/ww8/ww8par3.cxx         |   18 -
 sw/source/filter/ww8/ww8scan.cxx         |  149 +++++---------
 sw/source/filter/ww8/ww8scan.hxx         |   44 +---
 sw/source/filter/ww8/ww8toolbar.cxx      |  245 +++++++++++------------
 sw/source/filter/ww8/ww8toolbar.hxx      |   42 ++--
 sw/source/filter/xml/swxml.cxx           |   47 ++--
 tools/inc/tools/stream.hxx               |   10 
 tools/inc/tools/unqidx.hxx               |    4 
 tools/qa/cppunit/test_stream.cxx         |    8 
 tools/source/memtools/unqidx.cxx         |   22 --
 tools/source/stream/stream.cxx           |   45 +++-
 unotools/inc/unotools/eventcfg.hxx       |    3 
 unotools/source/config/eventcfg.cxx      |   27 --
 unusedcode.easy                          |   40 ---
 vcl/inc/vcl/canvastools.hxx              |    1 
 vcl/inc/vcl/cvtgrf.hxx                   |    4 
 vcl/inc/vcl/dialog.hxx                   |    1 
 vcl/source/gdi/cvtgrf.cxx                |   76 -------
 vcl/source/gdi/gdimtf.cxx                |   15 -
 vcl/source/gdi/pdfwriter_impl.cxx        |    5 
 vcl/source/gdi/pdfwriter_impl.hxx        |    2 
 vcl/source/helper/canvastools.cxx        |    6 
 vcl/source/window/dialog.cxx             |   31 --
 xmloff/inc/xmloff/shapeimport.hxx        |    7 
 xmloff/source/draw/sdpropls.cxx          |    7 
 xmloff/source/draw/sdpropls.hxx          |    1 
 xmloff/source/draw/shapeimport.cxx       |   83 -------
 54 files changed, 619 insertions(+), 1141 deletions(-)

New commits:
commit a234cec9f67ff9eae21e1fe1030ec2d2442a51f9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 5 10:53:49 2011 +0100

    disentangle WW8Read_xstz variants

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 41df2b0..604a811 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2169,13 +2169,13 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
     *pDataStream >> hps;
 
     // xstzName
-    sTitle = WW8Read_xstz(*pDataStream, 0, true);
+    sTitle = read_LEuInt16_BeltAndBracesString(*pDataStream);
 
     if (nWhich == WW8_CT_EDIT)
     {   // Field is a textbox
         // Default text
         // xstzTextDef
-        sDefault = WW8Read_xstz(*pDataStream, 0, true);
+        sDefault = read_LEuInt16_BeltAndBracesString(*pDataStream);
     }
     else
     {
@@ -2191,14 +2191,14 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
         }
     }
     // xstzTextFormat
-    sFormatting = WW8Read_xstz(*pDataStream, 0, true);
+    sFormatting = read_LEuInt16_BeltAndBracesString(*pDataStream);
     // xstzHelpText
-    sHelp = WW8Read_xstz(*pDataStream, 0, true);
+    sHelp = read_LEuInt16_BeltAndBracesString(*pDataStream);
     // xstzStatText
-    sToolTip = WW8Read_xstz(*pDataStream, 0, true);
+    sToolTip = read_LEuInt16_BeltAndBracesString(*pDataStream);
 
-    String sEntryMacro = WW8Read_xstz(*pDataStream, 0, true);
-    String sExitMcr = WW8Read_xstz(*pDataStream, 0, true);
+    String sEntryMacro = read_LEuInt16_BeltAndBracesString(*pDataStream);
+    String sExitMcr = read_LEuInt16_BeltAndBracesString(*pDataStream);
 
     if (nWhich == WW8_CT_DROPDOWN)
     {
commit c0eb401571fc835da8a083f12b44666e73bc33e1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 5 10:27:17 2011 +0100

    another round of unused methods

diff --git a/unusedcode.easy b/unusedcode.easy
index 3a9a734..aaba53c 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2043,9 +2043,11 @@ binfilter::SwOLELRUCache::Remove(binfilter::SwOLEObj&)
 binfilter::SwOutlineNodes::Insert(binfilter::SwNode* const&, unsigned short&)
 binfilter::SwOutlineNodes::Insert(binfilter::SwNode* const*, unsigned short)
 binfilter::SwOutlineNodes::Insert(binfilter::SwOutlineNodes const*, unsigned short, unsigned short)
+binfilter::SwRects::Insert(binfilter::SwRect const&, unsigned short)
 binfilter::SwRects::Insert(binfilter::SwRects const*, unsigned short, unsigned short, unsigned short)
 binfilter::SwRects::Replace(binfilter::SwRect const&, unsigned short)
 binfilter::SwRects::Replace(binfilter::SwRect const*, unsigned short, unsigned short)
+binfilter::SwRects::SwRects(unsigned short, unsigned char)
 binfilter::SwRects::_ForEach(unsigned short, unsigned short, unsigned char (*)(binfilter::SwRect const&, void*), void*)
 binfilter::SwRubyList::DeleteAndDestroy(unsigned short, unsigned short)
 binfilter::SwSelBoxes::Insert(binfilter::SwTableBox* const&, unsigned short&)
commit 04ce2cea24b7e90de6542789dfdcf894082fad70
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 5 00:17:44 2011 +0100

    callcatcher: drop some Impl methods, regenerate list

diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index bf6499c..b1a38fa 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1213,16 +1213,6 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
     nBulletId = rParagraphObj.nBulletId;
 }
 
-::com::sun::star::awt::Size ParagraphObj::ImplMapSize( const ::com::sun::star::awt::Size& rSize )
-{
-    Size aSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) );
-    if ( !aSize.Width() )
-        aSize.Width()++;
-    if ( !aSize.Height() )
-        aSize.Height()++;
-    return ::com::sun::star::awt::Size( aSize.Width(), aSize.Height() );
-}
-
 sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition )
 {
     mnTextSize = 0;
diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx
index 6a0c9fd..24f1800 100644
--- a/sd/source/filter/eppt/text.hxx
+++ b/sd/source/filter/eppt/text.hxx
@@ -181,7 +181,6 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
         void            ImplConstruct( ParagraphObj& rParagraphObj );
         void            ImplClear();
         sal_uInt32      ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
-        ::com::sun::star::awt::Size         ImplMapSize( const ::com::sun::star::awt::Size& rSize );
         void            ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue = sal_False );
         void            ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue = sal_False );
 
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
index c29fe77..d844c02 100644
--- a/svtools/inc/svtools/taskbar.hxx
+++ b/svtools/inc/svtools/taskbar.hxx
@@ -300,7 +300,6 @@ private:
     sal_Bool                mbDummy2;
 
 #ifdef _TASKBAR_CXX
-    SVT_DLLPRIVATE ImplTaskSBFldItem*  ImplGetFieldItem( sal_uInt16 nItemId ) const;
     SVT_DLLPRIVATE ImplTaskSBFldItem*  ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const;
     SVT_DLLPRIVATE sal_Bool                ImplUpdateClock();
     SVT_DLLPRIVATE sal_Bool                ImplUpdateFlashItems();
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
index 08f2a25..8c0b033 100644
--- a/svtools/source/control/taskstat.cxx
+++ b/svtools/source/control/taskstat.cxx
@@ -174,21 +174,6 @@ IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG )
 
 // -----------------------------------------------------------------------
 
-ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( sal_uInt16 nItemId ) const
-{
-    if ( !mpFieldItemList )
-        return NULL;
-
-    for ( size_t i = 0, n = mpFieldItemList->size(); i < n; ++i ) {
-        if ( (*mpFieldItemList)[ i ]->mnId == nItemId ) {
-            return  (*mpFieldItemList)[ i ];
-        }
-    }
-    return NULL;
-}
-
-// -----------------------------------------------------------------------
-
 ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const
 {
     if ( GetItemId( rPos ) == TASKSTATUSBAR_STATUSFIELDID )
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index 778925a..829fae0 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -496,23 +496,6 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru
     return aPropertyValue;
 }
 
-void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
-{
-    PushPropertyIds( rIds,
-        BASEPROPERTY_GRID_SHOWROWHEADER,
-        BASEPROPERTY_GRID_SHOWCOLUMNHEADER,
-        BASEPROPERTY_GRID_DATAMODEL,
-        BASEPROPERTY_GRID_COLUMNMODEL,
-        BASEPROPERTY_GRID_SELECTIONMODE,
-        BASEPROPERTY_GRID_HEADER_BACKGROUND,
-        BASEPROPERTY_GRID_HEADER_TEXT_COLOR,
-        BASEPROPERTY_GRID_LINE_COLOR,
-        BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS,
-        0
-    );
-    VCLXWindow::ImplGetPropertyIds( rIds, true );
-}
-
 //----------------------------------------------------------------------------------------------------------------------
 void SAL_CALL SVTXGridControl::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException)
 {
diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx
index 6e4eb80..60c3a3a 100644
--- a/svtools/source/uno/svtxgridcontrol.hxx
+++ b/svtools/source/uno/svtxgridcontrol.hxx
@@ -104,7 +104,6 @@ public:
 
     void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
     ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
-    static void     ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
 
     // ::com::sun::star::lang::XComponent
     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/svx/inc/svx/galtheme.hxx b/svx/inc/svx/galtheme.hxx
index 4d5f7bf..2dc845d 100644
--- a/svx/inc/svx/galtheme.hxx
+++ b/svx/inc/svx/galtheme.hxx
@@ -115,7 +115,6 @@ private:
     void                        ImplCreateSvDrawStorage();
     SVX_DLLPUBLIC SgaObject*                    ImplReadSgaObject( GalleryObject* pEntry );
     sal_Bool                    ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry );
-    void                        ImplRead();
     void                        ImplWrite();
     const GalleryObject*        ImplGetGalleryObject( size_t nPos ) const
                                 { return ( nPos < aObjectList.size() ) ? aObjectList[ nPos ] : NULL; }
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index e239fbd..2926a81 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -213,19 +213,6 @@ SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry )
 
 // ------------------------------------------------------------------------
 
-void GalleryTheme::ImplRead()
-{
-    SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
-
-    if( pIStm )
-    {
-        *pIStm >> *this;
-        delete pIStm;
-    }
-}
-
-// ------------------------------------------------------------------------
-
 void GalleryTheme::ImplWrite()
 {
     if( IsModified() )
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 9fe62ed..6d7085c 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -1492,8 +1492,10 @@ void SwRTFParser::ReadShapeObject()
             if (bshpTxt) {
               SdrOutliner& rOutliner=pDoc->GetDrawModel()->GetDrawOutliner(pStroke);
               rOutliner.Clear();
-              ByteString bs(shpTxt, RTL_TEXTENCODING_ASCII_US);
-              SvMemoryStream aStream((sal_Char*)bs.GetBuffer(), bs.Len(), STREAM_READ);
+              rtl::OString bs(rtl::OUStringToOString(shpTxt,
+                RTL_TEXTENCODING_ASCII_US));
+              SvMemoryStream aStream(const_cast<sal_Char*>(bs.getStr()),
+                bs.getLength(), STREAM_READ);
               rOutliner.Read(aStream, String::CreateFromAscii(""), EE_FORMAT_RTF);
               OutlinerParaObject* pParaObject=rOutliner.CreateParaObject();
               pStroke->NbcSetOutlinerParaObject(pParaObject);
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 02251d1..a379900 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -62,7 +62,7 @@
 #include <svx/xmleohlp.hxx>
 #include <comphelper/genericpropertyset.hxx>
 #include <rtl/logfile.hxx>
-
+#include <rtl/strbuf.hxx>
 #include <sfx2/frame.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <swerror.h>
@@ -194,9 +194,10 @@ sal_Int32 ReadThroughComponent(
 
 #ifdef TIMELOG
     // if we do profiling, we want to know the stream
-    ByteString aString( (String)rStreamName, RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aString(rtl::OUStringToOString(rStreamName,
+        RTL_TEXTENCODING_ASCII_US));
     RTL_LOGFILE_TRACE_AUTHOR1( "sw", LOGFILE_AUTHOR,
-                               "ReadThroughComponent : parsing \"%s\"", aString.GetBuffer() );
+        "ReadThroughComponent : parsing \"%s\"", aString.getStr() );
 #endif
 
     // finally, parser the stream
@@ -228,9 +229,11 @@ sal_Int32 ReadThroughComponent(
             return ERRCODE_SFX_WRONGPASSWORD;
 
 #if OSL_DEBUG_LEVEL > 1
-        ByteString aError( "SAX parse exception caught while importing:\n" );
-        aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
-        OSL_FAIL( aError.GetBuffer() );
+        rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+            "SAX parse exception caught while importing:\n"));
+        aError.append(rtl::OUStringToOString(r.Message,
+            RTL_TEXTENCODING_ASCII_US));
+        OSL_FAIL(aError.getStr());
 #endif
 
         String sErr( String::CreateFromInt32( r.LineNumber ));
@@ -262,9 +265,11 @@ sal_Int32 ReadThroughComponent(
             return ERRCODE_SFX_WRONGPASSWORD;
 
 #if OSL_DEBUG_LEVEL > 1
-        ByteString aError( "SAX exception caught while importing:\n" );
-        aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
-        OSL_FAIL( aError.GetBuffer() );
+        rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+            "SAX exception caught while importing:\n"));
+        aError.append(rtl::OUStringToOString(r.Message,
+            RTL_TEXTENCODING_ASCII_US));
+        OSL_FAIL(aError.getStr());
 #endif
 
         return ERR_SWG_READ_ERROR;
@@ -273,9 +278,11 @@ sal_Int32 ReadThroughComponent(
     {
         (void)r;
 #if OSL_DEBUG_LEVEL > 1
-        ByteString aError( "Zip exception caught while importing:\n" );
-        aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
-        OSL_FAIL( aError.GetBuffer() );
+        rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+            "Zip exception caught while importing:\n"));
+        aError.append(rtl::OUStringToOString(r.Message,
+            RTL_TEXTENCODING_ASCII_US));
+        OSL_FAIL(aError.getStr());
 #endif
         return ERRCODE_IO_BROKENPACKAGE;
     }
@@ -283,9 +290,11 @@ sal_Int32 ReadThroughComponent(
     {
         (void)r;
 #if OSL_DEBUG_LEVEL > 1
-        ByteString aError( "IO exception caught while importing:\n" );
-        aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
-        OSL_FAIL( aError.GetBuffer() );
+        rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+            "IO exception caught while importing:\n"));
+        aError.append(rtl::OUStringToOString(r.Message,
+            RTL_TEXTENCODING_ASCII_US));
+        OSL_FAIL(aError.getStr());
 #endif
         return ERR_SWG_READ_ERROR;
     }
@@ -293,9 +302,11 @@ sal_Int32 ReadThroughComponent(
     {
         (void)r;
 #if OSL_DEBUG_LEVEL > 1
-        ByteString aError( "uno exception caught while importing:\n" );
-        aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
-        OSL_FAIL( aError.GetBuffer() );
+        rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+            "uno exception caught while importing:\n"));
+        aError.append(rtl::OUStringToOString(r.Message,
+            RTL_TEXTENCODING_ASCII_US));
+        OSL_FAIL(aError.getStr());
 #endif
         return ERR_SWG_READ_ERROR;
     }
diff --git a/unotools/inc/unotools/eventcfg.hxx b/unotools/inc/unotools/eventcfg.hxx
index 253aaba..1e01ac0 100644
--- a/unotools/inc/unotools/eventcfg.hxx
+++ b/unotools/inc/unotools/eventcfg.hxx
@@ -83,7 +83,6 @@ public:
     GlobalEventConfig_Impl( );
     ~GlobalEventConfig_Impl( );
 
-    void EstablishFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame);
     void            Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
     void            Commit();
 
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 4e7aec4..007b244 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -205,20 +205,6 @@ void GlobalEventConfig_Impl::Commit()
 }
 
 //*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-void GlobalEventConfig_Impl::EstablishFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame)
-{
-    // check if frame already exists inside list
-    // ignore double registrations
-    // every frame must be notified one times only!
-    ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > xWeak(xFrame);
-    FrameVector::const_iterator pIt = ::std::find(m_lFrames.begin(), m_lFrames.end(), xWeak);
-    if (pIt == m_lFrames.end())
-        m_lFrames.push_back(xWeak);
-}
-
-//*****************************************************************************************************************
 //  private method
 //*****************************************************************************************************************
 void GlobalEventConfig_Impl::initBindingInfo()
diff --git a/unusedcode.easy b/unusedcode.easy
index c4e7bf6..3a9a734 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -13,37 +13,37 @@ CIccCmm::IsInGamut(float*)
 CIccCmm::ToInternalEncoding(icColorSpaceSignature, float*, unsigned char const*)
 CIccCmm::ToInternalEncoding(icColorSpaceSignature, float*, unsigned short const*)
 CIccFormulaCurveSegment::SetFunction(unsigned short, unsigned char, float*)
-CIccIO::ReadLine(void*, long)
+CIccIO::ReadLine(void*, int)
 CIccInfo::GetSpotShapeName(icSpotShape)
 CIccMBB::NewCLUT(unsigned char*, unsigned char)
-CIccMemIO::Alloc(unsigned long, bool)
+CIccMemIO::Alloc(unsigned int, bool)
 CIccMpeCLUT::SetCLUT(CIccCLUT*)
 CIccMpeCreator::DoGetElementSigName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, icElemTypeSignature)
 CIccMpeCurveSet::SetCurve(int, CIccCurveSetCurve*)
 CIccMruCmm::Attach(CIccCmm*, unsigned char)
 CIccNamedColorCmm::CIccNamedColorCmm(icColorSpaceSignature, icColorSpaceSignature, bool)
 CIccNamedColorCmm::SetLastXformDest(icColorSpaceSignature)
-CIccProfile::DeleteTag(unsigned long)
+CIccProfile::DeleteTag(unsigned int)
 CIccProfile::GetSpaceSamples() const
 CIccProfileIdDesc::CIccProfileIdDesc(CIccProfile&)
 CIccProfileIdDesc::CIccProfileIdDesc(icProfileID, CIccTagMultiLocalizedUnicode)
 CIccSegmentedCurve::Insert(CIccCurveSegment*)
 CIccTagCurve::SetGamma(float)
-CIccTagFixedNum<long, (icTagTypeSignature)1936077618>::GetSize() const
-CIccTagFixedNum<unsigned long, (icTagTypeSignature)1969632050>::GetSize() const
+CIccTagFixedNum<int, (icTagTypeSignature)1936077618>::GetSize() const
+CIccTagFixedNum<unsigned int, (icTagTypeSignature)1969632050>::GetSize() const
 CIccTagMultiLocalizedUnicode::SetText(unsigned short const*, unsigned short, unsigned short)
 CIccTagMultiProcessElement::GetElement(int)
 CIccTagNamedColor2::FindRootColor(char const*)
 CIccTagNamedColor2::Lab4ToLab2(float*, float const*)
 CIccTagNamedColor2::NegClip(float)
 CIccTagNum<unsigned char, (icTagTypeSignature)1969827896>::GetSize() const
-CIccTagNum<unsigned long long, (icTagTypeSignature)1969829428>::GetSize() const
-CIccTagNum<unsigned long, (icTagTypeSignature)1969828658>::GetSize() const
+CIccTagNum<unsigned int, (icTagTypeSignature)1969828658>::GetSize() const
+CIccTagNum<unsigned long, (icTagTypeSignature)1969829428>::GetSize() const
 CIccTagNum<unsigned short, (icTagTypeSignature)1969828150>::GetSize() const
 CIccTagProfileSequenceId::AddProfileDescription(CIccProfileIdDesc const&)
 CIccTagProfileSequenceId::GetFirst()
 CIccTagProfileSequenceId::GetLast()
-CIccTagProfileSequenceId::ParseMem(unsigned char*, unsigned long)
+CIccTagProfileSequenceId::ParseMem(unsigned char*, unsigned int)
 CIccTagResponseCurveSet16::GetFirstCurves()
 CIccTagResponseCurveSet16::GetNextCurves()
 CIccTagResponseCurveSet16::NewResponseCurves(icMeasurementUnitSig)
@@ -104,7 +104,6 @@ DdeService::DdeService(String const&)
 DdeTopic::RemoveItem(DdeItem const&)
 DffPropSet::SetPropertyValue(unsigned int, unsigned int) const
 Dialog::Dialog(Window*, ResId const&)
-Dialog::ImplCenterDialog()
 Dialog::IsStartedModal() const
 DirEntry::GetDevice() const
 DlgEdObj::LinkStubOnCreate(void*, void*)
@@ -205,13 +204,11 @@ GalleryExplorer::GetObjCount(unsigned long)
 GalleryExplorer::GetVCDrawModel(FmFormModel&) const
 GalleryExplorer::InsertGraphicObj(unsigned long, Graphic const&)
 GalleryExplorer::InsertSdrObj(unsigned long, FmFormModel&)
-GalleryTheme::ImplRead()
 GraphCtrl::GraphCtrl(Window*, long)
 Graphic::Draw(OutputDevice*, String const&, Font&, Bitmap const&, Point const&, Size const&)
 Graphic::GetGraphicsCompressMode(SvStream&)
 Graphic::StartAnimation(OutputDevice*, Point const&, long, OutputDevice*)
 Graphic::WriteEmbedded(SvStream&)
-GraphicConverter::ImplConvert(unsigned long, void*, unsigned long, void**, unsigned long)
 GraphicReader::IsPreviewModeEnabled() const
 GroupTable::SkipCurrentGroup()
 HTMLControls::Insert(HTMLControl const*&, unsigned short&)
@@ -241,8 +238,6 @@ ImpBitmap::ImplDestroy()
 ImpDefaultMapper::ImpDefaultMapper(com::sun::star::uno::Reference<com::sun::star::beans::XPropertyState>&)
 ImpEditEngine::Repeat(EditView*)
 ImpEditView::CalcSelectedRegion()
-ImpLabelList::ImplFirst()
-ImpLabelList::ImplNext()
 ImpSvMEdit::SetInsertMode(unsigned char)
 ImpSvMEdit::SetTextWindowOffset(Point const&)
 ImpSvlData::~ImpSvlData()
@@ -399,7 +394,6 @@ ParaPortion::DbgCheckTextPortions()
 ParaPortionList::DbgCheck(EditDoc&)
 ParagraphList::GetVisPos(Paragraph*) const
 ParagraphList::PrevVisible(Paragraph*) const
-ParagraphObj::ImplMapSize(com::sun::star::awt::Size const&)
 ParagraphObj::ParagraphObj(ParagraphObj&)
 PathDialog::SetPath(Edit const&)
 PatternBox::GetString(unsigned short) const
@@ -434,7 +428,6 @@ SVGExport::IsUseGradient() const
 SVGExport::popClip()
 SVGExport::pushClip(basegfx::B2DPolyPolygon const&)
 SVGFilter::implImport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
-SVTXGridControl::ImplGetPropertyIds(std::list<unsigned short, std::allocator<unsigned short> >&)
 SalColormap::SalColormap(BitmapPalette const&)
 SalColormap::SetPalette(BitmapPalette const&)
 SalDisplay::IsLocal()
@@ -1409,7 +1402,6 @@ TEWritingDirectionInfos::Replace(TEWritingDirectionInfo const&, unsigned short)
 TEWritingDirectionInfos::Replace(TEWritingDirectionInfo const*, unsigned short, unsigned short)
 TEWritingDirectionInfos::_ForEach(unsigned short, unsigned short, unsigned char (*)(TEWritingDirectionInfo const&, void*), void*)
 TTProfiler::Dec(unsigned long)
-TaskStatusBar::ImplGetFieldItem(unsigned short) const
 TaskStatusFieldItem::TaskStatusFieldItem()
 TempFile::IsValid() const
 TextObj::TextObj(TextObj&)
diff --git a/vcl/inc/vcl/canvastools.hxx b/vcl/inc/vcl/canvastools.hxx
index 516dfac..7c9653e 100644
--- a/vcl/inc/vcl/canvastools.hxx
+++ b/vcl/inc/vcl/canvastools.hxx
@@ -180,7 +180,6 @@ namespace vcl
         ::com::sun::star::geometry::RealSize2D          VCL_DLLPUBLIC size2DFromSize( const Size& );
 
         Size                                            VCL_DLLPUBLIC sizeFromRealSize2D( const ::com::sun::star::geometry::RealSize2D& );
-        Point                                           VCL_DLLPUBLIC pointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& );
 
         // geometry::Integer
         ::com::sun::star::geometry::IntegerSize2D       VCL_DLLPUBLIC integerSize2DFromSize( const Size& );
diff --git a/vcl/inc/vcl/cvtgrf.hxx b/vcl/inc/vcl/cvtgrf.hxx
index 50d766f..0603052 100644
--- a/vcl/inc/vcl/cvtgrf.hxx
+++ b/vcl/inc/vcl/cvtgrf.hxx
@@ -48,10 +48,6 @@ private:
     ConvertData*        mpConvertData;
 
 public:
-    SAL_DLLPRIVATE sal_uLong    ImplConvert( sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize,
-                                     void** ppOutBuffer, sal_uLong nOutFormat );
-
-public:
 
                         GraphicConverter();
                         ~GraphicConverter();
diff --git a/vcl/inc/vcl/dialog.hxx b/vcl/inc/vcl/dialog.hxx
index 7b8c3ac..bb41799 100644
--- a/vcl/inc/vcl/dialog.hxx
+++ b/vcl/inc/vcl/dialog.hxx
@@ -68,7 +68,6 @@ protected:
     using Window::ImplInit;
     SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
     SAL_DLLPRIVATE void    ImplDialogRes( const ResId& rResId );
-    SAL_DLLPRIVATE void    ImplCenterDialog();
 
 public:
     SAL_DLLPRIVATE sal_Bool    IsInClose() const { return mbInClose; }
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 6d3b607..a17c00f 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -56,82 +56,6 @@ GraphicConverter::~GraphicConverter()
 
 // ------------------------------------------------------------------------
 
-sal_uLong GraphicConverter::ImplConvert( sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize,
-                                     void** ppOutBuffer, sal_uLong nOutFormat )
-{
-    sal_uLong nRetBufSize = 0UL;
-
-    if( ( nInFormat != nOutFormat ) && pInBuffer )
-    {
-        if( ( nInFormat == CVT_SVM ) || ( nInFormat == CVT_BMP ) )
-        {
-            SvMemoryStream  aIStm;
-            Graphic         aGraphic;
-
-            aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
-            aIStm >> aGraphic;
-
-            if( !aIStm.GetError() )
-            {
-                SvMemoryStream aOStm( 64535, 64535 );
-
-                mpConvertData = new ConvertData( aGraphic, aOStm, nOutFormat );
-
-                if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
-                {
-                    nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
-                    *ppOutBuffer = (void*) aOStm.GetData();
-                    aOStm.ObjectOwnsMemory( sal_False );
-                }
-
-                delete mpConvertData;
-                mpConvertData = NULL;
-            }
-        }
-        else if( ( nOutFormat == CVT_SVM ) || ( nOutFormat == CVT_BMP ) )
-        {
-            SvMemoryStream  aIStm;
-
-            aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
-            mpConvertData = new ConvertData( Graphic(), aIStm, nInFormat );
-
-            if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
-            {
-                SvMemoryStream  aOStm( 645535, 64535 );
-                Graphic&        rGraphic = mpConvertData->maGraphic;
-
-                if( ( rGraphic.GetType() == GRAPHIC_BITMAP ) && ( CVT_SVM == nOutFormat ) )
-                {
-                    GDIMetaFile aMtf;
-
-                    aMtf.SetPrefSize( rGraphic.GetPrefSize() );
-                    aMtf.SetPrefMapMode( rGraphic.GetPrefMapMode() );
-                    aMtf.AddAction( new MetaBmpExScaleAction( Point(), aMtf.GetPrefSize(), rGraphic.GetBitmapEx() ) );
-                    rGraphic = aMtf;
-                }
-                else if( ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE ) && ( CVT_BMP == nOutFormat ) )
-                    rGraphic = rGraphic.GetBitmapEx();
-
-                aOStm << rGraphic;
-
-                if( !aOStm.GetError() )
-                {
-                    nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
-                    *ppOutBuffer = (void*) aOStm.GetData();
-                    aOStm.ObjectOwnsMemory( sal_False );
-                }
-            }
-
-            delete mpConvertData;
-            mpConvertData = NULL;
-        }
-    }
-
-    return nRetBufSize;
-}
-
-// ------------------------------------------------------------------------
-
 sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLong nFormat )
 {
     GraphicConverter*   pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index bdbca9d..fffde04 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -169,8 +169,6 @@ public:
 
     void            ImplInsert( ImpLabel* p ) { aList.push_back( p ); }
 
-    ImpLabel*       ImplFirst();
-    ImpLabel*       ImplNext();
     ImpLabel*       ImplGetLabel( size_t nPos ) const;
     ImpLabel*       ImplRemove( size_t nPos );
 
@@ -197,19 +195,6 @@ ImpLabelList::~ImpLabelList()
 }
 
 // ------------------------------------------------------------------------
-ImpLabel* ImpLabelList::ImplFirst()
-{
-    nListPos = 0;
-    return ( aList.empty() ) ? NULL : aList[ nListPos ];
-}
-
-// ------------------------------------------------------------------------
-ImpLabel* ImpLabelList::ImplNext()
-{
-    return ( nListPos + 1 < aList.size() ) ? aList[ ++nListPos ] : NULL;
-}
-
-// ------------------------------------------------------------------------
 
 ImpLabel* ImpLabelList::ImplGetLabel( size_t nPos ) const
 {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 23d3cb4..a56ea83 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8559,11 +8559,6 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRe
     m_aCurrentPDFState.m_aFillColor = Color( COL_TRANSPARENT );
 }
 
-Rectangle PDFWriterImpl::getRedirectTargetRect() const
-{
-    return m_aOutputStreams.empty() ? Rectangle() : m_aOutputStreams.front().m_aTargetRect;
-}
-
 SvStream* PDFWriterImpl::endRedirect()
 {
     SvStream* pStream = NULL;
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 4397d7c..65fc682 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -995,8 +995,6 @@ i12626
     void beginCompression();
     void endCompression();
     void beginRedirect( SvStream* pStream, const Rectangle& );
-    // returns an empty rect if no redirection is happending
-    Rectangle getRedirectTargetRect() const;
     SvStream* endRedirect();
 
     void endPage();
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index cddc1b5..85da67a 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -404,12 +404,6 @@ namespace vcl
                          static_cast<long>(rSize.Height + .5) );
         }
 
-        Point pointFromRealPoint2D( const geometry::RealPoint2D& rPoint )
-        {
-            return Point( static_cast<long>(rPoint.X + .5),
-                          static_cast<long>(rPoint.Y + .5) );
-        }
-
         ::Size sizeFromB2DSize( const ::basegfx::B2DVector& rVec )
         {
             return ::Size( FRound( rVec.getX() ),
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 5c4c786..e057c4e 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -385,35 +385,6 @@ void Dialog::ImplInitSettings()
 
 // -----------------------------------------------------------------------
 
-void Dialog::ImplCenterDialog()
-{
-    Rectangle   aDeskRect = ImplGetFrameWindow()->GetDesktopRectPixel();
-    Point       aDeskPos = aDeskRect.TopLeft();
-    Size        aDeskSize = aDeskRect.GetSize();
-    Size        aWinSize = GetSizePixel();
-    Window *pWindow = this;
-    while ( pWindow->mpWindowImpl->mpBorderWindow )
-        pWindow = pWindow->mpWindowImpl->mpBorderWindow;
-    Point       aWinPos( ((aDeskSize.Width() - aWinSize.Width()) / 2) + aDeskPos.X(),
-                         ((aDeskSize.Height() - aWinSize.Height()) / 2) + aDeskPos.Y() );
-
-    // Pruefen, ob Dialogbox ausserhalb des Desks liegt
-    if ( (aWinPos.X() + aWinSize.Width()) > (aDeskPos.X()+aDeskSize.Width()) )
-        aWinPos.X() = aDeskPos.X()+aDeskSize.Width() - aWinSize.Width();
-    if ( (aWinPos.Y()+aWinSize.Height()) > (aDeskPos.Y()+aDeskSize.Height()) )
-        aWinPos.Y() = aDeskPos.Y()+aDeskSize.Height() - aWinSize.Height();
-    // Linke Ecke bevorzugen, da Titelbar oben ist
-    if ( aWinPos.X() < aDeskPos.X() )
-        aWinPos.X() = aDeskPos.X();
-    if ( aWinPos.Y() < aDeskPos.Y() )
-        aWinPos.Y() = aDeskPos.Y();
-
-    //SetPosPixel( aWinPos );
-    SetPosPixel( pWindow->ScreenToOutputPixel( aWinPos ) );
-}
-
-// -----------------------------------------------------------------------
-
 Dialog::Dialog( WindowType nType ) :
     SystemWindow( nType )
 {
@@ -517,8 +488,6 @@ void Dialog::StateChanged( StateChangedType nType )
         if ( GetSettings().GetStyleSettings().GetAutoMnemonic() )
             ImplWindowAutoMnemonic( this );
 
-        //if ( IsDefaultPos() && !mpWindowImpl->mbFrame )
-        //    ImplCenterDialog();
         if ( !HasChildPathFocus() || HasFocus() )
             GrabFocusToFirstControl();
         if ( !(GetStyle() & WB_CLOSEABLE) )
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 77c54ee..8b68b1d 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1161,11 +1161,6 @@ XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLProp
 {
 }
 
-XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, sal_uInt16 nOffset)
-: XMLPropertySetMapper( &aXMLSDProperties[nOffset], rFactoryRef )
-{
-}
-
 XMLShapePropertySetMapper::~XMLShapePropertySetMapper()
 {
 }
diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx
index 80b6e17..4718782 100644
--- a/xmloff/source/draw/sdpropls.hxx
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -254,7 +254,6 @@ class XMLShapePropertySetMapper : public XMLPropertySetMapper
 {
 public:
     XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef);
-    XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, sal_uInt16 nOffset);
     ~XMLShapePropertySetMapper();
 };
 
commit f8238e893b94901a6b1b2e08fd45be1a15726996
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 23:26:09 2011 +0100

    no real need to use pointers here

diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index e89da0c..a00aa16 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -347,7 +347,7 @@ void ImportExcel8::ReadBasic( void )
                 if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() )
                 {
                     CTBWrapper wrapper;
-                    if ( wrapper.Read( xXCB ) )
+                    if ( wrapper.Read( *xXCB ) )
                     {
 #if OSL_DEBUG_LEVEL > 1
                         wrapper.Print( stderr );
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 749cb48..908d094 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -103,23 +103,23 @@ CTB::CTB(sal_uInt16 nNum ) : nViews( nNum ), ectbid(0)
 {
 }
 
-bool CTB::Read( SvStream *pS )
+bool CTB::Read( SvStream &rS )
 {
-    OSL_TRACE("CTB::Read() stream pos 0x%x", pS->Tell() );
-    nOffSet = pS->Tell();
-    tb.Read( pS );
+    OSL_TRACE("CTB::Read() stream pos 0x%x", rS.Tell() );
+    nOffSet = rS.Tell();
+    tb.Read( rS );
     for ( sal_uInt16 index = 0; index < nViews; ++index )
     {
         TBVisualData aVisData;
-        aVisData.Read( pS );
+        aVisData.Read( rS );
         rVisualData.push_back( aVisData );
     }
-    *pS >> ectbid;
+    rS >> ectbid;
 
     for ( sal_Int16 index = 0; index < tb.getcCL(); ++index )
     {
         TBC aTBC;
-        aTBC.Read( pS );
+        aTBC.Read( rS );
         rTBC.push_back( aTBC );
     }
     return true;
@@ -212,11 +212,11 @@ bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper&
     }
     return bRes;
 }
-bool CTBS::Read( SvStream *pS )
+bool CTBS::Read( SvStream &rS )
 {
-    OSL_TRACE("CTBS::Read() stream pos 0x%x", pS->Tell() );
-    nOffSet = pS->Tell();
-    *pS >> bSignature >> bVersion >> reserved1 >> reserved2 >> reserved3 >> ctb >> ctbViews >> ictbView;
+    OSL_TRACE("CTBS::Read() stream pos 0x%x", rS.Tell() );
+    nOffSet = rS.Tell();
+    rS >> bSignature >> bVersion >> reserved1 >> reserved2 >> reserved3 >> ctb >> ctbViews >> ictbView;
     return true;
 }
 
@@ -242,24 +242,24 @@ TBC::TBC()
 }
 
 bool
-TBC::Read(SvStream *pS)
+TBC::Read(SvStream &rS)
 {
-    OSL_TRACE("TBC::Read() stream pos 0x%x", pS->Tell() );
-    nOffSet = pS->Tell();
-    if ( !tbch.Read( pS ) )
+    OSL_TRACE("TBC::Read() stream pos 0x%x", rS.Tell() );
+    nOffSet = rS.Tell();
+    if ( !tbch.Read( rS ) )
         return false;
     sal_uInt16 tcid = tbch.getTcID();
     sal_uInt8 tct = tbch.getTct();
     if (  ( tcid != 0x0001 && tcid != 0x06CC && tcid != 0x03D8 && tcid != 0x03EC && tcid != 0x1051 ) && ( ( tct > 0 && tct < 0x0B ) || ( ( tct > 0x0B && tct < 0x10 ) || tct == 0x15 ) ) )
     {
         tbcCmd.reset( new TBCCmd );
-        if ( !  tbcCmd->Read( pS ) )
+        if ( !  tbcCmd->Read( rS ) )
             return false;
     }
     if ( tct != 0x16 )
     {
         tbcd.reset( new TBCData( tbch ) );
-        if ( !tbcd->Read( pS ) )
+        if ( !tbcd->Read( rS ) )
             return false;
     }
     return true;
@@ -350,13 +350,13 @@ TBCCmd::Print(FILE* fp)
     indent_printf( fp, "   reserved3 0x%x\n", reserved3 );
 }
 
-bool TBCCmd::Read( SvStream *pS )
+bool TBCCmd::Read( SvStream &rS )
 {
-    OSL_TRACE("TBCCmd::Read() stream pos 0x%x", pS->Tell() );
-    nOffSet = pS->Tell();
-    *pS >> cmdID;
+    OSL_TRACE("TBCCmd::Read() stream pos 0x%x", rS.Tell() );
+    nOffSet = rS.Tell();
+    rS >> cmdID;
     sal_uInt16 temp;
-    *pS >> temp;
+    rS >> temp;
     OSL_TRACE("TBCmd temp = 0x%x", temp );
     A = (temp & 0x8000 ) == 0x8000;
     B = (temp & 0x4000) == 0x4000;
@@ -375,16 +375,16 @@ CTBWrapper::~CTBWrapper()
 }
 
 bool
-CTBWrapper::Read( SvStream *pS)
+CTBWrapper::Read( SvStream &rS)
 {
-    OSL_TRACE("CTBWrapper::Read() stream pos 0x%x", pS->Tell() );
-    nOffSet = pS->Tell();
-    if ( !ctbSet.Read( pS ) )
+    OSL_TRACE("CTBWrapper::Read() stream pos 0x%x", rS.Tell() );
+    nOffSet = rS.Tell();
+    if ( !ctbSet.Read( rS ) )
         return false;
     for ( sal_uInt16 index = 0; index < ctbSet.ctb; ++index )
     {
         CTB aCTB( ctbSet.ctbViews );
-        if ( !aCTB.Read( pS ) )
+        if ( !aCTB.Read( rS ) )
             return false;
         rCTB.push_back( aCTB );
     }
diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx
index 22e2bcd..f6e1cc6 100644
--- a/sc/source/filter/excel/xltoolbar.hxx
+++ b/sc/source/filter/excel/xltoolbar.hxx
@@ -48,7 +48,7 @@ public:
     sal_uInt16 cmdType:5;
     sal_uInt16 C:1;
     sal_uInt16 reserved3:8;
-    bool Read( SvStream* pS );
+    bool Read( SvStream& rS );
     void Print(FILE* fp);
 };
 
@@ -61,7 +61,7 @@ public:
     TBC();
     ~TBC(){}
     void Print( FILE* );
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     bool ImportToolBarControl( CTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
 };
 
@@ -78,7 +78,7 @@ public:
     CTB(sal_uInt16);
     ~CTB(){}
     void Print( FILE* );
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     bool IsMenuToolbar();
     bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& );
     bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
@@ -103,7 +103,7 @@ public:
     CTBS();
     ~CTBS(){}
     void Print( FILE* );
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
 };
 
 class CTBWrapper : public TBBase
@@ -115,7 +115,7 @@ class CTBWrapper : public TBBase
 public:
     CTBWrapper();
     ~CTBWrapper();
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     bool ImportCustomToolBar( SfxObjectShell& rDocSh );
     CTB* GetCustomizationData( const rtl::OUString& name );
commit 65a62a24c7a219e1f130484b6c4974077d9224e7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 23:17:13 2011 +0100

    move template down and tweak

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index babb331..8b32b99 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -77,26 +77,37 @@ namespace SL
     IMPLCONSTSTRINGARRAY(MSMacroCmds);
 }
 
-template<class C> bool wwString<C>::TestBeltAndBraces(SvStream& rStrm)
+namespace
 {
-    bool bRet = false;
-    sal_uInt32 nOldPos = rStrm.Tell();
-    C nBelt(0);
-    rStrm >> nBelt;
-    nBelt *= sizeof(C);
-    if (rStrm.good() && (rStrm.remainingSize() >= (nBelt + sizeof(C))))
-    {
-        rStrm.SeekRel(nBelt);
-        if (rStrm.good())
+    /**
+        winword strings are typically Belt and Braces strings preceeded with a
+        pascal style count, and ending with a c style 0 terminator. 16bit chars
+        and count for ww8+ and 8bit chars and count for ww7-. The count and 0
+        can be checked for integrity to catch errors (e.g. lotus created
+        documents) where in error 8bit strings are used instead of 16bits
+        strings for style names.
+    */
+    template<typename C> bool TestBeltAndBraces(SvStream& rStrm)
+    {
+        bool bRet = false;
+        sal_uInt32 nOldPos = rStrm.Tell();
+        C nBelt(0);
+        rStrm >> nBelt;
+        nBelt *= sizeof(C);
+        if (rStrm.good() && (rStrm.remainingSize() >= (nBelt + sizeof(C))))
         {
-            C cBraces(0);
-            rStrm >> cBraces;
-            if (rStrm.good() && cBraces == 0)
-                bRet = true;
+            rStrm.SeekRel(nBelt);
+            if (rStrm.good())
+            {
+                C cBraces(0);
+                rStrm >> cBraces;
+                if (rStrm.good() && cBraces == 0)
+                    bRet = true;
+            }
         }
+        rStrm.Seek(nOldPos);
+        return bRet;
     }
-    rStrm.Seek(nOldPos);
-    return bRet;
 }
 
 inline bool operator==(const SprmInfo &rFirst, const SprmInfo &rSecond)
@@ -6146,7 +6157,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                 case 8:
                     // handle Unicode-String with leading length short and
                     // trailing zero
-                    if (ww8String::TestBeltAndBraces(rSt))
+                    if (TestBeltAndBraces<sal_Unicode>(rSt))
                     {
                         *pString = read_LEuInt16_BeltAndBracesString(rSt);
                         rSkip -= (pString->Len() + 2) * 2;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 7d732c8..a323b84 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -72,22 +72,6 @@ namespace SL
     DEFCONSTSTRINGARRAY(MSMacroCmds);
 }
 
-/**
-    winword strings are typically Belt and Braces strings preceeded with a
-    pascal style count, and ending with a c style 0 terminator. 16bit chars
-    and count for ww8+ and 8bit chars and count for ww7-. The count and 0
-    can be checked for integrity to catch errors (e.g. lotus created documents)
-    where in error 8bit strings are used instead of 16bits strings for style
-    names.
-*/
-template<class C> class wwString
-{
-public:
-    static bool TestBeltAndBraces(SvStream& rStrm);
-};
-
-typedef wwString<sal_Unicode> ww8String;
-
 struct SprmInfo
 {
     sal_uInt16 nId;         ///< A ww8 sprm is hardcoded as 16bits
@@ -98,9 +82,9 @@ struct SprmInfo
 struct SprmInfoHash
 {
     size_t operator()(const SprmInfo &a) const
-        {
-            return a.nId;
-        }
+    {
+        return a.nId;
+    }
 };
 
 typedef ww::WrappedHash<SprmInfo, SprmInfoHash> wwSprmSearcher;
commit b96c999d7a7cb5399fc8fbeab32a8b3b8b5c76bc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 23:04:18 2011 +0100

    disentangle 16bit pascal-strings and zero terminated pstrings, etc.
    
    one method to read pascal strings, zero-terminated pascal strings
    and non-zero terminated non-pascal strings is a disaster when
    length of 0 toggle into pascal-string mode, shudder!

diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index cb40a02..a382f49 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -269,7 +269,7 @@ bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
         case 99: // TIFF-File ( nicht embeddet )
             pSt->Seek(nPosFc);
             // Name als P-String einlesen
-            rFileName = WW8ReadPascalString(*pSt, eStructCharSet);
+            rFileName = read_uInt8_PascalString(*pSt, eStructCharSet);
             if (rFileName.Len())
                 rFileName = URIHelper::SmartRel2Abs(
                     INetURLObject(sBaseURL), rFileName,
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 703e1db..c708a2c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5337,13 +5337,13 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
         {
             if( bVer67 )
             {
-                mpAtnNames->push_back(WW8ReadPascalString(rStrm,
+                mpAtnNames->push_back(read_uInt8_PascalString(rStrm,
                     RTL_TEXTENCODING_MS_1252));
                 nRead += mpAtnNames->rbegin()->Len() + 1;   // Laenge + sal_uInt8 Count
             }
             else
             {
-                mpAtnNames->push_back(WW8Read_xstz(rStrm, 0, false));
+                mpAtnNames->push_back(read_LEuInt16_PascalString(rStrm));
                 // UNICode: doppelte Laenge + sal_uInt16 Count
                 nRead += mpAtnNames->rbegin()->Len() * 2 + 2;
             }
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 4094d00..41df2b0 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -702,7 +702,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
     //
     // 4. den Nummerierungsstring einlesen: ergibt Prefix und Postfix
     //
-    String sNumString(WW8Read_xstz(rSt, 0, false));
+    String sNumString(read_LEuInt16_PascalString(rSt));
 
     //
     // 5. gelesene Werte in Writer Syntax umwandeln
@@ -2225,7 +2225,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
         maListEntries.reserve(nNoStrings);
         for (sal_uInt32 nI = 0; nI < nNoStrings; ++nI)
         {
-            String sEntry =  WW8Read_xstz(*pDataStream, 0, false);
+            String sEntry =  read_LEuInt16_PascalString(*pDataStream);
             maListEntries.push_back(sEntry);
         }
     }
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 5f4f714..babb331 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1900,35 +1900,32 @@ Err:
     return false;
 }
 
-String WW8ReadPascalString(SvStream& rStrm, rtl_TextEncoding eEnc)
+String read_uInt8_PascalString(SvStream& rStrm, rtl_TextEncoding eEnc)
 {
-    sal_uInt8 b(0);
-    rStrm >> b;
-    return rtl::OStringToOUString(read_uInt8s_AsOString(rStrm, b), eEnc);
+    sal_uInt8 nLen(0);
+    rStrm >> nLen;
+    return rtl::OStringToOUString(read_uInt8s_AsOString(rStrm, nLen), eEnc);
 }
 
-String WW8ReadBeltAndBracesString(SvStream& rStrm, rtl_TextEncoding eEnc)
+String read_LEuInt16_PascalString(SvStream& rStrm)
 {
-    String aRet = WW8ReadPascalString(rStrm, eEnc);
-    rStrm.SeekRel( 1 ); // skip null-byte at end
-    return aRet;
+    sal_uInt16 nLen(0);
+    rStrm >> nLen;
+    return read_LEuInt16s_AsOUString(rStrm, nLen);
 }
 
-String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
+String read_uInt8_BeltAndBracesString(SvStream& rStrm, rtl_TextEncoding eEnc)
 {
-    sal_uInt16 b(0);
-
-    if( nChars )
-        b = nChars;
-    else
-        rStrm >> b;
-
-    rtl::OUString sRet = read_LEuInt16s_AsOUString(rStrm, nChars);
-
-    if( bAtEndSeekRel1 )
-        rStrm.SeekRel( 2 ); // ueberspringe das Null-Character am Ende.
+    String aRet = read_uInt8_PascalString(rStrm, eEnc);
+    rStrm.SeekRel(sizeof(sal_uInt8)); // skip null-byte at end
+    return aRet;
+}
 
-    return sRet;
+String read_LEuInt16_BeltAndBracesString(SvStream& rStrm)
+{
+    String aRet = read_LEuInt16_PascalString(rStrm);
+    rStrm.SeekRel(sizeof(sal_Unicode)); // skip null-byte at end
+    return aRet;
 }
 
 xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
@@ -1961,7 +1958,7 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
             nLen = USHRT_MAX - 1;
 
         if( bIsUnicode )
-            rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
+            rStr.Append(String(read_LEuInt16s_AsOUString(rStrm, nLen)));
         else
         {
             // Alloc method automatically sets Zero at the end
@@ -3864,7 +3861,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
             for (sal_uInt16 i=0; i < nStrings; ++i)
             {
                 if (bUnicode)
-                    rArray.push_back(WW8Read_xstz(rStrm, 0, false));
+                    rArray.push_back(read_LEuInt16_PascalString(rStrm));
                 else
                 {
                     sal_uInt8 nBChar(0);
@@ -3897,7 +3894,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
                 for (sal_uInt16 i=0; i < nStrings; ++i)
                 {
                     if( bUnicode )
-                        pValueArray->push_back(WW8Read_xstz(rStrm, 0, false));
+                        pValueArray->push_back(read_LEuInt16_PascalString(rStrm));
                     else
                     {
                         sal_uInt8 nBChar(0);
@@ -6142,7 +6139,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                 case 6:
                 case 7:
                     // lies Pascal-String
-                    *pString = WW8ReadBeltAndBracesString(rSt, RTL_TEXTENCODING_MS_1252);
+                    *pString = read_uInt8_BeltAndBracesString(rSt, RTL_TEXTENCODING_MS_1252);
                     // leading len and trailing zero --> 2
                     rSkip -= 2+ pString->Len();
                     break;
@@ -6151,7 +6148,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                     // trailing zero
                     if (ww8String::TestBeltAndBraces(rSt))
                     {
-                        *pString = WW8Read_xstz(rSt, 0, true);
+                        *pString = read_LEuInt16_BeltAndBracesString(rSt);
                         rSkip -= (pString->Len() + 2) * 2;
                     }
                     else
@@ -6166,7 +6163,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                         they are not corrupt. If they are then we try them as
                         8bit ones
                         */
-                        *pString = WW8ReadBeltAndBracesString(rSt,RTL_TEXTENCODING_MS_1252);
+                        *pString = read_uInt8_BeltAndBracesString(rSt,RTL_TEXTENCODING_MS_1252);
                         // leading len and trailing zero --> 2
                         rSkip -= 2+ pString->Len();
                     }
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 5118eca..7d732c8 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -152,12 +152,14 @@ public:
 
 //Read a Pascal-style, i.e. single byte string length followed
 //by string contents
-String WW8ReadPascalString(SvStream& rStrm, rtl_TextEncoding eEnc);
+String read_uInt8_PascalString(SvStream& rStrm, rtl_TextEncoding eEnc);
+String read_LEuInt16_PascalString(SvStream& rStrm);
 
 //Belt and Braces strings, i.e. Pascal-style strings followed by
 //null termination, Spolsky calls them "fucked strings" FWIW
 //http://www.joelonsoftware.com/articles/fog0000000319.html
-String WW8ReadBeltAndBracesString(SvStream& rStrm, rtl_TextEncoding eEnc);
+String read_uInt8_BeltAndBracesString(SvStream& rStrm, rtl_TextEncoding eEnc);
+String read_LEuInt16_BeltAndBracesString(SvStream& rStrm);
 
 //--Line abovewhich the code has meaningful comments
 
@@ -168,16 +170,6 @@ struct WW8PLCFxDesc;
 class  WW8PLCFx_PCD;
 
 /**
- Reads a UTF-16 unicode string. If nLen is set then that number of 16bit units
- (not bytes) is read, if its not set, then read a 16bit count from the
- stream and use that for the length.
-
- If bAtEndSeekRel1 is set, exactly ONE extra unit (not byte) is skipped at the
- end of the string.
-*/
-String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1);
-
-/**
  reads array of strings (see MS documentation: STring TaBle stored in File)
  returns NOT the original pascal strings but an array of converted char*
 
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 1147e9e..3f2c333 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -29,6 +29,7 @@
  * instead of those above.
  */
 #include "ww8toolbar.hxx"
+#include "ww8scan.hxx"
 #include <rtl/ustrbuf.hxx>
 #include <stdarg.h>
 #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
@@ -786,9 +787,7 @@ Xst::Read( SvStream& rS )
 {
     OSL_TRACE("Xst::Read() stream pos 0x%x", rS.Tell() );
     nOffSet = rS.Tell();
-    sal_Int16 nChars = 0;
-    rS >> nChars;
-    sString = read_LEuInt16s_AsOUString(rS, nChars);
+    sString = read_LEuInt16_PascalString(rS);
     return true;
 }
 
commit 2fb353433db5b9fd1afe8c688451d04db5b62d5f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 22:30:19 2011 +0100

    rework TestBestAndBraces in terms of new apis

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 00778c1..5f4f714 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -77,29 +77,25 @@ namespace SL
     IMPLCONSTSTRINGARRAY(MSMacroCmds);
 }
 
-template<class C> bool wwString<C>::TestBeltAndBraces(const SvStream& rStrm)
+template<class C> bool wwString<C>::TestBeltAndBraces(SvStream& rStrm)
 {
     bool bRet = false;
     sal_uInt32 nOldPos = rStrm.Tell();
-    SvStream &rMutableStrm = const_cast<SvStream &>(rStrm);
-    sal_uInt32 nLen = rMutableStrm.Seek(STREAM_SEEK_TO_END);
-    rMutableStrm.Seek(nOldPos);
-    C nBelt;
-    rMutableStrm >> nBelt;
+    C nBelt(0);
+    rStrm >> nBelt;
     nBelt *= sizeof(C);
-    if (nOldPos + sizeof(C) + nBelt + sizeof(C) <= nLen &&
-        !rStrm.GetError() && !rStrm.IsEof())
+    if (rStrm.good() && (rStrm.remainingSize() >= (nBelt + sizeof(C))))
     {
-        rMutableStrm.SeekRel(nBelt);
-        if (!rStrm.GetError())
+        rStrm.SeekRel(nBelt);
+        if (rStrm.good())
         {
-            C cBraces;
-            rMutableStrm >> cBraces;
-            if (!rMutableStrm.GetError() && cBraces == 0)
+            C cBraces(0);
+            rStrm >> cBraces;
+            if (rStrm.good() && cBraces == 0)
                 bRet = true;
         }
     }
-    rMutableStrm.Seek(nOldPos);
+    rStrm.Seek(nOldPos);
     return bRet;
 }
 
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 424d4d8..5118eca 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -83,11 +83,10 @@ namespace SL
 template<class C> class wwString
 {
 public:
-    static bool TestBeltAndBraces(const SvStream& rStrm);
-    //move the other string related code into this class as time goes by
+    static bool TestBeltAndBraces(SvStream& rStrm);
 };
 
-typedef wwString<sal_uInt16> ww8String;
+typedef wwString<sal_Unicode> ww8String;
 
 struct SprmInfo
 {
commit 5dc2dd29d2948804dcb1102fa0e97e0b205773d0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 22:12:00 2011 +0100

    disentangle WW8ReadPString to pascal-string and null terminated pstring
    
    and find that one of them was using 0 as encoding, rather than
    indicating normal-pascal string, sigh.

diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 2aae97a..cb40a02 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -269,7 +269,7 @@ bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
         case 99: // TIFF-File ( nicht embeddet )
             pSt->Seek(nPosFc);
             // Name als P-String einlesen
-            rFileName = WW8ReadPString(*pSt, eStructCharSet, 0);
+            rFileName = WW8ReadPascalString(*pSt, eStructCharSet);
             if (rFileName.Len())
                 rFileName = URIHelper::SmartRel2Abs(
                     INetURLObject(sBaseURL), rFileName,
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1b63541..703e1db 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5337,7 +5337,8 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
         {
             if( bVer67 )
             {
-                mpAtnNames->push_back(WW8ReadPString(rStrm, false));
+                mpAtnNames->push_back(WW8ReadPascalString(rStrm,
+                    RTL_TEXTENCODING_MS_1252));
                 nRead += mpAtnNames->rbegin()->Len() + 1;   // Laenge + sal_uInt8 Count
             }
             else
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index d93a3c2..00778c1 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1904,25 +1904,18 @@ Err:
     return false;
 }
 
-
-//-----------------------------------------
-
-
-// WW8ReadPString liest einen Pascal-String ein und gibt ihn zurueck. Der
-// Pascal- String hat am Ende ein \0, der aber im Laengenbyte nicht
-// mitgezaehlt wird.  Der Speicher fuer den Pascalstring wird alloziert.
-String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
-    bool bAtEndSeekRel1)
+String WW8ReadPascalString(SvStream& rStrm, rtl_TextEncoding eEnc)
 {
     sal_uInt8 b(0);
     rStrm >> b;
+    return rtl::OStringToOUString(read_uInt8s_AsOString(rStrm, b), eEnc);
+}
 
-    rtl::OString aByteStr = read_uInt8s_AsOString(rStrm, b);
-
-    if( bAtEndSeekRel1 )
-        rStrm.SeekRel( 1 ); // ueberspringe das Null-Byte am Ende.
-
-    return rtl::OStringToOUString(aByteStr, eEnc);
+String WW8ReadBeltAndBracesString(SvStream& rStrm, rtl_TextEncoding eEnc)
+{
+    String aRet = WW8ReadPascalString(rStrm, eEnc);
+    rStrm.SeekRel( 1 ); // skip null-byte at end
+    return aRet;
 }
 
 String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
@@ -6153,7 +6146,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                 case 6:
                 case 7:
                     // lies Pascal-String
-                    *pString = WW8ReadPString( rSt, RTL_TEXTENCODING_MS_1252 );
+                    *pString = WW8ReadBeltAndBracesString(rSt, RTL_TEXTENCODING_MS_1252);
                     // leading len and trailing zero --> 2
                     rSkip -= 2+ pString->Len();
                     break;
@@ -6177,7 +6170,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                         they are not corrupt. If they are then we try them as
                         8bit ones
                         */
-                        *pString = WW8ReadPString(rSt,RTL_TEXTENCODING_MS_1252);
+                        *pString = WW8ReadBeltAndBracesString(rSt,RTL_TEXTENCODING_MS_1252);
                         // leading len and trailing zero --> 2
                         rSkip -= 2+ pString->Len();
                     }
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 07938a1..424d4d8 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -151,6 +151,15 @@ public:
         const;
 };
 
+//Read a Pascal-style, i.e. single byte string length followed
+//by string contents
+String WW8ReadPascalString(SvStream& rStrm, rtl_TextEncoding eEnc);
+
+//Belt and Braces strings, i.e. Pascal-style strings followed by
+//null termination, Spolsky calls them "fucked strings" FWIW
+//http://www.joelonsoftware.com/articles/fog0000000319.html
+String WW8ReadBeltAndBracesString(SvStream& rStrm, rtl_TextEncoding eEnc);
+
 //--Line abovewhich the code has meaningful comments
 
 class  WW8Fib;
@@ -159,9 +168,6 @@ class  WW8PLCFspecial;
 struct WW8PLCFxDesc;
 class  WW8PLCFx_PCD;
 
-String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
-    bool bAtEndSeekRel1 = true);
-
 /**
  Reads a UTF-16 unicode string. If nLen is set then that number of 16bit units
  (not bytes) is read, if its not set, then read a 16bit count from the
commit 06e1f8ad6b35f93c478679e624301cd2c09159cf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 21:34:30 2011 +0100

    rework WW8ReadPString in terms of read_uInt8s_AsOString

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index fb3a8f9..d93a3c2 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1914,25 +1914,15 @@ Err:
 String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
     bool bAtEndSeekRel1)
 {
-    ByteString aByteStr;
-    sal_uInt8 b;
+    sal_uInt8 b(0);
     rStrm >> b;
 
-    if (b)
-    {
-        // Alloc methode automatically sets Zero at the end
-        sal_Char*  pByteData = aByteStr.AllocBuffer( b );
-
-        sal_uLong nWasRead = rStrm.Read( pByteData, b );
-        if( nWasRead != b )
-            aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
-    }
+    rtl::OString aByteStr = read_uInt8s_AsOString(rStrm, b);
 
     if( bAtEndSeekRel1 )
         rStrm.SeekRel( 1 ); // ueberspringe das Null-Byte am Ende.
 
-
-    return String( aByteStr, eEnc );
+    return rtl::OStringToOUString(aByteStr, eEnc);
 }
 
 String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
commit 22154753edb1eaa7199d9dc7d630dd4e409bbdb7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 21:28:56 2011 +0100

    fix blindingly wrong comment

diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index be90fff..07938a1 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -163,9 +163,12 @@ String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
     bool bAtEndSeekRel1 = true);
 
 /**
- The following method reads a 2Byte unicode string.  If bAtEndSeekRel1 is set,
- exactly ONE byte is skipped If nChars is set then that number of characters
- (not bytes) is read, if its not set, the first character read is the length
+ Reads a UTF-16 unicode string. If nLen is set then that number of 16bit units
+ (not bytes) is read, if its not set, then read a 16bit count from the
+ stream and use that for the length.
+
+ If bAtEndSeekRel1 is set, exactly ONE extra unit (not byte) is skipped at the
+ end of the string.
 */
 String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1);
 
commit 952dad0e625e3cbb93f4581e2ce431271fe739d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 21:24:47 2011 +0100

    rework WW8Read_xstz using read_LEuInt16s_AsOUString

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index c058e36..fb3a8f9 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1944,32 +1944,12 @@ String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
     else
         rStrm >> b;
 
-    String aStr;
-    if (b)
-    {
-        // Alloc methode automatically sets Zero at the end
-        sal_Unicode* pData = aStr.AllocBuffer( b );
-
-        sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
-        if( nWasRead != static_cast<sal_uLong>(b*2) )
-        {
-            b = static_cast<sal_uInt16>(nWasRead / 2);
-            aStr.ReleaseBufferAccess( b );
-            pData = aStr.GetBufferAccess();
-        }
-
-#ifdef OSL_BIGENDIAN
-        sal_uLong n;
-        sal_Unicode *pWork;
-        for( n = 0, pWork = pData; n < b; ++n, ++pWork )
-            *pWork = SWAPSHORT( *pWork );
-#endif // ifdef OSL_BIGENDIAN
-    }
+    rtl::OUString sRet = read_LEuInt16s_AsOUString(rStrm, nChars);
 
     if( bAtEndSeekRel1 )
         rStrm.SeekRel( 2 ); // ueberspringe das Null-Character am Ende.
 
-    return aStr;
+    return sRet;
 }
 
 xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
commit e99a072c0e19d1bab68a49758acaac22dd981e0c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 4 21:17:16 2011 +0100

    add a fairly efficient read_LEuInt16s_AsOUString, merge similar things

diff --git a/filter/inc/filter/msfilter/mstoolbar.hxx b/filter/inc/filter/msfilter/mstoolbar.hxx
index 2556c09..6cb7ef4 100644
--- a/filter/inc/filter/msfilter/mstoolbar.hxx
+++ b/filter/inc/filter/msfilter/mstoolbar.hxx
@@ -103,9 +103,8 @@ protected:
 public:
     TBBase() : nOffSet( 0 ) {}
     virtual ~TBBase(){}
-    rtl::OUString readUnicodeString( SvStream* pS, sal_Size nChars );
 
-    virtual bool Read(SvStream *pS) = 0;
+    virtual bool Read(SvStream &rS) = 0;
     virtual void Print( FILE* ) {} // #FIXME remove this an implement the debug routines in all the classes below to enable some sort of readable output
     sal_uInt32 GetOffset() { return nOffSet; }
 };
@@ -132,7 +131,7 @@ class MSFILTER_DLLPUBLIC WString : public TBBase
 public:
     WString(){};
     ~WString(){};
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     rtl::OUString getString(){ return sString; }
 };
 
@@ -151,7 +150,7 @@ class MSFILTER_DLLPUBLIC TBCExtraInfo : public TBBase
 public:
     TBCExtraInfo();
     ~TBCExtraInfo(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     rtl::OUString getOnAction();
 };
@@ -167,7 +166,7 @@ class MSFILTER_DLLPUBLIC TBCGeneralInfo  : public TBBase
 public:
     TBCGeneralInfo();
     ~TBCGeneralInfo() {}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     bool ImportToolBarControlData( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >& );
     rtl::OUString CustomText() { return customText.getString(); }
@@ -184,7 +183,7 @@ friend class TBCBSpecific; // #FIXME hacky access, need to fix
 public:
     TBCBitMap();
     ~TBCBitMap();
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     Bitmap& getBitMap();
 };
@@ -196,7 +195,7 @@ class MSFILTER_DLLPUBLIC TBCMenuSpecific : public TBBase
 public:
     TBCMenuSpecific();
     ~TBCMenuSpecific(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     rtl::OUString Name();
 };
@@ -214,7 +213,7 @@ class MSFILTER_DLLPUBLIC TBCCDData : public TBBase
 public:
     TBCCDData();
     ~TBCCDData();
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
 };
 
@@ -224,7 +223,7 @@ class TBCComboDropdownSpecific : public TBBase
 public:
     TBCComboDropdownSpecific( const TBCHeader& header );
     TBCComboDropdownSpecific(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
 };
 
@@ -239,7 +238,7 @@ class TBCBSpecific :  public TBBase
 public:
     TBCBSpecific();
     ~TBCBSpecific(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     // #TODO just add a getGraphic member here
     TBCBitMap* getIcon();
@@ -287,7 +286,7 @@ public:
     sal_uInt16 getTcID() const { return tcid; }
     bool isVisible() { return !( bFlagsTCR & 0x1 ); }
     bool isBeginGroup() { return ( bFlagsTCR & 0x2 ); }
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     sal_uInt32 getTbct() { return tbct; };
 };
@@ -302,7 +301,7 @@ class MSFILTER_DLLPUBLIC TBCData : public TBBase
 public:
     TBCData( const TBCHeader& Header );
     ~TBCData(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     bool ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar );
     TBCGeneralInfo& getGeneralInfo() { return controlGeneralInfo; }
@@ -322,7 +321,7 @@ class MSFILTER_DLLPUBLIC TB : public TBBase
 public:
     TB();
     ~TB(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
     sal_Int16 getcCL(){ return cCL; }
     WString& getName(){ return name; }
@@ -339,7 +338,7 @@ public:
     sal_Int16 top;
     sal_Int16 right;
     sal_Int16 bottom;
-    bool Read( SvStream* pS ) { *pS >> left >> top >> right >> bottom; return true; }
+    bool Read( SvStream &rS ) { rS >> left >> top >> right >> bottom; return true; }
     void Print( FILE* fo );
 };
 
@@ -358,7 +357,7 @@ class MSFILTER_DLLPUBLIC TBVisualData : public TBBase
 public:
     TBVisualData();
     ~TBVisualData(){}
-    bool Read(SvStream *pS);
+    bool Read(SvStream &rS);
     void Print( FILE* );
 };
 #endif
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index 2bc0015..4e65bb9 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -87,26 +87,19 @@
 #include <com/sun/star/sheet/XSpreadsheetView.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
 #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
-#include <svtools/filterutils.hxx>
 // #TODO remove this when oox is used for control/userform import
 #include <com/sun/star/util/MeasureUnit.hpp>
 #include <com/sun/star/awt/XDevice.hpp>
 #include <com/sun/star/awt/XUnitConversion.hpp>
 
-#ifndef C2S
-#define C2S(cChar)  String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
-#endif
 #ifndef C2U
-#define C2U(cChar)  rtl::OUString::createFromAscii(cChar)
+#define C2U(cChar)  rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 #endif
 
 using namespace ::com::sun::star;
 using namespace ::rtl;
 using namespace cppu;
 
-
-#define WW8_ASCII2STR(s) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(s))
-
 static char sWW8_form[] = "WW-Standard";
 
 sal_uInt8 const OCX_Control::aObjInfo[4] = { 0x00, 0x12, 0x03, 0x00 };
@@ -468,7 +461,7 @@ const uno::Reference< container::XIndexContainer >&
                 return xFormComps;
 
             uno::Reference< uno::XInterface >  xCreate =
-                rServiceFactory->createInstance(WW8_ASCII2STR(
+                rServiceFactory->createInstance(C2U(
                     "com.sun.star.form.component.Form"));
             if( xCreate.is() )
             {
@@ -476,7 +469,7 @@ const uno::Reference< container::XIndexContainer >&
                     uno::UNO_QUERY );
 
                 uno::Any aTmp(&sName,getCppuType((OUString *)0));
-                xFormPropSet->setPropertyValue( WW8_ASCII2STR("Name"), aTmp );
+                xFormPropSet->setPropertyValue( C2U("Name"), aTmp );
 
                 uno::Reference< form::XForm > xForm( xCreate, uno::UNO_QUERY );
                 DBG_ASSERT(xForm.is(), "keine Form?");
@@ -523,17 +516,17 @@ sal_Bool OCX_CommandButton::WriteContents(SvStorageStreamRef& rContents,
     sal_uInt32 nOldPos = rContents->Tell();
     rContents->SeekRel(8);
 
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     sal_uInt8 nTemp=0;//fEnabled;
     if (fEnabled)
@@ -544,14 +537,14 @@ sal_Bool OCX_CommandButton::WriteContents(SvStorageStreamRef& rContents,
     *rContents << sal_uInt8(0x00);
 
     nTemp = 0;
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("MultiLine"));
+    aTmp = rPropSet->getPropertyValue(C2U("MultiLine"));
     fWordWrap = any2bool(aTmp);
     if (fWordWrap)
         nTemp |= 0x80;
     *rContents << nTemp;
     *rContents << sal_uInt8(0x00);
 
-    SvxOcxString aCaption( rPropSet->getPropertyValue(WW8_ASCII2STR("Label")) );
+    SvxOcxString aCaption( rPropSet->getPropertyValue(C2U("Label")) );
     aCaption.WriteLenField( *rContents );
     aCaption.WriteCharArray( *rContents );
 
@@ -561,7 +554,7 @@ sal_Bool OCX_CommandButton::WriteContents(SvStorageStreamRef& rContents,
     *rContents << rSize.Height;
 
     // "take focus on click" is directly in content flags, not in option field...
-    mbTakeFocus = any2bool( rPropSet->getPropertyValue( WW8_ASCII2STR( "FocusOnClick" ) ) );
+    mbTakeFocus = any2bool( rPropSet->getPropertyValue( C2U( "FocusOnClick" ) ) );
 
     nFixedAreaLen = static_cast<sal_uInt16>(rContents->Tell()-nOldPos-4);
 
@@ -612,13 +605,13 @@ sal_Bool OCX_CommandButton::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -631,12 +624,12 @@ sal_Bool OCX_CommandButton::Export(SvStorageRef &rObj,
     };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
 
     return WriteContents(xContents,rPropSet,rSize);
 }
@@ -650,12 +643,12 @@ sal_Bool OCX_ImageButton::WriteContents(SvStorageStreamRef &rContents,
     sal_uInt32 nOldPos = rContents->Tell();
     rContents->SeekRel(8);
 
-    uno::Any aTmp=rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    uno::Any aTmp=rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     sal_uInt8 nTemp=0;//fEnabled;
     if (fEnabled)
@@ -714,13 +707,13 @@ sal_Bool OCX_ImageButton::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -733,12 +726,12 @@ sal_Bool OCX_ImageButton::Export(SvStorageRef &rObj,
     };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
     return WriteContents(xContents,rPropSet,rSize);
 }
 
@@ -854,10 +847,10 @@ sal_Bool OCX_OptionButton::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[6] = 0;
     pBlockFlags[7] = 0;
 
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     else
@@ -872,7 +865,7 @@ sal_Bool OCX_OptionButton::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[0] |= 0x01;
     *rContents << sal_uInt8(0x00);
     nTemp = 0;
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("MultiLine"));
+    aTmp = rPropSet->getPropertyValue(C2U("MultiLine"));
     fWordWrap = any2bool(aTmp);
     if (fWordWrap)
         nTemp |= 0x80;
@@ -882,7 +875,7 @@ sal_Bool OCX_OptionButton::WriteContents(SvStorageStreamRef &rContents,
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
@@ -894,19 +887,19 @@ sal_Bool OCX_OptionButton::WriteContents(SvStorageStreamRef &rContents,
 
     WriteAlign(rContents,4);
     nValueLen = 1|SVX_MSOCX_COMPRESSED;
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultState"));
+    aTmp = rPropSet->getPropertyValue(C2U("DefaultState"));
     sal_Int16 nDefault = sal_Int16();
     aTmp >>= nDefault;
     *rContents << nValueLen;
     pBlockFlags[2] |= 0x40;
 
 
-    SvxOcxString aCaption( rPropSet->getPropertyValue(WW8_ASCII2STR("Label")) );
+    SvxOcxString aCaption( rPropSet->getPropertyValue(C2U("Label")) );
     if (aCaption.HasData())
         pBlockFlags[2] |= 0x80;
     aCaption.WriteLenField( *rContents );
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("VisualEffect"));
+    aTmp = rPropSet->getPropertyValue(C2U("VisualEffect"));
     if (aTmp.hasValue())
     {
         sal_Int16 nApiSpecEffect = sal_Int16();
@@ -974,13 +967,13 @@ sal_Bool OCX_OptionButton::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -993,12 +986,12 @@ sal_Bool OCX_OptionButton::Export(SvStorageRef &rObj,
             };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
     return WriteContents(xContents, rPropSet, rSize);
 }
 
@@ -1021,12 +1014,12 @@ sal_Bool OCX_TextBox::WriteContents(SvStorageStreamRef &rContents,
 
 
     sal_uInt8 nTemp=0x19;
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     if (fEnabled)
         nTemp |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("ReadOnly"));
+    aTmp = rPropSet->getPropertyValue(C2U("ReadOnly"));
     fLocked = any2bool(aTmp);
     if (fLocked)
         nTemp |= 0x04;
@@ -1036,8 +1029,8 @@ sal_Bool OCX_TextBox::WriteContents(SvStorageStreamRef &rContents,
     *rContents << sal_uInt8(0x48);
     *rContents << sal_uInt8(0x80);
 
-    fMultiLine = any2bool(rPropSet->getPropertyValue(WW8_ASCII2STR("MultiLine")));
-    fHideSelection = any2bool(rPropSet->getPropertyValue(WW8_ASCII2STR("HideInactiveSelection")));
+    fMultiLine = any2bool(rPropSet->getPropertyValue(C2U("MultiLine")));
+    fHideSelection = any2bool(rPropSet->getPropertyValue(C2U("HideInactiveSelection")));
     nTemp = 0x0C;
     if (fMultiLine)
         nTemp |= 0x80;
@@ -1045,33 +1038,33 @@ sal_Bool OCX_TextBox::WriteContents(SvStorageStreamRef &rContents,
         nTemp |= 0x20;
     *rContents << nTemp;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
     pBlockFlags[0] |= 0x04;
 
-    aTmp = rPropSet->getPropertyValue( WW8_ASCII2STR("MaxTextLen"));
+    aTmp = rPropSet->getPropertyValue( C2U("MaxTextLen"));
     aTmp >>= nMaxLength;
     *rContents << nMaxLength;
     pBlockFlags[0] |= 0x08;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Border"));
+    aTmp = rPropSet->getPropertyValue(C2U("Border"));
     sal_Int16 nBorder = sal_Int16();
     aTmp >>= nBorder;
     nSpecialEffect = ExportBorder(nBorder,nBorderStyle);
     *rContents << nBorderStyle;
     pBlockFlags[0] |= 0x10;
 
-    aTmp = rPropSet->getPropertyValue( WW8_ASCII2STR("HScroll"));
+    aTmp = rPropSet->getPropertyValue( C2U("HScroll"));
     sal_Bool bTemp1 = any2bool(aTmp);
-    aTmp = rPropSet->getPropertyValue( WW8_ASCII2STR("VScroll"));
+    aTmp = rPropSet->getPropertyValue( C2U("VScroll"));
     sal_Bool bTemp2 = any2bool(aTmp);
     if (!bTemp1 && !bTemp2)
         nScrollBars =0;
@@ -1084,20 +1077,20 @@ sal_Bool OCX_TextBox::WriteContents(SvStorageStreamRef &rContents,
     *rContents << nScrollBars;
     pBlockFlags[0] |= 0x20;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("EchoChar"));
+    aTmp = rPropSet->getPropertyValue(C2U("EchoChar"));
     sal_uInt16 nTmp = sal_uInt16();
     aTmp >>= nTmp;
     nPasswordChar = static_cast<sal_uInt8>(nTmp);
     *rContents << nPasswordChar;
     pBlockFlags[1] |= 0x02;
 
-    SvxOcxString aValue( rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultText")) );
+    SvxOcxString aValue( rPropSet->getPropertyValue(C2U("DefaultText")) );
     aValue.WriteLenField( *rContents );
     if (aValue.HasData())
         pBlockFlags[2] |= 0x40;
 
     WriteAlign(rContents,4);
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BorderColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BorderColor"));
     if (aTmp.hasValue())
         aTmp >>= nBorderColor;
     *rContents << ExportColor(nBorderColor);
@@ -1160,13 +1153,13 @@ sal_Bool OCX_TextBox::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -1178,12 +1171,12 @@ sal_Bool OCX_TextBox::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
     return WriteContents(xContents, rPropSet, rSize);
 }
 
@@ -1206,12 +1199,12 @@ sal_Bool OCX_FieldControl::WriteContents(SvStorageStreamRef &rContents,
 
 
     sal_uInt8 nTemp=0x19;
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     if (fEnabled)
         nTemp |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("ReadOnly"));
+    aTmp = rPropSet->getPropertyValue(C2U("ReadOnly"));
     fLocked = any2bool(aTmp);
     if (fLocked)
         nTemp |= 0x04;
@@ -1224,19 +1217,19 @@ sal_Bool OCX_FieldControl::WriteContents(SvStorageStreamRef &rContents,
     nTemp = 0x2C;
     *rContents << nTemp;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
     pBlockFlags[0] |= 0x04;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Border"));
+    aTmp = rPropSet->getPropertyValue(C2U("Border"));
     sal_Int16 nBorder = sal_Int16();
     aTmp >>= nBorder;
     nSpecialEffect = ExportBorder(nBorder,nBorderStyle);
@@ -1244,7 +1237,7 @@ sal_Bool OCX_FieldControl::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[0] |= 0x10;
 
 #if 0 //Each control has a different Value format, and how to convert each to text has to be found out
-    SvxOcxString aValue( rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultText")) );
+    SvxOcxString aValue( rPropSet->getPropertyValue(C2U("DefaultText")) );
     aValue.WriteLenField( *rContents );
     if (aValue.HasData())
         pBlockFlags[2] |= 0x40;
@@ -1308,13 +1301,13 @@ sal_Bool OCX_FieldControl::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -1326,12 +1319,12 @@ sal_Bool OCX_FieldControl::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
     return WriteContents(xContents, rPropSet, rSize);
 }
 
@@ -1359,13 +1352,13 @@ sal_Bool OCX_ToggleButton::Export(
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -1378,12 +1371,12 @@ sal_Bool OCX_ToggleButton::Export(
     };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
 
     return WriteContents(xContents,rPropSet,rSize);
 }
@@ -1405,7 +1398,7 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[6] = 0;
     pBlockFlags[7] = 0;
 
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
 
     sal_uInt8 nTemp=fEnabled;
@@ -1417,20 +1410,20 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[0] |= 0x01;
     *rContents << sal_uInt8(0x00);
     nTemp = 0;
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("MultiLine"));
+    aTmp = rPropSet->getPropertyValue(C2U("MultiLine"));
     fWordWrap = any2bool(aTmp);
     if (fWordWrap)
         nTemp |= 0x80;
     *rContents << nTemp;
     *rContents << sal_uInt8(0x00);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
@@ -1443,12 +1436,12 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents,
     WriteAlign(rContents,4);
     nValueLen = 1|SVX_MSOCX_COMPRESSED;
     bool bDefault = false;
-    rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultState")) >>= bDefault;
+    rPropSet->getPropertyValue(C2U("DefaultState")) >>= bDefault;
     sal_uInt8 nDefault = static_cast< sal_uInt8 >( bDefault ? '1' : '0' );
     *rContents << nValueLen;
     pBlockFlags[2] |= 0x40;
 
-    SvxOcxString aCaption( rPropSet->getPropertyValue(WW8_ASCII2STR("Label")) );
+    SvxOcxString aCaption( rPropSet->getPropertyValue(C2U("Label")) );
     aCaption.WriteLenField( *rContents );
     if (aCaption.HasData())
         pBlockFlags[2] |= 0x80;
@@ -1502,12 +1495,12 @@ sal_Bool OCX_ComboBox::WriteContents(SvStorageStreamRef &rContents,
 
 
     sal_uInt8 nTemp=0x19;//fEnabled;
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     if (fEnabled)
         nTemp |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("ReadOnly"));
+    aTmp = rPropSet->getPropertyValue(C2U("ReadOnly"));
     fLocked = any2bool(aTmp);
     if (fLocked)
         nTemp |= 0x04;
@@ -1518,24 +1511,24 @@ sal_Bool OCX_ComboBox::WriteContents(SvStorageStreamRef &rContents,
     *rContents << sal_uInt8(0x80);
 
     nTemp = 0x0C;
-    fHideSelection = any2bool(rPropSet->getPropertyValue(WW8_ASCII2STR("HideInactiveSelection")));
+    fHideSelection = any2bool(rPropSet->getPropertyValue(C2U("HideInactiveSelection")));
     if( fHideSelection )
         nTemp |= 0x20;
     *rContents << nTemp;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
     pBlockFlags[0] |= 0x04;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Border"));
+    aTmp = rPropSet->getPropertyValue(C2U("Border"));
     sal_Int16 nBorder = sal_Int16();
     aTmp >>= nBorder;
     nSpecialEffect = ExportBorder(nBorder,nBorderStyle);
@@ -1548,7 +1541,7 @@ sal_Bool OCX_ComboBox::WriteContents(SvStorageStreamRef &rContents,
 
     WriteAlign(rContents,2);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("LineCount"));
+    aTmp = rPropSet->getPropertyValue(C2U("LineCount"));
     aTmp >>= nListRows;
     *rContents << nListRows;
     pBlockFlags[1] |= 0x40;
@@ -1556,20 +1549,20 @@ sal_Bool OCX_ComboBox::WriteContents(SvStorageStreamRef &rContents,
     *rContents << sal_uInt8(1); //DefaultSelected One
     pBlockFlags[2] |= 0x01;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Dropdown"));
+    aTmp = rPropSet->getPropertyValue(C2U("Dropdown"));
     nDropButtonStyle = any2bool(aTmp);
     if (nDropButtonStyle)
         nDropButtonStyle=0x02;
     *rContents << nDropButtonStyle;
     pBlockFlags[2] |= 0x04;
 
-    SvxOcxString aValue( rPropSet->getPropertyValue(WW8_ASCII2STR("Text")) );
+    SvxOcxString aValue( rPropSet->getPropertyValue(C2U("Text")) );
     aValue.WriteLenField( *rContents );
     if (aValue.HasData())
         pBlockFlags[2] |= 0x40;
 
     WriteAlign(rContents,4);
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BorderColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BorderColor"));
     if (aTmp.hasValue())
         aTmp >>= nBorderColor;
     *rContents << ExportColor(nBorderColor);
@@ -1632,13 +1625,13 @@ sal_Bool OCX_ComboBox::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -1650,12 +1643,12 @@ sal_Bool OCX_ComboBox::Export(SvStorageRef &rObj,
     };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
     return WriteContents(xContents, rPropSet, rSize);
 }
 
@@ -1676,13 +1669,13 @@ sal_Bool OCX_ListBox::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[6] = 0;
     pBlockFlags[7] = 0;
 
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     sal_uInt8 nTemp=fEnabled;
     if (fEnabled)
         nTemp = nTemp << 1;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("ReadOnly"));
+    aTmp = rPropSet->getPropertyValue(C2U("ReadOnly"));
     fLocked = any2bool(aTmp);
     if (fLocked)
         nTemp |= 0x04;
@@ -1693,19 +1686,19 @@ sal_Bool OCX_ListBox::WriteContents(SvStorageStreamRef &rContents,
     *rContents << sal_uInt8(0x00);
     *rContents << sal_uInt8(0x00);
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
     pBlockFlags[0] |= 0x04;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Border"));
+    aTmp = rPropSet->getPropertyValue(C2U("Border"));
     sal_Int16 nBorder = sal_Int16();
     aTmp >>= nBorder;
     nSpecialEffect = ExportBorder(nBorder,nBorderStyle);
@@ -1713,7 +1706,7 @@ sal_Bool OCX_ListBox::WriteContents(SvStorageStreamRef &rContents,
     *rContents << nBorderStyle;
     pBlockFlags[0] |= 0x10;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("MultiSelection"));
+    aTmp = rPropSet->getPropertyValue(C2U("MultiSelection"));
     nMultiState = any2bool(aTmp);
 
     if (nMultiState)
@@ -1730,7 +1723,7 @@ sal_Bool OCX_ListBox::WriteContents(SvStorageStreamRef &rContents,
     WriteAlign(rContents,4);
 
 #if 0
-    SvxOcxString aValue( rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultText")) );
+    SvxOcxString aValue( rPropSet->getPropertyValue(C2U("DefaultText")) );
     aValue.WriteLenField( *rContents );
     if (aValue.HasData())
         pBlockFlags[2] |= 0x40;
@@ -1739,7 +1732,7 @@ sal_Bool OCX_ListBox::WriteContents(SvStorageStreamRef &rContents,
 #endif
 
     WriteAlign(rContents,4);
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BorderColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BorderColor"));
     if (aTmp.hasValue())
         aTmp >>= nBorderColor;
     *rContents << ExportColor(nBorderColor);
@@ -1803,13 +1796,13 @@ sal_Bool OCX_ListBox::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor( rObj->OpenSotStream( C2S("\1CompObj")));
+    SvStorageStreamRef xStor( rObj->OpenSotStream( C2U("\1CompObj")));
     xStor->Write(aCompObj,sizeof(aCompObj));
     DBG_ASSERT((xStor.Is() && (SVSTREAM_OK == xStor->GetError())),"damn");
     }
 
     {
-    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2S("\3ObjInfo")));
+    SvStorageStreamRef xStor3( rObj->OpenSotStream( C2U("\3ObjInfo")));
     xStor3->Write(aObjInfo,sizeof(aObjInfo));
     DBG_ASSERT((xStor3.Is() && (SVSTREAM_OK == xStor3->GetError())),"damn");
     }
@@ -1821,12 +1814,12 @@ sal_Bool OCX_ListBox::Export(SvStorageRef &rObj,
         };
 
     {
-    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2S("\3OCXNAME")));
+    SvStorageStreamRef xStor2( rObj->OpenSotStream( C2U("\3OCXNAME")));
     xStor2->Write(aOCXNAME,sizeof(aOCXNAME));
     DBG_ASSERT((xStor2.Is() && (SVSTREAM_OK == xStor2->GetError())),"damn");
     }
 
-    SvStorageStreamRef xContents( rObj->OpenSotStream( C2S("contents")));
+    SvStorageStreamRef xContents( rObj->OpenSotStream( C2U("contents")));
     return WriteContents(xContents, rPropSet, rSize);
 }
 
@@ -1842,19 +1835,19 @@ sal_Bool OCX_Label::WriteContents(SvStorageStreamRef &rContents,
     pBlockFlags[2] = 0;
     pBlockFlags[3] = 0;
 
-    uno::Any aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("TextColor"));
+    uno::Any aTmp = rPropSet->getPropertyValue(C2U("TextColor"));
     if (aTmp.hasValue())
         aTmp >>= mnForeColor;
     *rContents << ExportColor(mnForeColor);
     pBlockFlags[0] |= 0x01;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor"));
+    aTmp = rPropSet->getPropertyValue(C2U("BackgroundColor"));
     if (aTmp.hasValue())
         aTmp >>= mnBackColor;
     *rContents << ExportColor(mnBackColor);
     pBlockFlags[0] |= 0x02;
 
-    aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled"));
+    aTmp = rPropSet->getPropertyValue(C2U("Enabled"));
     fEnabled = any2bool(aTmp);
     sal_uInt8 nTemp=fEnabled;
     if (fEnabled)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list