[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 10:51:56 UTC 2019
sd/source/ui/view/drviews2.cxx | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
New commits:
commit b17aeee00f0dce7124dc8a2e6100e10b6ef3a39e
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Nov 8 11:13:11 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 8 11:51:12 2019 +0100
jsdialog: apply .uno:LineWidth in Impress
Change-Id: I7b9a3e5d6af5ccf9e9be28c5a1460fbf8553ff08
Reviewed-on: https://gerrit.libreoffice.org/82275
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index c98532f34f42..24f41a3e81fa 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -89,6 +89,7 @@
#include <svx/xlnedwit.hxx>
#include <svx/xlnstwit.hxx>
#include <svx/xlnwtit.hxx>
+#include <svx/chrtitem.hxx>
#include <tools/diagnose_ex.h>
@@ -543,6 +544,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
*/
@@ -628,7 +648,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
More information about the Libreoffice-commits
mailing list