summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx23
1 files changed, 6 insertions, 17 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 4864cba499c4..a1780f9132c8 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1215,25 +1215,14 @@ int SwAnnotationWin::GetPrefScrollbarWidth() const
sal_Int32 SwAnnotationWin::GetMetaHeight() const
{
- if (!moMetaHeight)
- {
- const int fields = GetNumFields();
+ const int fields = GetNumFields();
- sal_Int32 nRequiredHeight = 0;
- weld::Label* aLabels[3] = { mxMetadataAuthor.get(), mxMetadataDate.get(), mxMetadataResolved.get() };
- for (int i = 0; i < fields; ++i)
- nRequiredHeight += aLabels[i]->get_preferred_size().Height();
- moMetaHeight = nRequiredHeight;
- }
- return *moMetaHeight;
-}
+ sal_Int32 nRequiredHeight = 0;
+ weld::Label* aLabels[3] = { mxMetadataAuthor.get(), mxMetadataDate.get(), mxMetadataResolved.get() };
+ for (int i = 0; i < fields; ++i)
+ nRequiredHeight += aLabels[i]->get_preferred_size().Height();
-void SwAnnotationWin::DataChanged(const DataChangedEvent& rDCEvt)
-{
- if ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE))
- {
- moMetaHeight.reset();
- }
+ return nRequiredHeight;
}
sal_Int32 SwAnnotationWin::GetNumFields() const