[Libreoffice-commits] .: 12 commits - desktop/source lotuswordpro/source package/source reportdesign/source sax/source sfx2/inc sfx2/source sw/source tools/bootstrp tools/Executable_rscdep.mk tools/inc tools/source tools/StaticLibrary_toolshelpers.mk unusedcode.easy xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Aug 16 01:04:41 PDT 2011


 desktop/source/app/dispatchwatcher.cxx            |   10 +-
 lotuswordpro/source/filter/lwplayout.cxx          |   53 -------------
 lotuswordpro/source/filter/lwplayout.hxx          |    4 -
 lotuswordpro/source/filter/lwppara.hxx            |   10 --
 lotuswordpro/source/filter/lwppara1.cxx           |   18 ----
 lotuswordpro/source/filter/lwprowlayout.cxx       |    6 -
 lotuswordpro/source/filter/lwprowlayout.hxx       |    1 
 lotuswordpro/source/filter/lwpsortopt.cxx         |   15 ---
 lotuswordpro/source/filter/lwpsortopt.hxx         |    2 
 lotuswordpro/source/filter/lwpstory.cxx           |   24 ------
 lotuswordpro/source/filter/lwpstory.hxx           |    1 
 lotuswordpro/source/filter/lwptablelayout.cxx     |   12 ---
 lotuswordpro/source/filter/lwptablelayout.hxx     |    1 
 package/source/manifest/ManifestDefines.hxx       |    5 -
 package/source/manifest/ManifestImport.cxx        |    3 
 package/source/manifest/ManifestImport.hxx        |    1 
 reportdesign/source/core/api/ReportDefinition.cxx |   26 +++---
 sax/source/expatwrap/saxwriter.cxx                |    4 -
 sfx2/inc/sfx2/viewfrm.hxx                         |    5 -
 sfx2/inc/sfx2/viewsh.hxx                          |    6 -
 sfx2/source/doc/DocumentMetadataAccess.cxx        |   84 ++++++++++-----------
 sfx2/source/doc/SfxDocumentMetaData.cxx           |   53 ++++++-------
 sfx2/source/view/viewfrm.cxx                      |   52 -------------
 sfx2/source/view/viewprn.cxx                      |   29 -------
 sfx2/source/view/viewsh.cxx                       |   85 ----------------------
 sw/source/core/unocore/unotext.cxx                |   26 +++---
 tools/Executable_rscdep.mk                        |    3 
 tools/StaticLibrary_toolshelpers.mk               |    5 +
 tools/bootstrp/cppdep.cxx                         |   53 +++++++------
 tools/bootstrp/cppdep.hxx                         |    2 
 tools/inc/tools/simplerm.hxx                      |   10 --
 tools/source/rc/resmgr.cxx                        |   83 ---------------------
 unusedcode.easy                                   |   23 -----
 xmloff/source/core/xmlexp.cxx                     |    3 
 34 files changed, 139 insertions(+), 579 deletions(-)

New commits:
commit 9f3b5b99e1595a3011ced4828fc7645d0d5b4d30
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 16 08:54:49 2011 +0100

    ByteString->rtl::OString

diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk
index ba3cef7..61462c6 100644
--- a/tools/Executable_rscdep.mk
+++ b/tools/Executable_rscdep.mk
@@ -40,8 +40,9 @@ $(eval $(call gb_Executable_add_defs,rscdep,\
 ))
 
 $(eval $(call gb_Executable_add_linked_libs,rscdep,\
-    sal \
     tl \
+    comphelper \
+    sal \
     $(gb_STDLIBS) \
 ))
 
diff --git a/tools/StaticLibrary_toolshelpers.mk b/tools/StaticLibrary_toolshelpers.mk
index 7ef0123..6c6b9ea 100644
--- a/tools/StaticLibrary_toolshelpers.mk
+++ b/tools/StaticLibrary_toolshelpers.mk
@@ -35,6 +35,11 @@ $(eval $(call gb_StaticLibrary_set_include,toolshelpers,\
     -I$(realpath $(SRCDIR)/tools/bootstrp) \
 ))
 
+$(eval $(call gb_StaticLibrary_add_api,toolshelpers,\
+    udkapi \
+    offapi \
+))
+
 $(eval $(call gb_StaticLibrary_add_cxxflags,toolshelpers,\
     -D_TOOLS_STRINGLIST \
 ))
diff --git a/tools/bootstrp/cppdep.cxx b/tools/bootstrp/cppdep.cxx
index b2d6cad..e291777 100644
--- a/tools/bootstrp/cppdep.cxx
+++ b/tools/bootstrp/cppdep.cxx
@@ -31,11 +31,12 @@
 
 #include <stdio.h>
 #include <string.h>
-
 #include <unistd.h>
 
 #include <sys/stat.h>
 #include <tools/stream.hxx>
+#include <rtl/strbuf.hxx>
+#include <comphelper/string.hxx>
 #include "cppdep.hxx"
 
 CppDep::CppDep( ByteString aFileName )
@@ -189,49 +190,51 @@ ByteString CppDep::Exists( ByteString aFileName )
     return aString;
 }
 
-ByteString CppDep::IsIncludeStatement( ByteString aLine )
+rtl::OString CppDep::IsIncludeStatement(rtl::OString aLine)
 {
-    ByteString aRetStr;
-    if ( aLine.Search("/*",0) != STRING_NOTFOUND )
+    sal_Int32 nIndex;
+
+    nIndex = aLine.indexOf("/*");
+    if ( nIndex != -1 )
     {
 #ifdef DEBUG_VERBOSE
-        fprintf( stderr, "found starting C comment : %s\n", aLine.GetBuffer() );
+        fprintf( stderr, "found starting C comment : %s\n", aLine.getStr() );
 #endif
-        aLine.Erase(aLine.Search("/*",0), aLine.Len() - 1);
+        aLine = aLine.copy(0, nIndex);
 #ifdef DEBUG_VERBOSE
-        fprintf( stderr, "cleaned string : %s\n", aLine.GetBuffer() );
+        fprintf( stderr, "cleaned string : %s\n", aLine.getStr() );
 #endif
     }
-    if ( aLine.Search("//",0) != STRING_NOTFOUND )
+
+    nIndex = aLine.indexOf("//");
+    if ( nIndex != -1 )
     {
 #ifdef DEBUG_VERBOSE
-        fprintf( stderr, "found C++ comment : %s\n", aLine.GetBuffer() );
+        fprintf( stderr, "found C++ comment : %s\n", aLine.getStr() );
 #endif
-        aLine.Erase(aLine.Search("//",0), aLine.Len() - 1);
+        aLine = aLine.copy(0, nIndex);
 #ifdef DEBUG_VERBOSE
-        fprintf( stderr, "cleaned string : %s\n", aLine.GetBuffer() );
+        fprintf( stderr, "cleaned string : %s\n", aLine.getStr() );
 #endif
     }
     // WhiteSpacesfressen
-    aLine.EraseAllChars(' ');
-    aLine.EraseAllChars('\t');
+    using comphelper::string::replace;
+    aLine = replace(aLine, rtl::OString(' '), rtl::OString());
+    aLine = replace(aLine, rtl::OString('\t'), rtl::OString());
 #ifdef DEBUG_VERBOSE
-    fprintf( stderr, "now : %s\n", aLine.GetBuffer() );
+    fprintf( stderr, "now : %s\n", aLine.getStr() );
 #endif
     // ist der erste Teil ein #include ?
-    ByteString aTmpStr;
-    aTmpStr = aLine.Copy( 0, 8 );
-#ifdef DEBUG_VERBOSE
-    fprintf( stderr, "is include : %s\n", aTmpStr.GetBuffer() );
-#endif
-    if ( aTmpStr.Equals("#include") )
+    rtl::OString aRetStr;
+    if (
+        aLine.getLength() >= 10 &&
+        aLine.match(rtl::OString(RTL_CONSTASCII_STRINGPARAM("#include")))
+       )
     {
-        aLine.Erase( 0, 8 );
-        sal_uInt16 nLen = aLine.Len();
-        aLine.Erase( nLen-1, 1 );
-        aLine.Erase( 0, 1 );
+        //#include<foo> or #include"foo"
+        aLine = aLine.copy(9, aLine.getLength()-10);
 #ifdef DEBUG_VERBOSE
-        fprintf( stderr, "Gotcha : %s\n", aLine.GetBuffer() );
+        fprintf( stderr, "Gotcha : %s\n", aLine.getStr() );
 #endif
         aRetStr = aLine;
     }
diff --git a/tools/bootstrp/cppdep.hxx b/tools/bootstrp/cppdep.hxx
index d1e4397..2d80074 100644
--- a/tools/bootstrp/cppdep.hxx
+++ b/tools/bootstrp/cppdep.hxx
@@ -45,7 +45,7 @@ protected:
     sal_Bool            Search( ByteString aFileName );
     ByteString      Exists( ByteString aFileName );
 
-    ByteString      IsIncludeStatement( ByteString aLine );
+    rtl::OString IsIncludeStatement(rtl::OString aLine);
 public:
                     CppDep( ByteString aFileName );
                     CppDep();
commit 13023291d1541cdfc6fa0a00706c149f0f9b2e26
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 16 08:53:25 2011 +0100

    callcatcher: unused code

diff --git a/lotuswordpro/source/filter/lwppara.hxx b/lotuswordpro/source/filter/lwppara.hxx
index 9bdac99..bec521d 100644
--- a/lotuswordpro/source/filter/lwppara.hxx
+++ b/lotuswordpro/source/filter/lwppara.hxx
@@ -286,12 +286,8 @@ private:
 
     void OverrideParaBullet(LwpParaProperty* pProps);
     void OverrideParaNumbering(LwpParaProperty* pProps);
-    void OverrideTab(LwpTabOverride* base,LwpTabOverride* over,XFParaStyle* pOverStyle);
     sal_Bool IsBadHintsInFile();
 
-    //void OutPutSectionTail(IXFStream* pOutputStream);
-    //void OutPutBulletTail(LwpBulletStyleMgr* pBulletStyleMgr,IXFStream* pOutputStream);
-
     sal_Bool RegisterMasterPage(XFParaStyle* pBaseStyle);
     void RegisterNewSectionStyle(LwpPageLayout* pLayout);
 
@@ -300,12 +296,6 @@ private:
     void AddBreakAfter(XFContentContainer* pCont);
     void AddBreakBefore(XFContentContainer* pCont);
     XFSection* CreateXFSection();
-
-    /*
-    sal_Bool IsNeedTabForTOC();
-    void AddTabStyleForTOC();
-    void AddTabStopForTOC();
-    maybe useful for futer version */
 };
 
 inline LwpSilverBullet* LwpPara::GetSilverBullet()
