summaryrefslogtreecommitdiff
path: root/extensions/source/dbpilots/optiongrouplayouter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/dbpilots/optiongrouplayouter.cxx')
-rw-r--r--extensions/source/dbpilots/optiongrouplayouter.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx
index 14a67ada98f7..870522855000 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include "groupboxwiz.hxx"
#include "dbptools.hxx"
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace dbp
@@ -90,7 +90,7 @@ namespace dbp
// shape collection (for grouping the shapes)
Reference< XShapes > xButtonCollection( ShapeCollection::create(mxContext) );
// first member : the shape of the control
- xButtonCollection->add(_rContext.xObjectShape.get());
+ xButtonCollection->add(_rContext.xObjectShape);
sal_Int32 nTempHeight = (aControlShapeSize.Height - BUTTON_HEIGHT/4) / (nRadioButtons + 1);
@@ -102,7 +102,7 @@ namespace dbp
css::awt::Point aButtonPosition;
aButtonPosition.X = aShapePosition.X + OFFSET;
- OUString sElementsName("RadioGroup");
+ OUString sElementsName(u"RadioGroup"_ustr);
disambiguateName(Reference< XNameAccess >(_rContext.xForm, UNO_QUERY), sElementsName);
auto aLabelIter = _rSettings.aLabels.cbegin();
@@ -112,28 +112,28 @@ namespace dbp
aButtonPosition.Y = aShapePosition.Y + (i+1) * nTempHeight;
Reference< XPropertySet > xRadioModel(
- xDocFactory->createInstance("com.sun.star.form.component.RadioButton"),
+ xDocFactory->createInstance(u"com.sun.star.form.component.RadioButton"_ustr),
UNO_QUERY);
// the label
- xRadioModel->setPropertyValue("Label", makeAny(*aLabelIter));
+ xRadioModel->setPropertyValue(u"Label"_ustr, Any(*aLabelIter));
// the value
- xRadioModel->setPropertyValue("RefValue", makeAny(*aValueIter));
+ xRadioModel->setPropertyValue(u"RefValue"_ustr, Any(*aValueIter));
// default selection
if (_rSettings.sDefaultField == *aLabelIter)
- xRadioModel->setPropertyValue("DefaultState", makeAny(sal_Int16(1)));
+ xRadioModel->setPropertyValue(u"DefaultState"_ustr, Any(sal_Int16(1)));
// the connection to the database field
if (!_rSettings.sDBField.isEmpty())
- xRadioModel->setPropertyValue("DataField", makeAny(_rSettings.sDBField));
+ xRadioModel->setPropertyValue(u"DataField"_ustr, Any(_rSettings.sDBField));
// the name for the model
- xRadioModel->setPropertyValue("Name", makeAny(sElementsName));
+ xRadioModel->setPropertyValue(u"Name"_ustr, Any(sElementsName));
// create a shape for the radio button
Reference< XControlShape > xRadioShape(
- xDocFactory->createInstance("com.sun.star.drawing.ControlShape"),
+ xDocFactory->createInstance(u"com.sun.star.drawing.ControlShape"_ustr),
UNO_QUERY);
Reference< XPropertySet > xShapeProperties(xRadioShape, UNO_QUERY);
@@ -158,13 +158,13 @@ namespace dbp
// xShapeProperties->setPropertyValue("Name", makeAny(sElementsName));
// add to the page
- xPageShapes->add(xRadioShape.get());
+ xPageShapes->add(xRadioShape);
// add to the collection (for the later grouping)
- xButtonCollection->add(xRadioShape.get());
+ xButtonCollection->add(xRadioShape);
// set the GroupBox as "LabelControl" for the RadioButton
// (_after_ having inserted the model into the page!)
- xRadioModel->setPropertyValue("LabelControl", makeAny(_rContext.xObjectModel));
+ xRadioModel->setPropertyValue(u"LabelControl"_ustr, Any(_rContext.xObjectModel));
}
// group the shapes
@@ -176,7 +176,7 @@ namespace dbp
Reference< XShapeGroup > xGroupedOptions = xGrouper->group(xButtonCollection);
Reference< XSelectionSupplier > xSelector(_rContext.xDocumentModel->getCurrentController(), UNO_QUERY);
if (xSelector.is())
- xSelector->select(makeAny(xGroupedOptions));
+ xSelector->select(Any(xGroupedOptions));
}
}
catch(Exception&)
@@ -189,12 +189,12 @@ namespace dbp
void OOptionGroupLayouter::implAnchorShape(const Reference< XPropertySet >& _rxShapeProps)
{
- static constexpr OUStringLiteral s_sAnchorPropertyName = u"AnchorType";
+ static constexpr OUString s_sAnchorPropertyName = u"AnchorType"_ustr;
Reference< XPropertySetInfo > xPropertyInfo;
if (_rxShapeProps.is())
xPropertyInfo = _rxShapeProps->getPropertySetInfo();
if (xPropertyInfo.is() && xPropertyInfo->hasPropertyByName(s_sAnchorPropertyName))
- _rxShapeProps->setPropertyValue(s_sAnchorPropertyName, makeAny(TextContentAnchorType_AT_PAGE));
+ _rxShapeProps->setPropertyValue(s_sAnchorPropertyName, Any(TextContentAnchorType_AT_PAGE));
}