summaryrefslogtreecommitdiffstats
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgctl3d.cxx5
-rw-r--r--svx/source/form/labelitemwindow.cxx2
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx9
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx40
-rw-r--r--svx/source/svdraw/svdxcgv.cxx63
5 files changed, 73 insertions, 46 deletions
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index e315819b06..319b0a2d78 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -58,6 +58,11 @@ void Svx3DPreviewControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
Construct();
}
+void Svx3DPreviewControl::ClearPageView()
+{
+ mp3DView->ClearPageView();
+}
+
Svx3DPreviewControl::~Svx3DPreviewControl()
{
mp3DObj.clear();
diff --git a/svx/source/form/labelitemwindow.cxx b/svx/source/form/labelitemwindow.cxx
index c9afd1534a..91d9f99c0c 100644
--- a/svx/source/form/labelitemwindow.cxx
+++ b/svx/source/form/labelitemwindow.cxx
@@ -58,7 +58,9 @@ OUString LabelItemWindow::get_label() const { return m_xLabel->get_label(); }
void LabelItemWindow::dispose()
{
+ m_xImage.reset();
m_xLabel.reset();
+ m_xBox.reset();
InterimItemWindow::dispose();
}
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 91cea51325..b5b1f2be3c 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -43,15 +43,6 @@ void ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
SetColCount();
}
-void ValueSetWithTextControl::SetOptimalDrawingAreaHeight()
-{
- const vcl::Font aFont(Application::GetSettings().GetStyleSettings().GetLabelFont());
- const sal_Int32 nRowHeight = aFont.GetFontSize().Height() * 9 / 4; // see UserDraw()
- const Size aSize(GetOutputSizePixel().Width(), nRowHeight * maItems.size());
- GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height());
- SetOutputSizePixel(aSize);
-}
-
void ValueSetWithTextControl::AddItem(
const OUString& rItemText,
const OUString& rItemText2 )
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 1bad74cebb..a74c6d5b8f 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -35,6 +35,7 @@
#include <basegfx/vector/b2dvector.hxx>
#include <sdr/primitive2d/sdrtextprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/textbreakuphelper.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/primitive2d/textdecoratedprimitive2d.hxx>
#include <basegfx/range/b2drange.hxx>
@@ -328,13 +329,38 @@ namespace
const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D* pTCPP =
static_cast<const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D*>(pNewPrimitive.get());
- pTCPP->CreateDecorationGeometryContent(
- aContainer,
- pTCPP->getTextTransform(),
- caseMappedText,
- rInfo.mnTextStart,
- rInfo.mnTextLen,
- aDXArray);
+ if (pTCPP->getWordLineMode()) // single word mode: 'Individual words' in UI
+ {
+ // Split to single word primitives using TextBreakupHelper
+ drawinglayer::primitive2d::TextBreakupHelper aTextBreakupHelper(*pTCPP);
+ drawinglayer::primitive2d::Primitive2DContainer aBroken(aTextBreakupHelper.extractResult(drawinglayer::primitive2d::BreakupUnit::Word));
+ for (auto& rPortion : aBroken)
+ {
+ assert(rPortion->getPrimitive2DID() == PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D &&
+ "TextBreakupHelper generates same output primitive type as input");
+
+ const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D* pPortion =
+ static_cast<const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D*>(rPortion.get());
+
+ pPortion->CreateDecorationGeometryContent(
+ aContainer,
+ pPortion->getTextTransform(),
+ caseMappedText,
+ pPortion->getTextPosition(),
+ pPortion->getTextLength(),
+ pPortion->getDXArray());
+ }
+ }
+ else
+ {
+ pTCPP->CreateDecorationGeometryContent(
+ aContainer,
+ pTCPP->getTextTransform(),
+ caseMappedText,
+ rInfo.mnTextStart,
+ rInfo.mnTextLen,
+ aDXArray);
+ }
}
pNewPrimitive = new drawinglayer::primitive2d::GroupPrimitive2D(std::move(aContainer));
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 050a997077..5d16cbae25 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -599,42 +599,45 @@ Graphic SdrExchangeView::GetObjGraphic(const SdrObject& rSdrObject, bool bSVG)
{
Graphic aRet;
- // try to get a graphic from the object first
- const SdrGrafObj* pSdrGrafObj(dynamic_cast< const SdrGrafObj* >(&rSdrObject));
- const SdrOle2Obj* pSdrOle2Obj(dynamic_cast< const SdrOle2Obj* >(&rSdrObject));
-
- if(pSdrGrafObj)
+ if (!rSdrObject.HasText())
{
- if(pSdrGrafObj->isEmbeddedVectorGraphicData())
+ // try to get a graphic from the object first
+ const SdrGrafObj* pSdrGrafObj(dynamic_cast<const SdrGrafObj*>(&rSdrObject));
+ const SdrOle2Obj* pSdrOle2Obj(dynamic_cast<const SdrOle2Obj*>(&rSdrObject));
+
+ if (pSdrGrafObj)
{
- // get Metafile for Svg content
- aRet = pSdrGrafObj->getMetafileFromEmbeddedVectorGraphicData();
+ if (pSdrGrafObj->isEmbeddedVectorGraphicData())
+ {
+ // get Metafile for Svg content
+ aRet = pSdrGrafObj->getMetafileFromEmbeddedVectorGraphicData();
+ }
+ else
+ {
+ // Make behaviour coherent with metafile
+ // recording below (which of course also takes
+ // view-transformed objects)
+ aRet = pSdrGrafObj->GetTransformedGraphic();
+ }
}
- else
+ else if (pSdrOle2Obj)
{
- // Make behaviour coherent with metafile
- // recording below (which of course also takes
- // view-transformed objects)
- aRet = pSdrGrafObj->GetTransformedGraphic();
- }
- }
- else if(pSdrOle2Obj)
- {
- if(pSdrOle2Obj->GetGraphic())
- {
- aRet = *pSdrOle2Obj->GetGraphic();
+ if (pSdrOle2Obj->GetGraphic())
+ {
+ aRet = *pSdrOle2Obj->GetGraphic();
+ }
}
- }
- else
- {
- // Support extracting a snapshot from video media, if possible.
- const SdrMediaObj* pSdrMediaObj = dynamic_cast<const SdrMediaObj*>(&rSdrObject);
- if (pSdrMediaObj)
+ else
{
- const css::uno::Reference<css::graphic::XGraphic>& xGraphic
- = pSdrMediaObj->getSnapshot();
- if (xGraphic.is())
- aRet = Graphic(xGraphic);
+ // Support extracting a snapshot from video media, if possible.
+ const SdrMediaObj* pSdrMediaObj = dynamic_cast<const SdrMediaObj*>(&rSdrObject);
+ if (pSdrMediaObj)
+ {
+ const css::uno::Reference<css::graphic::XGraphic>& xGraphic
+ = pSdrMediaObj->getSnapshot();
+ if (xGraphic.is())
+ aRet = Graphic(xGraphic);
+ }
}
}