[Libreoffice-commits] core.git: 3 commits - i18nutil/source include/sfx2 sfx2/inc sfx2/source

Zolnai Tamás tamas.zolnai at collabora.com
Thu Jan 9 06:45:12 PST 2014


 i18nutil/source/utility/paper.cxx          |    2 -
 include/sfx2/thumbnailview.hxx             |    3 --
 sfx2/inc/inettbc.hxx                       |    1 
 sfx2/source/control/recentdocsviewitem.cxx |    6 ++++
 sfx2/source/control/thumbnailview.cxx      |   35 +----------------------------
 sfx2/source/inet/inettbc.cxx               |    4 ---
 6 files changed, 10 insertions(+), 41 deletions(-)

New commits:
commit a1638c81d06330b514d18af0b0a3e84607b110c1
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Thu Jan 9 15:36:47 2014 +0100

    Remove unused private member: pAccExec
    
    Change-Id: Ie21f8a62213954da7f66c1fbe890ba9dee93cf77

diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index 464bf82..1038c68 100644
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.hxx
@@ -30,7 +30,6 @@ class SvtURLBox;
 class SfxURLToolBoxControl_Impl : public SfxToolBoxControl
 {
 private:
-    ::svt::AcceleratorExecute*  pAccExec;
 
     SvtURLBox*              GetURLBox() const;
     void                    OpenURL( const OUString& rName, sal_Bool bNew ) const;
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index eb6de6a..af7afe1 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -62,15 +62,13 @@ using namespace ::com::sun::star::task;
 SFX_IMPL_TOOLBOX_CONTROL(SfxURLToolBoxControl_Impl,SfxStringItem)
 
 SfxURLToolBoxControl_Impl::SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
-    : SfxToolBoxControl( nSlotId, nId, rBox ),
-    pAccExec( 0 )
+    : SfxToolBoxControl( nSlotId, nId, rBox )
 {
     addStatusListener( OUString( ".uno:CurrentURL" ));
 }
 
 SfxURLToolBoxControl_Impl::~SfxURLToolBoxControl_Impl()
 {
-    delete pAccExec;
 }
 
 SvtURLBox* SfxURLToolBoxControl_Impl::GetURLBox() const
commit 0314034d8b23d5b69399cfcdf6b2f2add73f9f47
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Thu Jan 9 14:34:35 2014 +0100

    fdo#71628 Startcenter: remove thumbnail selection when focus is moved away
    
    mnHighItemId is never assaigned with a valid value and there is
    no sense to store one selected element's index anyway,
    because there can be more.
    The bMove parameter of ImplGetItem is never used and doesn' work
    so remove it.
    
    Change-Id: I91d6bc3fd13a2b44e6961fea66d02702a8f31c2b

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index a122dd8..bfd1ca5 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -300,7 +300,7 @@ protected:
     SFX2_DLLPRIVATE void         ImplInitScrollBar();
     SFX2_DLLPRIVATE void         ImplDeleteItems();
     SFX2_DLLPRIVATE void         ImplDraw();
-    SFX2_DLLPRIVATE size_t       ImplGetItem( const Point& rPoint, bool bMove = false ) const;
+    SFX2_DLLPRIVATE size_t       ImplGetItem( const Point& rPoint ) const;
     SFX2_DLLPRIVATE ThumbnailViewItem*    ImplGetItem( size_t nPos );
     SFX2_DLLPRIVATE sal_uInt16          ImplGetVisibleItemCount() const;
     SFX2_DLLPRIVATE ThumbnailViewItem*    ImplGetVisibleItem( sal_uInt16 nVisiblePos );
@@ -328,7 +328,6 @@ protected:
 
     int mnFineness;
 
-    sal_uInt16 mnHighItemId;
     sal_uInt16 mnCols;
     sal_uInt16 mnFirstLine;
     sal_uInt16 mnSpacing;
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 695447e..b799487 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -149,7 +149,6 @@ void ThumbnailView::ImplInit()
     mnLines             = 0;
     mnFineness          = 5;
     mnFirstLine         = 0;
-    mnHighItemId        = 0;
     mnCols              = 0;
     mnSpacing           = 0;
     mbScroll            = false;
@@ -450,7 +449,7 @@ void ThumbnailView::CalculateItemPositions ()
     delete pDelScrBar;
 }
 
