summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-18 10:23:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-18 12:56:41 +0200
commita2d97135411d566b0b1f3d47af7912c8412cee7f (patch)
treee9b6fb0a85671afffdd9e778af1f6714cb695bbb /sd
parent660e82ee8c97a2ad9b31fdcc817ce9543119ec09 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx13
-rw-r--r--sd/source/ui/annotations/annotationwindow.hxx4
3 files changed, 9 insertions, 10 deletions
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;