sd/source/ui/annotations/annotationtag.cxx    |    2 ++
 sd/source/ui/annotations/annotationwindow.cxx |   13 +++++--------
 sd/source/ui/annotations/annotationwindow.hxx |    4 ++--
 3 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit a2d97135411d566b0b1f3d47af7912c8412cee7f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 18 10:23:27 2020 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Aug 18 12:56:41 2020 +0200

    annotation label doesn't need to be a MultiLine edit, FixedText is enough
    
    Change-Id: Ib5db02be9d29f0ba21bf4295be8cf81be2cb409b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100905
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/source/ui/annotations/annotationtag.cxx 
b/sd/source/ui/annotations/annotationtag.cxx
index f4b0d66a5563..6d918775f73d 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -20,6 +20,8 @@
 #include <com/sun/star/geometry/RealPoint2D.hpp>
 #include <com/sun/star/office/XAnnotation.hpp>
 
+#include <rtl/ustrbuf.hxx>
+
 #include <vcl/commandevent.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index fab5c58679f0..472b9deacd72 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -268,19 +268,16 @@ void AnnotationWindow::InitControls()
     mpTextWindow->SetPointer(PointerStyle::Text);
 
     // window control for author and date
-    mpMeta = VclPtr<VclMultiLineEdit>::Create(this,0);
-    mpMeta->SetReadOnly();
-    mpMeta->SetRightToLeft(AllSettings::GetLayoutRTL());
-    mpMeta->AlwaysDisableInput(true);
+    mpMeta = VclPtr<FixedText>::Create(this);
     mpMeta->SetCallHandlersOnInputDisabled(true);
 
     // we should leave this setting alone, but for this we need a better 
layout algo
     // with variable meta size height
     AllSettings aSettings = mpMeta->GetSettings();
     StyleSettings aStyleSettings = aSettings.GetStyleSettings();
-    vcl::Font aFont = aStyleSettings.GetFieldFont();
+    vcl::Font aFont = aStyleSettings.GetLabelFont();
     aFont.SetFontHeight(8);
-    aStyleSettings.SetFieldFont(aFont);
+    aStyleSettings.SetLabelFont(aFont);
     aSettings.SetStyleSettings(aStyleSettings);
     mpMeta->SetSettings(aSettings);
 
@@ -343,7 +340,7 @@ void AnnotationWindow::Rescale()
     mpTextWindow->SetMapMode( aMode );
     if ( mpMeta )
     {
-        vcl::Font aFont( 
mpMeta->GetSettings().GetStyleSettings().GetFieldFont() );
+        vcl::Font aFont( 
mpMeta->GetSettings().GetStyleSettings().GetLabelFont() );
         sal_Int32 nHeight = long(aFont.GetFontHeight() * aMode.GetScaleY());
         aFont.SetFontHeight( nHeight );
         mpMeta->SetControlFont( aFont );
@@ -541,7 +538,7 @@ void AnnotationWindow::SetColor()
     mpMeta->SetControlBackground(maColor);
     AllSettings aSettings = mpMeta->GetSettings();
     StyleSettings aStyleSettings = aSettings.GetStyleSettings();
-    aStyleSettings.SetFieldTextColor( bHighContrast ? maColorLight : 
maColorDark);
+    aStyleSettings.SetLabelTextColor( bHighContrast ? maColorLight : 
maColorDark);
     aSettings.SetStyleSettings(aStyleSettings);
     mpMeta->SetSettings(aSettings);
 
diff --git a/sd/source/ui/annotations/annotationwindow.hxx 
b/sd/source/ui/annotations/annotationwindow.hxx
index aa28144bd1d2..0db64ef309a9 100644
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -22,7 +22,7 @@
 
 #include <vcl/ctrl.hxx>
 #include <vcl/floatwin.hxx>
-#include <vcl/vclmedit.hxx>
+#include <vcl/fixed.hxx>
 #include <vcl/scrbar.hxx>
 
 #include <basegfx/polygon/b2dpolygon.hxx>
@@ -81,7 +81,7 @@ class AnnotationWindow : public FloatingWindow
         bool                    mbProtected;
         bool                    mbMouseOverButton;
         VclPtr<AnnotationTextWindow>   mpTextWindow;
-        VclPtr<VclMultiLineEdit> mpMeta;
+        VclPtr<FixedText> mpMeta;
         ::tools::Rectangle               maRectMetaButton;
         basegfx::B2DPolygon     maPopupTriangle;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to