-size_t ThumbnailView::ImplGetItem( const Point& rPos, bool bMove ) const
+size_t ThumbnailView::ImplGetItem( const Point& rPos ) const
 {
     if ( !mbHasVisibleItems )
     {
@@ -464,13 +463,6 @@ size_t ThumbnailView::ImplGetItem( const Point& rPos, bool bMove ) const
             if (mFilteredItemList[i]->isVisible() && mFilteredItemList[i]->getDrawArea().IsInside(rPos))
                 return i;
         }
-
-        // return the previously selected item if spacing is set and
-        // the mouse hasn't left the window yet
-        if ( bMove && mnSpacing && mnHighItemId )
-        {
-            return GetItemPos( mnHighItemId );
-        }
     }
 
     return THUMBNAILVIEW_ITEM_NOTFOUND;
@@ -926,22 +918,7 @@ void ThumbnailView::GetFocus()
 
 void ThumbnailView::LoseFocus()
 {
-    if (mnHighItemId)
-    {
-        size_t nPos = GetItemPos(mnHighItemId);
-
-        if (nPos != THUMBNAILVIEW_ITEM_NOTFOUND)
-        {
-            ThumbnailViewItem *pOld = mItemList[nPos];
-
-            pOld->setHighlight(false);
-
-            if (!pOld->isSelected())
-                DrawItem(pOld);
-        }
-
-        mnHighItemId = 0;
-    }
+    deselectItems();
 
     Control::LoseFocus();
 
@@ -1049,12 +1026,6 @@ void ThumbnailView::RemoveItem( sal_uInt16 nItemId )
         mpStartSelRange = mFilteredItemList.end();
     }
 
-    // reset variables
-    if ( mnHighItemId == nItemId )
-    {
-        mnHighItemId    = 0;
-    }
-
     CalculateItemPositions();
 
     if ( IsReallyVisible() && IsUpdateMode() )
@@ -1067,7 +1038,6 @@ void ThumbnailView::Clear()
 
     // reset variables
     mnFirstLine     = 0;
-    mnHighItemId    = 0;
 
     CalculateItemPositions();
 
@@ -1081,7 +1051,6 @@ void ThumbnailView::updateItems (const std::vector<ThumbnailViewItem*> &items)
 
     // reset variables
     mnFirstLine     = 0;
-    mnHighItemId    = 0;
 
     mItemList = items;
 
commit 5ab1fb926e984780380665ae185646b603292a6e
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Thu Jan 9 13:01:51 2014 +0100

    Startcenter: use SCREEN_4_3 as default paper for presentations
    
    Remove static to able to construct items with different
    paper info.
    Fix SCREEN_4_3 width and height values and use it for
    presentations.
    
    Change-Id: Ifba44675f6126ebfccf26f53f226214bed92352c

diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 2447bfc..e3f99f2 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -82,7 +82,7 @@ static const PageDesc aDinTab[] =
     { MM2MM100( 114 ),   MM2MM100( 229 ),    "EnvC65", NULL },
     { MM2MM100( 110 ),   MM2MM100( 220 ),    "EnvDL",  "DL" },
     { MM2MM100( 180),    MM2MM100( 270 ),    NULL,  NULL }, //Dia
-    { MM2MM100( 210),    MM2MM100( 280 ),    NULL,  NULL }, //Screen 4:3
+    { MM2MM100( 280),    MM2MM100( 210 ),    NULL,  NULL }, //Screen 4:3
     { IN2MM100( 17 ),    IN2MM100( 22 ),     "AnsiC",  "CSheet" },
     { IN2MM100( 22 ),    IN2MM100( 34 ),     "AnsiD",  "DSheet" },
     { IN2MM100( 34 ),    IN2MM100( 44 ),     "AnsiE",  "ESheet" },
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 2531da1..2d1e083 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -38,7 +38,11 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
         Size aExtSize(aExt.GetSizePixel());
 
         // attempt to make it appear as if it is on a piece of paper
-        static PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
+        INetURLObject aUrl(rURL);
+        PaperInfo aInfo(
+            RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, aUrl.getExtension())
+            ? PAPER_SCREEN_4_3
+            : PaperInfo::getSystemDefaultPaper());
         double ratio = double(nThumbnailSize) / double(std::max(aInfo.getWidth(), aInfo.getHeight()));
         Size aThumbnailSize(aInfo.getWidth() * ratio, aInfo.getHeight() * ratio);
 


More information about the Libreoffice-commits mailing list