diff --git a/lotuswordpro/source/filter/lwppara1.cxx b/lotuswordpro/source/filter/lwppara1.cxx
index 1992967..38ad112 100644
--- a/lotuswordpro/source/filter/lwppara1.cxx
+++ b/lotuswordpro/source/filter/lwppara1.cxx
@@ -558,24 +558,6 @@ void LwpPara::OverrideParaNumbering(LwpParaProperty* pProps)
     m_pParaNumbering.reset(pOver.release());
 }
 
-/**************************************************************************
- * @short:
- * @descr:
- * @param:
- * @param:
- * @return:
-**************************************************************************/
-void LwpPara::OverrideTab(LwpTabOverride *base, LwpTabOverride *over, XFParaStyle *pOverStyle)
-{
-    if (base)
-    {
-        over->Override(base);
-        LwpParaStyle::ApplyTab(pOverStyle,base);
-    }
-    else
-        LwpParaStyle::ApplyTab(pOverStyle,over);
-}
-
 void LwpPara::FindLayouts()
 {
     m_Fribs.SetPara(this);
diff --git a/lotuswordpro/source/filter/lwpsortopt.cxx b/lotuswordpro/source/filter/lwpsortopt.cxx
index 151e24f..e1919d3 100644
--- a/lotuswordpro/source/filter/lwpsortopt.cxx
+++ b/lotuswordpro/source/filter/lwpsortopt.cxx
@@ -89,13 +89,5 @@ void LwpSortOption::Read(LwpObjectStream *pStrm)
     }
     pStrm->SkipExtra();
 }
-/**
- * @descr       return the disk size
- **/
-sal_uInt16 LwpSortOption::DiskSize()
-{
-    sal_uInt16 keysize = 4 * sizeof(sal_uInt16);
-    return (3* keysize + (2 * sizeof(sal_uInt16)) + sizeof(sal_uInt8) + sizeof(sal_uInt16));
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpsortopt.hxx b/lotuswordpro/source/filter/lwpsortopt.hxx
index a1df7d0..6bb75cb 100644
--- a/lotuswordpro/source/filter/lwpsortopt.hxx
+++ b/lotuswordpro/source/filter/lwpsortopt.hxx
@@ -92,7 +92,6 @@ public:
     ~LwpSortOption(){}
 public:
     void Read(LwpObjectStream *pStrm);
-    sal_uInt16 DiskSize();
 private:
     LwpSortKey m_Keys[3];
     sal_uInt16 m_nCount;
diff --git a/unusedcode.easy b/unusedcode.easy
index d2793c9..d191997 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -375,7 +375,6 @@ LwpObject::LwpObject()
 LwpObjectID::GetBuffer(char*)
 LwpObjectID::ReadCompressed(LwpSvStream*, LwpObjectID&)
 LwpObjectStream::QuickReadInt8(bool*)
-LwpPara::OverrideTab(LwpTabOverride*, LwpTabOverride*, XFParaStyle*)
 MSDffImportRecords::Insert(MSDffImportRecords const*, unsigned short, unsigned short)
 MSDffImportRecords::Insert(SvxMSDffImportRec* const&, unsigned short&)
 MSDffImportRecords::Insert(SvxMSDffImportRec* const*, unsigned short)
@@ -2321,6 +2320,7 @@ binfilter::SfxMacroConfig::LinkStubCallbackHdl_Impl(void*, void*)
 binfilter::SfxMacroConfig::LinkStubEventHdl_Impl(void*, void*)
 binfilter::SfxMultiVarRecordWriter::SfxMultiVarRecordWriter(unsigned char, SvStream*, unsigned short, unsigned char)
 binfilter::SfxObjectShell::GetBaseURL() const
+binfilter::SfxPSPropertyArr_Impl::DeleteAndDestroy(unsigned short, unsigned short)
 binfilter::SfxPtrArr::Insert(unsigned short, void*)
 binfilter::SfxPtrArr::Remove(void*)
 binfilter::SfxPtrArr::Replace(void*, void*)
commit f88247d9c5fe484b799600e24a96abbdd34cfe2f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 16 02:07:57 2011 +0100

    callcatcher: unused code

diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index f325180..0c66d27 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -114,7 +114,6 @@ public:
     static SfxViewFrame*    Current();
     static SfxViewFrame*    GetFirst( const SfxObjectShell* pDoc = 0, sal_Bool bOnlyVisible = sal_True );
     static SfxViewFrame*    GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = 0, sal_Bool bOnlyVisible = sal_True );
-    static sal_uInt16           Count();
 
     static SfxViewFrame*    Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = NULL );
 
@@ -138,8 +137,6 @@ public:
     SfxObjectShell*         GetObjectShell() const
                             { return xObjSh; }
 
-    void                    DoAdjustPosSize( SfxViewShell *pSh,
-                                        const Point rPos, const Size &rSize );
     void                    LockAdjustPosSizePixel()
                             { nAdjustPosPixelLock++; }
     void                    UnlockAdjustPosSizePixel()
@@ -213,7 +210,6 @@ public:
 
     SAL_DLLPRIVATE void GetState_Impl( SfxItemSet &rSet );
     SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq );
-    SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq, sal_Bool bAsync );
     SAL_DLLPRIVATE void StateReload_Impl( SfxItemSet &rSet );
     SAL_DLLPRIVATE void ExecView_Impl( SfxRequest &rReq );
     SAL_DLLPRIVATE void StateView_Impl( SfxItemSet &rSet );
@@ -224,7 +220,6 @@ public:
     SAL_DLLPRIVATE sal_Bool IsResizeInToOut_Impl() const;
     SAL_DLLPRIVATE sal_Bool IsAdjustPosSizePixelLocked_Impl() const
                             { return nAdjustPosPixelLock != 0; }
-    SAL_DLLPRIVATE void ForceInnerResize_Impl( sal_Bool bOn );
     SAL_DLLPRIVATE void UpdateDocument_Impl();
 
     SAL_DLLPRIVATE void LockObjectShell_Impl(sal_Bool bLock=sal_True);
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index c904e8d..0a1ffdb 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -218,7 +218,6 @@ public:
     virtual sal_Bool                HasSelection( sal_Bool bText = sal_True ) const;
     virtual SdrView*            GetDrawView() const;
 
-    void                        SetSubShell( SfxShell *pShell );
     SfxShell*                   GetSubShell() const { return pSubShell; }
     void                        AddSubShell( SfxShell& rShell );
     void                        RemoveSubShell( SfxShell *pShell=NULL );
@@ -239,14 +238,11 @@ public:
     void                        SetBorderPixel( const SvBorder &rBorder );
     void                        InvalidateBorder();
     inline SfxViewFrame*        GetViewFrame() const;
-    void                        AdjustVisArea(const Rectangle& rRect);
 
     // Printing Interface
     virtual SfxPrinter*         GetPrinter( sal_Bool bCreate = sal_False );
     virtual sal_uInt16              SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=sal_False );
     virtual SfxTabPage*         CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
-    void                        LockPrinter( sal_Bool bLock = sal_True );
-    sal_Bool                    IsPrinterLocked() const;
     virtual JobSetup            GetJobSetup() const;
     Printer*                    GetActivePrinter() const;
 
@@ -286,7 +282,6 @@ public:
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
                                 GetController();
 
-    ::cppu::OInterfaceContainerHelper& GetContextMenuInterceptors() const;
     sal_Bool                        TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent );
 
     void                        SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
@@ -328,7 +323,6 @@ public:
     SAL_DLLPRIVATE void PushSubShells_Impl( sal_Bool bPush=sal_True );
     SAL_DLLPRIVATE void PopSubShells_Impl() { PushSubShells_Impl( sal_False ); }
     SAL_DLLPRIVATE void TakeOwnerShip_Impl();
