[Libreoffice-commits] core.git: sw/Library_sw.mk sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 8 00:15:54 UTC 2019


 sw/Library_sw.mk                                |    2 +-
 sw/source/core/layout/fly.cxx                   |    2 +-
 sw/source/uibase/docvw/FrameControlsManager.cxx |    8 ++++----
 sw/source/uibase/docvw/UnfloatTableButton.cxx   |   18 +++++++++---------
 sw/source/uibase/inc/FrameControlsManager.hxx   |    2 +-
 sw/source/uibase/inc/UnfloatTableButton.hxx     |   13 ++++++-------
 6 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit 5fce6efe346c38d17b933641422c98c9cfe54069
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Jan 7 19:15:37 2019 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Jan 8 01:15:29 2019 +0100

    Unfloat: FloatingTableButton -> UnfloatTableButton
    
    It explains better, what this button is.
    
    Change-Id: I93b78c7907686179ec4fe6b3f45daa15c846c316
    Reviewed-on: https://gerrit.libreoffice.org/65942
    Tested-by: Jenkins
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 732ebe750cbb..939838d3dfc2 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -607,7 +607,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
     sw/source/uibase/docvw/AnnotationWin2 \
     sw/source/uibase/docvw/DashedLine \
     sw/source/uibase/docvw/FrameControlsManager \
-    sw/source/uibase/docvw/FloatingTableButton \
+    sw/source/uibase/docvw/UnfloatTableButton \
     sw/source/uibase/docvw/PageBreakWin \
     sw/source/uibase/docvw/OverlayRanges \
     sw/source/uibase/docvw/PostItMgr \
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index edb35f91a049..970d454567e7 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1868,7 +1868,7 @@ void SwFlyFrame::UpdateUnfloatButton(SwWrtShell* pWrtSh, bool bShow) const
     SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
     SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
     Point aBottomRightPixel = rEditWin.LogicToPixel( getFrameArea().BottomRight() );
-    rMngr.SetFloatingTableButton(this, bShow,  aBottomRightPixel);
+    rMngr.SetUnfloatTableButton(this, bShow,  aBottomRightPixel);
 }
 
 SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 6bad9e5dd3af..bd135c422cb5 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -11,7 +11,7 @@
 #include <FrameControlsManager.hxx>
 #include <HeaderFooterWin.hxx>
 #include <PageBreakWin.hxx>
-#include <FloatingTableButton.hxx>
+#include <UnfloatTableButton.hxx>
 #include <pagefrm.hxx>
 #include <flyfrm.hxx>
 #include <viewopt.hxx>
@@ -139,7 +139,7 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrame* pPageFrame
         pControl->ShowAll( true );
 }
 
-void SwFrameControlsManager::SetFloatingTableButton( const SwFlyFrame* pFlyFrame, bool bShow, Point aBottomRightPixel )
+void SwFrameControlsManager::SetUnfloatTableButton( const SwFlyFrame* pFlyFrame, bool bShow, Point aBottomRightPixel )
 {
     if(pFlyFrame == nullptr)
         return;
@@ -157,7 +157,7 @@ void SwFrameControlsManager::SetFloatingTableButton( const SwFlyFrame* pFlyFrame
     else
     {
         SwFrameControlPtr pNewControl( new SwFrameControl(
-                VclPtr<FloatingTableButton>::Create( m_pEditWin, pFlyFrame ).get() ) );
+                VclPtr<UnfloatTableButton>::Create( m_pEditWin, pFlyFrame ).get() ) );
         const SwViewOption* pViewOpt = m_pEditWin->GetView().GetWrtShell().GetViewOptions();
         pNewControl->SetReadonly( pViewOpt->IsReadonly() );
 
@@ -166,7 +166,7 @@ void SwFrameControlsManager::SetFloatingTableButton( const SwFlyFrame* pFlyFrame
         pControl.swap( pNewControl );
     }
 
-    FloatingTableButton* pButton = dynamic_cast<FloatingTableButton*>(pControl->GetWindow());
+    UnfloatTableButton* pButton = dynamic_cast<UnfloatTableButton*>(pControl->GetWindow());
     assert(pButton != nullptr);
     pButton->SetOffset(aBottomRightPixel);
     pControl->ShowAll( bShow );
diff --git a/sw/source/uibase/docvw/FloatingTableButton.cxx b/sw/source/uibase/docvw/UnfloatTableButton.cxx
similarity index 90%
rename from sw/source/uibase/docvw/FloatingTableButton.cxx
rename to sw/source/uibase/docvw/UnfloatTableButton.cxx
index cce46145cf18..4fd025ad8ba1 100644
--- a/sw/source/uibase/docvw/FloatingTableButton.cxx
+++ b/sw/source/uibase/docvw/UnfloatTableButton.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <FloatingTableButton.hxx>
+#include <UnfloatTableButton.hxx>
 #include <HeaderFooterWin.hxx>
 
 #include <edtwin.hxx>
@@ -36,15 +36,15 @@
 #define BOX_DISTANCE 3
 #define BUTTON_WIDTH 12
 
-FloatingTableButton::FloatingTableButton(SwEditWin* pEditWin, const SwFrame* pFrame)
+UnfloatTableButton::UnfloatTableButton(SwEditWin* pEditWin, const SwFrame* pFrame)
     : SwFrameMenuButtonBase(pEditWin, pFrame)
     , m_sLabel(SwResId(STR_UNFLOAT_TABLE))
 {
 }
 
-FloatingTableButton::~FloatingTableButton() { disposeOnce(); }
+UnfloatTableButton::~UnfloatTableButton() { disposeOnce(); }
 
-void FloatingTableButton::SetOffset(Point aBottomRightPixel)
+void UnfloatTableButton::SetOffset(Point aBottomRightPixel)
 {
     // Compute the text size and get the box position & size from it
     tools::Rectangle aTextRect;
@@ -66,7 +66,7 @@ void FloatingTableButton::SetOffset(Point aBottomRightPixel)
     SetPosSizePixel(aBoxPos, aBoxSize);
 }
 
-void FloatingTableButton::MouseButtonDown(const MouseEvent& /*rMEvt*/)
+void UnfloatTableButton::MouseButtonDown(const MouseEvent& /*rMEvt*/)
 {
     assert(GetFrame()->IsFlyFrame());
     // const_cast is needed because of bad design of ISwFrameControl and derived classes
@@ -122,7 +122,7 @@ void FloatingTableButton::MouseButtonDown(const MouseEvent& /*rMEvt*/)
     }
 }
 
