summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-08 11:13:11 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-08 12:36:20 +0100
commit240581f7d7172d8ed1e5fa38a114b102fe626e25 (patch)
tree2db4edbe8bd6beec04b2e1a25bb9462dd8fcc294 /sd
parent271bdc3469b694c113e4449750866dee032e2d34 (diff)
jsdialog: apply .uno:LineWidth in Impress
Change-Id: I7b9a3e5d6af5ccf9e9be28c5a1460fbf8553ff08 Reviewed-on: https://gerrit.libreoffice.org/82275 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/82281 Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx30
1 files changed, 29 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index caa352e3b152..cb25ccad181d 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -80,6 +80,13 @@
#include <svx/svxids.hrc>
#include <svx/sdtfsitm.hxx>
#include <svx/sdmetitm.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xflclit.hxx>
+#include <svx/xlineit0.hxx>
+#include <svx/xlnedwit.hxx>
+#include <svx/xlnstwit.hxx>
+#include <svx/xlnwtit.hxx>
+#include <svx/chrtitem.hxx>
#include <tools/diagnose_ex.h>
@@ -530,6 +537,25 @@ public:
}
};
+namespace
+{
+ void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+ {
+ const SfxPoolItem* pItem = nullptr;
+
+ if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
+ {
+ double fValue = static_cast<const SvxDoubleItem*>(pItem)->GetValue();
+ // FIXME: different units...
+ int nPow = 100;
+ int nValue = fValue * nPow;
+
+ XLineWidthItem aItem(nValue);
+ pArgs->Put(aItem);
+ }
+ }
+}
+
/**
* SfxRequests for temporary actions
*/
@@ -615,7 +641,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if( rReq.GetArgs() )
{
- mpDrawView->SetAttributes(*rReq.GetArgs());
+ std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
+ lcl_convertStringArguments(pNewArgs);
+ mpDrawView->SetAttributes(*pNewArgs);
rReq.Done();
}
else