-    SAL_DLLPRIVATE void CheckOwnerShip_Impl();
     SAL_DLLPRIVATE void TakeFrameOwnerShip_Impl();
     SAL_DLLPRIVATE sal_Bool ExecKey_Impl(const KeyEvent& aKey);
 #endif
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index e41ae1f..cafb0db 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -290,18 +290,6 @@ long ReloadDecouple_Impl( void* pObj, void* pArg )
     return 0;
 }
 
-void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq, sal_Bool bAsync )
-{
-    if( bAsync )
-    {
-        if( !pImp->pReloader )
-            pImp->pReloader = new svtools::AsynchronLink(
-                Link( this, ReloadDecouple_Impl ) );
-        pImp->pReloader->Call( new SfxRequest( rReq ) );
-    }
-    else ExecReload_Impl( rReq );
-}
-
 void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 {
     SfxFrame *pParent = GetFrame().GetParentFrame();
@@ -1541,28 +1529,6 @@ SfxViewFrame* SfxViewFrame::Current()
 }
 
 //--------------------------------------------------------------------
-sal_uInt16 SfxViewFrame::Count()
-
-/*  [Description]
-
-    Returns the number of visable <SfxViewFrame> instances.
-*/
-
-{
-    SfxApplication *pSfxApp = SFX_APP();
-    SfxViewFrameArr_Impl& rFrames = pSfxApp->GetViewFrames_Impl();
-    const sal_uInt16 nCount = rFrames.Count();
-    sal_uInt16 nFound = 0;
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
-    {
-        SfxViewFrame *pFrame = rFrames[i];
-        if ( pFrame->IsVisible() )
-            ++nFound;
-    }
-    return nFound;
-}
-
-//--------------------------------------------------------------------
 // returns the first window of spec. type viewing the specified doc.
 SfxViewFrame* SfxViewFrame::GetFirst
 (
@@ -1718,29 +1684,11 @@ void SfxViewFrame::ForceOuterResize_Impl(sal_Bool bOn)
         pImp->bResizeInToOut = !bOn;
 }
 
-void SfxViewFrame::ForceInnerResize_Impl(sal_Bool bOn)
-{
-    pImp->bDontOverwriteResizeInToOut = bOn;
-}
-
 //--------------------------------------------------------------------
 sal_Bool SfxViewFrame::IsResizeInToOut_Impl() const
 {
     return pImp->bResizeInToOut;
 }
-//--------------------------------------------------------------------
-void SfxViewFrame::DoAdjustPosSize( SfxViewShell *pSh,
-                                const Point rPos, const Size &rSize )
-{
-    DBG_CHKTHIS(SfxViewFrame, 0);
-    if( pSh && !nAdjustPosPixelLock )
-    {
-        Window *pWindow = pSh->GetWindow();
-        Point aPos = pWindow->LogicToPixel(rPos);
-        Size aSize = pWindow->LogicToPixel(rSize);
-        DoAdjustPosSizePixel(pSh, aPos, aSize);
-    }
-}
 
 //--------------------------------------------------------------------
 void SfxViewFrame::GetDocNumber_Impl()
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 877005e..70c98d6 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -878,35 +878,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
 
 //--------------------------------------------------------------------
 
-sal_Bool SfxViewShell::IsPrinterLocked() const
-{
-    return pImp->m_nPrinterLocks > 0;
-}
-
-//--------------------------------------------------------------------
-
-void SfxViewShell::LockPrinter( sal_Bool bLock)
-{
-    sal_Bool bChanged = sal_False;
-    if ( bLock )
-    {
-        bChanged = 1 == ++pImp->m_nPrinterLocks;
-    }
-    else
-    {
-        bChanged = 0 == --pImp->m_nPrinterLocks;
-    }
-
-    if ( bChanged )
-    {
-        Invalidate( SID_PRINTDOC );
-        Invalidate( SID_PRINTDOCDIRECT );
-        Invalidate( SID_SETUPPRINTER );
-    }
-}
-
-//--------------------------------------------------------------------
-
 SfxPrinter* SfxViewShell::GetPrinter( sal_Bool /*bCreate*/ )
 {
     return 0;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c835d89..befc248 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1480,39 +1480,6 @@ sal_Bool SfxViewShell::HasSelection( sal_Bool ) const
     return sal_False;
 }
 
-//--------------------------------------------------------------------
-
-void SfxViewShell::SetSubShell( SfxShell *pShell )
-
-/*  [Description]
-
-    With this method a selection or cursor Shell can be registered, which are
-    automatically pushed to SfxDispatcher immediately after SfxViewShell, and
-    and automatically popped immediately before SfxViewShell.
-
-    If the SfxViewShell instance is already pushed, then pShell will be
-    immediately pushed as well. Is another SfxShell instance registered by
-    using SetSubShell, which was previously registered, the previously
-    registered shell is popped automatically if possible. With pShell==0
-    the current sub-shell be can thus be unregistered.
-*/
-
-{
-    // Is this ViewShell even active?
-    SfxDispatcher *pDisp = pFrame->GetDispatcher();
-    if ( pDisp->IsActive(*this) )
-    {
-        // Update Dispatcher
-        if ( pSubShell )
-            pDisp->Pop(*pSubShell);
-        if ( pShell )
-            pDisp->Push(*pShell);
-        pDisp->Flush();
-    }
-
-    pSubShell = pShell;
-}
-
 void SfxViewShell::AddSubShell( SfxShell& rShell )
 {
     pImp->aArr.Insert( &rShell, pImp->aArr.Count() );
@@ -1839,14 +1806,6 @@ void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const
 
 //--------------------------------------------------------------------
 
-void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
-{
-    DBG_ASSERT (pFrame, "No Frame?");
-    GetObjectShell()->SetVisArea( rRect );
-}
-
-//--------------------------------------------------------------------
-
 void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/)
 {
     SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
@@ -2065,11 +2024,6 @@ void SfxViewShell::RemoveContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTM
     pImp->aInterceptorContainer.removeInterface( xInterceptor );
 }
 
-::cppu::OInterfaceContainerHelper& SfxViewShell::GetContextMenuInterceptors() const
-{
-    return pImp->aInterceptorContainer;
-}
-
 void Change( Menu* pMenu, SfxViewShell* pView )
 {
     SfxDispatcher *pDisp = pView->GetViewFrame()->GetDispatcher();
@@ -2183,45 +2137,6 @@ void SfxViewShell::TakeFrameOwnerShip_Impl()
     pImp->m_bGotFrameOwnership = true;
 }
 
-void SfxViewShell::CheckOwnerShip_Impl()
-{
-    sal_Bool bSuccess = sal_False;
-    if (pImp->m_bGotOwnership)
-    {
-        uno::Reference < util::XCloseable > xModel(
-            GetObjectShell()->GetModel(), uno::UNO_QUERY );
-        if ( xModel.is() )
-        {
-            try
-            {
-                // this call will destroy this object in case of success!
-                xModel->close( sal_True );
-                bSuccess = sal_True;
-            }
-            catch (const util::CloseVetoException&)
-            {
-            }
-        }
-    }
-
-    if (!bSuccess && pImp->m_bGotFrameOwnership)
-    {
-        // document couldn't be closed or it shouldn't, now try at least to close the frame
-        uno::Reference < util::XCloseable > xFrame(
-            GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
-        if ( xFrame.is() )
-        {
-            try
-            {
-                xFrame->close( sal_True );
-            }
-            catch (const util::CloseVetoException&)
-            {
-            }
-        }
-    }
-}
-
 long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent )
 {
     if (pImp->m_pController.is())
diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx
index 0076788..0794ed1 100644
--- a/tools/inc/tools/simplerm.hxx
+++ b/tools/inc/tools/simplerm.hxx
@@ -83,13 +83,6 @@ public:
 
     bool                    IsValid() const { return m_pResImpl != NULL; }
 
-    /** retrieves the locale of the resource file represented by this instance
-        @precond
-            IsValid returns <TRUE/>
-    */
-    const ::com::sun::star::lang::Locale&
-                            GetLocale() const;
-
     /** reads the string with the given resource id
         @param  nId
             the resource id of the string to read
@@ -110,9 +103,6 @@ public:
             <TRUE/> if and only if a resource of the given type, with the given id, is available.
     */
     bool                    IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourceId );
-
-    sal_uInt32              ReadBlob( sal_uInt32 nId, void** pBuffer );
-    void                    FreeBlob( void* pBuffer );
 };
 
 #endif // _TOOLS_SIMPLERESMGR_HXX_
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 5a44dfa..c5ff744 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -2035,87 +2035,4 @@ UniString SimpleResMgr::ReadString( sal_uInt32 nId )
     return sReturn;
 }
 