-void FloatingTableButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
+void UnfloatTableButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
 {
     SetMapMode(MapMode(MapUnit::MapPixel));
     drawinglayer::primitive2d::Primitive2DContainer aSeq;
@@ -162,9 +162,9 @@ void FloatingTableButton::Paint(vcl::RenderContext& rRenderContext, const tools:
     pProcessor->process(aSeq);
 }
 
-void FloatingTableButton::ShowAll(bool bShow) { Show(bShow); }
+void UnfloatTableButton::ShowAll(bool bShow) { Show(bShow); }
 
-bool FloatingTableButton::Contains(const Point& rDocPt) const
+bool UnfloatTableButton::Contains(const Point& rDocPt) const
 {
     ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel());
     if (aRect.IsInside(rDocPt))
@@ -173,6 +173,6 @@ bool FloatingTableButton::Contains(const Point& rDocPt) const
     return false;
 }
 
-void FloatingTableButton::SetReadonly(bool bReadonly) { ShowAll(!bReadonly); }
+void UnfloatTableButton::SetReadonly(bool bReadonly) { ShowAll(!bReadonly); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sw/source/uibase/inc/FrameControlsManager.hxx b/sw/source/uibase/inc/FrameControlsManager.hxx
index 096e61376b8c..2b94b947fd53 100644
--- a/sw/source/uibase/inc/FrameControlsManager.hxx
+++ b/sw/source/uibase/inc/FrameControlsManager.hxx
@@ -47,7 +47,7 @@ class SwFrameControlsManager
         // Helper methods
         void SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset );
         void SetPageBreakControl( const SwPageFrame* pPageFrame );
-        void SetFloatingTableButton( const SwFlyFrame* pFlyFrame, bool bShow, Point aTopLeftPixel = Point() );
+        void SetUnfloatTableButton( const SwFlyFrame* pFlyFrame, bool bShow, Point aTopLeftPixel = Point() );
 };
 
 #endif
diff --git a/sw/source/uibase/inc/FloatingTableButton.hxx b/sw/source/uibase/inc/UnfloatTableButton.hxx
similarity index 81%
rename from sw/source/uibase/inc/FloatingTableButton.hxx
rename to sw/source/uibase/inc/UnfloatTableButton.hxx
index 6ca99579a6f9..1ecfa8a3849f 100644
--- a/sw/source/uibase/inc/FloatingTableButton.hxx
+++ b/sw/source/uibase/inc/UnfloatTableButton.hxx
@@ -7,13 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_SW_SOURCE_UIBASE_DOCVW_FLOATINGTABLEBUTTON_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_DOCVW_FLOATINGTABLEBUTTON_HXX
+#ifndef INCLUDED_SW_SOURCE_UIBASE_DOCVW_UNFLOATTABLEBUTTON_HXX
+#define INCLUDED_SW_SOURCE_UIBASE_DOCVW_UNFLOATTABLEBUTTON_HXX
 
 #include "FrameControl.hxx"
 #include <vcl/menubtn.hxx>
 
-
 /** Class for unfloat table button
  *
  * This unfloat button is used to convert a floating table into a simple writer table embedded to the text body.
@@ -23,13 +22,13 @@
  * floating properties.
  *
  */
-class FloatingTableButton : public SwFrameMenuButtonBase
+class UnfloatTableButton : public SwFrameMenuButtonBase
 {
     OUString m_sLabel;
 
 public:
-    FloatingTableButton(SwEditWin* pEditWin, const SwFrame* pFrame);
-    virtual ~FloatingTableButton() override;
+    UnfloatTableButton(SwEditWin* pEditWin, const SwFrame* pFrame);
+    virtual ~UnfloatTableButton() override;
 
     void SetOffset(Point aBottomRightPixel);
 
@@ -44,4 +43,4 @@ public:
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list