[Libreoffice-commits] core.git: 2 commits - include/svtools include/svx sd/source svtools/source svx/source unusedcode.easy

Caolán McNamara caolanm at redhat.com
Thu Sep 18 06:13:03 PDT 2014


 include/svtools/roadmapwizard.hxx        |    6 -----
 include/svx/PaletteManager.hxx           |    1 
 sd/source/ui/view/DocumentRenderer.cxx   |    5 ++--
 svtools/source/dialogs/roadmapwizard.cxx |   35 -------------------------------
 svx/source/tbxctrls/PaletteManager.cxx   |   10 --------
 unusedcode.easy                          |    1 
 6 files changed, 4 insertions(+), 54 deletions(-)

New commits:
commit f1f89f0202232635e7fbbd7ca47de51755b2bce0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 18 11:40:26 2014 +0100

    IsDraw doesn't mean the app/page is Draw
    
    it means a slide in impress.
    
    commit 7b31e45ec7106d2cfbdbb7915d97667ba710f81c
    Date:   Mon Jun 23 20:55:21 2014 +0100
        Make Draw use paper size when printing - fdo#63905
    
        Previously, Draw/Impress use the default size from the printer.
        Now Draw uses the paper size (specified in page formatting).
        Impress still uses the old method - not sure if this is correct
        but printing handouts etc probably complicate print/paper size.
    
    suggests the intent is for this to not affect Impress and to only
    affect Draw, so this does that
    
    Change-Id: I481a824ef244fd837992c893f6de0c051af0a26b

diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 5880a69..723aa02e 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1360,8 +1360,9 @@ private:
         PrintInfo& rInfo)
     {
         SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc();
+        bool bIsDraw = pDocument->GetDocumentType() == DOCUMENT_TYPE_DRAW;
         rInfo.meOrientation = ORIENTATION_PORTRAIT;
-        bool bDoDodgyHeightWidthFit = !mpOptions->IsDraw() && !mpOptions->IsNotes();
+        bool bDoDodgyHeightWidthFit = !bIsDraw && !mpOptions->IsNotes();
 
         if( ! mpOptions->IsBooklet())
         {
@@ -1448,7 +1449,7 @@ private:
                 aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time( Time::SYSTEM ), false, false );
 
             // Draw should use specified paper size when printing
-            if (mpOptions->IsDraw())
+            if (mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW)
             {
                 aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD)->GetSize();
                 maPrintSize = awt::Size(aInfo.maPrintSize.Width(),
commit efcdf9004de2c406774f7a1ed207d24c0dbe36cc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 18 11:38:43 2014 +0100

    callcatcher: update unused code
    
    Change-Id: I3010bdd736c15a086f3ce61cacbb34159f0b2abf

diff --git a/include/svtools/roadmapwizard.hxx b/include/svtools/roadmapwizard.hxx
index 876b199..7abcd48 100644
--- a/include/svtools/roadmapwizard.hxx
+++ b/include/svtools/roadmapwizard.hxx
@@ -214,12 +214,6 @@ protected:
          */
         void    updateRoadmapItemLabel( WizardState _nState );
 
-    protected:
-#ifdef DBG_UTIL
-        const sal_Char* checkInvariants() const;
-        friend const char* CheckInvariants( const void* pVoid );
-#endif
-
     private:
         DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* );
 
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 7070bc1..bde6a77 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -60,7 +60,6 @@ public:
 
     long        GetColorCount();
     long        GetRecentColorCount();
-    OUString    GetPaletteName();
 
     const Color& GetLastColor();
     void        SetLastColor(const Color& rLastColor);
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 6e83474..bb28814 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -118,41 +118,6 @@ namespace svt
     }
 
     //= RoadmapWizard
-#ifdef DBG_UTIL
-    const sal_Char* RoadmapWizard::checkInvariants() const
-    {
-        // all paths have to start with the same state
-        WizardState nSharedFirstState = WZS_INVALID_STATE;
-        for ( Paths::const_iterator aPath = m_pImpl->aPaths.begin();
-              aPath != m_pImpl->aPaths.end();
-              ++aPath
-            )
-        {
-            if ( aPath->second.empty() )
-                return "RoadmapWizard::checkInvariants: paths should not be empty!";
-
-            if ( nSharedFirstState == WZS_INVALID_STATE )
-                // first path
-                nSharedFirstState = aPath->second[ 0 ];
-            else
-                if ( nSharedFirstState != aPath->second[ 0 ] )
-                    return "RoadmapWizard::checkInvariants: alls paths must start with the same state!";
-        }
-
-        if ( !m_pImpl->aPaths.empty() )
-        {
-            Paths::const_iterator aCurrentPathPos = m_pImpl->aPaths.find( m_pImpl->nActivePath );
-            if ( aCurrentPathPos == m_pImpl->aPaths.end() )
-                return "RoadmapWizard::checkInvariants: invalid active path!";
-
-            if ( -1 == m_pImpl->getStateIndexInPath( getCurrentState(), m_pImpl->nActivePath ) )
-                return "RoadmapWizard::checkInvariants: the current state is not part of the current path!";
-        }
-
-        return NULL;
-    }
-#endif
-
     RoadmapWizard::RoadmapWizard( Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags )
         :OWizardMachine( _pParent, i_nStyle, _nButtonFlags )
         ,m_pImpl( new RoadmapWizardImpl )
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index df4c4b8..b104fe9 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -166,16 +166,6 @@ long PaletteManager::GetRecentColorCount()
     return maRecentColors.size();
 }
 
-OUString PaletteManager::GetPaletteName()
-{
-    if( mnCurrentPalette == 0 )
-        return OUString( STR_DEFAULT_PAL );
-    else if( mnCurrentPalette == mnNumOfPalettes - 1 )
-        return OUString( STR_DOC_COLORS );
-    else
-        return maPalettes[mnCurrentPalette - 1].GetName();
-}
-
 const Color& PaletteManager::GetLastColor()
 {
     return mLastColor;
diff --git a/unusedcode.easy b/unusedcode.easy
index ee2ddaf..60aee14 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -18,6 +18,7 @@ OutputDevice::LogicToPixel(Region const&, MapMode const&) const
 OutputDevice::LogicToPixel(basegfx::B2DPolygon const&) const
 OutputDevice::LogicToPixel(basegfx::B2DPolygon const&, MapMode const&) const
 OutputDevice::PixelToLogic(Region const&, MapMode const&) const
+PaletteManager::GetPaletteName()
 Primitive2dXmlDump::filterActionType(unsigned short, bool)
 Primitive2dXmlDump::filterAllActionTypes()
 SalGraphics::drawTransformedBitmap(basegfx::B2DPoint const&, basegfx::B2DPoint const&, basegfx::B2DPoint const&, SalBitmap const&, SalBitmap const*)


More information about the Libreoffice-commits mailing list