-// -----------------------------------------------------------------------
-
-const ::com::sun::star::lang::Locale& SimpleResMgr::GetLocale() const
-{
-    DBG_ASSERT( IsValid(), "SimpleResMgr::ReadBlob: invalid, this will crash!" );
-    return m_pResImpl->aLocale;
-}
-
-// -----------------------------------------------------------------------
-
-sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer )
-{
-    osl::MutexGuard aGuard(m_aAccessSafety);
-
-    DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadBlob : have no impl class !" );
-
-    // perhaps constructed with an invalid filename ?
-    DBG_ASSERT( pBuffer, "SimpleResMgr::ReadBlob : invalid argument !" );
-    *pBuffer = NULL;
-
-    void* pResHandle = NULL;
-    InternalResMgr* pFallback = m_pResImpl;
-    RSHEADER_TYPE* pResHeader = (RSHEADER_TYPE*)m_pResImpl->LoadGlobalRes( RSC_RESOURCE, nId, &pResHandle );
-    DBG_ASSERT( pResHeader, "SimpleResMgr::ReadBlob : couldn't find the resource with the given id !" );
-
-    if ( !pResHeader )
-    {
-        osl::Guard<osl::Mutex> aGuard2( getResMgrMutex() );
-
-        // try fallback
-        while( ! pResHandle && pFallback )
-        {
-            InternalResMgr* pOldFallback = pFallback;
-            pFallback = ResMgrContainer::get().getNextFallback( pFallback );
-            if( pOldFallback != m_pResImpl )
-                ResMgrContainer::get().freeResMgr( pOldFallback );
-            if( pFallback )
-            {
-                // handle possible recursion
-                if( pFallback->aLocale.Language != m_pResImpl->aLocale.Language ||
-                    pFallback->aLocale.Country  != m_pResImpl->aLocale.Country  ||
-                    pFallback->aLocale.Variant  != m_pResImpl->aLocale.Variant )
-                {
-                    pResHeader = (RSHEADER_TYPE*)pFallback->LoadGlobalRes( RSC_RESOURCE, nId, &pResHandle );
-                }
-                else
-                {
-                    ResMgrContainer::get().freeResMgr( pFallback );
-                    pFallback = NULL;
-                }
-            }
-        }
-        if( ! pResHandle )
-            // no exception handling, this would require the locking of the solar mutex which isn't allowed within this class
-            return 0;
-    }
-
-    DBG_ASSERT( pResHandle == NULL, "SimpleResMgr::ReadBlob : behaviour of LoadGlobalRes changed !" );
-    // if pResHandle is not NULL the FreeBlob wouldn't have to delete the pointer given as pBuffer, but
-    // FreeBlob doesn't know that so it would probably crash ....
-
-    sal_uInt32 nRemaining = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
-    *pBuffer = (void*)(((sal_uInt8*)pResHeader) + sizeof(RSHEADER_TYPE));
-
-    // free an eventual fallback InternalResMgr
-    if( m_pResImpl != pFallback )
-    {
-        osl::Guard<osl::Mutex> aGuard2( getResMgrMutex() );
-
-        ResMgrContainer::get().freeResMgr( pFallback );
-    }
-
-    return nRemaining;
-}
-
-// -----------------------------------------------------------------------
-
-void SimpleResMgr::FreeBlob( void* pBuffer )
-{
-    void* pCompleteBuffer = (void*)(((sal_uInt8*)pBuffer) - sizeof(RSHEADER_TYPE));
-    rtl_freeMemory(pCompleteBuffer);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index c7ec603..d2793c9 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1092,28 +1092,15 @@ SfxUnoStyleSheet::SfxUnoStyleSheet(SfxStyleSheet const&)
 SfxVersionTableDtor::GetVersions() const
 SfxViewFactory::InitFactory()
 SfxViewFactory::~SfxViewFactory()
-SfxViewFrame::Count()
-SfxViewFrame::DoAdjustPosSize(SfxViewShell*, Point, Size const&)
-SfxViewFrame::ExecReload_Impl(SfxRequest&, unsigned char)
-SfxViewFrame::ForceInnerResize_Impl(unsigned char)
 SfxViewFrame::Hide()
-SfxViewShell::AdjustVisArea(Rectangle const&)
-SfxViewShell::CheckOwnerShip_Impl()
-SfxViewShell::GetContextMenuInterceptors() const
-SfxViewShell::IsPrinterLocked() const
-SfxViewShell::LockPrinter(unsigned char)
 SfxViewShell::PlugInsActive() const
 SfxViewShell::SetAdditionalPrintOptions(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
 SfxViewShell::SetScrollingMode(SfxScrollingMode)
-SfxViewShell::SetSubShell(SfxShell*)
 SfxVirtualMenu::GetItemText(unsigned short) const
 SfxVirtualMenu::GetPopupMenu(unsigned short) const
 SfxVirtualMenu::SetHelpIds(ResMgr*)
 SfxVirtualMenu::UpdateImages()
 SfxWhichIter::LastWhich()
-SimpleResMgr::FreeBlob(void*)
-SimpleResMgr::GetLocale() const
-SimpleResMgr::ReadBlob(unsigned int, void**)
 Slider::SetRangeMax(long)
 Slider::SetRangeMin(long)
 Slider::Slider(Window*, ResId const&)
commit ac96fbd737d01c074232ce74ba5279550ee8ce5d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 16 00:43:33 2011 +0100

    there's no point to that assign

diff --git a/tools/bootstrp/cppdep.cxx b/tools/bootstrp/cppdep.cxx
index ad5bb80..b2d6cad 100644
--- a/tools/bootstrp/cppdep.cxx
+++ b/tools/bootstrp/cppdep.cxx
@@ -226,7 +226,7 @@ ByteString CppDep::IsIncludeStatement( ByteString aLine )
 #endif
     if ( aTmpStr.Equals("#include") )
     {
-        aTmpStr = aLine.Erase( 0, 8 );
+        aLine.Erase( 0, 8 );
         sal_uInt16 nLen = aLine.Len();
         aLine.Erase( nLen-1, 1 );
         aLine.Erase( 0, 1 );
commit e74517995b04e24ff96daa1d71969111782c372d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 22:16:53 2011 +0100

    revert this

diff --git a/xmloff/inc/xmloff/xmlkywd.hxx b/xmloff/inc/xmloff/xmlkywd.hxx
index 95f6cb0..bce52d8 100644
--- a/xmloff/inc/xmloff/xmlkywd.hxx
+++ b/xmloff/inc/xmloff/xmlkywd.hxx
@@ -56,6 +56,7 @@ XML_CONSTASCII_ACTION( sXML_CDATA, "CDATA" );
 XML_CONSTASCII_ACTION( sXML_WS, " " );
 XML_CONSTASCII_ACTION( sXML_xml, "xml" );
 XML_CONSTASCII_ACTION( sXML_xmlns, "xmlns" );
+XML_CONSTASCII_ACTION( sXML_xml_pi, "version=\"1.0\" encoding=\"UTF-8\"" );
 XML_CONSTASCII_ACTION( sXML_xml_doctype_prefix, "<!DOCTYPE " );
 XML_CONSTASCII_ACTION( sXML_xml_doctype_suffix, " PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">" );
 
commit cf77838729d4fb677a80091ccc65360e4a451788
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 22:16:31 2011 +0100

    catch by const reference

diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 38c2763..860ffc7 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -355,7 +355,7 @@ throw (uno::RuntimeException)
         {
             bForceExpandHints = CheckForOwnMemberMeta(*pPam, bAbsorb);
         }
-        catch (lang::IllegalArgumentException & iae)
+        catch (const lang::IllegalArgumentException& iae)
         {
             // stupid method not allowed to throw iae
             throw uno::RuntimeException(iae.Message, 0);
@@ -1325,13 +1325,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
                 SwUnoCursorHelper::SetPropertyValue(aPam, *pParaPropSet,
                     pValues[nProp].Name, pValues[nProp].Value);
             }
-            catch (lang::IllegalArgumentException& rIllegal)
+            catch (const lang::IllegalArgumentException& rIllegal)
             {
                 sMessage = rIllegal.Message;
                 bIllegalException = true;
                 break;
             }
-            catch (uno::RuntimeException& rRuntime)
+            catch (const uno::RuntimeException& rRuntime)
             {
                 sMessage = rRuntime.Message;
                 bRuntimeException = true;
@@ -1437,13 +1437,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
                     pValues[nProp].Name, pValues[nProp].Value,
                     nsSetAttrMode::SETATTR_NOFORMATATTR);
             }
-            catch( lang::IllegalArgumentException& rIllegal )
+            catch (const lang::IllegalArgumentException& rIllegal)
             {
                 sMessage = rIllegal.Message;
                 bIllegalException = true;
                 break;
             }
-            catch( uno::RuntimeException& rRuntime )
+            catch (const uno::RuntimeException& rRuntime)
             {
                 sMessage = rRuntime.Message;
                 bRuntimeException = true;
@@ -1703,12 +1703,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
             m_pImpl->m_pDoc->DelFullPara(aStartPam);
         }
     }
-    catch (lang::IllegalArgumentException& rIllegal)
+    catch (const lang::IllegalArgumentException& rIllegal)
     {
         sMessage = rIllegal.Message;
         bIllegalException = true;
     }
-    catch (uno::RuntimeException& rRuntime)
+    catch (const uno::RuntimeException& rRuntime)
     {
         sMessage = rRuntime.Message;
         bRuntimeException = true;
@@ -2096,7 +2096,7 @@ lcl_ApplyCellProperties(
             {
                 xCellPS->setPropertyValue(rName, rValue);
             }
-            catch (uno::Exception const& e)
+            catch (const uno::Exception&)
             {
                 // Apply the paragraph and char properties to the cell's content
                 const uno::Reference< text::XText > xCellText(xCell,
@@ -2218,7 +2218,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
                 xPrSet->setPropertyValue( pTableProperties[nProperty].Name,
                         pTableProperties[nProperty].Value );
             }
-            catch ( uno::Exception const& e )
+            catch (const uno::Exception& e)
             {
 #if DEBUG
                 std::clog << "Exception when setting property: ";
@@ -2229,6 +2229,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
                 std::clog << rtl::OUStringToOString( e.Message,
                     RTL_TEXTENCODING_UTF8 ).getStr();
                 std::clog << std::endl;
+#else
+                (void)e;
 #endif
             }
         }
@@ -2270,13 +2272,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
         // have to be applied
         lcl_MergeCells(aMergedCells);
     }
-    catch( const lang::WrappedTargetException& rWrapped )
+    catch (const lang::WrappedTargetException&)
     {
-        (void)rWrapped;
     }
-    catch ( const lang::IndexOutOfBoundsException& rBounds )
+    catch (const lang::IndexOutOfBoundsException&)
     {
-        (void)rBounds;
     }
 
     return xRet;
commit 7684c90b6a40f9975e48cd86700676feb6f310df
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 22:15:57 2011 +0100

    catch by const reference

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 724664a..a2d5bad 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -241,7 +241,7 @@ void lcl_extractAndStartStatusIndicator( const ::comphelper::MediaDescriptor& _r
             _rCallArgs[ nLength ] <<= _rxStatusIndicator;
         }
     }
-    catch( const uno::Exception& )
+    catch (const uno::Exception&)
     {
         OSL_FAIL( "lcl_extractAndStartStatusIndicator: caught an exception!" );
     }
@@ -542,7 +542,7 @@ namespace
                 ::comphelper::disposeComponent(xModel);
             }
         }
