[Libreoffice-commits] .: 3 commits - sw/inc sw/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Fri Apr 6 14:41:23 PDT 2012


 sw/inc/swurl.hxx                         |   12 ++--------
 sw/source/core/access/acchyperlink.cxx   |    4 +--
 sw/source/core/text/txtftn.cxx           |    3 --
 sw/source/ui/app/docstyle.cxx            |    5 ++--
 sw/source/ui/docvw/SidebarTxtControl.cxx |    2 -
 sw/source/ui/docvw/edtwin.cxx            |    2 -
 sw/source/ui/docvw/romenu.cxx            |    2 -
 sw/source/ui/fldui/xfldui.cxx            |    2 -
 sw/source/ui/wrtsh/wrtsh2.cxx            |   36 +++++++++++++------------------
 unusedcode.easy                          |   28 ++++++------------------
 10 files changed, 36 insertions(+), 60 deletions(-)

New commits:
commit 16fc0fdb9008ffc48a6a363ffcd50555835a3857
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 6 22:38:16 2012 +0100

    callcatcher: update unused code

diff --git a/unusedcode.easy b/unusedcode.easy
index 91368d3..cb5c9fe 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -775,7 +775,6 @@ dbtools::getConnection(rtl::OUString const&, rtl::OUString const&, rtl::OUString
 dbtools::throwFunctionNotSupportedException(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, com::sun::star::uno::Any const&)
 dp_misc::TRACE(rtl::OString const&)
 dp_misc::writeConsoleError(rtl::OString const&)
-drawinglayer::attribute::SdrFillTextAttribute::isDefault() const
 drawinglayer::attribute::SdrFormTextAttribute::getFormTextShdwTransp() const
 drawinglayer::attribute::SdrTextAttribute::getPropertiesVersion() const
 drawinglayer::attribute::SdrTextAttribute::isWrongSpell() const
@@ -799,25 +798,15 @@ oox::PropertyMap::dump(com::sun::star::uno::Reference<com::sun::star::beans::XPr
 oox::core::BinaryFilterBase::BinaryFilterBase(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
 oox::core::FilterBase::openSubStorage(rtl::OUString const&, bool) const
 oox::core::FilterBase::requestEncryptionData(comphelper::IDocPasswordVerifier&) const
-oox::dump::Output::writeAddress(oox::dump::Address const&)
+oox::dump::InputObjectBase::dumpNullCharArray(oox::dump::String const&, unsigned short)
+oox::dump::InputObjectBase::dumpNullUnicodeArray(oox::dump::String const&)
+oox::dump::Output::writeColRange(int, int)
+oox::dump::Output::writeColRowRange(int, int)
 oox::dump::Output::writeColorABGR(int)
-oox::dump::Output::writeRange(oox::dump::Range const&)
-oox::dump::Output::writeRangeList(std::__debug::vector<oox::dump::Range, std::allocator<oox::dump::Range> > const&)
-oox::dump::OutputObjectBase::writeAddressItem(oox::dump::String const&, oox::dump::Address const&)
-oox::dump::OutputObjectBase::writeColIndexItem(oox::dump::String const&, int)
-oox::dump::OutputObjectBase::writeColRangeItem(oox::dump::String const&, int, int)
-oox::dump::OutputObjectBase::writeRangeItem(oox::dump::String const&, oox::dump::Range const&)
-oox::dump::OutputObjectBase::writeRangeListItem(oox::dump::String const&, std::__debug::vector<oox::dump::Range, std::allocator<oox::dump::Range> > const&)
-oox::dump::OutputObjectBase::writeRowIndexItem(oox::dump::String const&, int)
-oox::dump::OutputObjectBase::writeRowRangeItem(oox::dump::String const&, int, int)
-oox::dump::OutputObjectBase::writeTokenAddress3dItem(oox::dump::String const&, rtl::OUString const&, oox::dump::TokenAddress const&, bool)
-oox::dump::OutputObjectBase::writeTokenAddressItem(oox::dump::String const&, oox::dump::TokenAddress const&, bool)
-oox::dump::OutputObjectBase::writeTokenRange3dItem(oox::dump::String const&, rtl::OUString const&, oox::dump::TokenRange const&, bool)
-oox::dump::OutputObjectBase::writeTokenRangeItem(oox::dump::String const&, oox::dump::TokenRange const&, bool)
+oox::dump::Output::writeRowRange(int, int)
 oox::dump::SequenceRecordObjectBase::construct(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&, oox::dump::String const&, oox::dump::String const&)
-oox::dump::StdHlinkObject::StdHlinkObject(oox::dump::InputObjectBase const&)
-oox::dump::StringHelper::appendToken(rtl::OUStringBuffer&, long, unsigned short)
-oox::dump::TextStreamObjectBase::construct(oox::dump::InputObjectBase const&, unsigned short)
+oox::dump::StringHelper::appendRange(rtl::OUStringBuffer&, oox::dump::TokenRange const&, bool)
+oox::dump::StringHelper::appendRangeList(rtl::OUStringBuffer&, std::__debug::vector<oox::dump::Range, std::allocator<oox::dump::Range> > const&)
 oox::ole::OleHelper::importStdHlink(oox::ole::StdHlinkInfo&, oox::BinaryInputStream&, bool)
 oox::xls::BiffAutoFilterContext::BiffAutoFilterContext(oox::xls::WorksheetHelper const&, oox::xls::AutoFilter&)
 oox::xls::BiffCodecHelper::implReadFilePass(oox::xls::BiffInputStream&, oox::xls::BiffType)
@@ -889,9 +878,6 @@ sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
 sd::ToolPanelPaneShell::RegisterInterface(SfxModule*)
 sd::View::LockRedraw(unsigned char)
 sd::ViewShellBase::RegisterFactory(unsigned short)
-sd::framework::ConfigurationClassifier::GetC1andC2() const
-sd::framework::ConfigurationClassifier::TraceResourceIdVector(char const*, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId>, std::allocator<com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId> > > const&) const
-sd::framework::ConfigurationTracer::TraceConfiguration(com::sun::star::uno::Reference<com::sun::star::drawing::framework::XConfiguration> const&, char const*)
 sd::slidesorter::cache::GenericPageCache::ReleasePreviewBitmap(SdrPage const*)
 sd::slidesorter::controller::SelectionFunction::EventDescriptor::EventDescriptor(KeyEvent const&, sd::slidesorter::SlideSorter&)
 sd::slidesorter::model::VisualState::SetVisualStateBlend(double)
commit 121e715d9a6161842a69423f75be03a7bf39aa8d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 6 08:26:35 2012 +0100

    optional argument is always provided

diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx
index 550e085..beb9f25 100644
--- a/sw/inc/swurl.hxx
+++ b/sw/inc/swurl.hxx
@@ -28,21 +28,15 @@
 #ifndef _SWURL_HXX
 #define _SWURL_HXX
 
-#include <tools/solar.h>
+#include <rtl/ustring.hxx>
 
-
-class UniString;
 class ViewShell;
 
 #define URLLOAD_NOFILTER            0x0000
 #define URLLOAD_NEWVIEW             0x8000
 
-
-void LoadURL( const UniString& rName, ViewShell* pSh,
-              sal_uInt16 nFilter = URLLOAD_NOFILTER,
-              const UniString *pTargetFrameName = 0 );
-
-
+void LoadURL( ViewShell& rSh, const rtl::OUString& rName,
+              sal_uInt16 nFilter, const rtl::OUString& rTargetFrameName );
 
 #endif
 
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 1fe57fa..27f3494 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -90,8 +90,8 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex )
             ViewShell *pVSh = xPara->GetShell();
             if( pVSh )
             {
-                LoadURL( rINetFmt.GetValue(), pVSh, URLLOAD_NOFILTER,
-                         &rINetFmt.GetTargetFrame() );
+                LoadURL(*pVSh, rINetFmt.GetValue(), URLLOAD_NOFILTER,
+                         rINetFmt.GetTargetFrame());
                 OSL_ENSURE( pTxtAttr == rINetFmt.GetTxtINetFmt(),
                          "lost my txt attr" );
                 const SwTxtINetFmt* pTxtAttr2 = rINetFmt.GetTxtINetFmt();
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index 5938a24..95cc889 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -287,7 +287,7 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt )
                     SwWrtShell &rSh = mrDocView.GetWrtShell();
                     String sURL( pURL->GetURL() );
                     String sTarget( pURL->GetTargetFrame() );
-                    ::LoadURL( sURL, &rSh, URLLOAD_NOFILTER, &sTarget);
+                    ::LoadURL(rSh, sURL, URLLOAD_NOFILTER, sTarget);
                     return;
                 }
             }
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index d56f907..e6ae678 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -4263,7 +4263,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
                                     {
                                         String sURL(pField->GetURL());
                                         String sTarget(pField->GetTargetFrame());
-                                        ::LoadURL( sURL, &rSh, nFilter, &sTarget);
+                                        ::LoadURL(rSh, sURL, nFilter, sTarget);
                                     }
                                     bCallShadowCrsr = sal_False;
                                 }
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index c6ac398..4db8c60 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -373,7 +373,7 @@ void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId )
     if( USHRT_MAX != nExecId )
         rDis.GetBindings()->Execute( nExecId );
     if( USHRT_MAX != nFilter )
