summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr/browserline.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/propctrlr/browserline.cxx')
-rw-r--r--extensions/source/propctrlr/browserline.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index d4770ba3e5d1..f4619000dcf8 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -25,9 +25,11 @@
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <comphelper/string.hxx>
#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <utility>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -41,19 +43,17 @@ namespace pcr
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::inspection::XPropertyControl;
using ::com::sun::star::inspection::XPropertyControlContext;
- using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::graphic::GraphicProvider;
using ::com::sun::star::graphic::XGraphicProvider;
using ::com::sun::star::uno::Sequence;
- using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::graphic::XGraphic;
namespace PropertyLineElement = ::com::sun::star::inspection::PropertyLineElement;
- OBrowserLine::OBrowserLine(const OUString& rEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup,
+ OBrowserLine::OBrowserLine(OUString aEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup,
weld::Container* pInitialControlParent)
- : m_sEntryName(rEntryName)
+ : m_sEntryName(std::move(aEntryName))
, m_xBuilder(Application::CreateBuilder(pParent, "modules/spropctrlr/ui/browserline.ui"))
, m_xContainer(m_xBuilder->weld_container("BrowserLine"))
, m_xFtTitle(m_xBuilder->weld_label("label"))
@@ -88,7 +88,7 @@ namespace pcr
}
}
- void OBrowserLine::SetComponentHelpIds(const OString& rHelpId)
+ void OBrowserLine::SetComponentHelpIds(const OUString& rHelpId)
{
if (m_pControlWindow)
m_pControlWindow->set_help_id(rHelpId);
@@ -178,7 +178,7 @@ namespace pcr
OUStringBuffer aText(m_xFtTitle->get_label());
int n10DotsWidth = m_xFtTitle->get_pixel_size("..........").Width();
- int nTextWidth = m_xFtTitle->get_pixel_size(aText.toString()).Width();
+ int nTextWidth = m_xFtTitle->get_pixel_size(OUString::unacquired(aText)).Width();
int nDiff = m_nNameWidth - nTextWidth;
int nExtraChars = (nDiff * 10) / n10DotsWidth;
for (int i = 0; i < nExtraChars; ++i)
@@ -314,9 +314,7 @@ namespace pcr
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create(xContext) );
- Sequence< PropertyValue > aMediaProperties(1);
- aMediaProperties[0].Name = "URL";
- aMediaProperties[0].Value <<= rImageURL;
+ Sequence aMediaProperties{ comphelper::makePropertyValue("URL", rImageURL) };
xGraphic = Reference<XGraphic>(xGraphicProvider->queryGraphic(aMediaProperties), css::uno::UNO_SET_THROW);
}