-        catch(uno::Exception& ex)
+        catch (const uno::Exception&)
         {
             DBG_UNHANDLED_EXCEPTION();
         }
@@ -777,7 +777,7 @@ void OReportDefinition::init()
         }
         m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) );
     }
-    catch ( const uno::Exception& )
+    catch (const uno::Exception&)
     {
         DBG_UNHANDLED_EXCEPTION();
     }
@@ -1257,8 +1257,8 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
                 if ( xFrame.is() )
                     xFrame->close( _bDeliverOwnership );
             }
-            catch( const util::CloseVetoException& ) { throw; }
-            catch( const uno::Exception& )
+            catch (const util::CloseVetoException&) { throw; }
+            catch (const uno::Exception&)
             {
                 OSL_FAIL( "ODatabaseDocument::impl_closeControllerFrames: caught an unexpected exception!" );
             }
@@ -1288,7 +1288,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
         fillArgs(aDescriptor);
         m_pImpl->m_pReportModel->SetModified(sal_False);
     }
-    catch ( ... )
+    catch (...)
     {
         m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( true );
         throw;
@@ -1619,7 +1619,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
             if ( xTransact.is() )
                 xTransact->commit();
         }
-        catch(uno::Exception)
+        catch (const uno::Exception&)
         {
             OSL_FAIL("Exception Caught: Could not commit report storage!");
             throw io::IOException();
@@ -1730,9 +1730,8 @@ sal_Bool OReportDefinition::WriteThroughComponent(
         // finally, commit stream.
         return bRet;
     }
-    catch(const uno::Exception& e)
+    catch (const uno::Exception&)
     {
-        (void)e; // helper to know what e contains
         throw;
     }
 }
@@ -1870,7 +1869,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
         {
             xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), uno::UNO_QUERY_THROW );
         }
-        catch( const uno::Exception& )
+        catch (const uno::Exception&)
         {
             if ( i == nLastOpenMode )
                 throw lang::WrappedTargetException(
@@ -2028,7 +2027,7 @@ void OReportDefinition::notifyEvent(const ::rtl::OUString& _sEventName)
         aGuard.clear();
         m_pImpl->m_aDocEventListeners.notifyEach(&document::XEventListener::notifyEvent,aEvt);
     }
-    catch(uno::Exception&)
+    catch (const uno::Exception&)
     {
     }
 }
@@ -2077,7 +2076,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL OReportDefinition::getViewDat
                 {
                     xContainer->insertByIndex(xContainer->getCount(),(*aIter)->getViewData());
                 }
-                catch(uno::Exception&)
+                catch (const uno::Exception&)
                 {
                 }
             }
@@ -2876,10 +2875,9 @@ uno::Any SAL_CALL OReportDefinition::getTransferData( const datatransfer::DataFl
         {
             aResult <<= getPreferredVisualRepresentation(0).Data;
         }
-        catch( uno::Exception & ex )
+        catch (const uno::Exception &)
         {
             DBG_UNHANDLED_EXCEPTION();
-            (void)ex;
         }
     }
     else
commit 2ef7e20436221f0adc8f8f1b95ac2a7ba734b2af
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 15:14:00 2011 +0100

    catch by const reference

diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 7654e0e..59ac066 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -340,7 +340,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
                     else
                         xDispatcher->dispatch( aURL, aArgs2 );
                 }
-                catch ( ::com::sun::star::uno::Exception& )
+                catch (const ::com::sun::star::uno::Exception&)
                 {
                     OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
                         "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: "));
@@ -397,14 +397,14 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
             {
                 xDoc = Reference < XPrintable >( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY );
             }
-            catch ( ::com::sun::star::lang::IllegalArgumentException& iae)
+            catch (const ::com::sun::star::lang::IllegalArgumentException& iae)
             {
                 OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: "))
                     + iae.Message;
                 OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
             }
-            catch (com::sun::star::io::IOException& ioe)
+            catch (const com::sun::star::io::IOException& ioe)
             {
                 OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "Dispatchwatcher IOException while calling loadComponentFromURL: "))
@@ -483,7 +483,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
                             {
                                 xStorable->storeToURL( aOutFile, conversionProperties );
                             }
-                            catch ( Exception& e )
+                            catch (const Exception&)
                             {
                                 fprintf( stderr, "Error: Please reverify input parameters...\n" );
                             }
@@ -566,7 +566,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
                             xComp->dispose();
                     }
                 }
-                catch ( com::sun::star::util::CloseVetoException& )
+                catch (const com::sun::star::util::CloseVetoException&)
                 {
                 }
 
commit 0a9fa3d840da1ba224397fddd6a09852d7121701
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 11:06:49 2011 +0100

    ditch some junk

diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 8931a16..9bbad2f 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -2078,59 +2078,6 @@ sal_uInt8 LwpPlacableLayout::GetRelativeType()
     return LwpVirtualLayout::GetRelativeType();
 }
 /**
-* @descr:   Get relative from where type
-*
-*/
-sal_uInt8 LwpPlacableLayout::GetRelativeFromWhere()
-{
-    LwpLayoutRelativity* pLayRel = GetRelativityPiece();
-    if(pLayRel)
-    {
-        return pLayRel->GetRelGuts()->GetRelativeFromWhere();
-    }
-    return 0;
-}
-/**
-* @descr:   Get relative distance
-*
-*/
-LwpPoint LwpPlacableLayout::GetRelativeDistance()
-{
-    LwpPoint aPoint;
-    LwpLayoutRelativity* pLayRel = GetRelativityPiece();
-    if(pLayRel)
-    {
-        aPoint = pLayRel->GetRelGuts()->GetRelativeDistance();
-    }
-    return aPoint;
-}
-/**
-* @descr:   Get tether type
-*
-*/
-sal_uInt8 LwpPlacableLayout::GetTetherType()
-{
-    LwpLayoutRelativity* pLayRel = GetRelativityPiece();
-    if(pLayRel)
-    {
-        return pLayRel->GetRelGuts()->GetTetherType();
-    }
-    return 0;
-}
-/**
-* @descr:   Get tether where type
-*
-*/
-sal_uInt8 LwpPlacableLayout::GetTetherWhere()
-{
-    LwpLayoutRelativity* pLayRel = GetRelativityPiece();
-    if(pLayRel)
-    {
-        return pLayRel->GetRelGuts()->GetTetherWhere();
-    }
-    return 0;
-}
-/**
 * @descr:   Get offset from the baseline
 *
 */
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx
index 056cd68..abe582d 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -420,10 +420,6 @@ public:
     virtual sal_uInt8 GetWrapType();
     virtual LwpLayoutRelativity* GetRelativityPiece();
     virtual sal_uInt8 GetRelativeType();
-    sal_uInt8 GetRelativeFromWhere();
-    LwpPoint GetRelativeDistance();
-    sal_uInt8 GetTetherType();
-    sal_uInt8 GetTetherWhere();
     virtual sal_Int32 GetBaseLineOffset();
     virtual sal_Bool IsAnchorPage();
     virtual sal_Bool IsAnchorFrame();
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 0d6264d..219f358 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -479,10 +479,4 @@ void LwpRowHeadingLayout::Read()
     m_pObjStrm->SkipExtra();
 }
 
-LwpRowLayout * LwpRowHeadingLayout::GetRowLayout()
-{
-    LwpRowLayout * pRow = dynamic_cast<LwpRowLayout *>(cRowLayout.obj());
-    return pRow;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwprowlayout.hxx b/lotuswordpro/source/filter/lwprowlayout.hxx
index a1693f8..54be9f0 100644
--- a/lotuswordpro/source/filter/lwprowlayout.hxx
+++ b/lotuswordpro/source/filter/lwprowlayout.hxx
@@ -126,7 +126,6 @@ public:
     LwpRowHeadingLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     virtual ~LwpRowHeadingLayout();
     virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_ROW_HEADING_LAYOUT;}
