summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/annotation/AnnotationObject.cxx22
-rw-r--r--svx/source/svdraw/svdmodel.cxx1
2 files changed, 15 insertions, 8 deletions
diff --git a/svx/source/annotation/AnnotationObject.cxx b/svx/source/annotation/AnnotationObject.cxx
index c87943067ae0..d69f9be6e9fa 100644
--- a/svx/source/annotation/AnnotationObject.cxx
+++ b/svx/source/annotation/AnnotationObject.cxx
@@ -11,15 +11,13 @@
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
+#include <comphelper/lok.hxx>
+
#include <sal/log.hxx>
#include <svx/svdmodel.hxx>
-
#include <svx/annotation/AnnotationObject.hxx>
#include <svx/annotation/ObjectAnnotationData.hxx>
#include <sdr/properties/rectangleproperties.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
-
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
#include <svx/xlineit0.hxx>
@@ -29,6 +27,9 @@
#include <svx/sdooitm.hxx>
#include <svx/sdtagitm.hxx>
#include <svx/sdasitm.hxx>
+
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/colritem.hxx>
#include <o3tl/unit_conversion.hxx>
@@ -92,15 +93,13 @@ Color getColorLight(sal_uInt16 aAuthorIndex)
AnnotationObject::AnnotationObject(SdrModel& rSdrModel)
: SdrRectObj(rSdrModel)
{
- setAsAnnotationObject(true);
- mbTextFrame = true; // need this so the frame can be adjusted to the text
+ setup();
}
AnnotationObject::AnnotationObject(SdrModel& rSdrModel, AnnotationObject const& rSource)
: SdrRectObj(rSdrModel, rSource)
{
- setAsAnnotationObject(true);
- mbTextFrame = true; // need this so the frame can be adjusted to the text
+ setup();
}
AnnotationObject::AnnotationObject(SdrModel& rSdrModel, tools::Rectangle const& rRectangle,
@@ -116,8 +115,15 @@ AnnotationObject::AnnotationObject(SdrModel& rSdrModel, tools::Rectangle const&
rSdrModel.EnableUndo(bUndo);
osl_atomic_decrement(&m_refCount);
+ setup();
+}
+
+void AnnotationObject::setup()
+{
setAsAnnotationObject(true);
mbTextFrame = true; // need this so the frame can be adjusted to the text
+ bool bLOK = comphelper::LibreOfficeKit::isActive();
+ SetVisible(getSdrModelFromSdrObject().IsPDFDocument() || !bLOK);
}
void AnnotationObject::ApplyAnnotationName()
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 3c43cf2c81bc..a26b26a2ff2c 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -142,6 +142,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel
, m_bStarDrawPreviewMode(false)
, mbDisableTextEditUsesCommonUndoManager(false)
, mbVOCInvalidationIsReliable(false)
+ , m_bIsPDFDocument(false)
, m_nDefaultTabulator(0)
, m_nMaxUndoCount(16)
, m_pTextChain(new TextChain)