-        ::LoadURL( sURL, &rSh, nFilter, &sTargetFrameName);
+        ::LoadURL(rSh, sURL, nFilter, sTargetFrameName);
 
     if( pClipCntnr )
     {
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 3d7264b..16196cc 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -331,7 +331,7 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter
     }
 
     // damit die Vorlagenumsetzung sofort angezeigt wird
-    ::LoadURL( rItem.GetValue(), this, nFilter, &rItem.GetTargetFrame() );
+    ::LoadURL( *this, rItem.GetValue(), nFilter, rItem.GetTargetFrame() );
     const SwTxtINetFmt* pTxtAttr = rItem.GetTxtINetFmt();
     if( pTxtAttr )
     {
@@ -362,35 +362,31 @@ sal_Bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter )
             GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
         }
 
-        ::LoadURL( sURL, this, nFilter, &sTargetFrameName);
+        ::LoadURL(*this, sURL, nFilter, sTargetFrameName);
     }
     return bRet;
 }
 
 
-void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
-              const String *pTargetFrameName )
+void LoadURL( ViewShell& rVSh, const rtl::OUString& rURL, sal_uInt16 nFilter,
+              const rtl::OUString& rTargetFrameName )
 {
-    OSL_ENSURE( rURL.Len() && pVSh, "what should be loaded here?" );
-    if( !rURL.Len() || !pVSh )
+    OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" );
+    if( rURL.isEmpty() )
         return ;
 
     // die Shell kann auch 0 sein !!!!!
-    SwWrtShell *pSh = 0;
-    if ( pVSh && pVSh->ISA(SwCrsrShell) )
-    {
-        //Eine CrsrShell ist auch immer eine WrtShell
-        pSh = (SwWrtShell*)pVSh;
-    }
-    else
+    if ( !rVSh.ISA(SwCrsrShell) )
         return;
 
-    SwDocShell* pDShell = pSh->GetView().GetDocShell();
+    //Eine CrsrShell ist auch immer eine WrtShell
+    SwWrtShell &rSh = (SwWrtShell&)rVSh;
+
+    SwDocShell* pDShell = rSh.GetView().GetDocShell();
     OSL_ENSURE( pDShell, "No DocShell?!");
-    String sTargetFrame;
-    if( pTargetFrameName && pTargetFrameName->Len() )
-        sTargetFrame = *pTargetFrameName;
-    else if( pDShell ) {
+    rtl::OUString sTargetFrame(rTargetFrameName);
+    if (sTargetFrame.isEmpty() && pDShell)
+    {
         using namespace ::com::sun::star;
         uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
             pDShell->GetModel(), uno::UNO_QUERY_THROW);
@@ -402,7 +398,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
     String sReferer;
     if( pDShell && pDShell->GetMedium() )
         sReferer = pDShell->GetMedium()->GetName();
-    SfxViewFrame* pViewFrm = pSh->GetView().GetViewFrame();
+    SfxViewFrame* pViewFrm = rSh.GetView().GetViewFrame();
     SfxFrameItem aView( SID_DOCFRAME, pViewFrm );
     SfxStringItem aName( SID_FILE_NAME, rURL );
     SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame );
@@ -413,7 +409,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
     SfxBoolItem aBrowse( SID_BROWSE, sal_True );
 
     if( nFilter & URLLOAD_NEWVIEW )
-        aTargetFrameName.SetValue( String::CreateFromAscii("_blank") );
+        aTargetFrameName.SetValue( rtl::OUString("_blank") );
 
     const SfxPoolItem* aArr[] = {
                 &aName,
commit f5407c72f94117c9a172d1ac1466f5dea88a3a59
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 6 07:54:21 2012 +0100

    UniString::CreateFromInt32(0) -> "0"

diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 3769aff..c346be9 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1582,8 +1582,7 @@ void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const
 
 SwFldPortion *SwErgoSumPortion::Clone( const XubString &rExpand ) const
 {
-    UniString aTmp; // = UniString::CreateFromInt32( 0 );
-    return new SwErgoSumPortion( rExpand, aTmp );
+    return new SwErgoSumPortion( rExpand, rtl::OUString() );
 }
 
 SwErgoSumPortion::SwErgoSumPortion( const XubString &rExp, const XubString& rStr )
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 4f6290f..3937a43 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -636,7 +636,8 @@ String  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
         String aDesc;
         const SfxPoolItem* pItem = aIter.FirstItem();
 
-        String sPageNum, sModel, sBreak;
+        rtl::OUString sPageNum;
+        String sModel, sBreak;
         sal_Bool bHasWesternFontPrefix = sal_False;
         sal_Bool bHasCJKFontPrefix = sal_False;
         SvtCJKOptions aCJKOptions;
@@ -729,7 +730,7 @@ String  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
             aDesc += SW_RESSTR(STR_PAGEBREAK);
             aDesc += sPlus;
             aDesc += sModel;
-            if(sPageNum != String(UniString::CreateFromInt32(0)))
+            if (sPageNum != "0")
             {
                 aDesc += sPlus;
                 aDesc += SW_RESSTR(STR_PAGEOFFSET);
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index 5cd034f..731bc34 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -136,7 +136,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
             Any aCol = xCols->getByName(rFldName);
             Reference <XPropertySet> xCol;
             aCol >>= xCol;
-            Any aType = xCol->getPropertyValue( UniString::CreateFromAscii("Type"));
+            Any aType = xCol->getPropertyValue(rtl::OUString("Type"));
             sal_Int32 eDataType = 0;
             aType >>= eDataType;
             switch(eDataType)


More information about the Libreoffice-commits mailing list