-    LwpRowLayout * GetRowLayout();
 protected:
     void Read();
     LwpObjectID cRowLayout;
diff --git a/lotuswordpro/source/filter/lwpsortopt.cxx b/lotuswordpro/source/filter/lwpsortopt.cxx
index e4ce34d..151e24f 100644
--- a/lotuswordpro/source/filter/lwpsortopt.cxx
+++ b/lotuswordpro/source/filter/lwpsortopt.cxx
@@ -90,13 +90,6 @@ void LwpSortOption::Read(LwpObjectStream *pStrm)
     pStrm->SkipExtra();
 }
 /**
- * @descr       skip the sort option
- **/
-void LwpSortOption::Skip(LwpObjectStream *pStrm)
-{
-    pStrm->SeekRel(DiskSize());
-}
-/**
  * @descr       return the disk size
  **/
 sal_uInt16 LwpSortOption::DiskSize()
diff --git a/lotuswordpro/source/filter/lwpsortopt.hxx b/lotuswordpro/source/filter/lwpsortopt.hxx
index a138ea1..a1df7d0 100644
--- a/lotuswordpro/source/filter/lwpsortopt.hxx
+++ b/lotuswordpro/source/filter/lwpsortopt.hxx
@@ -92,7 +92,6 @@ public:
     ~LwpSortOption(){}
 public:
     void Read(LwpObjectStream *pStrm);
-    void Skip(LwpObjectStream *pStrm);
     sal_uInt16 DiskSize();
 private:
     LwpSortKey m_Keys[3];
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index c9af88c..5b2e6f6 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -324,30 +324,6 @@ sal_Bool LwpStory::IsNeedSection()
     return bNewSection;
 }
 /**************************************************************************
- * @descr:  process frame which anchor type is to page, frame or cell
- * @param:
- * @param:
- * @return:
-**************************************************************************/
-void LwpStory::XFConvertFrame(XFContentContainer* pCont)
-{
-    LwpVirtualLayout* pLayout = GetLayout(NULL);
-    while(pLayout)
-    {
-        LwpVirtualLayout* pFrameLayout = dynamic_cast<LwpVirtualLayout*>(pLayout->GetChildHead()->obj());
-        while(pFrameLayout)
-        {
-            if((pFrameLayout->IsAnchorPage()&&(pFrameLayout->IsFrame()||pFrameLayout->IsSuperTable()||pFrameLayout->IsGroupHead()))
-                ||(pFrameLayout->IsAnchorFrame()))
-            {
-                pFrameLayout->XFConvert(pCont);
-            }
-            pFrameLayout = dynamic_cast<LwpVirtualLayout*>(pFrameLayout->GetNext()->obj());
-        }
-        pLayout = GetLayout(pLayout);
-    }
-}
-/**************************************************************************
  * @descr:  process frame which anchor type is to cell
  * @param:
  * @param:
diff --git a/lotuswordpro/source/filter/lwpstory.hxx b/lotuswordpro/source/filter/lwpstory.hxx
index 5944979..7bbd2b5 100644
--- a/lotuswordpro/source/filter/lwpstory.hxx
+++ b/lotuswordpro/source/filter/lwpstory.hxx
@@ -97,7 +97,6 @@ private:
 
 protected:
     void Read();
-    void XFConvertFrame(XFContentContainer* pCont);
     void XFConvertFrameInCell(XFContentContainer* pCont);
     void XFConvertFrameInFrame(XFContentContainer* pCont);
     void XFConvertFrameInHeaderFooter(XFContentContainer* pCont);
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index a269a6e..f092720 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -406,18 +406,6 @@ void  LwpSuperTableLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 n
 
 }
 /**
- * @short   parse frame
- * @param
- * @return
- */
-void  LwpSuperTableLayout::ParseFrame(XFFrame * pXFFrame)
-{
-    if(m_pFrame)
-    {
-        m_pFrame->Parse(pXFFrame);
-    }
-}
-/**
  * @short  register frame style
  * @param
  * @return
diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx b/lotuswordpro/source/filter/lwptablelayout.hxx
index f38a368..f5a5adf 100644
--- a/lotuswordpro/source/filter/lwptablelayout.hxx
+++ b/lotuswordpro/source/filter/lwptablelayout.hxx
@@ -179,7 +179,6 @@ public:
     void XFConvert(XFContentContainer* pCont);
     // for frame style
     virtual void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, sal_Bool bAll = sal_False);
-    void ParseFrame(XFFrame* pXFFrame);
     void RegisterFrameStyle();
     LwpTableHeadingLayout* GetTableHeadingLayout();
 protected:
diff --git a/package/source/manifest/ManifestDefines.hxx b/package/source/manifest/ManifestDefines.hxx
index 4d8d9f0..969f4d8 100644
--- a/package/source/manifest/ManifestDefines.hxx
+++ b/package/source/manifest/ManifestDefines.hxx
@@ -61,10 +61,7 @@
 #define ATTRIBUTE_SALT "manifest:salt"
 #define ATTRIBUTE_ITERATION_COUNT "manifest:iteration-count"
 
-#define SHA256_URL "http://www.w3.org/2001/04/xmlenc#sha256"
-//http://tools.oasis-open.org/issues/browse/OFFICE-3702
-//http://tools.oasis-open.org/issues/browse/OFFICE-3708
-#define SHA256_URL_TYPO "http://www.w3.org/2000/09/xmldsig#sha256"
+#define SHA256_URL "http://www.w3.org/2000/09/xmldsig#sha256"
 #define SHA1_NAME "SHA1"
 #define SHA1_URL "http://www.w3.org/2000/09/xmldsig#sha1"
 
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index 902f5b5..f685f7e 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -88,7 +88,6 @@ ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManV
 , sWhiteSpace                   ( RTL_CONSTASCII_USTRINGPARAM ( " " ) )
 
 , sSHA256_URL                   ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_URL ) )
-, sSHA256_URL_TYPO              ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_URL_TYPO ) )
 , sSHA1_Name                    ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_NAME ) )
 , sSHA1_URL                     ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_URL ) )
 
@@ -282,7 +281,7 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
             else if ( aConvertedName == sStartKeyAlgElement )
             {
                 OUString aString = aConvertedAttribs[sStartKeyAlgNameAttribute];
-                if (aString.equals(sSHA256_URL) || aString.equals(sSHA256_URL_TYPO))
+                if ( aString.equals( sSHA256_URL ) )
                 {
                     aSequence[nNumProperty].Name = sStartKeyAlgProperty;
                     aSequence[nNumProperty++].Value <<= xml::crypto::DigestID::SHA256;
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
index 5d67206..1c646a7 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -106,7 +106,6 @@ protected:
     const ::rtl::OUString sWhiteSpace;
 
     const ::rtl::OUString sSHA256_URL;
-    const ::rtl::OUString sSHA256_URL_TYPO;
     const ::rtl::OUString sSHA1_Name;
     const ::rtl::OUString sSHA1_URL;
 
diff --git a/unusedcode.easy b/unusedcode.easy
index 5b4e319..c7ec603 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -376,14 +376,6 @@ LwpObjectID::GetBuffer(char*)
 LwpObjectID::ReadCompressed(LwpSvStream*, LwpObjectID&)
 LwpObjectStream::QuickReadInt8(bool*)
 LwpPara::OverrideTab(LwpTabOverride*, LwpTabOverride*, XFParaStyle*)
-LwpPlacableLayout::GetRelativeDistance()
-LwpPlacableLayout::GetRelativeFromWhere()
-LwpPlacableLayout::GetTetherType()
-LwpPlacableLayout::GetTetherWhere()
-LwpRowHeadingLayout::GetRowLayout()
-LwpSortOption::Skip(LwpObjectStream*)
-LwpStory::XFConvertFrame(XFContentContainer*)
-LwpSuperTableLayout::ParseFrame(XFFrame*)
 MSDffImportRecords::Insert(MSDffImportRecords const*, unsigned short, unsigned short)
 MSDffImportRecords::Insert(SvxMSDffImportRec* const&, unsigned short&)
 MSDffImportRecords::Insert(SvxMSDffImportRec* const*, unsigned short)
diff --git a/xmloff/inc/xmloff/xmlkywd.hxx b/xmloff/inc/xmloff/xmlkywd.hxx
index bce52d8..95f6cb0 100644
--- a/xmloff/inc/xmloff/xmlkywd.hxx
+++ b/xmloff/inc/xmloff/xmlkywd.hxx
@@ -56,7 +56,6 @@ XML_CONSTASCII_ACTION( sXML_CDATA, "CDATA" );
 XML_CONSTASCII_ACTION( sXML_WS, " " );
 XML_CONSTASCII_ACTION( sXML_xml, "xml" );
 XML_CONSTASCII_ACTION( sXML_xmlns, "xmlns" );
-XML_CONSTASCII_ACTION( sXML_xml_pi, "version=\"1.0\" encoding=\"UTF-8\"" );
 XML_CONSTASCII_ACTION( sXML_xml_doctype_prefix, "<!DOCTYPE " );
 XML_CONSTASCII_ACTION( sXML_xml_doctype_suffix, " PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">" );
 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 3002548..1498d48 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1369,9 +1369,6 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
 
     mxHandler->startDocument();
 
-    // <?xml version="1.0" encoding="UTF-8"?>
-//  xHandler->processingInstruction( S2U( sXML_xml ), S2U( sXML_xml_pi ) );
-
     // <office:document ...>
     CheckAttrList();
 
commit 2b4d91f5a3738e0b71583769b3a69d6a6211d7ca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 10:16:24 2011 +0100

    catch by const reference

diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 1417fb6..f0869b0 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -241,7 +241,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
     {
         m_out->writeBytes( m_Sequence );
     }
-    catch( IOException & e )
+    catch (const IOException & e)
     {
         Any a;
         a <<= e;
@@ -1125,7 +1125,7 @@ void SAXWriter::endDocument(void)                   throw(SAXException, RuntimeE
     {
         m_out->closeOutput();
     }
-    catch( IOException & e )
+    catch (const IOException & e)
     {
         Any a;
         a <<= e;
commit 82eb8062f0c48726a3cedd39f567cbff7e0b9aeb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 10:03:25 2011 +0100

    catch by const reference

diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index e2c4071..60bc62d 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -325,9 +325,9 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
                     (*i_pTypes)[i].get());
             }
         }
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "addFile: exception")), /*this*/0, uno::makeAny(e));
@@ -374,9 +374,9 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
             i_xPart.get());
         i_rImpl.m_xManifest->removeStatements(i_xPart.get(),
             getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext), 0);
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("removeFile: exception")),
             0, uno::makeAny(e));
