[Libreoffice-commits] core.git: compilerplugins/clang include/svx svx/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Feb 14 08:09:44 UTC 2017


 compilerplugins/clang/unusedenumconstants.py          |    1 +
 include/svx/sxmtpitm.hxx                              |    2 +-
 svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx |    1 -
 svx/source/svdraw/svdomeas.cxx                        |   13 +++++++------
 4 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit b0a23c4c35f90ce3cf6a18a37fe141eb33cd5c57
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Feb 13 11:06:07 2017 +0200

    remove unused BreakedLine enumerator from SdrMeasureTextVPos
    
    Change-Id: I28cf3d36c1427b382aea1925d2dd94ace0d2a443
    Reviewed-on: https://gerrit.libreoffice.org/34204
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index f7a6432..50be7db 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -107,6 +107,7 @@ for d in definitionSet:
          "vcl/inc/sft.hxx", # CompositeFlags, WidthClass, WeightClass
          "vcl/inc/CommonSalLayout.hxx", # VerticalOrientation
          "include/tools/fontenum.hxx", # part of GDI file format
+         "svx/inc/galobj.hxx", # GalSoundType
         # unit test code
          "cppu/source/uno/check.cxx",
         # general weird nonsense going on
diff --git a/include/svx/sxmtpitm.hxx b/include/svx/sxmtpitm.hxx
index c242b42..f0c6ff9 100644
--- a/include/svx/sxmtpitm.hxx
+++ b/include/svx/sxmtpitm.hxx
@@ -24,7 +24,7 @@
 #include <svx/svxdllapi.h>
 
 enum class SdrMeasureTextHPos { Auto, LeftOutside, Inside, RightOutside };
-enum class SdrMeasureTextVPos { Auto, Above, BreakedLine, Below, VerticalCentered };
+enum class SdrMeasureTextVPos { Auto, Above, Below, VerticalCentered };
 
 
 // class SdrMeasureTextHPosItem
diff --git a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
index d80227e..02410ad 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
@@ -95,7 +95,6 @@ namespace sdr
                     aMTPVer = drawinglayer::primitive2d::MEASURETEXTPOSITION_NEGATIVE;
                     break;
                 }
-                case SdrMeasureTextVPos::BreakedLine :
                 case SdrMeasureTextVPos::VerticalCentered :
                 {
                     aMTPVer = drawinglayer::primitive2d::MEASURETEXTPOSITION_CENTERED;
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index b6d5a4f..c98ab44 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -411,8 +411,9 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
 
     rPol.eUsedTextHPos=rRec.eWantTextHPos;
     rPol.eUsedTextVPos=rRec.eWantTextVPos;
-    if (rPol.eUsedTextVPos==SdrMeasureTextVPos::Auto) rPol.eUsedTextVPos=SdrMeasureTextVPos::Above;
-    bool bBrkLine=rPol.eUsedTextVPos==SdrMeasureTextVPos::BreakedLine;
+    if (rPol.eUsedTextVPos==SdrMeasureTextVPos::Auto)
+        rPol.eUsedTextVPos=SdrMeasureTextVPos::Above;
+    bool bBrkLine=false;
     if (rPol.eUsedTextVPos==SdrMeasureTextVPos::VerticalCentered)
     {
         OutlinerParaObject* pOutlinerParaObject = SdrTextObj::GetOutlinerParaObject();
@@ -675,7 +676,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
         }
         switch (eMV) {
             case SdrMeasureTextVPos::VerticalCentered:
-            case SdrMeasureTextVPos::BreakedLine: aTextPos.Y()=aPt1b.Y()-aTextSize2.Height()/2; break;
+                aTextPos.Y()=aPt1b.Y()-aTextSize2.Height()/2; break;
             case SdrMeasureTextVPos::Below: {
                 if (!bUpsideDown) aTextPos.Y()=aPt1b.Y()+nLWdt;
                 else aTextPos.Y()=aPt1b.Y()-aTextSize2.Height()-nLWdt;
@@ -697,7 +698,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
         }
         switch (eMV) {
             case SdrMeasureTextVPos::VerticalCentered:
-            case SdrMeasureTextVPos::BreakedLine: aTextPos.Y()=aPt1b.Y()+aTextSize2.Width()/2; break;
+                aTextPos.Y()=aPt1b.Y()+aTextSize2.Width()/2; break;
             case SdrMeasureTextVPos::Below: {
                 if (!bBelowRefEdge) aTextPos.Y()=aPt1b.Y()+aTextSize2.Width()+nLWdt;
                 else aTextPos.Y()=aPt1b.Y()-nLWdt;
@@ -1334,7 +1335,7 @@ sal_uInt16 SdrMeasureObj::GetOutlinerViewAnchorMode() const
         // at eMH==SdrMeasureTextHPos::Inside we can anchor horizontally
         if (eMV==SdrMeasureTextVPos::Above) eTV=SDRTEXTVERTADJUST_BOTTOM;
         if (eMV==SdrMeasureTextVPos::Below) eTV=SDRTEXTVERTADJUST_TOP;
-        if (eMV==SdrMeasureTextVPos::BreakedLine || eMV==SdrMeasureTextVPos::VerticalCentered) eTV=SDRTEXTVERTADJUST_CENTER;
+        if (eMV==SdrMeasureTextVPos::VerticalCentered) eTV=SDRTEXTVERTADJUST_CENTER;
     } else {
         if (eMH==SdrMeasureTextHPos::LeftOutside) eTV=SDRTEXTVERTADJUST_BOTTOM;
         if (eMH==SdrMeasureTextHPos::RightOutside) eTV=SDRTEXTVERTADJUST_TOP;
@@ -1346,7 +1347,7 @@ sal_uInt16 SdrMeasureObj::GetOutlinerViewAnchorMode() const
             if (eMV==SdrMeasureTextVPos::Above) eTH=SDRTEXTHORZADJUST_RIGHT;
             if (eMV==SdrMeasureTextVPos::Below) eTH=SDRTEXTHORZADJUST_LEFT;
         }
-        if (eMV==SdrMeasureTextVPos::BreakedLine || eMV==SdrMeasureTextVPos::VerticalCentered) eTH=SDRTEXTHORZADJUST_CENTER;
+        if (eMV==SdrMeasureTextVPos::VerticalCentered) eTH=SDRTEXTHORZADJUST_CENTER;
     }
 
     EVAnchorMode eRet=ANCHOR_BOTTOM_HCENTER;


More information about the Libreoffice-commits mailing list