@@ -403,9 +403,9 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
             ret.push_back(xPart);
         }
         return ret;
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getAllParts: exception")),
             0, uno::makeAny(e));
@@ -425,9 +425,9 @@ isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl,
                 i_xType.get()),
             uno::UNO_SET_THROW);
         return (xEnum->hasMoreElements());
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("isPartOfType: exception")),
             0, uno::makeAny(e));
@@ -518,7 +518,7 @@ collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage,
         {
             o_rFiles.insert(i_Path + styles);
         }
-    } catch (uno::Exception &) {
+    } catch (const uno::Exception &) {
         OSL_TRACE("collectFilesFromStorage: exception?");
     }
 }
@@ -571,7 +571,7 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
                             "refusing to recurse into embedded document");
                         return;
                     }
-                } catch (uno::Exception &) { }
+                } catch (const uno::Exception &) { }
                 ::rtl::OUStringBuffer buf(i_rBaseURI);
                 buf.append(dir).append(static_cast<sal_Unicode>('/'));
                 readStream(i_rImpl, xDir, rest, buf.makeStringAndClear() );
@@ -581,13 +581,13 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
                     ucb::IOErrorCode_NO_DIRECTORY, i_rBaseURI + dir, dir);
             }
         }
-    } catch (container::NoSuchElementException & e) {
+    } catch (const container::NoSuchElementException & e) {
         throw mkException(e.Message, ucb::IOErrorCode_NOT_EXISTING_PATH,
             i_rBaseURI + i_rPath, i_rPath);
-    } catch (io::IOException & e) {
+    } catch (const io::IOException & e) {
         throw mkException(e.Message, ucb::IOErrorCode_CANT_READ,
             i_rBaseURI + i_rPath, i_rPath);
-    } catch (rdf::ParseException & e) {
+    } catch (const rdf::ParseException & e) {
         throw mkException(e.Message, ucb::IOErrorCode_WRONG_FORMAT,
             i_rBaseURI + i_rPath, i_rPath);
     }
@@ -604,11 +604,11 @@ importFile(struct DocumentMetadataAccess_Impl & i_rImpl,
 retry:
     try {
         readStream(i_rImpl, i_xStorage, i_rPath, i_rBaseURI);
-    } catch (ucb::InteractiveAugmentedIOException & e) {
+    } catch (const ucb::InteractiveAugmentedIOException & e) {
         if (handleError(e, i_xHandler)) goto retry;
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("importFile: exception")),
             0, uno::makeAny(e));
@@ -673,7 +673,7 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl,
                         "refusing to recurse into embedded document");
                     return;
                 }
-            } catch (uno::Exception &) { }
+            } catch (const uno::Exception &) { }
             ::rtl::OUStringBuffer buf(i_rBaseURI);
             buf.append(dir).append(static_cast<sal_Unicode>('/'));
             writeStream(i_rImpl, xDir, i_xGraphName, rest,
@@ -684,9 +684,9 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl,
                 xTransaction->commit();
             }
         }
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (io::IOException &) {
+    } catch (const io::IOException &) {
         throw;
     }
 }
@@ -720,13 +720,13 @@ retry:
         getURIForStream(i_rImpl, manifest));
     try {
         readStream(i_rImpl, i_xStorage, manifest, baseURI);
-    } catch (ucb::InteractiveAugmentedIOException & e) {
+    } catch (const ucb::InteractiveAugmentedIOException & e) {
         // no manifest.rdf: this is not an error in ODF < 1.2
         if (!(ucb::IOErrorCode_NOT_EXISTING_PATH == e.Code)) {
             iaioe = e;
             err = true;
         }
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         rterr <<= e;
     }
 
@@ -775,7 +775,7 @@ static void init(struct DocumentMetadataAccess_Impl & i_rImpl)
         i_rImpl.m_xManifest->addStatement(i_rImpl.m_xBaseURI.get(),
             getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext),
             getURI<rdf::URIs::PKG_DOCUMENT>(i_rImpl.m_xContext).get());
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("init: unexpected exception")), 0,
             uno::makeAny(e));
@@ -948,7 +948,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
 
     try {
         m_pImpl->m_xRepository->createGraph(xGraphName);
-    } catch (rdf::RepositoryException & e) {
+    } catch (const rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::addMetadataFile: exception")),
@@ -995,7 +995,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     try {
         m_pImpl->m_xRepository->importGraph(
             i_Format, i_xInStream, xGraphName, i_xBaseURI);
-    } catch (rdf::RepositoryException & e) {
+    } catch (const rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::importMetadataFile: "
@@ -1016,7 +1016,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
 {
     try {
         m_pImpl->m_xRepository->destroyGraph(i_xGraphName);
-    } catch (rdf::RepositoryException & e) {
+    } catch (const rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::removeMetadataFile: "
@@ -1079,9 +1079,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         // remove file from manifest
         removeFile(*m_pImpl, xPart);
 
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::removeContentOrStylesFile: exception")),
@@ -1185,9 +1185,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
                 // something else! just ignore it...
             }
         }
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::loadMetadataFromStorage: "
@@ -1221,12 +1221,12 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     const ::rtl::OUString baseURI( m_pImpl->m_xBaseURI->getStringValue() );
     try {
         writeStream(*m_pImpl, i_xStorage, xManifest, manifest, baseURI);
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (io::IOException & e) {
+    } catch (const io::IOException & e) {
         throw lang::WrappedTargetException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "storeMetadataToStorage: IO exception")), *this, uno::makeAny(e));
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "storeMetadataToStorage: exception")), *this, uno::makeAny(e));
@@ -1258,21 +1258,21 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             }
             try {
                 writeStream(*m_pImpl, i_xStorage, xName, relName, baseURI);
-            } catch (uno::RuntimeException &) {
+            } catch (const uno::RuntimeException &) {
                 throw;
-            } catch (io::IOException & e) {
+            } catch (const io::IOException & e) {
                 throw lang::WrappedTargetException(
                     ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                         "storeMetadataToStorage: IO exception")),
                     *this, uno::makeAny(e));
-            } catch (uno::Exception & e) {
+            } catch (const uno::Exception & e) {
                 throw lang::WrappedTargetRuntimeException(
                     ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                         "storeMetadataToStorage: exception")),
                     *this, uno::makeAny(e));
             }
         }
-    } catch (rdf::RepositoryException & e) {
+    } catch (const rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "storeMetadataToStorage: exception")), *this, uno::makeAny(e));
@@ -1310,11 +1310,11 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             xStorage = ::comphelper::OStorageHelper::GetStorageFromURL2(
                             URL, embed::ElementModes::READ, xMsf);
         }
-    } catch (uno::RuntimeException &) {
+    } catch (const uno::RuntimeException &) {
         throw;
-    } catch (io::IOException &) {
+    } catch (const io::IOException &) {
         throw;
-    } catch (uno::Exception & e) {
+    } catch (const uno::Exception & e) {
         throw lang::WrappedTargetException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "DocumentMetadataAccess::loadMetadataFromMedium: "
@@ -1328,11 +1328,11 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     uno::Reference<rdf::XURI> xBaseURI;
     try {
         xBaseURI = createBaseURI(m_pImpl->m_xContext, xStorage, BaseURL);
-    } catch (uno::Exception &) {
+    } catch (const uno::Exception &) {
         // fall back to URL
         try {
             xBaseURI = createBaseURI(m_pImpl->m_xContext, xStorage, URL);
-        } catch (uno::Exception &) {
+        } catch (const uno::Exception &) {
             OSL_FAIL("cannot create base URI");
         }
     }
@@ -1385,7 +1385,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             xProps->setPropertyValue(
                 ::comphelper::MediaDescriptor::PROP_MEDIATYPE(),
                 iter->second);
-        } catch (uno::Exception &) { }
+        } catch (const uno::Exception &) { }
     }
     storeMetadataToStorage(xStorage);
 
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 864652c..29cea37 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -682,7 +682,7 @@ SfxDocumentMetaData::getURLProperties(
         xPropArg->addProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")),
                 css::beans::PropertyAttribute::MAYBEVOID,
                 css::uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta))));
-    } catch (css::uno::Exception &) {
+    } catch (const css::uno::Exception &) {
         // ignore
     }
     return css::uno::Reference< css::beans::XPropertySet>(xPropArg,
@@ -704,7 +704,7 @@ getNodeText(css::uno::Reference<css::xml::dom::XNode> i_xNode)
         if (c->getNodeType() == css::xml::dom::NodeType_TEXT_NODE) {
             try {
                 return c->getNodeValue();
-            } catch (css::xml::dom::DOMException &) { // too big?
+            } catch (const css::xml::dom::DOMException &) { // too big?
                 return ::rtl::OUString();
             }
         }
@@ -773,7 +773,7 @@ SfxDocumentMetaData::setMetaText(const char* i_name,
             xNode->appendChild(xTextNode);
             return true;
         }
-    } catch (css::xml::dom::DOMException & e) {
+    } catch (const css::xml::dom::DOMException & e) {
         css::uno::Any a(e);
         throw css::lang::WrappedTargetRuntimeException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
@@ -910,7 +910,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
         }
 
         return true;
-    } catch (css::xml::dom::DOMException & e) {
+    } catch (const css::xml::dom::DOMException & e) {
         css::uno::Any a(e);
         throw css::lang::WrappedTargetRuntimeException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
@@ -938,7 +938,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
         css::uno::Any any;
         try {
             any = i_xPropSet->getPropertyValue(name);
-        } catch (css::uno::Exception &) {
+        } catch (const css::uno::Exception &) {
             // ignore
         }
         const css::uno::Type & type = any.getValueType();
@@ -1051,7 +1051,7 @@ SfxDocumentMetaData::updateElement(const char *i_name,
             m_xParent->appendChild(xNode);
         }
         m_meta[name] = xNode;
-    } catch (css::xml::dom::DOMException & e) {
+    } catch (const css::xml::dom::DOMException & e) {
         css::uno::Any a(e);
         throw css::lang::WrappedTargetRuntimeException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
@@ -1200,7 +1200,7 @@ void SAL_CALL SfxDocumentMetaData::init(
     m_xParent.clear();
     try {
         m_xParent = xPath->selectSingleNode(xDocNode, prefix);
-    } catch (com::sun::star::uno::Exception &) {
+    } catch (const com::sun::star::uno::Exception &) {
     }
 
     if (!m_xParent.is()) {
@@ -1250,7 +1250,7 @@ void SAL_CALL SfxDocumentMetaData::init(
             css::uno::UNO_QUERY_THROW);
             xRElem->appendChild(xParent);
             m_xParent = xParent;
-        } catch (css::xml::dom::DOMException & e) {
+        } catch (const css::xml::dom::DOMException & e) {
             css::uno::Any a(e);
             throw css::lang::WrappedTargetRuntimeException(
                     ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
@@ -1371,14 +1371,14 @@ void SAL_CALL SfxDocumentMetaData::init(
         try {
             m_xUserDefined->addProperty(name,
                 css::beans::PropertyAttribute::REMOVEABLE, any);
-        } catch (css::beans::PropertyExistException &) {
+        } catch (const css::beans::PropertyExistException &) {
             DBG_WARNING1("SfxDocumentMetaData: duplicate: %s",
                     OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
             // ignore; duplicate
-        } catch (css::beans::IllegalTypeException &) {
+        } catch (const css::beans::IllegalTypeException &) {
             OSL_TRACE("SfxDocumentMetaData: illegal type: %s",
                     OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
-        } catch (css::lang::IllegalArgumentException &) {
+        } catch (const css::lang::IllegalArgumentException &) {
             OSL_TRACE("SfxDocumentMetaData: illegal arg: %s",
                     OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
         }
@@ -1966,7 +1966,7 @@ SfxDocumentMetaData::loadFromStorage(
             >>= input.sSystemId;
         input.sSystemId += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")).concat(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta)));
-    } catch (css::uno::Exception &) {
+    } catch (const css::uno::Exception &) {
         input.sSystemId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta));
     }
     css::uno::Sequence< css::uno::Any > args(1);
@@ -1985,7 +1985,7 @@ SfxDocumentMetaData::loadFromStorage(
     xParser->setDocumentHandler(xDocHandler);
     try {
         xParser->parseStream(input);
-    } catch (css::xml::sax::SAXException &) {
+    } catch (const css::xml::sax::SAXException &) {
         throw css::io::WrongFormatException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "SfxDocumentMetaData::loadFromStorage:"
                 " XML parsing exception")), *this);
@@ -2099,11 +2099,11 @@ SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL,
             xStorage = ::comphelper::OStorageHelper::GetStorageFromURL(
                             URL, css::embed::ElementModes::READ, xMsf);
         }
-    } catch (css::uno::RuntimeException &) {
+    } catch (const css::uno::RuntimeException &) {
         throw;
-    } catch (css::io::IOException &) {
+    } catch (const css::io::IOException &) {
         throw;
-    } catch (css::uno::Exception & e) {
+    } catch (const css::uno::Exception & e) {
         throw css::lang::WrappedTargetException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "SfxDocumentMetaData::loadFromMedium: exception")),
@@ -2225,9 +2225,9 @@ SfxDocumentMetaData::createClone()
             xDoc->importNode(xRoot, true));
         xDoc->appendChild(xRootNew);
         pNew->init(xDoc);
-    } catch (css::uno::RuntimeException &) {
+    } catch (const css::uno::RuntimeException &) {
         throw;
-    } catch (css::uno::Exception & e) {
+    } catch (const css::uno::Exception & e) {
         css::uno::Any a(e);
         throw css::lang::WrappedTargetRuntimeException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
@@ -2269,9 +2269,9 @@ void SAL_CALL SfxDocumentMetaData::setModified( ::sal_Bool bModified )
             css::lang::EventObject event(xThis);
             m_NotifyListeners.notifyEach(&css::util::XModifyListener::modified,
                 event);
-        } catch (css::uno::RuntimeException &) {
+        } catch (const css::uno::RuntimeException &) {
             throw;
-        } catch (css::uno::Exception & e) {
+        } catch (const css::uno::Exception & e) {
             // ignore
             DBG_WARNING1("SfxDocumentMetaData::setModified: exception:\n%s",
                 OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
commit e0225e7e733aaa90bd109ee11c977183ce823170
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 10:01:10 2011 +0100

    const char*->const char[]

diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 66e1b04..864652c 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -501,8 +501,7 @@ const char* s_nsODF     = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
 const char* s_nsODFMeta = "urn:oasis:names:tc:opendocument:xmlns:meta:1.0";
 // const char* s_nsOOo     = "http://openoffice.org/2004/office"; // not used (yet?)
 
-const char* s_metaXml = "meta.xml";
-
+static const char s_meta    [] = "meta.xml";
 
 bool isValidDate(const css::util::Date & i_rDate)
 {
@@ -682,7 +681,7 @@ SfxDocumentMetaData::getURLProperties(
         }
         xPropArg->addProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")),
                 css::beans::PropertyAttribute::MAYBEVOID,
-                css::uno::makeAny(::rtl::OUString::createFromAscii(s_metaXml)));
+                css::uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta))));
     } catch (css::uno::Exception &) {
         // ignore
     }
@@ -1932,7 +1931,7 @@ SfxDocumentMetaData::loadFromStorage(
     // open meta data file
     css::uno::Reference<css::io::XStream> xStream(
         xStorage->openStreamElement(
-            ::rtl::OUString::createFromAscii(s_metaXml),
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta)),
             css::embed::ElementModes::READ) );
     if (!xStream.is()) throw css::uno::RuntimeException();
     css::uno::Reference<css::io::XInputStream> xInStream =
@@ -1966,9 +1965,9 @@ SfxDocumentMetaData::loadFromStorage(
         xPropArg->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")))
             >>= input.sSystemId;
         input.sSystemId += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")).concat(
-                ::rtl::OUString::createFromAscii(s_metaXml));
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta)));
     } catch (css::uno::Exception &) {
-        input.sSystemId = ::rtl::OUString::createFromAscii(s_metaXml);
+        input.sSystemId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta));
     }
     css::uno::Sequence< css::uno::Any > args(1);
     args[0] <<= xPropArg;
@@ -2013,7 +2012,7 @@ SfxDocumentMetaData::storeToStorage(
 
     // write into storage
     css::uno::Reference<css::io::XStream> xStream =
-        xStorage->openStreamElement(::rtl::OUString::createFromAscii(s_metaXml),
+        xStorage->openStreamElement(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s_meta)),
             css::embed::ElementModes::WRITE
             | css::embed::ElementModes::TRUNCATE);
     if (!xStream.is()) throw css::uno::RuntimeException();


More information about the Libreoffice-commits mailing list