loplugin:ostr in svx

Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin
2024-05-11 12:41:09 +02:00
parent 28a43d53b2
commit bc91cc4750
256 changed files with 2622 additions and 2583 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ public:
OUString msIdentifier; //< The identifier of this entry (from example.xml).
ClassificationResult(ClassificationType eType, OUString sName,
OUString sAbbreviatedName, OUString sIdentifier = "")
OUString sAbbreviatedName, OUString sIdentifier = u""_ustr)
: meType(eType)
, msName(std::move(sName))
, msAbbreviatedName(std::move(sAbbreviatedName))
+4 -4
View File
@@ -113,8 +113,8 @@ class SVX_DLLPUBLIC DeleteHeaderDialog final : public weld::MessageDialogControl
{
public:
DeleteHeaderDialog(weld::Widget* pParent)
: MessageDialogController(pParent, "svx/ui/deleteheaderdialog.ui",
"DeleteHeaderDialog")
: MessageDialogController(pParent, u"svx/ui/deleteheaderdialog.ui"_ustr,
u"DeleteHeaderDialog"_ustr)
{
}
};
@@ -123,8 +123,8 @@ class SVX_DLLPUBLIC DeleteFooterDialog final : public weld::MessageDialogControl
{
public:
DeleteFooterDialog(weld::Widget* pParent)
: MessageDialogController(pParent, "svx/ui/deletefooterdialog.ui",
"DeleteFooterDialog")
: MessageDialogController(pParent, u"svx/ui/deletefooterdialog.ui"_ustr,
u"DeleteFooterDialog"_ustr)
{
}
};
+1 -1
View File
@@ -377,7 +377,7 @@ public:
virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) = 0;
virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) = 0;
virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent,
const OUString& rName, const OUString& rDesc, const OUString& rTitle = "" ) = 0;
const OUString& rName, const OUString& rDesc, const OUString& rTitle = u""_ustr ) = 0;
// #i68101#
virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0;
@@ -51,7 +51,7 @@ public:
OUString SAL_CALL getImplementationName() override
{
return "com.sun.star.comp.graphic.PrimitiveFactory2D";
return u"com.sun.star.comp.graphic.PrimitiveFactory2D"_ustr;
}
sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override
@@ -61,7 +61,7 @@ public:
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
{
return { "com.sun.star.graphic.PrimitiveFactory2D" };
return { u"com.sun.star.graphic.PrimitiveFactory2D"_ustr };
}
};
+4 -4
View File
@@ -41,7 +41,7 @@ CPPUNIT_TEST_FIXTURE(XTableImportExportTest, testImportExport)
BitmapChecksum aChecksum(0);
{
rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, "REF");
rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, u"REF"_ustr);
uno::Reference<container::XNameContainer> xNameContainer(xBitmapList->createInstance());
CPPUNIT_ASSERT(xNameContainer.is());
@@ -51,20 +51,20 @@ CPPUNIT_TEST_FIXTURE(XTableImportExportTest, testImportExport)
Graphic aGraphic(aBitmapEx);
uno::Reference<awt::XBitmap> xBitmap(aGraphic.GetXGraphic(), css::uno::UNO_QUERY);
xNameContainer->insertByName("SomeBitmap", uno::Any(xBitmap));
xNameContainer->insertByName(u"SomeBitmap"_ustr, uno::Any(xBitmap));
xBitmapList->Save();
aChecksum = aBitmap.GetChecksum();
}
{
rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, "REF");
rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, u"REF"_ustr);
bool bResult = xBitmapList->Load();
CPPUNIT_ASSERT(bResult);
uno::Reference<container::XNameContainer> xNameContainer(xBitmapList->createInstance());
CPPUNIT_ASSERT(xNameContainer.is());
uno::Any aAny = xNameContainer->getByName("SomeBitmap");
uno::Any aAny = xNameContainer->getByName(u"SomeBitmap"_ustr);
CPPUNIT_ASSERT(aAny.has<uno::Reference<awt::XBitmap>>());
auto xBitmap = aAny.get<uno::Reference<awt::XBitmap>>();
CPPUNIT_ASSERT(xBitmap.is());
+3 -3
View File
@@ -27,7 +27,7 @@ class ClassicshapesTest : public UnoApiTest
{
public:
ClassicshapesTest()
: UnoApiTest("svx/qa/unit/data/")
: UnoApiTest(u"svx/qa/unit/data/"_ustr)
{
}
@@ -173,8 +173,8 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf130076Flip)
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape2(getShape(2, nPageIndex));
uno::Reference<beans::XPropertySet> xShapeProps2(xShape2, uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapeProps->getPropertyValue("CircleStartAngle") >>= nAngle1);
CPPUNIT_ASSERT(xShapeProps2->getPropertyValue("CircleStartAngle") >>= nAngle2);
CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CircleStartAngle"_ustr) >>= nAngle1);
CPPUNIT_ASSERT(xShapeProps2->getPropertyValue(u"CircleStartAngle"_ustr) >>= nAngle2);
CPPUNIT_ASSERT_EQUAL_MESSAGE(OUString("Incorrect vertical flip starting angle on page "
+ OUString::number(nPageIndex))
.toUtf8()
+6 -5
View File
@@ -27,7 +27,7 @@ class Test : public UnoApiTest
{
public:
Test()
: UnoApiTest("svx/qa/unit/data/")
: UnoApiTest(u"svx/qa/unit/data/"_ustr)
{
}
};
@@ -42,7 +42,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChartExportToPdf)
uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
// When exporting that chart to PDF:
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "application/pdf",
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"application/pdf"_ustr,
maTempFile.GetURL());
// Then make sure we get a valid, non-empty PDF:
@@ -71,14 +71,15 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicObjectResolver)
// Test name in root folder
{
uno::Reference<graphic::XGraphic> xGraphic = xGraphicHelper->loadGraphic("SomeImage.png");
uno::Reference<graphic::XGraphic> xGraphic
= xGraphicHelper->loadGraphic(u"SomeImage.png"_ustr);
CPPUNIT_ASSERT_EQUAL(true, xGraphic.is());
}
// Test name in sub-folder
{
uno::Reference<graphic::XGraphic> xGraphic
= xGraphicHelper->loadGraphic("Pictures/SomeOtherImage.png");
= xGraphicHelper->loadGraphic(u"Pictures/SomeOtherImage.png"_ustr);
CPPUNIT_ASSERT_EQUAL(true, xGraphic.is());
}
@@ -87,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicObjectResolver)
uno::Reference<graphic::XGraphic> xGraphic;
try
{
xGraphic = xGraphicHelper->loadGraphic("NoneExistent.png");
xGraphic = xGraphicHelper->loadGraphic(u"NoneExistent.png"_ustr);
}
catch (const uno::Exception&)
{
+28 -23
View File
@@ -50,7 +50,7 @@ class CustomshapesTest : public UnoApiTest
{
public:
CustomshapesTest()
: UnoApiTest("svx/qa/unit/data/")
: UnoApiTest(u"svx/qa/unit/data/"_ustr)
{
}
@@ -90,7 +90,8 @@ sal_uInt8 CustomshapesTest::countShapes()
Color CustomshapesTest::getColor(uno::Reference<drawing::XShape> xShape, const double& fX,
const double& fY)
{
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL());
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr,
maTempFile.GetURL());
SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ);
vcl::PngImageReader aPNGReader(aFileStream);
Bitmap aBMP = aPNGReader.read().GetBitmap();
@@ -113,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302)
const SdrCustomShapeGeometryItem& rGeometryItem(
pSdrCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
const css::uno::Any* pAny
= rGeometryItem.GetPropertyValueByName("TextPath", "SameLetterHeights");
= rGeometryItem.GetPropertyValueByName(u"TextPath"_ustr, u"SameLetterHeights"_ustr);
if (pAny)
*pAny >>= bSameHeights;
@@ -124,11 +125,11 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302)
SdrView* pSdrView = pViewShell->GetDrawView();
pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
dispatchCommand(mxComponent, ".uno:FontworkSameLetterHeights", {});
dispatchCommand(mxComponent, u".uno:FontworkSameLetterHeights"_ustr, {});
const SdrCustomShapeGeometryItem& rGeometryItem1
= pSdrCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
pAny = rGeometryItem1.GetPropertyValueByName("TextPath", "SameLetterHeights");
pAny = rGeometryItem1.GetPropertyValueByName(u"TextPath"_ustr, u"SameLetterHeights"_ustr);
if (pAny)
*pAny >>= bSameHeights;
@@ -136,11 +137,11 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302)
pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
dispatchCommand(mxComponent, ".uno:FontworkSameLetterHeights", {});
dispatchCommand(mxComponent, u".uno:FontworkSameLetterHeights"_ustr, {});
const SdrCustomShapeGeometryItem& rGeometryItem2
= pSdrCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
pAny = rGeometryItem2.GetPropertyValueByName("TextPath", "SameLetterHeights");
pAny = rGeometryItem2.GetPropertyValueByName(u"TextPath"_ustr, u"SameLetterHeights"_ustr);
if (pAny)
*pAny >>= bSameHeights;
@@ -161,7 +162,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf147409_GeomItemHash)
// Apply FontworkSameLetterHeights toggle
// Without patch a debug build fails assert in SfxItemPool::DirectPutItemInPoolImpl and so crashes.
dispatchCommand(mxComponent, ".uno:FontworkSameLetterHeights", {});
dispatchCommand(mxComponent, u".uno:FontworkSameLetterHeights"_ustr, {});
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf146866_GeomItemHash)
@@ -178,7 +179,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf146866_GeomItemHash)
// Apply extrusion toggle
// Without patch a debug build fails assert in SfxItemPool::DirectPutItemInPoolImpl and so crashes.
dispatchCommand(mxComponent, ".uno:ExtrusionToggle", {});
dispatchCommand(mxComponent, u".uno:ExtrusionToggle"_ustr, {});
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_NonUI)
@@ -190,7 +191,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_NonUI)
// Generate bitmap from shape
uno::Reference<drawing::XShape> xShape = getShape(0);
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL());
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr,
maTempFile.GetURL());
// Read bitmap and test color
// The expected values are taken from an image generated by Word
@@ -226,7 +228,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FrontLightDim)
// Generate bitmap from shape
uno::Reference<drawing::XShape> xShape = getShape(0);
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL());
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr,
maTempFile.GetURL());
// Read bitmap and test color
// The expected values are taken from an image generated by Word
@@ -255,7 +258,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FirstLightHarsh)
// Generate bitmap from shape
uno::Reference<drawing::XShape> xShape = getShape(0);
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL());
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr,
maTempFile.GetURL());
// Read bitmap and test color in center
SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ);
@@ -309,7 +313,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterZ_odt)
awt::Rectangle aBoundRect;
xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect;
awt::Point aAnchorPosition;
xPropSet->getPropertyValue("AnchorPosition") >>= aAnchorPosition;
xPropSet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition;
sal_Int32 nActualLeft = aBoundRect.X - aAnchorPosition.X;
// Without the fix it would have failed with left = 7731.
@@ -334,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterY_odt)
awt::Rectangle aBoundRect;
xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect;
awt::Point aAnchorPosition;
xPropSet->getPropertyValue("AnchorPosition") >>= aAnchorPosition;
xPropSet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition;
sal_Int32 nActualTop = aBoundRect.Y - aAnchorPosition.Y;
// Without the fix it would have failed with top = 2252.
@@ -359,7 +363,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterY_doc)
awt::Rectangle aBoundRect;
xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect;
awt::Point aAnchorPosition;
xPropSet->getPropertyValue("AnchorPosition") >>= aAnchorPosition;
xPropSet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition;
sal_Int32 nActualTop = aBoundRect.Y - aAnchorPosition.Y;
// Without the fix it would have failed with top = 2330
@@ -799,10 +803,10 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf115813_OOXML_XY_handle)
uno::Reference<drawing::XShape> xShape(getShape(i));
SdrObjCustomShape& rSdrObjCustomShape(
static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape)));
OUString sShapeType("non-primitive"); // default for ODF
OUString sShapeType(u"non-primitive"_ustr); // default for ODF
const SdrCustomShapeGeometryItem& rGeometryItem(
rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type");
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr);
if (pAny)
*pAny >>= sShapeType;
@@ -869,10 +873,10 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126512_OOXML_handle_in_ODP)
uno::Reference<drawing::XShape> xShape(getShape(i));
SdrObjCustomShape& rSdrObjCustomShape(
static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape)));
OUString sShapeType("non-primitive"); // only to initialize, value not used here
OUString sShapeType(u"non-primitive"_ustr); // only to initialize, value not used here
const SdrCustomShapeGeometryItem& rGeometryItem(
rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type");
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr);
if (pAny)
*pAny >>= sShapeType;
@@ -1178,7 +1182,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf136176)
}
// Save and reload
saveAndReload("draw8");
saveAndReload(u"draw8"_ustr);
// Expected values of point 4 of the shape polygon
const OString sTestCase[] = { "FlipH"_ostr, "FlipV"_ostr, "FlipHV"_ostr };
@@ -1213,7 +1217,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf148501_OctagonBevel)
// Generate bitmap from shape
uno::Reference<drawing::XShape> xShape = getShape(0);
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL());
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr,
maTempFile.GetURL());
// Read bitmap and test color
// expected in order top-left, top, top-right, right, bottom-right:
@@ -1246,7 +1251,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS
const uno::Reference<drawing::XShape>& xShape)
{
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW);
uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry");
uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr);
uno::Sequence<beans::PropertyValue> aCustomShapeGeometry;
if (!(anotherAny >>= aCustomShapeGeometry))
return false;
@@ -1338,7 +1343,7 @@ bool lcl_getShapeCoordinates(uno::Sequence<drawing::EnhancedCustomShapeParameter
const uno::Reference<drawing::XShape>& xShape)
{
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW);
uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry");
uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr);
uno::Sequence<beans::PropertyValue> aCustomShapeGeometry;
if (!(anotherAny >>= aCustomShapeGeometry))
return false;
+5 -3
View File
@@ -309,7 +309,8 @@ void GalleryObjTest::TestInsertGalleryObject()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Object count inconsistent", sal_uInt32(0),
pGalleryTheme->GetObjectCount());
std::vector<OUString> imageList{ "galtest1.png", "galtest2.png", "galtest3.jpg" };
std::vector<OUString> imageList{ u"galtest1.png"_ustr, u"galtest2.png"_ustr,
u"galtest3.jpg"_ustr };
for (sal_uInt32 i = 0; i < static_cast<sal_uInt32>(imageList.size()); i++)
{
@@ -354,7 +355,8 @@ void GalleryObjTest::TestRemoveGalleryObject()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Object count inconsistent", sal_uInt32(0),
pGalleryTheme->GetObjectCount());
std::vector<OUString> imageList{ "galtest1.png", "galtest2.png", "galtest3.jpg" };
std::vector<OUString> imageList{ u"galtest1.png"_ustr, u"galtest2.png"_ustr,
u"galtest3.jpg"_ustr };
for (sal_uInt32 i = 0; i < static_cast<sal_uInt32>(imageList.size()); i++)
{
@@ -409,7 +411,7 @@ void GalleryObjTest::TestChangePositionGalleryObject()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Object count inconsistent", sal_uInt32(0),
pGalleryTheme->GetObjectCount());
OUString imageList[] = { "galtest1.png", "galtest2.png", "galtest3.jpg" };
OUString imageList[] = { u"galtest1.png"_ustr, u"galtest2.png"_ustr, u"galtest3.jpg"_ustr };
for (sal_uInt32 i = 0; i < (sizeof(imageList) / sizeof(imageList[0])); i++)
{
+2 -2
View File
@@ -28,7 +28,7 @@ class GluePointTest : public UnoApiTest
{
public:
GluePointTest()
: UnoApiTest("svx/qa/unit/data/")
: UnoApiTest(u"svx/qa/unit/data/"_ustr)
{
}
@@ -57,7 +57,7 @@ bool lcl_getGeometryGluePoints(
const uno::Reference<drawing::XShape>& xShape)
{
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW);
uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry");
uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr);
uno::Sequence<beans::PropertyValue> aCustomShapeGeometry;
if (!(anotherAny >>= aCustomShapeGeometry))
return false;
+21 -21
View File
@@ -31,7 +31,7 @@ class SdrTest : public UnoApiXmlTest
{
public:
SdrTest()
: UnoApiXmlTest("svx/qa/unit/data/")
: UnoApiXmlTest(u"svx/qa/unit/data/"_ustr)
{
}
@@ -101,32 +101,32 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment)
// - Actual : 162
// - In <>, attribute 'xy13' of '(//shadow/transform)[1]' incorrect value.
// i.e. shadow alignment was ignored while scaling the shadow.
assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy13"_ostr, "-568");
assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy23"_ostr, "162");
assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy13"_ostr, u"-568"_ustr);
assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy23"_ostr, u"162"_ustr);
assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy13"_ostr, "-1795");
assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy23"_ostr, "162");
assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy13"_ostr, u"-1795"_ustr);
assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy23"_ostr, u"162"_ustr);
assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy13"_ostr, "-3021");
assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy23"_ostr, "161");
assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy13"_ostr, u"-3021"_ustr);
assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy23"_ostr, u"161"_ustr);
assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy13"_ostr, "-568");
assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy23"_ostr, "-749");
assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy13"_ostr, u"-568"_ustr);
assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy23"_ostr, u"-749"_ustr);
assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy13"_ostr, "-3021");
assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy23"_ostr, "-750");
assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy13"_ostr, u"-3021"_ustr);
assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy23"_ostr, u"-750"_ustr);
assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy13"_ostr, "-567");
assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy23"_ostr, "-1692");
assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy13"_ostr, u"-567"_ustr);
assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy23"_ostr, u"-1692"_ustr);
assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy13"_ostr, "-1795");
assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy23"_ostr, "-1693");
assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy13"_ostr, u"-1795"_ustr);
assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy23"_ostr, u"-1693"_ustr);
assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy13"_ostr, "-3023");
assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy23"_ostr, "-1692");
assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy13"_ostr, u"-3023"_ustr);
assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy23"_ostr, u"-1692"_ustr);
assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy13"_ostr, "-1795");
assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy23"_ostr, "-750");
assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy13"_ostr, u"-1795"_ustr);
assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy23"_ostr, u"-750"_ustr);
}
{
// Page 2 contains a table with shadow alignment center
@@ -143,8 +143,8 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment)
// - Expected: -5196
// - Actual : 0
// - In<>, attribute 'xy13' of '//shadow/transform' incorrect value.
assertXPath(pDocument, "//shadow/transform"_ostr, "xy13"_ostr, "-5196");
assertXPath(pDocument, "//shadow/transform"_ostr, "xy23"_ostr, "-2290");
assertXPath(pDocument, "//shadow/transform"_ostr, "xy13"_ostr, u"-5196"_ustr);
assertXPath(pDocument, "//shadow/transform"_ostr, "xy23"_ostr, u"-2290"_ustr);
}
}
+81 -73
View File
@@ -47,7 +47,7 @@ class SvdrawTest : public UnoApiXmlTest
{
public:
SvdrawTest()
: UnoApiXmlTest("svx/qa/unit/data/")
: UnoApiXmlTest(u"svx/qa/unit/data/"_ustr)
{
}
@@ -89,10 +89,10 @@ xmlDocUniquePtr lcl_dumpAndParseFirstObjectWithAssert(SdrPage* pSdrPage)
CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
{
// Create a new Draw document with a rectangle.
mxComponent = loadFromDesktop("private:factory/sdraw");
mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY);
xShape->setSize(awt::Size(10000, 10000));
xShape->setPosition(awt::Point(1000, 1000));
@@ -103,12 +103,12 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
// Add semi-transparent text on the rectangle.
uno::Reference<text::XTextRange> xShapeText(xShape, uno::UNO_QUERY);
xShapeText->getText()->setString("hello");
xShapeText->getText()->setString(u"hello"_ustr);
uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
xShapeProperties->setPropertyValue("CharColor", uno::Any(COL_RED));
xShapeProperties->setPropertyValue(u"CharColor"_ustr, uno::Any(COL_RED));
sal_Int16 nTransparence = 75;
xShapeProperties->setPropertyValue("CharTransparence", uno::Any(nTransparence));
xShapeProperties->setPropertyValue(u"CharTransparence"_ustr, uno::Any(nTransparence));
// Generates drawinglayer primitives for the page.
auto pDrawPage = dynamic_cast<SvxDrawPage*>(xDrawPage.get());
@@ -130,19 +130,19 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale)
{
// Given a path object:
mxComponent = loadFromDesktop("private:factory/sdraw");
mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance("com.sun.star.drawing.ClosedBezierShape"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.drawing.ClosedBezierShape"_ustr), uno::UNO_QUERY);
// When setting its scale by both using setSize() and scaling in a transform matrix:
// Set size and basic properties.
xShape->setPosition(awt::Point(2512, 6062));
xShape->setSize(awt::Size(112, 112));
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
xShapeProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_SOLID));
xShapeProps->setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_SOLID));
xShapeProps->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(0)));
xShapeProps->setPropertyValue(u"FillStyle"_ustr, uno::Any(drawing::FillStyle_SOLID));
xShapeProps->setPropertyValue(u"LineStyle"_ustr, uno::Any(drawing::LineStyle_SOLID));
xShapeProps->setPropertyValue(u"FillColor"_ustr, uno::Any(static_cast<sal_Int32>(0)));
// Add it to the draw page.
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -184,7 +184,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale)
drawing::PolygonFlags_NORMAL,
},
};
xShapeProps->setPropertyValue("PolyPolygonBezier", uno::Any(aPolyPolygonBezierCoords));
xShapeProps->setPropertyValue(u"PolyPolygonBezier"_ustr, uno::Any(aPolyPolygonBezierCoords));
drawing::HomogenMatrix3 aMatrix;
aMatrix.Line1.Column1 = 56;
aMatrix.Line2.Column1 = -97;
@@ -195,7 +195,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale)
aMatrix.Line1.Column3 = 3317;
aMatrix.Line2.Column3 = 5583;
aMatrix.Line3.Column3 = 1;
xShapeProps->setPropertyValue("Transformation", uno::Any(aMatrix));
xShapeProps->setPropertyValue(u"Transformation"_ustr, uno::Any(aMatrix));
// Then make sure the scaling is only applied once:
// Without the accompanying fix in place, this test would have failed with:
@@ -208,18 +208,18 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale)
CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag)
{
// Given a document with a groupshape, which has 2 children.
mxComponent = loadFromDesktop("private:factory/sdraw");
mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xRect1(
xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY);
xRect1->setPosition(awt::Point(1000, 1000));
xRect1->setSize(awt::Size(10000, 10000));
uno::Reference<drawing::XShape> xRect2(
xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY);
xRect2->setPosition(awt::Point(1000, 1000));
xRect2->setSize(awt::Size(10000, 10000));
uno::Reference<drawing::XShapes> xGroup(
xFactory->createInstance("com.sun.star.drawing.GroupShape"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.drawing.GroupShape"_ustr), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -228,12 +228,12 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag)
xGroup->add(xRect1);
xGroup->add(xRect2);
uno::Reference<text::XTextRange> xRect2Text(xRect2, uno::UNO_QUERY);
xRect2Text->setString("x");
xRect2Text->setString(u"x"_ustr);
uno::Sequence<beans::PropertyValue> aGrabBag = {
comphelper::makePropertyValue("OOXLayout", true),
comphelper::makePropertyValue(u"OOXLayout"_ustr, true),
};
uno::Reference<beans::XPropertySet> xGroupProps(xGroup, uno::UNO_QUERY);
xGroupProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag));
xGroupProps->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aGrabBag));
// When editing the shape text of the 2nd rectangle (insert a char at the start).
SfxViewShell* pViewShell = SfxViewShell::Current();
@@ -241,11 +241,11 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag)
SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xRect2);
pSdrView->SdrBeginTextEdit(pObject);
EditView& rEditView = pSdrView->GetTextEditOutlinerView()->GetEditView();
rEditView.InsertText("y");
rEditView.InsertText(u"y"_ustr);
pSdrView->SdrEndTextEdit();
// Then make sure that grab-bag is empty to avoid losing the new text.
xGroupProps->getPropertyValue("InteropGrabBag") >>= aGrabBag;
xGroupProps->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag;
// Without the accompanying fix in place, this test would have failed with:
// assertion failed
// - Expression: !aGrabBag.hasElements()
@@ -289,39 +289,39 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject)
assertXPath(pXmlDoc, "/primitive2D"_ostr, 1);
OString aBasePath("/primitive2D/sdrrectangle/group/polypolygoncolor"_ostr);
assertXPath(pXmlDoc, aBasePath, "color"_ostr, "#729fcf");
assertXPath(pXmlDoc, aBasePath, "color"_ostr, u"#729fcf"_ustr);
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "height"_ostr,
"99"); // weird Rectangle is created with size 100
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "width"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "minx"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "miny"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxx"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxy"_ostr, "99");
u"99"_ustr); // weird Rectangle is created with size 100
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "width"_ostr, u"99"_ustr);
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "minx"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "miny"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxx"_ostr, u"99"_ustr);
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxy"_ostr, u"99"_ustr);
aBasePath = "/primitive2D/sdrrectangle/group/polypolygoncolor/polypolygon/polygon"_ostr;
assertXPath(pXmlDoc, aBasePath + "/point", 5);
assertXPath(pXmlDoc, aBasePath + "/point[1]", "x"_ostr, "49.5"); // hmm, weird, why?
assertXPath(pXmlDoc, aBasePath + "/point[1]", "y"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/point[2]", "x"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/point[2]", "y"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/point[3]", "x"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/point[3]", "y"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/point[4]", "x"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/point[4]", "y"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/point[5]", "x"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/point[5]", "y"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/point[1]", "x"_ostr, u"49.5"_ustr); // hmm, weird, why?
assertXPath(pXmlDoc, aBasePath + "/point[1]", "y"_ostr, u"99"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[2]", "x"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[2]", "y"_ostr, u"99"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[3]", "x"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[3]", "y"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[4]", "x"_ostr, u"99"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[4]", "y"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[5]", "x"_ostr, u"99"_ustr);
assertXPath(pXmlDoc, aBasePath + "/point[5]", "y"_ostr, u"99"_ustr);
aBasePath = "/primitive2D/sdrrectangle/group/polygonstroke"_ostr;
assertXPath(pXmlDoc, aBasePath, 1);
assertXPath(pXmlDoc, aBasePath + "/line", "color"_ostr, "#3465a4");
assertXPath(pXmlDoc, aBasePath + "/line", "width"_ostr, "0");
assertXPath(pXmlDoc, aBasePath + "/line", "linejoin"_ostr, "Round");
assertXPath(pXmlDoc, aBasePath + "/line", "linecap"_ostr, "BUTT");
assertXPath(pXmlDoc, aBasePath + "/line", "color"_ostr, u"#3465a4"_ustr);
assertXPath(pXmlDoc, aBasePath + "/line", "width"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, aBasePath + "/line", "linejoin"_ostr, u"Round"_ustr);
assertXPath(pXmlDoc, aBasePath + "/line", "linecap"_ostr, u"BUTT"_ustr);
assertXPathContent(pXmlDoc, aBasePath + "/polygon", "49.5,99 0,99 0,0 99,0 99,99");
assertXPathContent(pXmlDoc, aBasePath + "/polygon", u"49.5,99 0,99 0,0 99,0 99,99"_ustr);
// If solid line, then there is no line stroke information
assertXPath(pXmlDoc, aBasePath + "/stroke", 0);
@@ -373,13 +373,13 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testFontWorks)
assertXPath(pXmlDoc, "/primitive2D"_ostr, 1);
assertXPath(pXmlDoc, "//scene"_ostr, "projectionMode"_ostr, "Perspective");
assertXPath(pXmlDoc, "//scene/extrude3D[1]/fill"_ostr, "color"_ostr, "#ff0000");
assertXPath(pXmlDoc, "//scene"_ostr, "projectionMode"_ostr, u"Perspective"_ustr);
assertXPath(pXmlDoc, "//scene/extrude3D[1]/fill"_ostr, "color"_ostr, u"#ff0000"_ustr);
assertXPath(pXmlDoc, "//scene/extrude3D[1]/object3Dattributes/material"_ostr, "color"_ostr,
"#ff0000");
u"#ff0000"_ustr);
// ODF default 50% is represented by Specular Intensity = 2^5. The relationship is not linear.
assertXPath(pXmlDoc, "//scene/extrude3D[1]/object3Dattributes/material"_ostr,
"specularIntensity"_ostr, "32");
"specularIntensity"_ostr, u"32"_ustr);
}
CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_EOLinCurvedText)
@@ -475,9 +475,9 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMetal)
// ODF specifies for metal = true specular color as rgb(200,200,200) and adding 15 to specularity
// Together with extrusion-first-light-level 67% and extrusion-specularity 80% factor is
// 0.67*0.8 * 200/255 = 0.42 and color #6b6b6b
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, "#6b6b6b");
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, u"#6b6b6b"_ustr);
// 3D specularIntensity = 2^(50/10) + 15 = 47, with default extrusion-shininess 50%
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, "47");
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, u"47"_ustr);
}
CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong)
@@ -489,8 +489,8 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong)
xmlDocUniquePtr pXmlDoc = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage);
// The rendering method and normals kind were always 'Flat' without the patch.
assertXPath(pXmlDoc, "//scene"_ostr, "shadeMode"_ostr, "Phong");
assertXPath(pXmlDoc, "//object3Dattributes"_ostr, "normalsKind"_ostr, "Specific");
assertXPath(pXmlDoc, "//scene"_ostr, "shadeMode"_ostr, u"Phong"_ustr);
assertXPath(pXmlDoc, "//object3Dattributes"_ostr, "normalsKind"_ostr, u"Specific"_ustr);
}
CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMattePPT)
@@ -507,14 +507,14 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMattePPT)
// to forth light, as only first light is specular. Because first and third lights are off, the
// forth light is the second one in the dump. The gray color corresponding to
// FirstLightLevel = 38000/2^16 is #949494.
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, "#000000");
assertXPath(pXmlDoc, "(//light)[2]"_ostr, "color"_ostr, "#949494");
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, u"#000000"_ustr);
assertXPath(pXmlDoc, "(//light)[2]"_ostr, "color"_ostr, u"#949494"_ustr);
// To make the second light soft, part of its intensity is moved to lights 5,6,7 and 8.
assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, "#1e1e1e");
assertXPath(pXmlDoc, "(//light)[3]"_ostr, "color"_ostr, "#3b3b3b");
assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, u"#1e1e1e"_ustr);
assertXPath(pXmlDoc, "(//light)[3]"_ostr, "color"_ostr, u"#3b3b3b"_ustr);
// The 3D property specularIntensity is not related to 'extrusion-specularity' but to
// 'extrusion-shininess'. specularIntensity = 2^(shininess/10), here default 32.
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, "32");
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, u"32"_ustr);
}
CPPUNIT_TEST_FIXTURE(SvdrawTest, testMaterialSpecular)
@@ -530,11 +530,11 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testMaterialSpecular)
// -level'. 3D specularIntensity is derived from property 'draw:extrusion-shininess'. Both are
// object properties, not scene properties. Those were wrong in various forms before the patch.
// Specularity = 77% * first-light-level 67% = 0.5159, which corresponds to gray color #848484.
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, "#848484");
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, u"#848484"_ustr);
// extrusion-shininess 50% corresponds to 3D specularIntensity 32, use 2^(50/10).
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, "32");
assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, u"32"_ustr);
// extrusion-first-light-level 67% corresponds to gray color #ababab, use 255 * 0.67.
assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, "#ababab");
assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, u"#ababab"_ustr);
// The first light is harsh, the second light soft. So the 3D scene should have 6 lights (1+1+4).
assertXPath(pXmlDoc, "//light"_ostr, 6);
}
@@ -572,7 +572,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testPageViewDrawLayerClip)
loadFromFile(u"page-view-draw-layer-clip.docx");
// When saving that document to PDF:
save("writer_pdf_Export");
save(u"writer_pdf_Export"_ustr);
// Then make sure that line shape gets clipped:
std::unique_ptr<vcl::pdf::PDFiumDocument> pDoc = parsePDFExport();
@@ -726,27 +726,35 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testClipVerticalTextOverflow)
// - In <>, XPath contents of child does not match
// i.e. the vertically overflowing text wasn't clipped & overflowing text
// was drawn anyways.
assertXPathContent(pDocument, "count((//sdrblocktext)[4]//textsimpleportion)"_ostr, "6");
assertXPathContent(pDocument, "count((//sdrblocktext)[4]//textsimpleportion)"_ostr, u"6"_ustr);
// make sure text is aligned correctly after the overflowing text is clipped
assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[1]"_ostr, "y"_ostr, "3749");
assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[6]"_ostr, "y"_ostr, "7559");
assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[1]"_ostr, "y"_ostr,
u"3749"_ustr);
assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[6]"_ostr, "y"_ostr,
u"7559"_ustr);
// make sure the text that isn't overflowing is still aligned properly
assertXPathContent(pDocument, "count((//sdrblocktext)[5]//textsimpleportion)"_ostr, "3");
assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[1]"_ostr, "y"_ostr, "5074");
assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[3]"_ostr, "y"_ostr, "6598");
assertXPathContent(pDocument, "count((//sdrblocktext)[5]//textsimpleportion)"_ostr, u"3"_ustr);
assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[1]"_ostr, "y"_ostr,
u"5074"_ustr);
assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[3]"_ostr, "y"_ostr,
u"6598"_ustr);
// Test vertically overflowing text, with vertical text direction
assertXPathContent(pDocument, "count((//sdrblocktext)[6]//textsimpleportion)"_ostr, "12");
assertXPathContent(pDocument, "count((//sdrblocktext)[6]//textsimpleportion)"_ostr, u"12"_ustr);
// make sure text is aligned correctly after the overflowing text is clipped
assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[1]"_ostr, "x"_ostr, "13093");
assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[12]"_ostr, "x"_ostr, "4711");
assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[1]"_ostr, "x"_ostr,
u"13093"_ustr);
assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[12]"_ostr, "x"_ostr,
u"4711"_ustr);
// make sure the text that isn't overflowing is still aligned properly
assertXPathContent(pDocument, "count((//sdrblocktext)[7]//textsimpleportion)"_ostr, "3");
assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[1]"_ostr, "x"_ostr, "25417");
assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[3]"_ostr, "x"_ostr, "23893");
assertXPathContent(pDocument, "count((//sdrblocktext)[7]//textsimpleportion)"_ostr, u"3"_ustr);
assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[1]"_ostr, "x"_ostr,
u"25417"_ustr);
assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[3]"_ostr, "x"_ostr,
u"23893"_ustr);
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ void SdrTextObjTest::AllFamiliesCanBeRestoredFromSavedString()
for (SfxStyleFamily family : allFamilies)
{
OUString styleName = "styleName";
OUString styleName = u"styleName"_ustr;
SdrTextObj::AppendFamilyToStyleName(styleName, family);
SfxStyleFamily readFamily = SdrTextObj::ReadFamilyFromStyleName(styleName);
CPPUNIT_ASSERT_EQUAL(static_cast<int>(family), static_cast<int>(readFamily));
+19 -19
View File
@@ -36,7 +36,7 @@ class Test : public UnoApiXmlTest
{
public:
Test()
: UnoApiXmlTest("svx/qa/unit/data/")
: UnoApiXmlTest(u"svx/qa/unit/data/"_ustr)
{
}
@@ -81,36 +81,36 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur)
//- Actual : 2
//- In <>, XPath contents of child does not match
// i.e. the shadow's transparency was miscalculated.
assertXPathContent(pDocument, "count(//objectinfo/unifiedtransparence)"_ostr, "0");
assertXPathContent(pDocument, "count(//objectinfo/unifiedtransparence)"_ostr, u"0"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "color"_ostr, "#ff0000");
assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "blur"_ostr, "141");
assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "color"_ostr, "#ff0000");
assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "blur"_ostr, "141");
assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "color"_ostr, "#ff0000");
assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "blur"_ostr, "141");
assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "color"_ostr, "#ff0000");
assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "blur"_ostr, "141");
assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "color"_ostr, "#ff0000");
assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "blur"_ostr, "141");
assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "color"_ostr, u"#ff0000"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "blur"_ostr, u"141"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "color"_ostr, u"#ff0000"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "blur"_ostr, u"141"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "color"_ostr, u"#ff0000"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "blur"_ostr, u"141"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "color"_ostr, u"#ff0000"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "blur"_ostr, u"141"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "color"_ostr, u"#ff0000"_ustr);
assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "blur"_ostr, u"141"_ustr);
assertXPath(pDocument, "//objectinfo/group/sdrCell[1]/unifiedtransparence"_ostr, 0);
assertXPath(pDocument, "//objectinfo/group/sdrCell[2]/unifiedtransparence"_ostr, 0);
assertXPath(pDocument, "//objectinfo/group/sdrCell[3]/group/unifiedtransparence"_ostr,
"transparence"_ostr, "80");
"transparence"_ostr, u"80"_ustr);
assertXPath(pDocument, "//objectinfo/group/sdrCell[4]/group/unifiedtransparence"_ostr,
"transparence"_ostr, "80");
"transparence"_ostr, u"80"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testSvxTableControllerSetAttrToSelectedShape)
{
// Given a document with a table shape, editing cell text:
mxComponent = loadFromDesktop("private:factory/simpress",
"com.sun.star.presentation.PresentationDocument");
mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
u"com.sun.star.presentation.PresentationDocument"_ustr);
uno::Sequence<beans::PropertyValue> aArgs
= { comphelper::makePropertyValue("Rows", sal_Int32(2)),
comphelper::makePropertyValue("Columns", sal_Int32(2)) };
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
= { comphelper::makePropertyValue(u"Rows"_ustr, sal_Int32(2)),
comphelper::makePropertyValue(u"Columns"_ustr, sal_Int32(2)) };
dispatchCommand(mxComponent, u".uno:InsertTable"_ustr, aArgs);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
+27 -26
View File
@@ -45,7 +45,7 @@ class UnodrawTest : public UnoApiXmlTest
{
public:
UnodrawTest()
: UnoApiXmlTest("svx/qa/unit/data/")
: UnoApiXmlTest(u"svx/qa/unit/data/"_ustr)
{
}
};
@@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testWriterGraphicExport)
uno::Sequence<beans::PropertyValue> aProperties(
comphelper::InitPropertySequence({ { "URL", uno::Any(maTempFile.GetURL()) },
{ "MediaType", uno::Any(OUString("image/jpeg")) } }));
{ "MediaType", uno::Any(u"image/jpeg"_ustr) } }));
CPPUNIT_ASSERT(xExportFilter->filter(aProperties));
}
@@ -86,7 +86,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998)
uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory();
uno::Reference<awt::XControlModel> xModel(
xFactory->createInstance("com.sun.star.awt.UnoControlDialogModel"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.awt.UnoControlDialogModel"_ustr), uno::UNO_QUERY);
CPPUNIT_ASSERT(xModel.is());
uno::Reference<beans::XPropertySet> xModelProps(xModel, uno::UNO_QUERY);
@@ -94,20 +94,20 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998)
// This resulted in a uno::RuntimeException, assigning a shape to a dialog model's image was
// broken.
xModelProps->setPropertyValue("ImageURL", xShape->getPropertyValue("GraphicURL"));
xModelProps->setPropertyValue(u"ImageURL"_ustr, xShape->getPropertyValue(u"GraphicURL"_ustr));
uno::Reference<graphic::XGraphic> xGraphic;
xModelProps->getPropertyValue("Graphic") >>= xGraphic;
xModelProps->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT(xGraphic.is());
}
CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
{
// Create an Impress document an insert a table shape.
mxComponent = loadFromDesktop("private:factory/simpress",
"com.sun.star.presentation.PresentationDocument");
mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
u"com.sun.star.presentation.PresentationDocument"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance("com.sun.star.drawing.TableShape"), uno::UNO_QUERY);
xFactory->createInstance(u"com.sun.star.drawing.TableShape"_ustr), uno::UNO_QUERY);
xShape->setPosition(awt::Point(1000, 1000));
xShape->setSize(awt::Size(10000, 10000));
uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
@@ -119,17 +119,17 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
// Without the accompanying fix in place, this test would have failed with throwing a
// beans.UnknownPropertyException, as shadow-as-direct-formatting on tables were not possible.
xShapeProps->setPropertyValue("Shadow", uno::Any(true));
xShapeProps->setPropertyValue(u"Shadow"_ustr, uno::Any(true));
Color nRed = COL_LIGHTRED;
xShapeProps->setPropertyValue("ShadowColor", uno::Any(nRed));
CPPUNIT_ASSERT(xShapeProps->getPropertyValue("ShadowColor") >>= nRed);
xShapeProps->setPropertyValue(u"ShadowColor"_ustr, uno::Any(nRed));
CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"ShadowColor"_ustr) >>= nRed);
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nRed);
// Add text.
uno::Reference<table::XCellRange> xTable(xShapeProps->getPropertyValue("Model"),
uno::Reference<table::XCellRange> xTable(xShapeProps->getPropertyValue(u"Model"_ustr),
uno::UNO_QUERY);
uno::Reference<text::XTextRange> xCell(xTable->getCellByPosition(0, 0), uno::UNO_QUERY);
xCell->setString("A1");
xCell->setString(u"A1"_ustr);
// Generates drawinglayer primitives for the shape.
auto pDrawPage = dynamic_cast<SvxDrawPage*>(xDrawPage.get());
@@ -160,22 +160,23 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets)
{
// Create a title shape with 2 paragraphs in it.
mxComponent = loadFromDesktop("private:factory/simpress",
"com.sun.star.presentation.PresentationDocument");
mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
u"com.sun.star.presentation.PresentationDocument"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPages> xDrawPages = xSupplier->getDrawPages();
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPages->getByIndex(0), uno::UNO_QUERY);
// A default document contains a title shape and a text shape on the first slide.
uno::Reference<drawing::XShape> xTitleShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<lang::XServiceInfo> xTitleShapeInfo(xTitleShape, uno::UNO_QUERY);
CPPUNIT_ASSERT(xTitleShapeInfo->supportsService("com.sun.star.presentation.TitleTextShape"));
CPPUNIT_ASSERT(
xTitleShapeInfo->supportsService(u"com.sun.star.presentation.TitleTextShape"_ustr));
uno::Reference<text::XTextRange> xTitleShapeText(xTitleShape, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTitleShapeText->getText();
uno::Reference<text::XTextRange> xCursor = xText->createTextCursor();
xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
xText->insertString(xCursor, u"foo"_ustr, /*bAbsorb=*/false);
xText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH,
/*bAbsorb=*/false);
xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
xText->insertString(xCursor, u"bar"_ustr, /*bAbsorb=*/false);
// Check that the title shape has 2 paragraphs.
uno::Reference<container::XEnumerationAccess> xTextEA(xText, uno::UNO_QUERY);
@@ -192,20 +193,20 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets)
CPPUNIT_TEST_FIXTURE(UnodrawTest, testPngExport)
{
// Given an empty Impress document:
mxComponent = loadFromDesktop("private:factory/simpress",
"com.sun.star.presentation.PresentationDocument");
mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
u"com.sun.star.presentation.PresentationDocument"_ustr);
// When exporting that document to PNG with a JSON size:
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW);
SvMemoryStream aStream;
uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("impress_png_Export");
aMediaDescriptor["FilterOptions"]
<<= OUString("{\"PixelHeight\":{\"type\":\"long\",\"value\":\"192\"},"
"\"PixelWidth\":{\"type\":\"long\",\"value\":\"192\"}}");
aMediaDescriptor["OutputStream"] <<= xOut;
xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_png_Export"_ustr;
aMediaDescriptor[u"FilterOptions"_ustr]
<<= u"{\"PixelHeight\":{\"type\":\"long\",\"value\":\"192\"},"
"\"PixelWidth\":{\"type\":\"long\",\"value\":\"192\"}}"_ustr;
aMediaDescriptor[u"OutputStream"_ustr] <<= xOut;
xStorable->storeToURL(u"private:stream"_ustr, aMediaDescriptor.getAsConstPropertyValueList());
// Then make sure that the size request is handled:
aStream.Seek(STREAM_SEEK_TO_BEGIN);
+2 -2
View File
@@ -25,7 +25,7 @@ class Test : public UnoApiTest
{
public:
Test()
: UnoApiTest("svx/qa/unit/data/")
: UnoApiTest(u"svx/qa/unit/data/"_ustr)
{
}
};
@@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, test3DObjectFallback)
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<graphic::XGraphic> xGraphic;
xShape->getPropertyValue("Graphic") >>= xGraphic;
xShape->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
// Without the accompanying fix in place, this test would have failed, we could not read
// Models/Fallbacks/duck.png, as we assumed a format like Pictures/something.png, i.e. a single
// slash in the path.
+7 -7
View File
@@ -27,7 +27,7 @@ class XOutdevTest : public UnoApiTest
{
public:
XOutdevTest()
: UnoApiTest("svx/qa/unit/data/")
: UnoApiTest(u"svx/qa/unit/data/"_ustr)
{
}
};
@@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testPdfGraphicExport)
XOutFlags const eFlags = XOutFlags::DontExpandFilename | XOutFlags::DontAddExtension
| XOutFlags::UseNativeIfPossible;
OUString aTempURL = maTempFile.GetURL();
XOutBitmap::WriteGraphic(aGraphic, aTempURL, "pdf", eFlags);
XOutBitmap::WriteGraphic(aGraphic, aTempURL, u"pdf"_ustr, eFlags);
// Assert that the output looks like a PDF.
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
@@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testTdf60684)
XOutFlags const eFlags = XOutFlags::DontExpandFilename | XOutFlags::DontAddExtension
| XOutFlags::UseNativeIfPossible;
OUString aTempURL = maTempFile.GetURL();
XOutBitmap::WriteGraphic(aGraphic, aTempURL, "png", eFlags);
XOutBitmap::WriteGraphic(aGraphic, aTempURL, u"png"_ustr, eFlags);
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
CPPUNIT_ASSERT(pStream->TellEnd() > 4);
@@ -93,8 +93,8 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testTdf60684)
CPPUNIT_TEST_FIXTURE(XOutdevTest, testFillColorThemeUnoApi)
{
// Given an empty Impress document with a (title) shape:
mxComponent = loadFromDesktop("private:factory/simpress",
"com.sun.star.presentation.PresentationDocument");
mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
u"com.sun.star.presentation.PresentationDocument"_ustr);
// When setting the theme index of the shape's fill color:
uno::Reference<drawing::XDrawPagesSupplier> xPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -107,14 +107,14 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testFillColorThemeUnoApi)
aComplexColor.setThemeColor(model::ThemeColorType::Accent1);
aComplexColor.addTransformation({ model::TransformationType::LumMod, 2000 });
aComplexColor.addTransformation({ model::TransformationType::LumOff, 8000 });
xShape->setPropertyValue("FillComplexColor",
xShape->setPropertyValue(u"FillComplexColor"_ustr,
uno::Any(model::color::createXComplexColor(aComplexColor)));
}
// Then make sure the value we read back is the expected one:
{
uno::Reference<util::XComplexColor> xComplexColor;
CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= xComplexColor);
CPPUNIT_ASSERT(xShape->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
@@ -282,7 +282,7 @@ void SAL_CALL AccessibleControlShape::grabFocus()
OUString SAL_CALL AccessibleControlShape::getImplementationName()
{
return "com.sun.star.comp.accessibility.AccessibleControlShape";
return u"com.sun.star.comp.accessibility.AccessibleControlShape"_ustr;
}
OUString AccessibleControlShape::CreateAccessibleBaseName()
@@ -318,8 +318,8 @@ OUString
if ( sDesc.isEmpty() )
{ // no -> use the default
aDG.Initialize (STR_ObjNameSingulUno);
aDG.AddProperty ("ControlBackground", DescriptionGenerator::PropertyType::Color);
aDG.AddProperty ( "ControlBorder", DescriptionGenerator::PropertyType::Integer);
aDG.AddProperty (u"ControlBackground"_ustr, DescriptionGenerator::PropertyType::Color);
aDG.AddProperty ( u"ControlBorder"_ustr, DescriptionGenerator::PropertyType::Integer);
}
// ensure that we are listening to the Name property
m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, true, DESC_PROPERTY_NAME );
@@ -96,7 +96,7 @@ void SAL_CALL
OUString SAL_CALL
AccessibleGraphicShape::getImplementationName()
{
return "AccessibleGraphicShape";
return u"AccessibleGraphicShape"_ustr;
}
@@ -104,7 +104,7 @@ css::uno::Sequence< OUString> SAL_CALL
AccessibleGraphicShape::getSupportedServiceNames()
{
ThrowIfDisposed ();
const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleGraphicShape" };
const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleGraphicShape"_ustr };
return comphelper::concatSequences(AccessibleShape::getSupportedServiceNames(), vals);
}
@@ -103,7 +103,7 @@ void SAL_CALL
OUString SAL_CALL
AccessibleOLEShape::getImplementationName()
{
return "AccessibleOLEShape";
return u"AccessibleOLEShape"_ustr;
}
@@ -111,7 +111,7 @@ css::uno::Sequence< OUString> SAL_CALL
AccessibleOLEShape::getSupportedServiceNames()
{
ThrowIfDisposed();
const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleOLEShape" };
const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleOLEShape"_ustr };
return comphelper::concatSequences(AccessibleShape::getSupportedServiceNames(), vals);
}
+11 -11
View File
@@ -190,7 +190,7 @@ void AccessibleShape::UpdateStates()
try
{
drawing::FillStyle aFillStyle;
bShapeIsOpaque = ( xSet->getPropertyValue ("FillStyle") >>= aFillStyle)
bShapeIsOpaque = ( xSet->getPropertyValue (u"FillStyle"_ustr) >>= aFillStyle)
&& aFillStyle == drawing::FillStyle_SOLID;
}
catch (css::beans::UnknownPropertyException&)
@@ -290,7 +290,7 @@ OUString SAL_CALL AccessibleShape::getAccessibleDescription()
if( m_pShape && !m_pShape->GetDescription().isEmpty())
return m_pShape->GetDescription() ;
else
return " ";
return u" "_ustr;
}
// XAccessibleContext
@@ -533,7 +533,7 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds()
// Transform coordinates from internal to pixel.
if (maShapeTreeInfo.GetViewForwarder() == nullptr)
throw uno::RuntimeException (
"AccessibleShape has no valid view forwarder",
u"AccessibleShape has no valid view forwarder"_ustr,
getXWeak());
::Size aPixelSize = maShapeTreeInfo.GetViewForwarder()->LogicToPixel (
::Size (aBoundingBox.Width, aBoundingBox.Height));
@@ -624,7 +624,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground()
if (aSet.is())
{
uno::Any aColor;
aColor = aSet->getPropertyValue ("LineColor");
aColor = aSet->getPropertyValue (u"LineColor"_ustr);
aColor >>= nColor;
}
}
@@ -647,9 +647,9 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground()
if (aSet.is())
{
uno::Any aColor;
aColor = aSet->getPropertyValue ("FillColor");
aColor = aSet->getPropertyValue (u"FillColor"_ustr);
aColor >>= nColor;
aColor = aSet->getPropertyValue ("FillTransparence");
aColor = aSet->getPropertyValue (u"FillTransparence"_ustr);
short nTrans=0;
aColor >>= nTrans;
Color crBk(nColor);
@@ -832,7 +832,7 @@ uno::Any SAL_CALL AccessibleShape::getExtendedAttributes()
OUString SAL_CALL
AccessibleShape::getImplementationName()
{
return "AccessibleShape";
return u"AccessibleShape"_ustr;
}
@@ -840,7 +840,7 @@ uno::Sequence<OUString> SAL_CALL
AccessibleShape::getSupportedServiceNames()
{
ThrowIfDisposed ();
const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleShape" };
const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleShape"_ustr };
return comphelper::concatSequences(AccessibleContextBase::getSupportedServiceNames(), vals);
}
@@ -1043,20 +1043,20 @@ void AccessibleShape::UpdateNameAndDescription()
Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY_THROW);
// Get the accessible name.
OUString sString = GetOptionalProperty(xSet, "Title");
OUString sString = GetOptionalProperty(xSet, u"Title"_ustr);
if (!sString.isEmpty())
{
SetAccessibleName(sString, AccessibleContextBase::FromShape);
}
else
{
sString = GetOptionalProperty(xSet, "Name");
sString = GetOptionalProperty(xSet, u"Name"_ustr);
if (!sString.isEmpty())
SetAccessibleName(sString, AccessibleContextBase::FromShape);
}
// Get the accessible description.
sString = GetOptionalProperty(xSet, "Description");
sString = GetOptionalProperty(xSet, u"Description"_ustr);
if (!sString.isEmpty())
SetAccessibleDescription(sString, AccessibleContextBase::FromShape);
}
@@ -258,15 +258,15 @@ namespace accessibility
SvxTextForwarder& AccessibleTextHelper_Impl::GetTextForwarder() const
{
if( !maEditSource.IsValid() )
throw uno::RuntimeException("Unknown edit source", mxFrontEnd);
throw uno::RuntimeException(u"Unknown edit source"_ustr, mxFrontEnd);
SvxTextForwarder* pTextForwarder = maEditSource.GetTextForwarder();
if( !pTextForwarder )
throw uno::RuntimeException("Unable to fetch text forwarder, model might be dead", mxFrontEnd);
throw uno::RuntimeException(u"Unable to fetch text forwarder, model might be dead"_ustr, mxFrontEnd);
if( !pTextForwarder->IsValid() )
throw uno::RuntimeException("Text forwarder is invalid, model might be dead", mxFrontEnd);
throw uno::RuntimeException(u"Text forwarder is invalid, model might be dead"_ustr, mxFrontEnd);
return *pTextForwarder;
}
@@ -274,15 +274,15 @@ namespace accessibility
SvxViewForwarder& AccessibleTextHelper_Impl::GetViewForwarder() const
{
if( !maEditSource.IsValid() )
throw uno::RuntimeException("Unknown edit source", mxFrontEnd);
throw uno::RuntimeException(u"Unknown edit source"_ustr, mxFrontEnd);
SvxViewForwarder* pViewForwarder = maEditSource.GetViewForwarder();
if( !pViewForwarder )
throw uno::RuntimeException("Unable to fetch view forwarder, model might be dead", mxFrontEnd);
throw uno::RuntimeException(u"Unable to fetch view forwarder, model might be dead"_ustr, mxFrontEnd);
if( !pViewForwarder->IsValid() )
throw uno::RuntimeException("View forwarder is invalid, model might be dead", mxFrontEnd);
throw uno::RuntimeException(u"View forwarder is invalid, model might be dead"_ustr, mxFrontEnd);
return *pViewForwarder;
}
@@ -290,18 +290,18 @@ namespace accessibility
SvxEditViewForwarder& AccessibleTextHelper_Impl::GetEditViewForwarder() const
{
if( !maEditSource.IsValid() )
throw uno::RuntimeException("Unknown edit source", mxFrontEnd);
throw uno::RuntimeException(u"Unknown edit source"_ustr, mxFrontEnd);
SvxEditViewForwarder* pViewForwarder = maEditSource.GetEditViewForwarder();
if( !pViewForwarder )
{
throw uno::RuntimeException("No edit view forwarder, object not in edit mode", mxFrontEnd);
throw uno::RuntimeException(u"No edit view forwarder, object not in edit mode"_ustr, mxFrontEnd);
}
if( !pViewForwarder->IsValid() )
{
throw uno::RuntimeException("View forwarder is invalid, object not in edit mode", mxFrontEnd);
throw uno::RuntimeException(u"View forwarder is invalid, object not in edit mode"_ustr, mxFrontEnd);
}
return *pViewForwarder;
@@ -310,7 +310,7 @@ namespace accessibility
SvxEditSourceAdapter& AccessibleTextHelper_Impl::GetEditSource() const
{
if( !maEditSource.IsValid() )
throw uno::RuntimeException("AccessibleTextHelper_Impl::GetEditSource: no edit source", mxFrontEnd );
throw uno::RuntimeException(u"AccessibleTextHelper_Impl::GetEditSource: no edit source"_ustr, mxFrontEnd );
return maEditSource;
}
@@ -1435,7 +1435,7 @@ namespace accessibility
if( 0 > i || i >= getAccessibleChildCount() ||
GetTextForwarder().GetParagraphCount() <= i )
{
throw lang::IndexOutOfBoundsException("Invalid child index", mxFrontEnd);
throw lang::IndexOutOfBoundsException(u"Invalid child index"_ustr, mxFrontEnd);
}
DBG_ASSERT(mxFrontEnd.is(), "AccessibleTextHelper_Impl::UpdateVisibleChildren: no frontend set");
@@ -1474,12 +1474,12 @@ namespace accessibility
{
// make given position relative
if( !mxFrontEnd.is() )
throw uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid", mxFrontEnd );
throw uno::RuntimeException(u"AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid"_ustr, mxFrontEnd );
uno::Reference< XAccessibleContext > xFrontEndContext = mxFrontEnd->getAccessibleContext();
if( !xFrontEndContext.is() )
throw uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid", mxFrontEnd );
throw uno::RuntimeException(u"AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid"_ustr, mxFrontEnd );
uno::Reference< XAccessibleComponent > xFrontEndComponent( xFrontEndContext, uno::UNO_QUERY_THROW );
@@ -79,7 +79,7 @@ void DescriptionGenerator::Initialize(std::u16string_view sPrefix)
{
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue("Style");
uno::Any aValue = mxSet->getPropertyValue(u"Style"_ustr);
uno::Reference<container::XNamed> xStyle(aValue, uno::UNO_QUERY);
if (xStyle.is())
msDescription.append(xStyle->getName());
@@ -487,7 +487,7 @@ sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getBackground()
// XServiceInfo
OUString SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationName()
{
return "com.sun.star.comp.ui.SvxGraphCtrlAccessibleContext";
return u"com.sun.star.comp.ui.SvxGraphCtrlAccessibleContext"_ustr;
}
sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString& sServiceName )
@@ -497,9 +497,9 @@ sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString
Sequence< OUString > SAL_CALL SvxGraphCtrlAccessibleContext::getSupportedServiceNames()
{
return { "com.sun.star.accessibility.Accessible",
"com.sun.star.accessibility.AccessibleContext",
"com.sun.star.drawing.AccessibleGraphControl" };
return { u"com.sun.star.accessibility.Accessible"_ustr,
u"com.sun.star.accessibility.AccessibleContext"_ustr,
u"com.sun.star.drawing.AccessibleGraphControl"_ustr };
}
// XTypeProvider
@@ -511,7 +511,7 @@ Sequence<sal_Int8> SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationId()
// XServiceName
OUString SvxGraphCtrlAccessibleContext::getServiceName()
{
return "com.sun.star.accessibility.AccessibleContext";
return u"com.sun.star.accessibility.AccessibleContext"_ustr;
}
// XAccessibleSelection
+31 -31
View File
@@ -91,67 +91,67 @@ void RegisterDrawShapeTypes()
<type>SvxShapeTypes</type> enum.
*/
static ShapeTypeDescriptor const aSvxShapeTypeList[] = {
ShapeTypeDescriptor ( DRAWING_TEXT, "com.sun.star.drawing.TextShape",
ShapeTypeDescriptor ( DRAWING_TEXT, u"com.sun.star.drawing.TextShape"_ustr,
CreateSvxAccessibleShape),
ShapeTypeDescriptor (DRAWING_RECTANGLE, "com.sun.star.drawing.RectangleShape",
ShapeTypeDescriptor (DRAWING_RECTANGLE, u"com.sun.star.drawing.RectangleShape"_ustr,
CreateSvxAccessibleShape),
ShapeTypeDescriptor ( DRAWING_ELLIPSE, "com.sun.star.drawing.EllipseShape",
ShapeTypeDescriptor ( DRAWING_ELLIPSE, u"com.sun.star.drawing.EllipseShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_CONTROL, "com.sun.star.drawing.ControlShape",
ShapeTypeDescriptor ( DRAWING_CONTROL, u"com.sun.star.drawing.ControlShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_CONNECTOR, "com.sun.star.drawing.ConnectorShape",
ShapeTypeDescriptor ( DRAWING_CONNECTOR, u"com.sun.star.drawing.ConnectorShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_MEASURE, "com.sun.star.drawing.MeasureShape",
ShapeTypeDescriptor ( DRAWING_MEASURE, u"com.sun.star.drawing.MeasureShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_LINE, "com.sun.star.drawing.LineShape",
ShapeTypeDescriptor ( DRAWING_LINE, u"com.sun.star.drawing.LineShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_POLY_POLYGON, "com.sun.star.drawing.PolyPolygonShape",
ShapeTypeDescriptor ( DRAWING_POLY_POLYGON, u"com.sun.star.drawing.PolyPolygonShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_POLY_LINE, "com.sun.star.drawing.PolyLineShape",
ShapeTypeDescriptor ( DRAWING_POLY_LINE, u"com.sun.star.drawing.PolyLineShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_OPEN_BEZIER, "com.sun.star.drawing.OpenBezierShape",
ShapeTypeDescriptor ( DRAWING_OPEN_BEZIER, u"com.sun.star.drawing.OpenBezierShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_CLOSED_BEZIER, "com.sun.star.drawing.ClosedBezierShape",
ShapeTypeDescriptor ( DRAWING_CLOSED_BEZIER, u"com.sun.star.drawing.ClosedBezierShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_OPEN_FREEHAND, "com.sun.star.drawing.OpenFreeHandShape",
ShapeTypeDescriptor ( DRAWING_OPEN_FREEHAND, u"com.sun.star.drawing.OpenFreeHandShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_CLOSED_FREEHAND, "com.sun.star.drawing.ClosedFreeHandShape",
ShapeTypeDescriptor ( DRAWING_CLOSED_FREEHAND, u"com.sun.star.drawing.ClosedFreeHandShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_POLY_POLYGON_PATH, "com.sun.star.drawing.PolyPolygonPathShape",
ShapeTypeDescriptor ( DRAWING_POLY_POLYGON_PATH, u"com.sun.star.drawing.PolyPolygonPathShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_POLY_LINE_PATH, "com.sun.star.drawing.PolyLinePathShape",
ShapeTypeDescriptor ( DRAWING_POLY_LINE_PATH, u"com.sun.star.drawing.PolyLinePathShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_GRAPHIC_OBJECT, "com.sun.star.drawing.GraphicObjectShape",
ShapeTypeDescriptor ( DRAWING_GRAPHIC_OBJECT, u"com.sun.star.drawing.GraphicObjectShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_GROUP, "com.sun.star.drawing.GroupShape",
ShapeTypeDescriptor ( DRAWING_GROUP, u"com.sun.star.drawing.GroupShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_OLE, "com.sun.star.drawing.OLE2Shape",
ShapeTypeDescriptor ( DRAWING_OLE, u"com.sun.star.drawing.OLE2Shape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_PAGE, "com.sun.star.drawing.PageShape",
ShapeTypeDescriptor ( DRAWING_PAGE, u"com.sun.star.drawing.PageShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_CAPTION, "com.sun.star.drawing.CaptionShape",
ShapeTypeDescriptor ( DRAWING_CAPTION, u"com.sun.star.drawing.CaptionShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_FRAME, "com.sun.star.drawing.FrameShape",
ShapeTypeDescriptor ( DRAWING_FRAME, u"com.sun.star.drawing.FrameShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_PLUGIN, "com.sun.star.drawing.PluginShape",
ShapeTypeDescriptor ( DRAWING_PLUGIN, u"com.sun.star.drawing.PluginShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_APPLET, "com.sun.star.drawing.AppletShape",
ShapeTypeDescriptor ( DRAWING_APPLET, u"com.sun.star.drawing.AppletShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_3D_SCENE, "com.sun.star.drawing.Shape3DSceneObject",
ShapeTypeDescriptor ( DRAWING_3D_SCENE, u"com.sun.star.drawing.Shape3DSceneObject"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_3D_CUBE, "com.sun.star.drawing.Shape3DCubeObject",
ShapeTypeDescriptor ( DRAWING_3D_CUBE, u"com.sun.star.drawing.Shape3DCubeObject"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_3D_SPHERE, "com.sun.star.drawing.Shape3DSphereObject",
ShapeTypeDescriptor ( DRAWING_3D_SPHERE, u"com.sun.star.drawing.Shape3DSphereObject"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_3D_LATHE, "com.sun.star.drawing.Shape3DLatheObject",
ShapeTypeDescriptor ( DRAWING_3D_LATHE, u"com.sun.star.drawing.Shape3DLatheObject"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_3D_EXTRUDE, "com.sun.star.drawing.Shape3DExtrudeObject",
ShapeTypeDescriptor ( DRAWING_3D_EXTRUDE, u"com.sun.star.drawing.Shape3DExtrudeObject"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_CUSTOM, "com.sun.star.drawing.CustomShape",
ShapeTypeDescriptor ( DRAWING_CUSTOM, u"com.sun.star.drawing.CustomShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_TABLE, "com.sun.star.drawing.TableShape",
ShapeTypeDescriptor ( DRAWING_TABLE, u"com.sun.star.drawing.TableShape"_ustr,
CreateSvxAccessibleShape ),
ShapeTypeDescriptor ( DRAWING_MEDIA, "com.sun.star.drawing.MediaShape",
ShapeTypeDescriptor ( DRAWING_MEDIA, u"com.sun.star.drawing.MediaShape"_ustr,
CreateSvxAccessibleShape ),
};
+1 -1
View File
@@ -519,7 +519,7 @@ sal_Bool SvxShowCharSetItemAcc::doAccessibleAction ( sal_Int32 nIndex )
OUString SvxShowCharSetItemAcc::getAccessibleActionDescription ( sal_Int32 nIndex )
{
if( nIndex == 0 )
return "press";
return u"press"_ustr;
throw IndexOutOfBoundsException();
}
@@ -86,13 +86,13 @@ OUString SvxPixelCtlAccessible::getAccessibleDescription( )
{
::osl::MutexGuard aGuard( m_aMutex );
return mpPixelCtl ? mpPixelCtl->GetAccessibleDescription() : "";
return mpPixelCtl ? mpPixelCtl->GetAccessibleDescription() : u""_ustr;
}
OUString SvxPixelCtlAccessible::getAccessibleName( )
{
::osl::MutexGuard aGuard( m_aMutex );
return mpPixelCtl ? mpPixelCtl->GetAccessibleName() : "";
return mpPixelCtl ? mpPixelCtl->GetAccessibleName() : u""_ustr;
}
Reference< XAccessibleRelationSet > SAL_CALL SvxPixelCtlAccessible::getAccessibleRelationSet()
@@ -578,7 +578,7 @@ OUString SvxRectCtlChildAccessibleContext::getAccessibleActionDescription ( sal_
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
return "select";
return u"select"_ustr;
}
+9 -9
View File
@@ -145,7 +145,7 @@ bool lcl_ExecuteFilterDialog(const uno::Sequence<beans::PropertyValue>& rPropsFo
try
{
uno::Reference<ui::dialogs::XExecutableDialog> xFilterDialog(
comphelper::getProcessServiceFactory()->createInstance( "com.sun.star.svtools.SvFilterOptionsDialog" ), uno::UNO_QUERY);
comphelper::getProcessServiceFactory()->createInstance( u"com.sun.star.svtools.SvFilterOptionsDialog"_ustr ), uno::UNO_QUERY);
uno::Reference<beans::XPropertyAccess> xFilterProperties( xFilterDialog, uno::UNO_QUERY);
if( xFilterDialog.is() && xFilterProperties.is() )
@@ -280,8 +280,8 @@ OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGra
uno::Sequence<beans::PropertyValue> aPropsForDialog
{
comphelper::makePropertyValue("Graphic", xGraphic),
comphelper::makePropertyValue("FilterName", aExportFilter)
comphelper::makePropertyValue(u"Graphic"_ustr, xGraphic),
comphelper::makePropertyValue(u"FilterName"_ustr, aExportFilter)
};
uno::Sequence<beans::PropertyValue> aFilterData;
@@ -353,21 +353,21 @@ void GraphicHelper::SaveShapeAsGraphicToPath(
{
uno::Reference<lang::XMultiServiceFactory> xMSF(xContext->getServiceManager(), uno::UNO_QUERY);
uno::Reference<document::XExporter> xExporter(
xMSF->createInstance("com.sun.star.comp.PDF.PDFFilter"), uno::UNO_QUERY);
xMSF->createInstance(u"com.sun.star.comp.PDF.PDFFilter"_ustr), uno::UNO_QUERY);
xExporter->setSourceDocument(xComponent);
uno::Reference<drawing::XShapes> xShapes
= drawing::ShapeCollection::create(comphelper::getProcessComponentContext());
xShapes->add(xShape);
uno::Sequence<beans::PropertyValue> aFilterData{
comphelper::makePropertyValue("Selection", xShapes),
comphelper::makePropertyValue(u"Selection"_ustr, xShapes),
};
SvFileStream aStream(sPath, StreamMode::READWRITE | StreamMode::TRUNC);
uno::Reference<io::XOutputStream> xStream(new utl::OStreamWrapper(aStream));
uno::Sequence<beans::PropertyValue> aDescriptor
{
comphelper::makePropertyValue("FilterData", aFilterData),
comphelper::makePropertyValue("OutputStream", xStream)
comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData),
comphelper::makePropertyValue(u"OutputStream"_ustr, xStream)
};
uno::Reference<document::XFilter> xFilter(xExporter, uno::UNO_QUERY);
xFilter->filter(aDescriptor);
@@ -376,9 +376,9 @@ void GraphicHelper::SaveShapeAsGraphicToPath(
{
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter = drawing::GraphicExportFilter::create(xContext);
uno::Sequence<beans::PropertyValue> aDescriptor{ comphelper::makePropertyValue("MediaType",
uno::Sequence<beans::PropertyValue> aDescriptor{ comphelper::makePropertyValue(u"MediaType"_ustr,
aExportMimeType),
comphelper::makePropertyValue("URL", sPath) };
comphelper::makePropertyValue(u"URL"_ustr, sPath) };
uno::Reference<lang::XComponent> xSourceDocument(xShape, uno::UNO_QUERY_THROW);
xGraphicExporter->setSourceDocument(xSourceDocument);
@@ -1506,9 +1506,9 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex
// For ooxml-foo shapes, the way to calculate the adjustment value from the handle position depends on
// the type of the shape, therefore need 'Type'.
OUString sShapeType("non-primitive"); // default for ODF
OUString sShapeType(u"non-primitive"_ustr); // default for ODF
const SdrCustomShapeGeometryItem& rGeometryItem(mrSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
const Any* pAny = rGeometryItem.GetPropertyValueByName("Type");
const Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr);
if (pAny)
*pAny >>= sShapeType;
@@ -2174,7 +2174,7 @@ void EnhancedCustomShape2d::CreateSubPath(
// Some shapes will need special handling, decide on property 'Type'.
OUString sShpType;
SdrCustomShapeGeometryItem& rGeometryItem = const_cast<SdrCustomShapeGeometryItem&>(mrSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
Any* pAny = rGeometryItem.GetPropertyValueByName("Type");
Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr);
if (pAny)
*pAny >>= sShpType;
// User defined shapes in MS binary format, which contain command U or T after import
@@ -2183,8 +2183,8 @@ void EnhancedCustomShape2d::CreateSubPath(
// The only own or imported preset shapes with U command are those listed below.
// Command T is not used in preset shapes.
const std::unordered_set<OUString> aPresetShapesWithU =
{ "ellipse", "ring", "smiley", "sun", "forbidden", "flowchart-connector",
"flowchart-summing-junction", "flowchart-or", "cloud-callout"};
{ u"ellipse"_ustr, u"ring"_ustr, u"smiley"_ustr, u"sun"_ustr, u"forbidden"_ustr, u"flowchart-connector"_ustr,
u"flowchart-summing-junction"_ustr, u"flowchart-or"_ustr, u"cloud-callout"_ustr};
std::unordered_set<OUString>::const_iterator aIter = aPresetShapesWithU.find(sShpType);
const bool bIsPresetShapeWithU(aIter != aPresetShapesWithU.end());
@@ -2805,7 +2805,7 @@ void EnhancedCustomShape2d::AdaptObjColor(
rCustomShapeSet.Get( XATTR_FILLCOLOR ).GetColorValue(),
std::min(nColorIndex, nColorCount-1),
dBrightness );
rObj.SetMergedItem( XFillColorItem( "", aFillColor ) );
rObj.SetMergedItem( XFillColorItem( u""_ustr, aFillColor ) );
}
break;
}
@@ -2828,7 +2828,7 @@ void EnhancedCustomShape2d::AdaptObjColor(
aBGradient.SetColorStops(aColorStops);
}
rObj.SetMergedItem( XFillGradientItem( "", aBGradient ) );
rObj.SetMergedItem( XFillGradientItem( u""_ustr, aBGradient ) );
break;
}
case drawing::FillStyle_HATCH:
@@ -2844,7 +2844,7 @@ void EnhancedCustomShape2d::AdaptObjColor(
dBrightness ));
}
rObj.SetMergedItem( XFillHatchItem( "", aXHatch ) );
rObj.SetMergedItem( XFillHatchItem( u""_ustr, aXHatch ) );
break;
}
case drawing::FillStyle_BITMAP:
@@ -68,7 +68,7 @@ namespace {
void GetOrigin( const SdrCustomShapeGeometryItem& rItem, double& rOriginX, double& rOriginY )
{
css::drawing::EnhancedCustomShapeParameterPair aOriginParaPair;
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "Origin" );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"Origin"_ustr );
if ( ! ( pAny && ( *pAny >>= aOriginParaPair ) && ( aOriginParaPair.First.Value >>= rOriginX ) && ( aOriginParaPair.Second.Value >>= rOriginY ) ) )
{
rOriginX = 0.50;
@@ -79,7 +79,7 @@ void GetOrigin( const SdrCustomShapeGeometryItem& rItem, double& rOriginX, doubl
void GetRotateAngle( const SdrCustomShapeGeometryItem& rItem, double& rAngleX, double& rAngleY )
{
css::drawing::EnhancedCustomShapeParameterPair aRotateAngleParaPair;
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "RotateAngle" );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"RotateAngle"_ustr );
if ( ! ( pAny && ( *pAny >>= aRotateAngleParaPair ) && ( aRotateAngleParaPair.First.Value >>= rAngleX ) && ( aRotateAngleParaPair.Second.Value >>= rAngleY ) ) )
{
rAngleX = 0.0;
@@ -92,7 +92,7 @@ void GetRotateAngle( const SdrCustomShapeGeometryItem& rItem, double& rAngleX, d
void GetSkew( const SdrCustomShapeGeometryItem& rItem, double& rSkewAmount, double& rSkewAngle )
{
css::drawing::EnhancedCustomShapeParameterPair aSkewParaPair;
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "Skew" );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"Skew"_ustr );
if ( ! ( pAny && ( *pAny >>= aSkewParaPair ) && ( aSkewParaPair.First.Value >>= rSkewAmount ) && ( aSkewParaPair.Second.Value >>= rSkewAngle ) ) )
{
rSkewAmount = 50;
@@ -108,7 +108,7 @@ void GetExtrusionDepth( const SdrCustomShapeGeometryItem& rItem, const double* p
{
css::drawing::EnhancedCustomShapeParameterPair aDepthParaPair;
double fDepth = 0, fFraction = 0;
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "Depth" );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"Depth"_ustr );
if ( pAny && ( *pAny >>= aDepthParaPair ) && ( aDepthParaPair.First.Value >>= fDepth ) && ( aDepthParaPair.Second.Value >>= fFraction ) )
{
rForwardDepth = fDepth * fFraction;
@@ -130,7 +130,7 @@ void GetExtrusionDepth( const SdrCustomShapeGeometryItem& rItem, const double* p
double GetDouble( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, double fDefault )
{
double fRetValue = fDefault;
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName );
if ( pAny )
*pAny >>= fRetValue;
return fRetValue;
@@ -139,7 +139,7 @@ double GetDouble( const SdrCustomShapeGeometryItem& rItem, const OUString& rProp
drawing::ShadeMode GetShadeMode( const SdrCustomShapeGeometryItem& rItem, const drawing::ShadeMode eDefault )
{
drawing::ShadeMode eRet( eDefault );
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "ShadeMode" );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"ShadeMode"_ustr );
if ( pAny )
{
if (!(*pAny >>= eRet))
@@ -157,7 +157,7 @@ drawing::ShadeMode GetShadeMode( const SdrCustomShapeGeometryItem& rItem, const
bool GetBool( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, const bool bDefault )
{
bool bRetValue = bDefault;
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName );
if ( pAny )
*pAny >>= bRetValue;
return bRetValue;
@@ -167,7 +167,7 @@ drawing::Position3D GetPosition3D( const SdrCustomShapeGeometryItem& rItem, cons
const drawing::Position3D& rDefault, const double* pMap )
{
drawing::Position3D aRetValue( rDefault );
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName );
if ( pAny )
*pAny >>= aRetValue;
if ( pMap )
@@ -182,7 +182,7 @@ drawing::Position3D GetPosition3D( const SdrCustomShapeGeometryItem& rItem, cons
drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, const drawing::Direction3D& rDefault )
{
drawing::Direction3D aRetValue( rDefault );
const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName );
const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName );
if ( pAny )
*pAny >>= aRetValue;
return aRetValue;
@@ -191,7 +191,7 @@ drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, co
sal_Int16 GetMetalType(const SdrCustomShapeGeometryItem& rItem, const sal_Int16 eDefault)
{
sal_Int16 aRetValue(eDefault);
const Any* pAny = rItem.GetPropertyValueByName("Extrusion", "MetalType");
const Any* pAny = rItem.GetPropertyValueByName(u"Extrusion"_ustr, u"MetalType"_ustr);
if (pAny)
*pAny >>= aRetValue;
return aRetValue;
@@ -256,7 +256,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
pMap = &fMap;
}
if ( GetBool( rGeometryItem, "Extrusion", false ) )
if ( GetBool( rGeometryItem, u"Extrusion"_ustr, false ) )
{
bool bIsMirroredX(rSdrObjCustomShape.IsMirroredX());
bool bIsMirroredY(rSdrObjCustomShape.IsMirroredY());
@@ -340,7 +340,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
fDepth = 1.0;
drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL );
const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" );
const Any* pAny = rGeometryItem.GetPropertyValueByName( u"Extrusion"_ustr, u"ProjectionMode"_ustr );
if (pAny)
{
if(!(*pAny >>= eProjectionMode))
@@ -363,7 +363,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
bool bUseTwoFillStyles( false );
drawing::ShadeMode eShadeMode( GetShadeMode( rGeometryItem, drawing::ShadeMode_FLAT ) );
bool bUseExtrusionColor = GetBool( rGeometryItem, "Color", false );
bool bUseExtrusionColor = GetBool( rGeometryItem, u"Color"_ustr, false );
drawing::FillStyle eFillStyle( aSet.Get(XATTR_FILLSTYLE).GetValue() );
pScene->GetProperties().SetObjectItem( Svx3DShadeModeItem(static_cast<sal_uInt16>(eShadeMode)));
@@ -578,7 +578,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
p3DObj->NbcSetLayer( pShape2d->GetLayer() );
p3DObj->SetMergedItemSet( aLocalSet );
if ( bUseExtrusionColor )
p3DObj->SetMergedItem( XFillColorItem( "", rSdrObjCustomShape.GetMergedItem( XATTR_SECONDARYFILLCOLOR ).GetColorValue() ) );
p3DObj->SetMergedItem( XFillColorItem( u""_ustr, rSdrObjCustomShape.GetMergedItem( XATTR_SECONDARYFILLCOLOR ).GetColorValue() ) );
p3DObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) );
p3DObj->SetMergedItem( Svx3DCloseBackItem( false ) );
@@ -606,7 +606,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
else if ( aLocalFillStyle == drawing::FillStyle_NONE )
{
const XLineColorItem& rLineColor = p3DObj->GetMergedItem( XATTR_LINECOLOR );
p3DObj->SetMergedItem( XFillColorItem( "", rLineColor.GetColorValue() ) );
p3DObj->SetMergedItem( XFillColorItem( u""_ustr, rLineColor.GetColorValue() ) );
p3DObj->SetMergedItem( makeSvx3DDoubleSidedItem( true ) );
p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) );
p3DObj->SetMergedItem( Svx3DCloseBackItem( false ) );
@@ -674,7 +674,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
double fXRotate, fYRotate;
GetRotateAngle( rGeometryItem, fXRotate, fYRotate );
drawing::Direction3D aRotationCenterDefault( 0, 0, 0 );
drawing::Direction3D aRotationCenter( GetDirection3D( rGeometryItem, "RotationCenter", aRotationCenterDefault ) );
drawing::Direction3D aRotationCenter( GetDirection3D( rGeometryItem, u"RotationCenter"_ustr, aRotationCenterDefault ) );
aRotationCenter.DirectionX *= aSnapRect.getOpenWidth();
aRotationCenter.DirectionY *= aSnapRect.getOpenHeight();
if (pMap)
@@ -741,7 +741,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
// ToDo: These default ViewPoint values are used as default by MS Office. But ODF
// default is (3500, -3500, 25000), details in tdf#146192.
drawing::Position3D aViewPointDefault( 3472, -3472, 25000 );
drawing::Position3D aViewPoint( GetPosition3D( rGeometryItem, "ViewPoint", aViewPointDefault, pMap ) );
drawing::Position3D aViewPoint( GetPosition3D( rGeometryItem, u"ViewPoint"_ustr, aViewPointDefault, pMap ) );
fViewPointX = aViewPoint.PositionX + fOriginX;
fViewPointY = - aViewPoint.PositionY + fOriginY;
fViewPointZ = aViewPoint.PositionZ;
@@ -818,12 +818,12 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
// light and material
// "LightFace" has nothing corresponding in 3D rendering engine.
/* bool bLightFace = */ GetBool(rGeometryItem, "LightFace", true); // default in ODF
/* bool bLightFace = */ GetBool(rGeometryItem, u"LightFace"_ustr, true); // default in ODF
// Light directions
drawing::Direction3D aFirstLightDirectionDefault(50000.0, 0.0, 10000.0);
drawing::Direction3D aFirstLightDirection(GetDirection3D( rGeometryItem, "FirstLightDirection", aFirstLightDirectionDefault));
drawing::Direction3D aFirstLightDirection(GetDirection3D( rGeometryItem, u"FirstLightDirection"_ustr, aFirstLightDirectionDefault));
if (aFirstLightDirection.DirectionX == 0.0 && aFirstLightDirection.DirectionY == 0.0
&& aFirstLightDirection.DirectionZ == 0.0)
aFirstLightDirection.DirectionZ = 1.0;
@@ -831,7 +831,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
aLight1Vector.normalize();
drawing::Direction3D aSecondLightDirectionDefault(-50000.0, 0.0, 10000.0);
drawing::Direction3D aSecondLightDirection(GetDirection3D( rGeometryItem, "SecondLightDirection", aSecondLightDirectionDefault));
drawing::Direction3D aSecondLightDirection(GetDirection3D( rGeometryItem, u"SecondLightDirection"_ustr, aSecondLightDirectionDefault));
if (aSecondLightDirection.DirectionX == 0.0 && aSecondLightDirection.DirectionY == 0.0
&& aSecondLightDirection.DirectionZ == 0.0)
aSecondLightDirection.DirectionZ = 1.0;
@@ -855,16 +855,16 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
// The 3D-Scene light "3" is currently not used.
// ODF default 66%. MS Office default 38000/65536=0.579 is set in import filter.
double fLight1Intensity = GetDouble(rGeometryItem, "FirstLightLevel", 66) / 100.0;
double fLight1Intensity = GetDouble(rGeometryItem, u"FirstLightLevel"_ustr, 66) / 100.0;
// ODF and MS Office have both default 'true'.
bool bFirstLightHarsh = GetBool(rGeometryItem, "FirstLightHarsh", true);
bool bFirstLightHarsh = GetBool(rGeometryItem, u"FirstLightHarsh"_ustr, true);
// ODF default 66%. MS Office default 38000/65536=0.579 is set in import filter
double fLight2Intensity = GetDouble(rGeometryItem, "SecondLightLevel", 66) / 100.0;
double fLight2Intensity = GetDouble(rGeometryItem, u"SecondLightLevel"_ustr, 66) / 100.0;
// ODF has default 'true'. MS Office default 'false' is set in import.
bool bSecondLightHarsh = GetBool(rGeometryItem, "SecondLightHarsh", true);
bool bSecondLightHarsh = GetBool(rGeometryItem, u"SecondLightHarsh"_ustr, true);
// ODF default 33%. MS Office default 20000/65536=0.305 is set in import filter.
double fAmbientIntensity = GetDouble(rGeometryItem, "Brightness", 33) / 100.0;
double fAmbientIntensity = GetDouble(rGeometryItem, u"Brightness"_ustr, 33) / 100.0;
double fLight1IntensityForSpecular(fLight1Intensity); // remember original value
if (!bFirstLightHarsh || !bSecondLightHarsh) // might need softing lights
@@ -981,7 +981,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
// default 65536 (100%), if the user sets surface 'Metal' in the UI of MS Office.
// We will change the material color of the 3D object as ersatz.
// ODF data type is percent with default 0%. MSO default is set in import filter.
double fDiffusion = GetDouble(rGeometryItem, "Diffusion", 0.0) / 100.0;
double fDiffusion = GetDouble(rGeometryItem, u"Diffusion"_ustr, 0.0) / 100.0;
// ODF standard specifies for value true: "the specular color for the shading of an
// extruded shape is gray (red, green and blue values of 200) instead of white and 15% is
@@ -991,14 +991,14 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
// MS Office uses current material color in case 'Metal' is set. To detect, whether
// rendering similar to MS Office has to be used the property 'MetalType' is used. It is
// set on import and in the extrusion bar.
bool bMetal = GetBool(rGeometryItem, "Metal", false);
bool bMetal = GetBool(rGeometryItem, u"Metal"_ustr, false);
sal_Int16 eMetalType(
GetMetalType(rGeometryItem, drawing::EnhancedCustomShapeMetalType::MetalODF));
bool bMetalMSCompatible
= eMetalType == drawing::EnhancedCustomShapeMetalType::MetalMSCompatible;
// Property "Specularity" corresponds to 3D object style attribute dr3d:specular-color.
double fSpecularity = GetDouble(rGeometryItem, "Specularity", 0) / 100.0;
double fSpecularity = GetDouble(rGeometryItem, u"Specularity"_ustr, 0) / 100.0;
if (bMetal && !bMetalMSCompatible)
{
@@ -1013,7 +1013,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
// Shininess ODF default 50 (unit %). MS Office default 5, import filter makes *10.
// Shininess corresponds to "Specular Intensity" with the nonlinear relationship
// "Specular Intensity" = 2^c3DShininess = 2^("Shininess" / 10)
double fShininess = GetDouble(rGeometryItem, "Shininess", 50) / 10.0;
double fShininess = GetDouble(rGeometryItem, u"Shininess"_ustr, 50) / 10.0;
fShininess = std::clamp<double>(pow(2, fShininess), 0.0, 100.0);
sal_uInt16 nIntensity = static_cast<sal_uInt16>(basegfx::fround(fShininess));
if (bMetal && !bMetalMSCompatible)
@@ -1046,7 +1046,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
= static_cast<sal_uInt16>(static_cast<double>(nBrightness) * fDiffusion);
nBrightness = std::clamp<sal_uInt16>(nBrightness, 0, 100);
Color aNewMatColor = Color::HSBtoRGB(nHue, nSaturation, nBrightness);
pNext->GetProperties().SetObjectItem(XFillColorItem("", aNewMatColor));
pNext->GetProperties().SetObjectItem(XFillColorItem(u""_ustr, aNewMatColor));
}
// Using material color instead of gray in case of MS Office compatible rendering.
@@ -126,7 +126,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArg
// XServiceInfo
OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName()
{
return "com.sun.star.drawing.EnhancedCustomShapeEngine";
return u"com.sun.star.drawing.EnhancedCustomShapeEngine"_ustr;
}
sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName )
{
@@ -134,7 +134,7 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS
}
Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames()
{
return { "com.sun.star.drawing.CustomShapeEngine" };
return { u"com.sun.star.drawing.CustomShapeEngine"_ustr };
}
// XCustomShapeEngine
@@ -260,7 +260,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
// retrieving the TextPath property to check if feature is enabled
const SdrCustomShapeGeometryItem& rGeometryItem(pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
bool bTextPathOn = false;
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "TextPath" );
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"TextPath"_ustr );
if ( pAny )
*pAny >>= bTextPathOn;
@@ -103,7 +103,7 @@ static bool InitializeFontWorkData(
nTextAreaCount >>= 1;
const SdrCustomShapeGeometryItem& rGeometryItem( rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "ScaleX" );
const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"ScaleX"_ustr );
if (pAny)
*pAny >>= rFWData.bScaleX;
else
@@ -517,7 +517,7 @@ static bool GetFontWorkOutline(
bool bSameLetterHeights = false;
const SdrCustomShapeGeometryItem& rGeometryItem(rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "SameLetterHeights" );
const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"SameLetterHeights"_ustr );
if ( pAny )
*pAny >>= bSameLetterHeights;
+1 -1
View File
@@ -352,7 +352,7 @@ void DiagramFrameHdl::clicked(const Point& /*rPnt*/)
// and only then take action. That would require
// to evaluate & keep that (maybe during creation).
// For now, just trigger to open the Dialog
comphelper::dispatchCommand(".uno:EditDiagram", {});
comphelper::dispatchCommand(u".uno:EditDiagram"_ustr, {});
}
void DiagramFrameHdl::CreateB2dIAObject()
+2 -2
View File
@@ -116,8 +116,8 @@ void insertCreationOrigin(uno::Reference<beans::XPropertyContainer> const& rxPro
return;
OUString sValue = (eOrigin == sfx::ClassificationCreationOrigin::BAF_POLICY)
? OUString("BAF_POLICY")
: OUString("MANUAL");
? u"BAF_POLICY"_ustr
: u"MANUAL"_ustr;
addOrInsertDocumentProperty(rxPropertyContainer, rKeyCreator.makeCreationOriginKey(), sValue);
}
} // end svx::classification namespace
+22 -22
View File
@@ -74,7 +74,7 @@ constexpr OUString constRecentlyUsedFileName(u"recentlyUsed.xml"_ustr);
OUString lcl_getClassificationUserPath()
{
OUString sPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user/classification/");
OUString sPath(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user/classification/"_ustr);
rtl::Bootstrap::expandMacros(sPath);
return sPath;
}
@@ -118,15 +118,15 @@ OUString classificationTypeToString(svx::ClassificationType const & reType)
switch(reType)
{
case svx::ClassificationType::CATEGORY:
return "CATEGORY"; break;
return u"CATEGORY"_ustr; break;
case svx::ClassificationType::MARKING:
return "MARKING"; break;
return u"MARKING"_ustr; break;
case svx::ClassificationType::TEXT:
return "TEXT"; break;
return u"TEXT"_ustr; break;
case svx::ClassificationType::INTELLECTUAL_PROPERTY_PART:
return "INTELLECTUAL_PROPERTY_PART"; break;
return u"INTELLECTUAL_PROPERTY_PART"_ustr; break;
case svx::ClassificationType::PARAGRAPH:
return "PARAGRAPH"; break;
return u"PARAGRAPH"_ustr; break;
}
return OUString();
}
@@ -156,27 +156,27 @@ void writeResultToXml(tools::XmlWriter & rXmlWriter,
ClassificationDialog::ClassificationDialog(weld::Window* pParent, const css::uno::Reference<css::document::XDocumentProperties>& rDocProps,
const bool bPerParagraph, std::function<void()> aParagraphSignHandler)
: GenericDialogController(pParent, "svx/ui/classificationdialog.ui", "AdvancedDocumentClassificationDialog")
: GenericDialogController(pParent, u"svx/ui/classificationdialog.ui"_ustr, u"AdvancedDocumentClassificationDialog"_ustr)
, maHelper(rDocProps)
, maInternationalHelper(rDocProps, /*bUseLocalizedPolicy*/ false)
, m_bPerParagraph(bPerParagraph)
, m_aParagraphSignHandler(std::move(aParagraphSignHandler))
, m_nCurrentSelectedCategory(-1)
, m_xOkButton(m_xBuilder->weld_button("ok"))
, m_xSignButton(m_xBuilder->weld_button("signButton"))
, m_xToolBox(m_xBuilder->weld_toggle_button("toolbox"))
, m_xRecentlyUsedListBox(m_xBuilder->weld_combo_box("recentlyUsedCB"))
, m_xClassificationListBox(m_xBuilder->weld_combo_box("classificationCB"))
, m_xInternationalClassificationListBox(m_xBuilder->weld_combo_box("internationalClassificationCB"))
, m_xMarkingLabel(m_xBuilder->weld_label("markingLabel"))
, m_xMarkingListBox(m_xBuilder->weld_tree_view("markingLB"))
, m_xIntellectualPropertyPartListBox(m_xBuilder->weld_tree_view("intellectualPropertyPartLB"))
, m_xIntellectualPropertyPartNumberListBox(m_xBuilder->weld_tree_view("intellectualPropertyPartNumberLB"))
, m_xIntellectualPropertyPartAddButton(m_xBuilder->weld_button("intellectualPropertyPartAddButton"))
, m_xIntellectualPropertyPartEdit(m_xBuilder->weld_entry("intellectualPropertyPartEntry"))
, m_xIntellectualPropertyExpander(m_xBuilder->weld_expander("intellectualPropertyExpander"))
, m_xOkButton(m_xBuilder->weld_button(u"ok"_ustr))
, m_xSignButton(m_xBuilder->weld_button(u"signButton"_ustr))
, m_xToolBox(m_xBuilder->weld_toggle_button(u"toolbox"_ustr))
, m_xRecentlyUsedListBox(m_xBuilder->weld_combo_box(u"recentlyUsedCB"_ustr))
, m_xClassificationListBox(m_xBuilder->weld_combo_box(u"classificationCB"_ustr))
, m_xInternationalClassificationListBox(m_xBuilder->weld_combo_box(u"internationalClassificationCB"_ustr))
, m_xMarkingLabel(m_xBuilder->weld_label(u"markingLabel"_ustr))
, m_xMarkingListBox(m_xBuilder->weld_tree_view(u"markingLB"_ustr))
, m_xIntellectualPropertyPartListBox(m_xBuilder->weld_tree_view(u"intellectualPropertyPartLB"_ustr))
, m_xIntellectualPropertyPartNumberListBox(m_xBuilder->weld_tree_view(u"intellectualPropertyPartNumberLB"_ustr))
, m_xIntellectualPropertyPartAddButton(m_xBuilder->weld_button(u"intellectualPropertyPartAddButton"_ustr))
, m_xIntellectualPropertyPartEdit(m_xBuilder->weld_entry(u"intellectualPropertyPartEntry"_ustr))
, m_xIntellectualPropertyExpander(m_xBuilder->weld_expander(u"intellectualPropertyExpander"_ustr))
, m_xEditWindow(new ClassificationEditView)
, m_xEditWindowWeld(new weld::CustomWeld(*m_xBuilder, "classificationEditWindow", *m_xEditWindow))
, m_xEditWindowWeld(new weld::CustomWeld(*m_xBuilder, u"classificationEditWindow"_ustr, *m_xEditWindow))
{
m_xOkButton->connect_clicked(LINK(this, ClassificationDialog, OkHdl));
m_xSignButton->connect_clicked(LINK(this, ClassificationDialog, ButtonClicked));
@@ -535,7 +535,7 @@ std::vector<ClassificationResult> ClassificationDialog::getResult()
eFontWeight = WEIGHT_BOLD;
}
// Font weight to string
OUString sWeightProperty = "NORMAL";
OUString sWeightProperty = u"NORMAL"_ustr;
if (eFontWeight == WEIGHT_BOLD)
sWeightProperty = "BOLD";
// Insert into collection
+4 -3
View File
@@ -17,9 +17,10 @@
#include <com/sun/star/system/SystemShellExecute.hpp>
FileExportedDialog::FileExportedDialog(weld::Window* pParent, OUString atitle)
: GenericDialogController(pParent, "svx/ui/fileexporteddialog.ui", "FileExportedDialog")
, m_xFileLabel(m_xBuilder->weld_label("Filelabel"))
, m_xButton(m_xBuilder->weld_button("ok"))
: GenericDialogController(pParent, u"svx/ui/fileexporteddialog.ui"_ustr,
u"FileExportedDialog"_ustr)
, m_xFileLabel(m_xBuilder->weld_label(u"Filelabel"_ustr))
, m_xButton(m_xBuilder->weld_button(u"ok"_ustr))
{
m_xFileLabel->set_label(atitle);
m_xButton->connect_clicked(LINK(this, FileExportedDialog, OpenHdl));
+8 -7
View File
@@ -15,11 +15,11 @@ namespace svx
{
GenericCheckEntry::GenericCheckEntry(weld::Container* pParent,
std::unique_ptr<CheckData>& pCheckData)
: m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/genericcheckentry.ui"))
, m_xContainer(m_xBuilder->weld_container("checkEntryBox"))
, m_xLabel(m_xBuilder->weld_label("label"))
, m_xMarkButton(m_xBuilder->weld_button("markButton"))
, m_xPropertiesButton(m_xBuilder->weld_button("propertiesButton"))
: m_xBuilder(Application::CreateBuilder(pParent, u"svx/ui/genericcheckentry.ui"_ustr))
, m_xContainer(m_xBuilder->weld_container(u"checkEntryBox"_ustr))
, m_xLabel(m_xBuilder->weld_label(u"label"_ustr))
, m_xMarkButton(m_xBuilder->weld_button(u"markButton"_ustr))
, m_xPropertiesButton(m_xBuilder->weld_button(u"propertiesButton"_ustr))
, m_pCheckData(pCheckData)
{
m_xLabel->set_label(m_pCheckData->getText());
@@ -43,9 +43,10 @@ IMPL_LINK_NOARG(GenericCheckEntry, PropertiesButtonClicked, weld::Button&, void)
GenericCheckDialog::GenericCheckDialog(weld::Window* pParent,
CheckDataCollection& rCheckDataCollection)
: GenericDialogController(pParent, "svx/ui/genericcheckdialog.ui", "GenericCheckDialog")
: GenericDialogController(pParent, u"svx/ui/genericcheckdialog.ui"_ustr,
u"GenericCheckDialog"_ustr)
, m_rCheckDataCollection(rCheckDataCollection)
, m_xCheckBox(m_xBuilder->weld_box("checkBox"))
, m_xCheckBox(m_xBuilder->weld_box(u"checkBox"_ustr))
{
set_title(m_rCheckDataCollection.getTitle());
}
+24 -24
View File
@@ -27,30 +27,30 @@
using namespace css;
SafeModeDialog::SafeModeDialog(weld::Window* pParent)
: GenericDialogController(pParent, "svx/ui/safemodedialog.ui", "SafeModeDialog")
, mxBtnContinue(m_xBuilder->weld_button("btn_continue"))
, mxBtnRestart(m_xBuilder->weld_button("btn_restart"))
, mxBtnApply(m_xBuilder->weld_button("btn_apply"))
, mxBoxRestore(m_xBuilder->weld_container("group_restore"))
, mxBoxConfigure(m_xBuilder->weld_container("group_configure"))
, mxBoxDeinstall(m_xBuilder->weld_container("group_deinstall"))
, mxBoxReset(m_xBuilder->weld_container("group_reset"))
, mxRadioRestore(m_xBuilder->weld_radio_button("radio_restore"))
, mxRadioConfigure(m_xBuilder->weld_radio_button("radio_configure"))
, mxRadioExtensions(m_xBuilder->weld_radio_button("radio_extensions"))
, mxRadioReset(m_xBuilder->weld_radio_button("radio_reset"))
, mxCBCheckProfilesafeConfig(m_xBuilder->weld_check_button("check_profilesafe_config"))
, mxCBCheckProfilesafeExtensions(m_xBuilder->weld_check_button("check_profilesafe_extensions"))
, mxCBDisableAllExtensions(m_xBuilder->weld_check_button("check_disable_all_extensions"))
, mxCBDeinstallUserExtensions(m_xBuilder->weld_check_button("check_deinstall_user_extensions"))
, mxCBResetSharedExtensions(m_xBuilder->weld_check_button("check_reset_shared_extensions"))
, mxCBResetBundledExtensions(m_xBuilder->weld_check_button("check_reset_bundled_extensions"))
, mxCBDisableHWAcceleration(m_xBuilder->weld_check_button("check_disable_hw_acceleration"))
, mxCBResetCustomizations(m_xBuilder->weld_check_button("check_reset_customizations"))
, mxCBResetWholeUserProfile(m_xBuilder->weld_check_button("check_reset_whole_userprofile"))
, mxBugLink(m_xBuilder->weld_link_button("linkbutton_bugs"))
, mxUserProfileLink(m_xBuilder->weld_link_button("linkbutton_profile"))
, mxBtnCreateZip(m_xBuilder->weld_button("btn_create_zip"))
: GenericDialogController(pParent, u"svx/ui/safemodedialog.ui"_ustr, u"SafeModeDialog"_ustr)
, mxBtnContinue(m_xBuilder->weld_button(u"btn_continue"_ustr))
, mxBtnRestart(m_xBuilder->weld_button(u"btn_restart"_ustr))
, mxBtnApply(m_xBuilder->weld_button(u"btn_apply"_ustr))
, mxBoxRestore(m_xBuilder->weld_container(u"group_restore"_ustr))
, mxBoxConfigure(m_xBuilder->weld_container(u"group_configure"_ustr))
, mxBoxDeinstall(m_xBuilder->weld_container(u"group_deinstall"_ustr))
, mxBoxReset(m_xBuilder->weld_container(u"group_reset"_ustr))
, mxRadioRestore(m_xBuilder->weld_radio_button(u"radio_restore"_ustr))
, mxRadioConfigure(m_xBuilder->weld_radio_button(u"radio_configure"_ustr))
, mxRadioExtensions(m_xBuilder->weld_radio_button(u"radio_extensions"_ustr))
, mxRadioReset(m_xBuilder->weld_radio_button(u"radio_reset"_ustr))
, mxCBCheckProfilesafeConfig(m_xBuilder->weld_check_button(u"check_profilesafe_config"_ustr))
, mxCBCheckProfilesafeExtensions(m_xBuilder->weld_check_button(u"check_profilesafe_extensions"_ustr))
, mxCBDisableAllExtensions(m_xBuilder->weld_check_button(u"check_disable_all_extensions"_ustr))
, mxCBDeinstallUserExtensions(m_xBuilder->weld_check_button(u"check_deinstall_user_extensions"_ustr))
, mxCBResetSharedExtensions(m_xBuilder->weld_check_button(u"check_reset_shared_extensions"_ustr))
, mxCBResetBundledExtensions(m_xBuilder->weld_check_button(u"check_reset_bundled_extensions"_ustr))
, mxCBDisableHWAcceleration(m_xBuilder->weld_check_button(u"check_disable_hw_acceleration"_ustr))
, mxCBResetCustomizations(m_xBuilder->weld_check_button(u"check_reset_customizations"_ustr))
, mxCBResetWholeUserProfile(m_xBuilder->weld_check_button(u"check_reset_whole_userprofile"_ustr))
, mxBugLink(m_xBuilder->weld_link_button(u"linkbutton_bugs"_ustr))
, mxUserProfileLink(m_xBuilder->weld_link_button(u"linkbutton_profile"_ustr))
, mxBtnCreateZip(m_xBuilder->weld_button(u"btn_create_zip"_ustr))
{
m_xDialog->set_centered_on_parent(false);
mxRadioRestore->connect_toggled(LINK(this, SafeModeDialog, RadioBtnHdl));
+2 -2
View File
@@ -43,7 +43,7 @@ SafeModeUI::SafeModeUI()
OUString SAL_CALL SafeModeUI::getImplementationName()
{
return "com.sun.star.comp.svx.SafeModeUI";
return u"com.sun.star.comp.svx.SafeModeUI"_ustr;
}
sal_Bool SAL_CALL SafeModeUI::supportsService(const OUString& sServiceName)
@@ -53,7 +53,7 @@ sal_Bool SAL_CALL SafeModeUI::supportsService(const OUString& sServiceName)
css::uno::Sequence< OUString > SAL_CALL SafeModeUI::getSupportedServiceNames()
{
return { "com.sun.star.dialog.SafeModeUI" };
return { u"com.sun.star.dialog.SafeModeUI"_ustr };
}
css::uno::Any SAL_CALL SafeModeUI::dispatchWithReturnValue(const css::util::URL&,
+17 -15
View File
@@ -13,33 +13,35 @@
namespace svx
{
ThemeColorEditDialog::ThemeColorEditDialog(weld::Window* pParent, model::ColorSet& rColorSet)
: GenericDialogController(pParent, "svx/ui/themecoloreditdialog.ui", "ThemeColorEditDialog")
: GenericDialogController(pParent, u"svx/ui/themecoloreditdialog.ui"_ustr,
u"ThemeColorEditDialog"_ustr)
, maColorSet(rColorSet)
, mxThemeColorsNameEntry(m_xBuilder->weld_entry("entryThemeColorsName"))
, mxDark1(new ColorListBox(m_xBuilder->weld_menu_button("buttonDark1"),
, mxThemeColorsNameEntry(m_xBuilder->weld_entry(u"entryThemeColorsName"_ustr))
, mxDark1(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonDark1"_ustr),
[pParent] { return pParent; }))
, mxLight1(new ColorListBox(m_xBuilder->weld_menu_button("buttonLight1"),
, mxLight1(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonLight1"_ustr),
[pParent] { return pParent; }))
, mxDark2(new ColorListBox(m_xBuilder->weld_menu_button("buttonDark2"),
, mxDark2(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonDark2"_ustr),
[pParent] { return pParent; }))
, mxLight2(new ColorListBox(m_xBuilder->weld_menu_button("buttonLight2"),
, mxLight2(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonLight2"_ustr),
[pParent] { return pParent; }))
, mxAccent1(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent1"),
, mxAccent1(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent1"_ustr),
[pParent] { return pParent; }))
, mxAccent2(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent2"),
, mxAccent2(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent2"_ustr),
[pParent] { return pParent; }))
, mxAccent3(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent3"),
, mxAccent3(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent3"_ustr),
[pParent] { return pParent; }))
, mxAccent4(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent4"),
, mxAccent4(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent4"_ustr),
[pParent] { return pParent; }))
, mxAccent5(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent5"),
, mxAccent5(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent5"_ustr),
[pParent] { return pParent; }))
, mxAccent6(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent6"),
, mxAccent6(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent6"_ustr),
[pParent] { return pParent; }))
, mxHyperlink(new ColorListBox(m_xBuilder->weld_menu_button("buttonHyperlink"),
, mxHyperlink(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonHyperlink"_ustr),
[pParent] { return pParent; }))
, mxFollowHyperlink(new ColorListBox(m_xBuilder->weld_menu_button("buttonFollowHyperlink"),
[pParent] { return pParent; }))
, mxFollowHyperlink(
new ColorListBox(m_xBuilder->weld_menu_button(u"buttonFollowHyperlink"_ustr),
[pParent] { return pParent; }))
{
mxThemeColorsNameEntry->set_text(rColorSet.getName());
mxDark1->SelectEntry(rColorSet.getColor(model::ThemeColorType::Dark1));
+3 -3
View File
@@ -17,13 +17,13 @@
namespace svx
{
ThemeDialog::ThemeDialog(weld::Window* pParent, model::Theme* pTheme)
: GenericDialogController(pParent, "svx/ui/themedialog.ui", "ThemeDialog")
: GenericDialogController(pParent, u"svx/ui/themedialog.ui"_ustr, u"ThemeDialog"_ustr)
, mpWindow(pParent)
, mpTheme(pTheme)
, mxValueSetThemeColors(new svx::ThemeColorValueSet)
, mxValueSetThemeColorsWindow(
new weld::CustomWeld(*m_xBuilder, "valueset_theme_colors", *mxValueSetThemeColors))
, mxAdd(m_xBuilder->weld_button("button_add"))
new weld::CustomWeld(*m_xBuilder, u"valueset_theme_colors"_ustr, *mxValueSetThemeColors))
, mxAdd(m_xBuilder->weld_button(u"button_add"_ustr))
{
mxValueSetThemeColors->SetColCount(3);
mxValueSetThemeColors->SetLineCount(4);
+28 -28
View File
@@ -227,8 +227,8 @@ IMPL_LINK( MaskData, CbxHdl, weld::Toggleable&, rCbx, void )
pSet->SelectItem( 1 );
pSet->Select();
pMask->m_xTbxPipette->set_item_active("pipette", true);
PipetteHdl("pipette");
pMask->m_xTbxPipette->set_item_active(u"pipette"_ustr, true);
PipetteHdl(u"pipette"_ustr);
}
IMPL_LINK( MaskData, CbxTransHdl, weld::Toggleable&, rCbx, void )
@@ -346,34 +346,34 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n
}
SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent)
: SfxDockingWindow(pBindinx, pCW, pParent, "DockingColorReplace",
"svx/ui/dockingcolorreplace.ui")
, m_xTbxPipette(m_xBuilder->weld_toolbar("toolbar"))
: SfxDockingWindow(pBindinx, pCW, pParent, u"DockingColorReplace"_ustr,
u"svx/ui/dockingcolorreplace.ui"_ustr)
, m_xTbxPipette(m_xBuilder->weld_toolbar(u"toolbar"_ustr))
, m_xCtlPipette(new BmpColorWindow)
, m_xCtlPipetteWin(new weld::CustomWeld(*m_xBuilder, "toolcolor", *m_xCtlPipette))
, m_xBtnExec(m_xBuilder->weld_button("replace"))
, m_xCbx1(m_xBuilder->weld_check_button("cbx1"))
, m_xCtlPipetteWin(new weld::CustomWeld(*m_xBuilder, u"toolcolor"_ustr, *m_xCtlPipette))
, m_xBtnExec(m_xBuilder->weld_button(u"replace"_ustr))
, m_xCbx1(m_xBuilder->weld_check_button(u"cbx1"_ustr))
, m_xQSet1(new MaskSet(this))
, m_xQSetWin1(new weld::CustomWeld(*m_xBuilder, "qset1", *m_xQSet1))
, m_xSp1(m_xBuilder->weld_metric_spin_button("tol1", FieldUnit::PERCENT))
, m_xLbColor1(new ColorListBox(m_xBuilder->weld_menu_button("color1"), [this]{ return GetFrameWeld(); }))
, m_xCbx2(m_xBuilder->weld_check_button("cbx2"))
, m_xQSetWin1(new weld::CustomWeld(*m_xBuilder, u"qset1"_ustr, *m_xQSet1))
, m_xSp1(m_xBuilder->weld_metric_spin_button(u"tol1"_ustr, FieldUnit::PERCENT))
, m_xLbColor1(new ColorListBox(m_xBuilder->weld_menu_button(u"color1"_ustr), [this]{ return GetFrameWeld(); }))
, m_xCbx2(m_xBuilder->weld_check_button(u"cbx2"_ustr))
, m_xQSet2(new MaskSet(this))
, m_xQSetWin2(new weld::CustomWeld(*m_xBuilder, "qset2", *m_xQSet2))
, m_xSp2(m_xBuilder->weld_metric_spin_button("tol2", FieldUnit::PERCENT))
, m_xLbColor2(new ColorListBox(m_xBuilder->weld_menu_button("color2"), [this]{ return GetFrameWeld(); }))
, m_xCbx3(m_xBuilder->weld_check_button("cbx3"))
, m_xQSetWin2(new weld::CustomWeld(*m_xBuilder, u"qset2"_ustr, *m_xQSet2))
, m_xSp2(m_xBuilder->weld_metric_spin_button(u"tol2"_ustr, FieldUnit::PERCENT))
, m_xLbColor2(new ColorListBox(m_xBuilder->weld_menu_button(u"color2"_ustr), [this]{ return GetFrameWeld(); }))
, m_xCbx3(m_xBuilder->weld_check_button(u"cbx3"_ustr))
, m_xQSet3(new MaskSet(this))
, m_xQSetWin3(new weld::CustomWeld(*m_xBuilder, "qset3", *m_xQSet3))
, m_xSp3(m_xBuilder->weld_metric_spin_button("tol3", FieldUnit::PERCENT))
, m_xLbColor3(new ColorListBox(m_xBuilder->weld_menu_button("color3"), [this]{ return GetFrameWeld(); }))
, m_xCbx4(m_xBuilder->weld_check_button("cbx4"))
, m_xQSetWin3(new weld::CustomWeld(*m_xBuilder, u"qset3"_ustr, *m_xQSet3))
, m_xSp3(m_xBuilder->weld_metric_spin_button(u"tol3"_ustr, FieldUnit::PERCENT))
, m_xLbColor3(new ColorListBox(m_xBuilder->weld_menu_button(u"color3"_ustr), [this]{ return GetFrameWeld(); }))
, m_xCbx4(m_xBuilder->weld_check_button(u"cbx4"_ustr))
, m_xQSet4(new MaskSet(this))
, m_xQSetWin4(new weld::CustomWeld(*m_xBuilder, "qset4", *m_xQSet4))
, m_xSp4(m_xBuilder->weld_metric_spin_button("tol4", FieldUnit::PERCENT))
, m_xLbColor4(new ColorListBox(m_xBuilder->weld_menu_button("color4"), [this]{ return GetFrameWeld(); }))
, m_xCbxTrans(m_xBuilder->weld_check_button("cbx5"))
, m_xLbColorTrans(new ColorListBox(m_xBuilder->weld_menu_button("color5"), [this]{ return GetFrameWeld(); }))
, m_xQSetWin4(new weld::CustomWeld(*m_xBuilder, u"qset4"_ustr, *m_xQSet4))
, m_xSp4(m_xBuilder->weld_metric_spin_button(u"tol4"_ustr, FieldUnit::PERCENT))
, m_xLbColor4(new ColorListBox(m_xBuilder->weld_menu_button(u"color4"_ustr), [this]{ return GetFrameWeld(); }))
, m_xCbxTrans(m_xBuilder->weld_check_button(u"cbx5"_ustr))
, m_xLbColorTrans(new ColorListBox(m_xBuilder->weld_menu_button(u"color5"_ustr), [this]{ return GetFrameWeld(); }))
, m_xData(new MaskData(this, *pBindinx))
, aPipetteColor(COL_WHITE)
, aSelItem(*this, *pBindinx)
@@ -546,8 +546,8 @@ void SvxBmpMask::PipetteClicked()
m_xQSet4->SetFormat();
}
m_xTbxPipette->set_item_active("pipette", false);
m_xData->PipetteHdl("pipette");
m_xTbxPipette->set_item_active(u"pipette"_ustr, false);
m_xData->PipetteHdl(u"pipette"_ustr);
}
void SvxBmpMask::SetExecState( bool bEnable )
@@ -1030,7 +1030,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
bool SvxBmpMask::IsEyedropping() const
{
return m_xTbxPipette->get_item_active("pipette");
return m_xTbxPipette->get_item_active(u"pipette"_ustr);
}
/** Set an accessible name for the source color check boxes. Without this
+49 -49
View File
@@ -67,7 +67,7 @@ SvxContourDlgChildWindow::SvxContourDlgChildWindow(vcl::Window* _pParent, sal_uI
SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW,
weld::Window* _pParent)
: SfxModelessDialogController(_pBindings, pCW, _pParent, "svx/ui/floatingcontour.ui", "FloatingContour")
: SfxModelessDialogController(_pBindings, pCW, _pParent, u"svx/ui/floatingcontour.ui"_ustr, u"FloatingContour"_ustr)
, m_xImpl(std::make_unique<SvxSuperContourDlg>(*m_xBuilder, *m_xDialog, _pBindings))
{
}
@@ -204,13 +204,13 @@ SvxSuperContourDlg::SvxSuperContourDlg(weld::Builder& rBuilder,
, m_rDialog(rDialog)
, m_xContourWnd(new ContourWindow(&rDialog))
, m_xStbStatusColor(new StatusColor(*m_xContourWnd))
, m_xTbx1(rBuilder.weld_toolbar("toolbar"))
, m_xMtfTolerance(rBuilder.weld_metric_spin_button("spinbutton", FieldUnit::PERCENT))
, m_xStbStatus2(rBuilder.weld_label("statuspos"))
, m_xStbStatus3(rBuilder.weld_label("statussize"))
, m_xCancelBtn(rBuilder.weld_button("cancel"))
, m_xStbStatusColorWeld(new weld::CustomWeld(rBuilder, "statuscolor", *m_xStbStatusColor))
, m_xContourWndWeld(new weld::CustomWeld(rBuilder, "container", *m_xContourWnd))
, m_xTbx1(rBuilder.weld_toolbar(u"toolbar"_ustr))
, m_xMtfTolerance(rBuilder.weld_metric_spin_button(u"spinbutton"_ustr, FieldUnit::PERCENT))
, m_xStbStatus2(rBuilder.weld_label(u"statuspos"_ustr))
, m_xStbStatus3(rBuilder.weld_label(u"statussize"_ustr))
, m_xCancelBtn(rBuilder.weld_button(u"cancel"_ustr))
, m_xStbStatusColorWeld(new weld::CustomWeld(rBuilder, u"statuscolor"_ustr, *m_xStbStatusColor))
, m_xContourWndWeld(new weld::CustomWeld(rBuilder, u"container"_ustr, *m_xContourWnd))
{
m_xCancelBtn->connect_clicked(LINK(this, SvxSuperContourDlg, CancelHdl));
@@ -241,10 +241,10 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, CancelHdl, weld::Button&, void)
{
bool bRet = true;
if (m_xTbx1->get_item_sensitive("TBI_APPLY"))
if (m_xTbx1->get_item_sensitive(u"TBI_APPLY"_ustr))
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querysavecontchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveContourChangesDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/querysavecontchangesdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QuerySaveContourChangesDialog"_ustr));
const short nRet = xQBox->run();
if ( nRet == RET_YES )
@@ -361,15 +361,15 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void)
}
else if (rId == "TBI_WORKPLACE")
{
if (m_xTbx1->get_item_active("TBI_WORKPLACE"))
if (m_xTbx1->get_item_active(u"TBI_WORKPLACE"_ustr))
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querydeletecontourdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryDeleteContourDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/querydeletecontourdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryDeleteContourDialog"_ustr));
if (!m_xContourWnd->IsContourChanged() || (xQBox->run() == RET_YES))
m_xContourWnd->SetWorkplaceMode( true );
else
m_xTbx1->set_item_active("TBI_WORKPLACE", false);
m_xTbx1->set_item_active(u"TBI_WORKPLACE"_ustr, false);
}
else
m_xContourWnd->SetWorkplaceMode( false );
@@ -396,7 +396,7 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void)
}
else if (rId == "TBI_POLYEDIT")
{
m_xContourWnd->SetPolyEditMode(m_xTbx1->get_item_active("TBI_POLYEDIT") ? SID_BEZIER_MOVE : 0);
m_xContourWnd->SetPolyEditMode(m_xTbx1->get_item_active(u"TBI_POLYEDIT"_ustr) ? SID_BEZIER_MOVE : 0);
}
else if (rId == "TBI_POLYMOVE")
{
@@ -434,19 +434,19 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void)
}
else if (rId == "TBI_PIPETTE")
{
bool bPipette = m_xTbx1->get_item_active("TBI_PIPETTE");
bool bPipette = m_xTbx1->get_item_active(u"TBI_PIPETTE"_ustr);
if ( !bPipette )
m_xStbStatusColor->Invalidate();
else if ( bGraphicLinked )
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/queryunlinkgraphicsdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryUnlinkGraphicsDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/queryunlinkgraphicsdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryUnlinkGraphicsDialog"_ustr));
if (xQBox->run() != RET_YES)
{
bPipette = false;
m_xTbx1->set_item_active("TBI_PIPETTE", bPipette);
m_xTbx1->set_item_active(u"TBI_PIPETTE"_ustr, bPipette);
m_xStbStatusColor->Invalidate();
}
}
@@ -458,16 +458,16 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void)
void SvxSuperContourDlg::SetActiveTool(std::u16string_view rId)
{
m_xTbx1->set_item_active("TBI_SELECT", rId == u"TBI_SELECT");
m_xTbx1->set_item_active("TBI_RECT", rId == u"TBI_RECT");
m_xTbx1->set_item_active("TBI_CIRCLE", rId == u"TBI_CIRCLE");
m_xTbx1->set_item_active("TBI_POLY", rId == u"TBI_POLY");
m_xTbx1->set_item_active(u"TBI_SELECT"_ustr, rId == u"TBI_SELECT");
m_xTbx1->set_item_active(u"TBI_RECT"_ustr, rId == u"TBI_RECT");
m_xTbx1->set_item_active(u"TBI_CIRCLE"_ustr, rId == u"TBI_CIRCLE");
m_xTbx1->set_item_active(u"TBI_POLY"_ustr, rId == u"TBI_POLY");
}
void SvxSuperContourDlg::SetActivePoly(std::u16string_view rId)
{
m_xTbx1->set_item_active("TBI_POLYMOVE", rId == u"TBI_POLYMOVE");
m_xTbx1->set_item_active("TBI_POLYINSERT", rId == u"TBI_POLYINSERT");
m_xTbx1->set_item_active(u"TBI_POLYMOVE"_ustr, rId == u"TBI_POLYMOVE");
m_xTbx1->set_item_active(u"TBI_POLYINSERT"_ustr, rId == u"TBI_POLYINSERT");
}
IMPL_LINK( SvxSuperContourDlg, MousePosHdl, GraphCtrl*, pWnd, void )
@@ -544,31 +544,31 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void )
const SdrObject* pObj = pWnd->GetSelectedSdrObject();
const SdrView* pView = pWnd->GetSdrView();
const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr;
const bool bDrawEnabled = !(bPolyEdit && m_xTbx1->get_item_active("TBI_POLYEDIT"));
const bool bPipette = m_xTbx1->get_item_active("TBI_PIPETTE");
const bool bWorkplace = m_xTbx1->get_item_active("TBI_WORKPLACE");
const bool bDrawEnabled = !(bPolyEdit && m_xTbx1->get_item_active(u"TBI_POLYEDIT"_ustr));
const bool bPipette = m_xTbx1->get_item_active(u"TBI_PIPETTE"_ustr);
const bool bWorkplace = m_xTbx1->get_item_active(u"TBI_WORKPLACE"_ustr);
const bool bDontHide = !( bPipette || bWorkplace );
const bool bBitmap = pWnd->GetGraphic().GetType() == GraphicType::Bitmap;
m_xTbx1->set_item_sensitive("TBI_APPLY", bDontHide && bExecState && pWnd->IsChanged());
m_xTbx1->set_item_sensitive(u"TBI_APPLY"_ustr, bDontHide && bExecState && pWnd->IsChanged());
m_xTbx1->set_item_sensitive("TBI_WORKPLACE", !bPipette && bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_WORKPLACE"_ustr, !bPipette && bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_SELECT", bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_RECT", bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_CIRCLE", bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_POLY", bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_SELECT"_ustr, bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_RECT"_ustr, bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_CIRCLE"_ustr, bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_POLY"_ustr, bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_POLYEDIT", bDontHide && bPolyEdit);
m_xTbx1->set_item_sensitive("TBI_POLYMOVE", bDontHide && !bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_POLYINSERT", bDontHide && !bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_POLYDELETE", bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible());
m_xTbx1->set_item_sensitive(u"TBI_POLYEDIT"_ustr, bDontHide && bPolyEdit);
m_xTbx1->set_item_sensitive(u"TBI_POLYMOVE"_ustr, bDontHide && !bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_POLYINSERT"_ustr, bDontHide && !bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_POLYDELETE"_ustr, bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible());
m_xTbx1->set_item_sensitive("TBI_AUTOCONTOUR", bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive("TBI_PIPETTE", !bWorkplace && bDrawEnabled && bBitmap);
m_xTbx1->set_item_sensitive(u"TBI_AUTOCONTOUR"_ustr, bDontHide && bDrawEnabled);
m_xTbx1->set_item_sensitive(u"TBI_PIPETTE"_ustr, !bWorkplace && bDrawEnabled && bBitmap);
m_xTbx1->set_item_sensitive("TBI_UNDO", bDontHide && aUndoGraphic.GetType() != GraphicType::NONE);
m_xTbx1->set_item_sensitive("TBI_REDO", bDontHide && aRedoGraphic.GetType() != GraphicType::NONE);
m_xTbx1->set_item_sensitive(u"TBI_UNDO"_ustr, bDontHide && aUndoGraphic.GetType() != GraphicType::NONE);
m_xTbx1->set_item_sensitive(u"TBI_REDO"_ustr, bDontHide && aRedoGraphic.GetType() != GraphicType::NONE);
if ( bPolyEdit )
{
@@ -586,7 +586,7 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void )
}
else
{
m_xTbx1->set_item_active("TBI_POLYEDIT", false);
m_xTbx1->set_item_active(u"TBI_POLYEDIT"_ustr, false);
SetActivePoly(u"TBI_POLYMOVE");
pWnd->SetPolyEditMode( 0 );
}
@@ -638,8 +638,8 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
if( !aMask.IsEmpty() )
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querynewcontourdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryNewContourDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/querynewcontourdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryNewContourDialog"_ustr));
bool bNewContour;
@@ -658,15 +658,15 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
}
}
m_xTbx1->set_item_active("TBI_PIPETTE", false);
m_xTbx1->set_item_active(u"TBI_PIPETTE"_ustr, false);
rWnd.SetPipetteMode( false );
m_xStbStatusColor->Invalidate();
}
IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow&, rWnd, void )
{
m_xTbx1->set_item_active("TBI_WORKPLACE", false);
m_xTbx1->set_item_active("TBI_SELECT", true);
m_xTbx1->set_item_active(u"TBI_WORKPLACE"_ustr, false);
m_xTbx1->set_item_active(u"TBI_SELECT"_ustr, true);
rWnd.SetWorkplaceMode( false );
m_xContourWnd->QueueIdleUpdate();
+4 -4
View File
@@ -242,15 +242,15 @@ bool SvxShowCharSet::isFavChar(std::u16string_view sTitle, std::u16string_view r
void SvxShowCharSet::createContextMenu(const Point& rPosition)
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/charsetmenu.ui"));
std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu("charsetmenu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), u"svx/ui/charsetmenu.ui"_ustr));
std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu(u"charsetmenu"_ustr));
sal_UCS4 cChar = GetSelectCharacter();
OUString aOUStr( &cChar, 1 );
if (isFavChar(aOUStr, mxVirDev->GetFont().GetFamilyName()) || maFavCharList.size() >= 16)
xItemMenu->set_visible("add", false);
xItemMenu->set_visible(u"add"_ustr, false);
else
xItemMenu->set_visible("remove", false);
xItemMenu->set_visible(u"remove"_ustr, false);
ContextMenuSelect(xItemMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(rPosition, Size(1,1))));
GrabFocus();
+26 -26
View File
@@ -61,7 +61,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ) :
GenericDialogController( pParent, "svx/ui/compressgraphicdialog.ui", "CompressGraphicDialog" ),
GenericDialogController( pParent, u"svx/ui/compressgraphicdialog.ui"_ustr, u"CompressGraphicDialog"_ustr ),
m_xGraphicObj ( pGraphicObj ),
m_aGraphic ( pGraphicObj->GetGraphicObject().GetGraphic() ),
m_aViewSize100mm ( pGraphicObj->GetLogicRect().GetSize() ),
@@ -76,7 +76,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, SdrGrafOb
}
CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, Graphic aGraphic, Size rViewSize100mm, tools::Rectangle const & rCropRectangle, SfxBindings& rBindings ) :
GenericDialogController( pParent, "svx/ui/compressgraphicdialog.ui", "CompressGraphicDialog" ),
GenericDialogController( pParent, u"svx/ui/compressgraphicdialog.ui"_ustr, u"CompressGraphicDialog"_ustr ),
m_xGraphicObj ( nullptr ),
m_aGraphic (std::move( aGraphic )),
m_aViewSize100mm ( rViewSize100mm ),
@@ -114,26 +114,26 @@ void CompressGraphicsDialog::recallParameter()
void CompressGraphicsDialog::Initialize()
{
m_xLabelGraphicType = m_xBuilder->weld_label("label-graphic-type");
m_xFixedText2 = m_xBuilder->weld_label("label-original-size");
m_xFixedText3 = m_xBuilder->weld_label("label-view-size");
m_xFixedText5 = m_xBuilder->weld_label("label-image-capacity");
m_xFixedText6 = m_xBuilder->weld_label("label-new-capacity");
m_xJpegCompRB = m_xBuilder->weld_radio_button("radio-jpeg");
m_xCompressionMF = m_xBuilder->weld_spin_button("spin-compression");
m_xCompressionSlider = m_xBuilder->weld_scale("scale-compression");
m_xLosslessRB = m_xBuilder->weld_radio_button("radio-lossless");
m_xQualityMF = m_xBuilder->weld_spin_button("spin-quality");
m_xQualitySlider = m_xBuilder->weld_scale("scale-quality");
m_xReduceResolutionCB = m_xBuilder->weld_check_button("checkbox-reduce-resolution");
m_xMFNewWidth = m_xBuilder->weld_spin_button("spin-new-width");
m_xMFNewHeight = m_xBuilder->weld_spin_button("spin-new-height");
m_xResolutionLB = m_xBuilder->weld_combo_box("combo-resolution");
m_xBtnCalculate = m_xBuilder->weld_button("calculate");
m_xInterpolationCombo = m_xBuilder->weld_combo_box("interpolation-method-combo");
m_xBtnOkay = m_xBuilder->weld_button("ok");
m_xLabelGraphicType = m_xBuilder->weld_label(u"label-graphic-type"_ustr);
m_xFixedText2 = m_xBuilder->weld_label(u"label-original-size"_ustr);
m_xFixedText3 = m_xBuilder->weld_label(u"label-view-size"_ustr);
m_xFixedText5 = m_xBuilder->weld_label(u"label-image-capacity"_ustr);
m_xFixedText6 = m_xBuilder->weld_label(u"label-new-capacity"_ustr);
m_xJpegCompRB = m_xBuilder->weld_radio_button(u"radio-jpeg"_ustr);
m_xCompressionMF = m_xBuilder->weld_spin_button(u"spin-compression"_ustr);
m_xCompressionSlider = m_xBuilder->weld_scale(u"scale-compression"_ustr);
m_xLosslessRB = m_xBuilder->weld_radio_button(u"radio-lossless"_ustr);
m_xQualityMF = m_xBuilder->weld_spin_button(u"spin-quality"_ustr);
m_xQualitySlider = m_xBuilder->weld_scale(u"scale-quality"_ustr);
m_xReduceResolutionCB = m_xBuilder->weld_check_button(u"checkbox-reduce-resolution"_ustr);
m_xMFNewWidth = m_xBuilder->weld_spin_button(u"spin-new-width"_ustr);
m_xMFNewHeight = m_xBuilder->weld_spin_button(u"spin-new-height"_ustr);
m_xResolutionLB = m_xBuilder->weld_combo_box(u"combo-resolution"_ustr);
m_xBtnCalculate = m_xBuilder->weld_button(u"calculate"_ustr);
m_xInterpolationCombo = m_xBuilder->weld_combo_box(u"interpolation-method-combo"_ustr);
m_xBtnOkay = m_xBuilder->weld_button(u"ok"_ustr);
m_xInterpolationCombo->set_active_text("Lanczos");
m_xInterpolationCombo->set_active_text(u"Lanczos"_ustr);
m_xInterpolationCombo->connect_changed(LINK(this, CompressGraphicsDialog, NewInterpolationModifiedHdl));
@@ -206,7 +206,7 @@ void CompressGraphicsDialog::Update()
aNativeSizeString = aNativeSizeString.replaceAll("$(CAPACITY)", OUString::number( m_aNativeSize / 1024 ));
m_xFixedText5->set_label(aNativeSizeString);
m_xFixedText6->set_label("??");
m_xFixedText6->set_label(u"??"_ustr);
}
void CompressGraphicsDialog::UpdateSensitivity(const bool bSensitive)
@@ -274,12 +274,12 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Sequence< PropertyValue > aFilterData{
comphelper::makePropertyValue("Interlaced", sal_Int32(0)),
comphelper::makePropertyValue("Compression", static_cast<sal_Int32>(m_xCompressionMF->get_value())),
comphelper::makePropertyValue("Quality", static_cast<sal_Int32>(m_xQualityMF->get_value()))
comphelper::makePropertyValue(u"Interlaced"_ustr, sal_Int32(0)),
comphelper::makePropertyValue(u"Compression"_ustr, static_cast<sal_Int32>(m_xCompressionMF->get_value())),
comphelper::makePropertyValue(u"Quality"_ustr, static_cast<sal_Int32>(m_xQualityMF->get_value()))
};
OUString aGraphicFormatName = m_xLosslessRB->get_active() ? OUString( "png" ) : OUString( "jpg" );
OUString aGraphicFormatName = m_xLosslessRB->get_active() ? u"png"_ustr : u"jpg"_ustr;
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( aGraphicFormatName );
rFilter.ExportGraphic( aScaledGraphic, u"none", aStream, nFilterFormat, &aFilterData );
+2 -2
View File
@@ -67,7 +67,7 @@ void ContourWindow::SetPolyPolygon(const tools::PolyPolygon& rPolyPoly)
SfxItemSet aSet(pModel->GetItemPool());
aSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
aSet.Put(XFillColorItem("", TRANSCOL));
aSet.Put(XFillColorItem(u""_ustr, TRANSCOL));
aSet.Put(XFillTransparenceItem(50) );
pPathObj->SetMergedItemSetAndBroadcast(aSet);
@@ -113,7 +113,7 @@ void ContourWindow::InitSdrModel()
SfxItemSet aSet( pModel->GetItemPool() );
aSet.Put( XFillColorItem( "", TRANSCOL ) );
aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) );
aSet.Put( XFillTransparenceItem( 50 ) );
pView->SetAttributes( aSet );
pView->SetFrameDragSingles();
+33 -33
View File
@@ -293,7 +293,7 @@ void SvxTPage::ActivatePage()
}
SvxTPView::SvxTPView(weld::Container* pParent)
: SvxTPage(pParent, "svx/ui/redlineviewpage.ui", "RedlineViewPage")
: SvxTPage(pParent, u"svx/ui/redlineviewpage.ui"_ustr, u"RedlineViewPage"_ustr)
, bEnableAccept(true)
, bEnableAcceptAll(true)
, bEnableReject(true)
@@ -301,13 +301,13 @@ SvxTPView::SvxTPView(weld::Container* pParent)
, bEnableUndo(true)
, bEnableClearFormat(false)
, bEnableClearFormatAll(false)
, m_xAccept(m_xBuilder->weld_button("accept"))
, m_xReject(m_xBuilder->weld_button("reject"))
, m_xAcceptAll(m_xBuilder->weld_button("acceptall"))
, m_xRejectAll(m_xBuilder->weld_button("rejectall"))
, m_xUndo(m_xBuilder->weld_button("undo"))
, m_xViewData(new SvxRedlinTable(m_xBuilder->weld_tree_view("writerchanges"),
m_xBuilder->weld_tree_view("calcchanges")))
, m_xAccept(m_xBuilder->weld_button(u"accept"_ustr))
, m_xReject(m_xBuilder->weld_button(u"reject"_ustr))
, m_xAcceptAll(m_xBuilder->weld_button(u"acceptall"_ustr))
, m_xRejectAll(m_xBuilder->weld_button(u"rejectall"_ustr))
, m_xUndo(m_xBuilder->weld_button(u"undo"_ustr))
, m_xViewData(new SvxRedlinTable(m_xBuilder->weld_tree_view(u"writerchanges"_ustr),
m_xBuilder->weld_tree_view(u"calcchanges"_ustr)))
{
Link<weld::Button&,void> aLink=LINK( this, SvxTPView, PbClickHdl);
@@ -457,29 +457,29 @@ SvxTPage::SvxTPage(weld::Container* pParent, const OUString& rUIXMLDescription,
}
SvxTPFilter::SvxTPFilter(weld::Container* pParent)
: SvxTPage(pParent, "svx/ui/redlinefilterpage.ui", "RedlineFilterPage")
: SvxTPage(pParent, u"svx/ui/redlinefilterpage.ui"_ustr, u"RedlineFilterPage"_ustr)
, bModified(false)
, m_pRedlinTable(nullptr)
, m_xCbDate(m_xBuilder->weld_check_button("date"))
, m_xLbDate(m_xBuilder->weld_combo_box("datecond"))
, m_xDfDate(new SvtCalendarBox(m_xBuilder->weld_menu_button("startdate")))
, m_xTfDate(m_xBuilder->weld_formatted_spin_button("starttime"))
, m_xCbDate(m_xBuilder->weld_check_button(u"date"_ustr))
, m_xLbDate(m_xBuilder->weld_combo_box(u"datecond"_ustr))
, m_xDfDate(new SvtCalendarBox(m_xBuilder->weld_menu_button(u"startdate"_ustr)))
, m_xTfDate(m_xBuilder->weld_formatted_spin_button(u"starttime"_ustr))
, m_xTfDateFormatter(new weld::TimeFormatter(*m_xTfDate))
, m_xIbClock(m_xBuilder->weld_button("startclock"))
, m_xFtDate2(m_xBuilder->weld_label("and"))
, m_xDfDate2(new SvtCalendarBox(m_xBuilder->weld_menu_button("enddate")))
, m_xTfDate2(m_xBuilder->weld_formatted_spin_button("endtime"))
, m_xIbClock(m_xBuilder->weld_button(u"startclock"_ustr))
, m_xFtDate2(m_xBuilder->weld_label(u"and"_ustr))
, m_xDfDate2(new SvtCalendarBox(m_xBuilder->weld_menu_button(u"enddate"_ustr)))
, m_xTfDate2(m_xBuilder->weld_formatted_spin_button(u"endtime"_ustr))
, m_xTfDate2Formatter(new weld::TimeFormatter(*m_xTfDate2))
, m_xIbClock2(m_xBuilder->weld_button("endclock"))
, m_xCbAuthor(m_xBuilder->weld_check_button("author"))
, m_xLbAuthor(m_xBuilder->weld_combo_box("authorlist"))
, m_xCbRange(m_xBuilder->weld_check_button("range"))
, m_xEdRange(m_xBuilder->weld_entry("rangeedit"))
, m_xBtnRange(m_xBuilder->weld_button("dotdotdot"))
, m_xCbAction(m_xBuilder->weld_check_button("action"))
, m_xLbAction(m_xBuilder->weld_combo_box("actionlist"))
, m_xCbComment(m_xBuilder->weld_check_button("comment"))
, m_xEdComment(m_xBuilder->weld_entry("commentedit"))
, m_xIbClock2(m_xBuilder->weld_button(u"endclock"_ustr))
, m_xCbAuthor(m_xBuilder->weld_check_button(u"author"_ustr))
, m_xLbAuthor(m_xBuilder->weld_combo_box(u"authorlist"_ustr))
, m_xCbRange(m_xBuilder->weld_check_button(u"range"_ustr))
, m_xEdRange(m_xBuilder->weld_entry(u"rangeedit"_ustr))
, m_xBtnRange(m_xBuilder->weld_button(u"dotdotdot"_ustr))
, m_xCbAction(m_xBuilder->weld_check_button(u"action"_ustr))
, m_xLbAction(m_xBuilder->weld_combo_box(u"actionlist"_ustr))
, m_xCbComment(m_xBuilder->weld_check_button(u"comment"_ustr))
, m_xEdComment(m_xBuilder->weld_entry(u"commentedit"_ustr))
{
m_xTfDateFormatter->EnableEmptyField(false);
m_xTfDate2Formatter->EnableEmptyField(false);
@@ -951,16 +951,16 @@ IMPL_LINK_NOARG(SvxTPFilter, RefHandle, weld::Button&, void)
}
SvxAcceptChgCtr::SvxAcceptChgCtr(weld::Container* pParent)
: m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/redlinecontrol.ui"))
, m_xTabCtrl(m_xBuilder->weld_notebook("tabcontrol"))
: m_xBuilder(Application::CreateBuilder(pParent, u"svx/ui/redlinecontrol.ui"_ustr))
, m_xTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr))
{
m_xTabCtrl->connect_enter_page(LINK(this, SvxAcceptChgCtr, ActivatePageHdl));
m_xTabCtrl->connect_leave_page(LINK(this, SvxAcceptChgCtr, DeactivatePageHdl));
m_xTPFilter.reset(new SvxTPFilter(m_xTabCtrl->get_page("filter")));
m_xTPView.reset(new SvxTPView(m_xTabCtrl->get_page("view")));
m_xTPFilter.reset(new SvxTPFilter(m_xTabCtrl->get_page(u"filter"_ustr)));
m_xTPView.reset(new SvxTPView(m_xTabCtrl->get_page(u"view"_ustr)));
m_xTPFilter->SetRedlinTable(m_xTPView->GetTableControl());
m_xTabCtrl->set_current_page("view");
m_xTabCtrl->set_current_page(u"view"_ustr);
m_xTabCtrl->set_help_id(HID_REDLINE_CTRL_VIEW);
m_xTabCtrl->show();
}
@@ -973,7 +973,7 @@ SvxAcceptChgCtr::~SvxAcceptChgCtr()
void SvxAcceptChgCtr::ShowFilterPage()
{
m_xTabCtrl->set_current_page("filter");
m_xTabCtrl->set_current_page(u"filter"_ustr);
}
IMPL_LINK(SvxAcceptChgCtr, ActivatePageHdl, const OUString&, rPage, void)
+21 -21
View File
@@ -54,27 +54,27 @@ using namespace css;
SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet,
css::uno::Reference<css::frame::XFrame> xFrame)
: SfxDialogController(pParent, "cui/ui/specialcharacters.ui", "SpecialCharactersDialog")
: SfxDialogController(pParent, u"cui/ui/specialcharacters.ui"_ustr, u"SpecialCharactersDialog"_ustr)
, m_xVirDev(VclPtr<VirtualDevice>::Create())
, isSearchMode(true)
, m_xFrame(std::move(xFrame))
, m_aCharmapContents(*m_xBuilder, m_xVirDev, true)
, m_aShowChar(m_xVirDev)
, m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button("insert") : m_xBuilder->weld_button("ok"))
, m_xFontText(m_xBuilder->weld_label("fontft"))
, m_xFontLB(m_xBuilder->weld_combo_box("fontlb"))
, m_xSubsetText(m_xBuilder->weld_label("subsetft"))
, m_xSubsetLB(m_xBuilder->weld_combo_box("subsetlb"))
, m_xSearchText(m_xBuilder->weld_entry("search"))
, m_xHexCodeText(m_xBuilder->weld_entry("hexvalue"))
, m_xDecimalCodeText(m_xBuilder->weld_entry("decimalvalue"))
, m_xFavouritesBtn(m_xBuilder->weld_button("favbtn"))
, m_xCharName(m_xBuilder->weld_label("charname"))
, m_xShowChar(new weld::CustomWeld(*m_xBuilder, "showchar", m_aShowChar))
, m_xShowSet(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll", true), m_xVirDev))
, m_xShowSetArea(new weld::CustomWeld(*m_xBuilder, "showcharset", *m_xShowSet))
, m_xSearchSet(new SvxSearchCharSet(m_xBuilder->weld_scrolled_window("searchscroll", true), m_xVirDev))
, m_xSearchSetArea(new weld::CustomWeld(*m_xBuilder, "searchcharset", *m_xSearchSet))
, m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button(u"insert"_ustr) : m_xBuilder->weld_button(u"ok"_ustr))
, m_xFontText(m_xBuilder->weld_label(u"fontft"_ustr))
, m_xFontLB(m_xBuilder->weld_combo_box(u"fontlb"_ustr))
, m_xSubsetText(m_xBuilder->weld_label(u"subsetft"_ustr))
, m_xSubsetLB(m_xBuilder->weld_combo_box(u"subsetlb"_ustr))
, m_xSearchText(m_xBuilder->weld_entry(u"search"_ustr))
, m_xHexCodeText(m_xBuilder->weld_entry(u"hexvalue"_ustr))
, m_xDecimalCodeText(m_xBuilder->weld_entry(u"decimalvalue"_ustr))
, m_xFavouritesBtn(m_xBuilder->weld_button(u"favbtn"_ustr))
, m_xCharName(m_xBuilder->weld_label(u"charname"_ustr))
, m_xShowChar(new weld::CustomWeld(*m_xBuilder, u"showchar"_ustr, m_aShowChar))
, m_xShowSet(new SvxShowCharSet(m_xBuilder->weld_scrolled_window(u"showscroll"_ustr, true), m_xVirDev))
, m_xShowSetArea(new weld::CustomWeld(*m_xBuilder, u"showcharset"_ustr, *m_xShowSet))
, m_xSearchSet(new SvxSearchCharSet(m_xBuilder->weld_scrolled_window(u"searchscroll"_ustr, true), m_xVirDev))
, m_xSearchSetArea(new weld::CustomWeld(*m_xBuilder, u"searchcharset"_ustr, *m_xSearchSet))
{
m_aShowChar.SetCentered(true);
m_xFontLB->make_sorted();
@@ -308,7 +308,7 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont )
{
//if for some reason, like font in an old document, StarSymbol is requested and it's not available, then
//try OpenSymbol instead
aTmp.SetFamilyName("OpenSymbol");
aTmp.SetFamilyName(u"OpenSymbol"_ustr);
}
if (m_xFontLB->find_text(sFontFamilyName) == -1)
@@ -337,10 +337,10 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
if (m_xFrame.is()) {
uno::Sequence<beans::PropertyValue> aArgs{
comphelper::makePropertyValue("Symbols", sGlyph),
comphelper::makePropertyValue("FontName", aFont.GetFamilyName())
comphelper::makePropertyValue(u"Symbols"_ustr, sGlyph),
comphelper::makePropertyValue(u"FontName"_ustr, aFont.GetFamilyName())
};
comphelper::dispatchCommand(".uno:InsertSymbol", m_xFrame, aArgs);
comphelper::dispatchCommand(u".uno:InsertSymbol"_ustr, m_xFrame, aArgs);
m_aCharmapContents.updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
@@ -706,7 +706,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
SetChar(cChar);
else {
m_xCharName->set_label(SvxResId(RID_SVXSTR_MISSING_CHAR));
m_aShowChar.SetText(" ");
m_aShowChar.SetText(u" "_ustr);
switch(radix)
{
case Radix::decimal:
+1 -1
View File
@@ -345,7 +345,7 @@ void DialControl::SetNoRotation()
mpImpl->mbNoRot = true;
InvalidateControl();
if (mpImpl->mpLinkField)
mpImpl->mpLinkField->set_text("");
mpImpl->mpLinkField->set_text(u""_ustr);
}
}
+1 -1
View File
@@ -129,7 +129,7 @@ void Svx3DPreviewControl::Construct()
XATTR_FILL_FIRST, XATTR_FILLBITMAP> aSet( mpModel->GetItemPool() );
aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aSet.Put( XFillColorItem( "", COL_WHITE ) );
aSet.Put( XFillColorItem( u""_ustr, COL_WHITE ) );
mpScene->SetMergedItemSet(aSet);
+8 -8
View File
@@ -945,7 +945,7 @@ void SvxLineLB::Fill( const XDashListRef &pList )
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBitmap);
m_xControl->append("", pList->GetStringForUiSolidLine(), *pVD);
m_xControl->append(u""_ustr, pList->GetStringForUiSolidLine(), *pVD);
}
// entries for dashed lines
@@ -962,7 +962,7 @@ void SvxLineLB::Fill( const XDashListRef &pList )
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), aBitmap);
m_xControl->append("", pEntry->GetName(), *pVD);
m_xControl->append(u""_ustr, pEntry->GetName(), *pVD);
}
else
{
@@ -982,7 +982,7 @@ void SvxLineLB::Append( const XDashEntry& rEntry, const BitmapEx& rBitmap )
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
pVD->DrawBitmapEx(Point(), rBitmap);
m_xControl->append("", rEntry.GetName(), *pVD);
m_xControl->append(u""_ustr, rEntry.GetName(), *pVD);
}
else
{
@@ -1032,7 +1032,7 @@ void SvxLineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
const Size aBmpSize(aBitmap.GetSizePixel());
pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false);
pVD->DrawBitmapEx(bStart ? Point() : Point(-aBmpSize.Width() / 2, 0), aBitmap);
m_xControl->append("", pEntry->GetName(), *pVD);
m_xControl->append(u""_ustr, pEntry->GetName(), *pVD);
}
else
m_xControl->append_text(pEntry->GetName());
@@ -1050,7 +1050,7 @@ void SvxLineEndLB::Append( const XLineEndEntry& rEntry, const BitmapEx& rBitmap
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false);
pVD->DrawBitmapEx(Point(-aBmpSize.Width() / 2, 0), rBitmap);
m_xControl->append("", rEntry.GetName(), *pVD);
m_xControl->append(u""_ustr, rEntry.GetName(), *pVD);
}
else
{
@@ -1447,10 +1447,10 @@ void padWidthForSidebar(weld::Toolbar& rToolbar, const css::uno::Reference<css::
{
// use the, filled-in by dispatcher, width of measurewidth as the width
// of a "standard" column in a two column panel
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&rToolbar, "svx/ui/measurewidthbar.ui"));
std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar("measurewidth1"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&rToolbar, u"svx/ui/measurewidthbar.ui"_ustr));
std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar(u"measurewidth1"_ustr));
ToolbarUnoDispatcher aDispatcher1(*xToolbar1, *xBuilder, rFrame);
std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar("measurewidth2"));
std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar(u"measurewidth2"_ustr));
ToolbarUnoDispatcher aDispatcher2(*xToolbar2, *xBuilder, rFrame);
nColumnWidth = std::max(xToolbar1->get_preferred_size().Width(), xToolbar2->get_preferred_size().Width());
eSize = rToolbar.get_icon_size();
+18 -18
View File
@@ -570,10 +570,10 @@ void SAL_CALL PluginProgress::reset()
}
SaveDialog::SaveDialog(weld::Window* pParent, RecoveryCore* pCore)
: GenericDialogController(pParent, "svx/ui/docrecoverysavedialog.ui", "DocRecoverySaveDialog")
: GenericDialogController(pParent, u"svx/ui/docrecoverysavedialog.ui"_ustr, u"DocRecoverySaveDialog"_ustr)
, m_pCore(pCore)
, m_xFileListLB(m_xBuilder->weld_tree_view("filelist"))
, m_xOkBtn(m_xBuilder->weld_button("ok"))
, m_xFileListLB(m_xBuilder->weld_tree_view(u"filelist"_ustr))
, m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
m_xFileListLB->set_size_request(-1, m_xFileListLB->get_height_rows(10));
@@ -590,7 +590,7 @@ SaveDialog::SaveDialog(weld::Window* pParent, RecoveryCore* pCore)
for (const TURLInfo& rInfo : rURLs)
{
m_xFileListLB->append("", rInfo.DisplayName, rInfo.StandardImageId);
m_xFileListLB->append(u""_ustr, rInfo.DisplayName, rInfo.StandardImageId);
}
}
@@ -614,9 +614,9 @@ IMPL_LINK_NOARG(SaveDialog, OKButtonHdl, weld::Button&, void)
}
SaveProgressDialog::SaveProgressDialog(weld::Window* pParent, RecoveryCore* pCore)
: GenericDialogController(pParent, "svx/ui/docrecoveryprogressdialog.ui", "DocRecoveryProgressDialog")
: GenericDialogController(pParent, u"svx/ui/docrecoveryprogressdialog.ui"_ustr, u"DocRecoveryProgressDialog"_ustr)
, m_pCore(pCore)
, m_xProgressBar(m_xBuilder->weld_progress_bar("progress"))
, m_xProgressBar(m_xBuilder->weld_progress_bar(u"progress"_ustr))
{
m_xProgressBar->set_size_request(m_xProgressBar->get_approximate_digit_width() * 50, -1);
m_xProgress = new PluginProgress(m_xProgressBar.get());
@@ -671,7 +671,7 @@ static short impl_askUserForWizardCancel(weld::Widget* pParent, TranslateId pRes
}
RecoveryDialog::RecoveryDialog(weld::Window* pParent, RecoveryCore* pCore)
: GenericDialogController(pParent, "svx/ui/docrecoveryrecoverdialog.ui", "DocRecoveryRecoverDialog")
: GenericDialogController(pParent, u"svx/ui/docrecoveryrecoverdialog.ui"_ustr, u"DocRecoveryRecoverDialog"_ustr)
, m_aTitleRecoveryInProgress(SvxResId(RID_SVXSTR_RECOVERY_INPROGRESS))
, m_aRecoveryOnlyFinish (SvxResId(RID_SVXSTR_RECOVERYONLY_FINISH))
, m_aRecoveryOnlyFinishDescr(SvxResId(RID_SVXSTR_RECOVERYONLY_FINISH_DESCR))
@@ -687,11 +687,11 @@ RecoveryDialog::RecoveryDialog(weld::Window* pParent, RecoveryCore* pCore)
, m_aRecovInProgrStr(SvxResId(RID_SVXSTR_RECOVINPROGR))
, m_aNotRecovYetStr(SvxResId(RID_SVXSTR_NOTRECOVYET))
, m_aWillBeDiscStr(SvxResId(RID_SVXSTR_WILLDISCARD))
, m_xDescrFT(m_xBuilder->weld_label("desc"))
, m_xProgressBar(m_xBuilder->weld_progress_bar("progress"))
, m_xFileListLB(m_xBuilder->weld_tree_view("filelist"))
, m_xNextBtn(m_xBuilder->weld_button("next"))
, m_xCancelBtn(m_xBuilder->weld_button("cancel"))
, m_xDescrFT(m_xBuilder->weld_label(u"desc"_ustr))
, m_xProgressBar(m_xBuilder->weld_progress_bar(u"progress"_ustr))
, m_xFileListLB(m_xBuilder->weld_tree_view(u"filelist"_ustr))
, m_xNextBtn(m_xBuilder->weld_button(u"next"_ustr))
, m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr))
{
const auto nWidth = m_xFileListLB->get_approximate_digit_width() * 80;
m_xFileListLB->set_size_request(nWidth, m_xFileListLB->get_height_rows(10));
@@ -1128,15 +1128,15 @@ void RecoveryDialog::impl_updateItemDescription(int row, const TriState& rState)
BrokenRecoveryDialog::BrokenRecoveryDialog(weld::Window* pParent,
RecoveryCore* pCore,
bool bBeforeRecovery)
: GenericDialogController(pParent, "svx/ui/docrecoverybrokendialog.ui", "DocRecoveryBrokenDialog")
: GenericDialogController(pParent, u"svx/ui/docrecoverybrokendialog.ui"_ustr, u"DocRecoveryBrokenDialog"_ustr)
, m_pCore(pCore)
, m_bBeforeRecovery(bBeforeRecovery)
, m_bExecutionNeeded(false)
, m_xFileListLB(m_xBuilder->weld_tree_view("filelist"))
, m_xSaveDirED(m_xBuilder->weld_entry("savedir"))
, m_xSaveDirBtn(m_xBuilder->weld_button("change"))
, m_xOkBtn(m_xBuilder->weld_button("ok"))
, m_xCancelBtn(m_xBuilder->weld_button("cancel"))
, m_xFileListLB(m_xBuilder->weld_tree_view(u"filelist"_ustr))
, m_xSaveDirED(m_xBuilder->weld_entry(u"savedir"_ustr))
, m_xSaveDirBtn(m_xBuilder->weld_button(u"change"_ustr))
, m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr))
, m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr))
{
m_xSaveDirBtn->connect_clicked( LINK( this, BrokenRecoveryDialog, SaveButtonHdl ) );
m_xOkBtn->connect_clicked( LINK( this, BrokenRecoveryDialog, OkButtonHdl ) );
+25 -25
View File
@@ -177,23 +177,23 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow
SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
SfxChildWindow *pCW,
vcl::Window* _pParent)
: SfxDockingWindow(pBindinx, pCW, _pParent, "DockingFontwork", "svx/ui/dockingfontwork.ui")
: SfxDockingWindow(pBindinx, pCW, _pParent, u"DockingFontwork"_ustr, u"svx/ui/dockingfontwork.ui"_ustr)
, rBindings(*pBindinx)
, aInputIdle("SvxFontWorkDialog Input")
, nSaveShadowX(0)
, nSaveShadowY(0)
, nSaveShadowAngle(450)
, nSaveShadowSize (100)
, m_xTbxStyle(m_xBuilder->weld_toolbar("style"))
, m_xTbxAdjust(m_xBuilder->weld_toolbar("adjust"))
, m_xMtrFldDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM))
, m_xMtrFldTextStart(m_xBuilder->weld_metric_spin_button("indent", FieldUnit::CM))
, m_xTbxShadow(m_xBuilder->weld_toolbar("shadow"))
, m_xFbShadowX(m_xBuilder->weld_image("shadowx"))
, m_xMtrFldShadowX(m_xBuilder->weld_metric_spin_button("distancex", FieldUnit::CM))
, m_xFbShadowY(m_xBuilder->weld_image("shadowy"))
, m_xMtrFldShadowY(m_xBuilder->weld_metric_spin_button("distancey", FieldUnit::CM))
, m_xShadowColorLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), [this]{ return GetFrameWeld(); } ))
, m_xTbxStyle(m_xBuilder->weld_toolbar(u"style"_ustr))
, m_xTbxAdjust(m_xBuilder->weld_toolbar(u"adjust"_ustr))
, m_xMtrFldDistance(m_xBuilder->weld_metric_spin_button(u"distance"_ustr, FieldUnit::CM))
, m_xMtrFldTextStart(m_xBuilder->weld_metric_spin_button(u"indent"_ustr, FieldUnit::CM))
, m_xTbxShadow(m_xBuilder->weld_toolbar(u"shadow"_ustr))
, m_xFbShadowX(m_xBuilder->weld_image(u"shadowx"_ustr))
, m_xMtrFldShadowX(m_xBuilder->weld_metric_spin_button(u"distancex"_ustr, FieldUnit::CM))
, m_xFbShadowY(m_xBuilder->weld_image(u"shadowy"_ustr))
, m_xMtrFldShadowY(m_xBuilder->weld_metric_spin_button(u"distancey"_ustr, FieldUnit::CM))
, m_xShadowColorLB(new ColorListBox(m_xBuilder->weld_menu_button(u"color"_ustr), [this]{ return GetFrameWeld(); } ))
{
SetText(SvxResId(RID_SVXSTR_FONTWORK));
@@ -316,7 +316,7 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
{
if ( pItem )
{
OUString sId = "off";
OUString sId = u"off"_ustr;
switch ( pItem->GetValue() )
{
@@ -331,16 +331,16 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
// Make sure that there is always exactly one checked toolbox item.
if ( pItem->GetValue() == XFormTextStyle::NONE )
{
m_xTbxStyle->set_item_active("rotate", false);
m_xTbxStyle->set_item_active("upright", false);
m_xTbxStyle->set_item_active("hori", false);
m_xTbxStyle->set_item_active("vert", false);
m_xTbxStyle->set_item_active(u"rotate"_ustr, false);
m_xTbxStyle->set_item_active(u"upright"_ustr, false);
m_xTbxStyle->set_item_active(u"hori"_ustr, false);
m_xTbxStyle->set_item_active(u"vert"_ustr, false);
m_xTbxStyle->set_item_active("off", true);
m_xTbxStyle->set_item_active(u"off"_ustr, true);
}
else
{
m_xTbxStyle->set_item_active("off", false);
m_xTbxStyle->set_item_active(u"off"_ustr, false);
m_xTbxStyle->set_item_active(sId, true);
}
@@ -416,7 +416,7 @@ void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
{
if ( pItem )
m_xTbxAdjust->set_item_active("orientation", pItem->GetValue());
m_xTbxAdjust->set_item_active(u"orientation"_ustr, pItem->GetValue());
}
// Set button for contour display
@@ -424,7 +424,7 @@ void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
{
if ( pItem )
m_xTbxShadow->set_item_active("contour", !pItem->GetValue());
m_xTbxShadow->set_item_active(u"contour"_ustr, !pItem->GetValue());
}
// Set button for text border
@@ -432,7 +432,7 @@ void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem)
{
if ( pItem )
m_xTbxShadow->set_item_active("textcontour", pItem->GetValue());
m_xTbxShadow->set_item_active(u"textcontour"_ustr, pItem->GetValue());
}
// Set shadow buttons
@@ -564,7 +564,7 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methods regarding to the kind of value accessed.
if (m_xTbxShadow->get_item_active("slant"))
if (m_xTbxShadow->get_item_active(u"slant"_ustr))
{
// #i19251#
// There is no value correction necessary at all, i think this
@@ -590,7 +590,7 @@ void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methods regarding to the kind of value accessed.
if (m_xTbxShadow->get_item_active("slant"))
if (m_xTbxShadow->get_item_active(u"slant"_ustr))
{
m_xMtrFldShadowY->set_value(pItem->GetValue(), FieldUnit::NONE);
}
@@ -722,7 +722,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer*, void)
}
}
if( eDlgUnit != m_xMtrFldShadowX->get_unit() &&
m_xTbxShadow->get_item_active("vertical") )
m_xTbxShadow->get_item_active(u"vertical"_ustr) )
{
SetFieldUnit(*m_xMtrFldShadowX, eDlgUnit, true);
SetFieldUnit(*m_xMtrFldShadowY, eDlgUnit, true);
@@ -773,7 +773,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer*, void)
IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl, ColorListBox&, void)
{
XFormTextShadowColorItem aItem( "", m_xShadowColorLB->GetSelectEntryColor() );
XFormTextShadowColorItem aItem( u""_ustr, m_xShadowColorLB->GetSelectEntryColor() );
GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_SHDWCOLOR,
SfxCallMode::RECORD, { &aItem });
}
+4 -4
View File
@@ -25,11 +25,11 @@ namespace svx
{
GotoPageDlg::GotoPageDlg(weld::Window* pParent, const OUString& title, const OUString& label,
sal_uInt16 curPagePos, sal_uInt16 pageCnt)
: GenericDialogController(pParent, "svx/ui/gotopagedialog.ui", "GotoPageDialog")
: GenericDialogController(pParent, u"svx/ui/gotopagedialog.ui"_ustr, u"GotoPageDialog"_ustr)
, mnMaxPageCnt(1)
, mxMtrPageCtrl(m_xBuilder->weld_spin_button("page"))
, mxPageNumberLbl(m_xBuilder->weld_label("page_count"))
, mxPageLbl(m_xBuilder->weld_label("page_label"))
, mxMtrPageCtrl(m_xBuilder->weld_spin_button(u"page"_ustr))
, mxPageNumberLbl(m_xBuilder->weld_label(u"page_count"_ustr))
, mxPageLbl(m_xBuilder->weld_label(u"page_label"_ustr))
{
set_title(title);
mxPageLbl->set_label(label);
+30 -30
View File
@@ -121,50 +121,50 @@ SvxFooterPage::SvxFooterPage(weld::Container* pPage, weld::DialogController* pCo
}
SvxHFPage::SvxHFPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, sal_uInt16 nSetId)
: SfxTabPage(pPage, pController, "svx/ui/headfootformatpage.ui", "HFFormatPage", &rSet)
: SfxTabPage(pPage, pController, u"svx/ui/headfootformatpage.ui"_ustr, u"HFFormatPage"_ustr, &rSet)
, nId(nSetId)
, mbDisableQueryBox(false)
, mbEnableDrawingLayerFillStyles(false)
, m_xCntSharedBox(m_xBuilder->weld_check_button("checkSameLR"))
, m_xCntSharedFirstBox(m_xBuilder->weld_check_button("checkSameFP"))
, m_xLMLbl(m_xBuilder->weld_label("labelLeftMarg"))
, m_xLMEdit(m_xBuilder->weld_metric_spin_button("spinMargLeft", FieldUnit::CM))
, m_xRMLbl(m_xBuilder->weld_label("labelRightMarg"))
, m_xRMEdit(m_xBuilder->weld_metric_spin_button("spinMargRight", FieldUnit::CM))
, m_xDistFT(m_xBuilder->weld_label("labelSpacing"))
, m_xDistEdit(m_xBuilder->weld_metric_spin_button("spinSpacing", FieldUnit::CM))
, m_xDynSpacingCB(m_xBuilder->weld_check_button("checkDynSpacing"))
, m_xHeightFT(m_xBuilder->weld_label("labelHeight"))
, m_xHeightEdit(m_xBuilder->weld_metric_spin_button("spinHeight", FieldUnit::CM))
, m_xHeightDynBtn(m_xBuilder->weld_check_button("checkAutofit"))
, m_xBackgroundBtn(m_xBuilder->weld_button("buttonMore"))
, m_xBspWin(new weld::CustomWeld(*m_xBuilder, "drawingareaPageHF", m_aBspWin))
, m_xCntSharedBox(m_xBuilder->weld_check_button(u"checkSameLR"_ustr))
, m_xCntSharedFirstBox(m_xBuilder->weld_check_button(u"checkSameFP"_ustr))
, m_xLMLbl(m_xBuilder->weld_label(u"labelLeftMarg"_ustr))
, m_xLMEdit(m_xBuilder->weld_metric_spin_button(u"spinMargLeft"_ustr, FieldUnit::CM))
, m_xRMLbl(m_xBuilder->weld_label(u"labelRightMarg"_ustr))
, m_xRMEdit(m_xBuilder->weld_metric_spin_button(u"spinMargRight"_ustr, FieldUnit::CM))
, m_xDistFT(m_xBuilder->weld_label(u"labelSpacing"_ustr))
, m_xDistEdit(m_xBuilder->weld_metric_spin_button(u"spinSpacing"_ustr, FieldUnit::CM))
, m_xDynSpacingCB(m_xBuilder->weld_check_button(u"checkDynSpacing"_ustr))
, m_xHeightFT(m_xBuilder->weld_label(u"labelHeight"_ustr))
, m_xHeightEdit(m_xBuilder->weld_metric_spin_button(u"spinHeight"_ustr, FieldUnit::CM))
, m_xHeightDynBtn(m_xBuilder->weld_check_button(u"checkAutofit"_ustr))
, m_xBackgroundBtn(m_xBuilder->weld_button(u"buttonMore"_ustr))
, m_xBspWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaPageHF"_ustr, m_aBspWin))
{
//swap header <-> footer in UI
if (nId == SID_ATTR_PAGE_FOOTERSET)
{
m_xContainer->set_help_id("svx/ui/headfootformatpage/FFormatPage");
m_xPageLbl = m_xBuilder->weld_label("labelFooterFormat");
m_xTurnOnBox = m_xBuilder->weld_check_button("checkFooterOn");
m_xContainer->set_help_id(u"svx/ui/headfootformatpage/FFormatPage"_ustr);
m_xPageLbl = m_xBuilder->weld_label(u"labelFooterFormat"_ustr);
m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkFooterOn"_ustr);
/* Set custom HIDs for the Footer help page (shared/01/05040400.xhp)
otherwise it would display the same extended help
on both the Header and Footer tabs */
m_xCntSharedBox->set_help_id( "SVX_HID_FOOTER_CHECKSAMELR" );
m_xCntSharedFirstBox->set_help_id( "SVX_HID_FOOTER_CHECKSAMEFP" );
m_xLMEdit->set_help_id( "SVX_HID_FOOTER_SPINMARGLEFT" );
m_xRMEdit->set_help_id( "SVX_HID_FOOTER_SPINMARGRIGHT" );
m_xDistEdit->set_help_id( "SVX_HID_FOOTER_SPINSPACING" );
m_xDynSpacingCB->set_help_id( "SVX_HID_FOOTER_CHECKDYNSPACING" );
m_xHeightEdit->set_help_id( "SVX_HID_FOOTER_SPINHEIGHT" );
m_xHeightDynBtn->set_help_id( "SVX_HID_FOOTER_CHECKAUTOFIT" );
m_xBackgroundBtn->set_help_id( "SVX_HID_FOOTER_BUTTONMORE" );
m_xCntSharedBox->set_help_id( u"SVX_HID_FOOTER_CHECKSAMELR"_ustr );
m_xCntSharedFirstBox->set_help_id( u"SVX_HID_FOOTER_CHECKSAMEFP"_ustr );
m_xLMEdit->set_help_id( u"SVX_HID_FOOTER_SPINMARGLEFT"_ustr );
m_xRMEdit->set_help_id( u"SVX_HID_FOOTER_SPINMARGRIGHT"_ustr );
m_xDistEdit->set_help_id( u"SVX_HID_FOOTER_SPINSPACING"_ustr );
m_xDynSpacingCB->set_help_id( u"SVX_HID_FOOTER_CHECKDYNSPACING"_ustr );
m_xHeightEdit->set_help_id( u"SVX_HID_FOOTER_SPINHEIGHT"_ustr );
m_xHeightDynBtn->set_help_id( u"SVX_HID_FOOTER_CHECKAUTOFIT"_ustr );
m_xBackgroundBtn->set_help_id( u"SVX_HID_FOOTER_BUTTONMORE"_ustr );
}
else //Header
{
m_xContainer->set_help_id("svx/ui/headfootformatpage/HFormatPage");
m_xPageLbl = m_xBuilder->weld_label("labelHeaderFormat");
m_xTurnOnBox = m_xBuilder->weld_check_button("checkHeaderOn");
m_xContainer->set_help_id(u"svx/ui/headfootformatpage/HFormatPage"_ustr);
m_xPageLbl = m_xBuilder->weld_label(u"labelHeaderFormat"_ustr);
m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkHeaderOn"_ustr);
}
m_xTurnOnBox->show();
m_xPageLbl->show();
+71 -71
View File
@@ -100,28 +100,28 @@ void SvxIMapDlgChildWindow::UpdateIMapDlg( const Graphic& rGraphic, const ImageM
}
SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Window* _pParent)
: SfxModelessDialogController(_pBindings, pCW, _pParent, "svx/ui/imapdialog.ui", "ImapDialog")
: SfxModelessDialogController(_pBindings, pCW, _pParent, u"svx/ui/imapdialog.ui"_ustr, u"ImapDialog"_ustr)
, pCheckObj(nullptr)
, aIMapItem(*this, *_pBindings)
, m_xIMapWnd(new IMapWindow(_pBindings->GetActiveFrame(), m_xDialog.get()))
, m_xTbxIMapDlg1(m_xBuilder->weld_toolbar("toolbar"))
, m_xFtURL(m_xBuilder->weld_label("urlft"))
, m_xURLBox(new SvtURLBox(m_xBuilder->weld_combo_box("url")))
, m_xFtText(m_xBuilder->weld_label("textft"))
, m_xEdtText(m_xBuilder->weld_entry("text"))
, m_xFtTarget(m_xBuilder->weld_label("targetft"))
, m_xCbbTarget(m_xBuilder->weld_combo_box("target"))
, m_xCancelBtn(m_xBuilder->weld_button("cancel"))
, m_xStbStatus1(m_xBuilder->weld_label("statusurl"))
, m_xStbStatus2(m_xBuilder->weld_label("statuspos"))
, m_xStbStatus3(m_xBuilder->weld_label("statussize"))
, m_xIMapWndWeld(new weld::CustomWeld(*m_xBuilder, "container", *m_xIMapWnd))
, m_xTbxIMapDlg1(m_xBuilder->weld_toolbar(u"toolbar"_ustr))
, m_xFtURL(m_xBuilder->weld_label(u"urlft"_ustr))
, m_xURLBox(new SvtURLBox(m_xBuilder->weld_combo_box(u"url"_ustr)))
, m_xFtText(m_xBuilder->weld_label(u"textft"_ustr))
, m_xEdtText(m_xBuilder->weld_entry(u"text"_ustr))
, m_xFtTarget(m_xBuilder->weld_label(u"targetft"_ustr))
, m_xCbbTarget(m_xBuilder->weld_combo_box(u"target"_ustr))
, m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr))
, m_xStbStatus1(m_xBuilder->weld_label(u"statusurl"_ustr))
, m_xStbStatus2(m_xBuilder->weld_label(u"statuspos"_ustr))
, m_xStbStatus3(m_xBuilder->weld_label(u"statussize"_ustr))
, m_xIMapWndWeld(new weld::CustomWeld(*m_xBuilder, u"container"_ustr, *m_xIMapWnd))
{
m_xTbxIMapDlg1->insert_separator(4, "sep1");
m_xTbxIMapDlg1->insert_separator(10, "sep2");
m_xTbxIMapDlg1->insert_separator(15, "sep3");
m_xTbxIMapDlg1->insert_separator(18, "sel4");
m_xTbxIMapDlg1->insert_separator(4, u"sep1"_ustr);
m_xTbxIMapDlg1->insert_separator(10, u"sep2"_ustr);
m_xTbxIMapDlg1->insert_separator(15, u"sep3"_ustr);
m_xTbxIMapDlg1->insert_separator(18, u"sel4"_ustr);
//lock this down so it doesn't jump around in size
//as entries are added later on
@@ -148,12 +148,12 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Windo
m_xCbbTarget->connect_focus_out( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
m_xTbxIMapDlg1->connect_clicked( LINK( this, SvxIMapDlg, TbxClickHdl ) );
OUString sSelect("TBI_SELECT");
OUString sSelect(u"TBI_SELECT"_ustr);
m_xTbxIMapDlg1->set_item_active(sSelect, true);
TbxClickHdl(sSelect);
m_xStbStatus1->set_size_request(120, -1);
const int nWidth = m_xStbStatus1->get_pixel_size(" 9999,99 cm / 9999,99 cm ").Width();
const int nWidth = m_xStbStatus1->get_pixel_size(u" 9999,99 cm / 9999,99 cm "_ustr).Width();
m_xStbStatus2->set_size_request(nWidth, -1);
m_xStbStatus3->set_size_request(nWidth, -1);
@@ -167,9 +167,9 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Windo
pOwnData->aIdle.SetInvokeHandler( LINK( this, SvxIMapDlg, UpdateHdl ) );
m_xTbxIMapDlg1->set_item_sensitive("TBI_ACTIVE", false);
m_xTbxIMapDlg1->set_item_sensitive("TBI_MACRO", false );
m_xTbxIMapDlg1->set_item_sensitive("TBI_PROPERTY", false );
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_ACTIVE"_ustr, false);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_MACRO"_ustr, false );
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_PROPERTY"_ustr, false );
m_xCancelBtn->connect_clicked(LINK(this, SvxIMapDlg, CancelHdl));
}
@@ -184,10 +184,10 @@ IMPL_LINK_NOARG(SvxIMapDlg, CancelHdl, weld::Button&, void)
{
bool bRet = true;
if ( m_xTbxIMapDlg1->get_item_sensitive("TBI_APPLY") )
if ( m_xTbxIMapDlg1->get_item_sensitive(u"TBI_APPLY"_ustr) )
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querymodifyimagemapchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryModifyImageMapChangesDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"svx/ui/querymodifyimagemapchangesdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryModifyImageMapChangesDialog"_ustr));
const tools::Long nRet = xQBox->run();
if( nRet == RET_YES )
@@ -202,8 +202,8 @@ IMPL_LINK_NOARG(SvxIMapDlg, CancelHdl, weld::Button&, void)
}
else if( m_xIMapWnd->IsChanged() )
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querysaveimagemapchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveImageMapChangesDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"svx/ui/querysaveimagemapchangesdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QuerySaveImageMapChangesDialog"_ustr));
const tools::Long nRet = xQBox->run();
if( nRet == RET_YES )
@@ -468,28 +468,28 @@ bool SvxIMapDlg::DoSave()
void SvxIMapDlg::SetActiveTool(std::u16string_view rId)
{
m_xTbxIMapDlg1->set_item_active("TBI_SELECT", rId == u"TBI_SELECT");
m_xTbxIMapDlg1->set_item_active("TBI_RECT", rId == u"TBI_RECT");
m_xTbxIMapDlg1->set_item_active("TBI_CIRCLE", rId == u"TBI_CIRCLE");
m_xTbxIMapDlg1->set_item_active("TBI_POLY", rId == u"TBI_POLY");
m_xTbxIMapDlg1->set_item_active("TBI_FREEPOLY", rId == u"TBI_FREEPOLY");
m_xTbxIMapDlg1->set_item_active(u"TBI_SELECT"_ustr, rId == u"TBI_SELECT");
m_xTbxIMapDlg1->set_item_active(u"TBI_RECT"_ustr, rId == u"TBI_RECT");
m_xTbxIMapDlg1->set_item_active(u"TBI_CIRCLE"_ustr, rId == u"TBI_CIRCLE");
m_xTbxIMapDlg1->set_item_active(u"TBI_POLY"_ustr, rId == u"TBI_POLY");
m_xTbxIMapDlg1->set_item_active(u"TBI_FREEPOLY"_ustr, rId == u"TBI_FREEPOLY");
m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", rId == u"TBI_POLYINSERT");
m_xTbxIMapDlg1->set_item_active("TBI_POLYDELETE", false);
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYINSERT"_ustr, rId == u"TBI_POLYINSERT");
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYDELETE"_ustr, false);
bool bMove = rId == u"TBI_POLYMOVE"
|| ( rId == u"TBI_POLYEDIT"
&& !m_xTbxIMapDlg1->get_item_active("TBI_POLYINSERT")
&& !m_xTbxIMapDlg1->get_item_active("TBI_POLYDELETE") );
&& !m_xTbxIMapDlg1->get_item_active(u"TBI_POLYINSERT"_ustr)
&& !m_xTbxIMapDlg1->get_item_active(u"TBI_POLYDELETE"_ustr) );
m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", bMove );
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYMOVE"_ustr, bMove );
bool bEditMode = ( rId == u"TBI_POLYEDIT" )
|| ( rId == u"TBI_POLYMOVE")
|| ( rId == u"TBI_POLYINSERT")
|| ( rId == u"TBI_POLYDELETE" );
m_xTbxIMapDlg1->set_item_active("TBI_POLYEDIT", bEditMode);
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYEDIT"_ustr, bEditMode);
}
IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void )
@@ -512,10 +512,10 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void )
if ( !rInfo.bOneMarked )
{
m_xTbxIMapDlg1->set_item_active("TBI_ACTIVE", false);
m_xTbxIMapDlg1->set_item_sensitive("TBI_ACTIVE", false);
m_xTbxIMapDlg1->set_item_sensitive("TBI_MACRO", false);
m_xTbxIMapDlg1->set_item_sensitive("TBI_PROPERTY", false);
m_xTbxIMapDlg1->set_item_active(u"TBI_ACTIVE"_ustr, false);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_ACTIVE"_ustr, false);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_MACRO"_ustr, false);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_PROPERTY"_ustr, false);
m_xStbStatus1->set_label(OUString());
m_xFtURL->set_sensitive(false);
@@ -525,15 +525,15 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void )
m_xFtTarget->set_sensitive(false);
m_xCbbTarget->set_sensitive(false);
m_xURLBox->set_entry_text( "" );
m_xEdtText->set_text( "" );
m_xURLBox->set_entry_text( u""_ustr );
m_xEdtText->set_text( u""_ustr );
}
else
{
m_xTbxIMapDlg1->set_item_sensitive("TBI_ACTIVE", true);
m_xTbxIMapDlg1->set_item_active("TBI_ACTIVE", !rInfo.bActivated );
m_xTbxIMapDlg1->set_item_sensitive("TBI_MACRO", true);
m_xTbxIMapDlg1->set_item_sensitive("TBI_PROPERTY", true);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_ACTIVE"_ustr, true);
m_xTbxIMapDlg1->set_item_active(u"TBI_ACTIVE"_ustr, !rInfo.bActivated );
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_MACRO"_ustr, true);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_PROPERTY"_ustr, true);
m_xFtURL->set_sensitive(true);
m_xURLBox->set_sensitive(true);
@@ -638,8 +638,8 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl, Timer *, void)
{
if (m_xIMapWnd->IsChanged())
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querysaveimagemapchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveImageMapChangesDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"svx/ui/querysaveimagemapchangesdialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QuerySaveImageMapChangesDialog"_ustr));
if (xQBox->run() == RET_YES)
{
DoSave();
@@ -652,7 +652,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl, Timer *, void)
pCheckObj = pOwnData->pUpdateEditingObject;
// After changes => default selection
m_xTbxIMapDlg1->set_item_active("TBI_SELECT", true);
m_xTbxIMapDlg1->set_item_active(u"TBI_SELECT"_ustr, true);
m_xIMapWnd->SetEditMode( true );
}
@@ -669,37 +669,37 @@ IMPL_LINK( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void )
const SdrModel* pModel = pWnd->GetSdrModel();
const SdrView* pView = pWnd->GetSdrView();
const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr;
const bool bDrawEnabled = !( bPolyEdit && m_xTbxIMapDlg1->get_item_active("TBI_POLYEDIT") );
const bool bDrawEnabled = !( bPolyEdit && m_xTbxIMapDlg1->get_item_active(u"TBI_POLYEDIT"_ustr) );
m_xTbxIMapDlg1->set_item_sensitive("TBI_APPLY", pOwnData->bExecState && pWnd->IsChanged() );
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_APPLY"_ustr, pOwnData->bExecState && pWnd->IsChanged() );
m_xTbxIMapDlg1->set_item_sensitive("TBI_SELECT", bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive("TBI_RECT", bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive("TBI_CIRCLE", bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive("TBI_POLY", bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive("TBI_FREEPOLY", bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_SELECT"_ustr, bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_RECT"_ustr, bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_CIRCLE"_ustr, bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_POLY"_ustr, bDrawEnabled);
m_xTbxIMapDlg1->set_item_sensitive(u"TBI_FREEPOLY"_ustr, bDrawEnabled);
// BezierEditor State
m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYEDIT", bPolyEdit );
m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYMOVE", !bDrawEnabled );
m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYINSERT", !bDrawEnabled );
m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYDELETE", !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() );
m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYEDIT"_ustr, bPolyEdit );
m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYMOVE"_ustr, !bDrawEnabled );
m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYINSERT"_ustr, !bDrawEnabled );
m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYDELETE"_ustr, !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() );
// Undo/Redo
m_xTbxIMapDlg1->set_item_sensitive( "TBI_UNDO", pModel->HasUndoActions() );
m_xTbxIMapDlg1->set_item_sensitive( "TBI_REDO", pModel->HasRedoActions() );
m_xTbxIMapDlg1->set_item_sensitive( u"TBI_UNDO"_ustr, pModel->HasUndoActions() );
m_xTbxIMapDlg1->set_item_sensitive( u"TBI_REDO"_ustr, pModel->HasRedoActions() );
if ( bPolyEdit )
{
switch( pWnd->GetPolyEditMode() )
{
case SID_BEZIER_MOVE:
m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", true);
m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", false);
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYMOVE"_ustr, true);
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYINSERT"_ustr, false);
break;
case SID_BEZIER_INSERT:
m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", true);
m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", false);
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYINSERT"_ustr, true);
m_xTbxIMapDlg1->set_item_active(u"TBI_POLYMOVE"_ustr, false);
break;
default:
break;
@@ -707,9 +707,9 @@ IMPL_LINK( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void )
}
else
{
m_xTbxIMapDlg1->set_item_active( "TBI_POLYEDIT", false );
m_xTbxIMapDlg1->set_item_active( "TBI_POLYMOVE", true);
m_xTbxIMapDlg1->set_item_active( "TBI_POLYINSERT", false );
m_xTbxIMapDlg1->set_item_active( u"TBI_POLYEDIT"_ustr, false );
m_xTbxIMapDlg1->set_item_active( u"TBI_POLYMOVE"_ustr, true);
m_xTbxIMapDlg1->set_item_active( u"TBI_POLYINSERT"_ustr, false );
pWnd->SetPolyEditMode( 0 );
}
+25 -25
View File
@@ -78,7 +78,7 @@ IMapWindow::IMapWindow(const Reference< XFrame >& rxDocumentFrame, weld::Dialog*
: GraphCtrl(pDialog)
, mxDocumentFrame(rxDocumentFrame)
{
pIMapPool = new SfxItemPool("IMapItemPool");
pIMapPool = new SfxItemPool(u"IMapItemPool"_ustr);
pIMapPool->registerItemInfoPackage(getItemInfoPackageIMapWindow());
}
@@ -282,17 +282,17 @@ rtl::Reference<SdrObject> IMapWindow::CreateObj( const IMapObject* pIMapObj )
SfxItemSet aSet( pModel->GetItemPool() );
aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aSet.Put( XFillColorItem( "", TRANSCOL ) );
aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) );
if ( !pIMapObj->IsActive() )
{
aSet.Put( XFillTransparenceItem( 100 ) );
aSet.Put( XLineColorItem( "", COL_RED ) );
aSet.Put( XLineColorItem( u""_ustr, COL_RED ) );
}
else
{
aSet.Put( XFillTransparenceItem( 50 ) );
aSet.Put( XLineColorItem( "", COL_BLACK ) );
aSet.Put( XLineColorItem( u""_ustr, COL_BLACK ) );
}
pSdrObj->SetMergedItemSetAndBroadcast(aSet);
@@ -310,7 +310,7 @@ void IMapWindow::InitSdrModel()
SfxItemSet aSet( pModel->GetItemPool() );
aSet.Put( XFillColorItem( "", TRANSCOL ) );
aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) );
aSet.Put( XFillTransparenceItem( 50 ) );
pView->SetAttributes( aSet );
pView->SetFrameDragSingles();
@@ -496,20 +496,20 @@ bool IMapWindow::Command(const CommandEvent& rCEvt)
{
if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/imapmenu.ui"));
mxPopupMenu = xBuilder->weld_menu("menu");
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), u"svx/ui/imapmenu.ui"_ustr));
mxPopupMenu = xBuilder->weld_menu(u"menu"_ustr);
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
const size_t nMarked = rMarkList.GetMarkCount();
mxPopupMenu->set_sensitive("url", false);
mxPopupMenu->set_sensitive("active", false);
mxPopupMenu->set_sensitive("macro", false);
mxPopupMenu->set_sensitive("selectall", pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectCount());
mxPopupMenu->set_sensitive(u"url"_ustr, false);
mxPopupMenu->set_sensitive(u"active"_ustr, false);
mxPopupMenu->set_sensitive(u"macro"_ustr, false);
mxPopupMenu->set_sensitive(u"selectall"_ustr, pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectCount());
if ( !nMarked )
{
mxPopupMenu->set_sensitive("arrange", false);
mxPopupMenu->set_sensitive("delete", false);
mxPopupMenu->set_sensitive(u"arrange"_ustr, false);
mxPopupMenu->set_sensitive(u"delete"_ustr, false);
}
else
{
@@ -517,14 +517,14 @@ bool IMapWindow::Command(const CommandEvent& rCEvt)
{
SdrObject* pSdrObj = GetSelectedSdrObject();
mxPopupMenu->set_sensitive("url", true);
mxPopupMenu->set_sensitive("active", true);
mxPopupMenu->set_sensitive("macro", true);
mxPopupMenu->set_active("active", GetIMapObj(pSdrObj)->IsActive());
mxPopupMenu->set_sensitive(u"url"_ustr, true);
mxPopupMenu->set_sensitive(u"active"_ustr, true);
mxPopupMenu->set_sensitive(u"macro"_ustr, true);
mxPopupMenu->set_active(u"active"_ustr, GetIMapObj(pSdrObj)->IsActive());
}
mxPopupMenu->set_sensitive("arrange", true);
mxPopupMenu->set_sensitive("delete", true);
mxPopupMenu->set_sensitive(u"arrange"_ustr, true);
mxPopupMenu->set_sensitive(u"delete"_ustr, true);
}
MenuSelectHdl(mxPopupMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))));
@@ -563,7 +563,7 @@ sal_Int8 IMapWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (mxDropTargetHelper->IsDropFormatSupported(SotClipboardFormatId::NETSCAPE_BOOKMARK))
{
INetBookmark aBookMark( "", "" );
INetBookmark aBookMark( u""_ustr, u""_ustr );
SdrObject* pSdrObj = GetHitSdrObj( rEvt.maPosPixel );
if( pSdrObj && TransferableDataHelper( rEvt.maDropEvent.Transferable ).GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aBookMark ) )
@@ -619,17 +619,17 @@ void IMapWindow::SetCurrentObjState( bool bActive )
GetIMapObj( pObj )->SetActive( bActive );
aSet.Put( XFillColorItem( "", TRANSCOL ) );
aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) );
if ( !bActive )
{
aSet.Put( XFillTransparenceItem( 100 ) );
aSet.Put( XLineColorItem( "", COL_RED ) );
aSet.Put( XLineColorItem( u""_ustr, COL_RED ) );
}
else
{
aSet.Put( XFillTransparenceItem( 50 ) );
aSet.Put( XLineColorItem( "", COL_BLACK ) );
aSet.Put( XLineColorItem( u""_ustr, COL_BLACK ) );
}
pView->SetAttributes( aSet );
@@ -677,8 +677,8 @@ void IMapWindow::DoMacroAssign()
aSet(*pIMapPool);
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
aNamesItem.AddEvent( "MouseOver", "", SvMacroItemId::OnMouseOver );
aNamesItem.AddEvent( "MouseOut", "", SvMacroItemId::OnMouseOut );
aNamesItem.AddEvent( u"MouseOver"_ustr, u""_ustr, SvMacroItemId::OnMouseOver );
aNamesItem.AddEvent( u"MouseOut"_ustr, u""_ustr, SvMacroItemId::OnMouseOut );
aSet.Put( aNamesItem );
SvxMacroItem aMacroItem(SID_ATTR_MACROITEM);
+2 -2
View File
@@ -325,7 +325,7 @@ void SvxLanguageBox::SetLanguageList(SvxLanguageListFlags nLangList, bool bHasLa
}
if (bAddSeparator)
m_xControl->append_separator("");
m_xControl->append_separator(u""_ustr);
bool bAddAvailable = (!(nLangList & SvxLanguageListFlags::ONLY_KNOWN) &&
((nLangList & SvxLanguageListFlags::ALL) ||
@@ -423,7 +423,7 @@ weld::ComboBoxEntry SvxLanguageBox::BuildEntry(const LanguageType nLangType, sal
{
int nAt = find_id( nLang );
if (nAt != -1)
return weld::ComboBoxEntry("");
return weld::ComboBoxEntry(u""_ustr);
}
OUString aStrEntry = (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll)
+3 -2
View File
@@ -22,8 +22,9 @@
#include <officecfg/Office/Common.hxx>
SvxLinkWarningDialog::SvxLinkWarningDialog(weld::Widget* pParent, const OUString& _rFileName)
: MessageDialogController(pParent, "svx/ui/linkwarndialog.ui", "LinkWarnDialog", "ask")
, m_xWarningOnBox(m_xBuilder->weld_check_button("ask"))
: MessageDialogController(pParent, u"svx/ui/linkwarndialog.ui"_ustr, u"LinkWarnDialog"_ustr,
u"ask"_ustr)
, m_xWarningOnBox(m_xBuilder->weld_check_button(u"ask"_ustr))
{
// replace filename
OUString sInfoText = m_xDialog->get_primary_text();
+39 -39
View File
@@ -101,43 +101,43 @@ bool SvxGridItem::GetPresentation
// TabPage Screen Settings
SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet)
: SfxTabPage(pPage, pController, "svx/ui/optgridpage.ui", "OptGridPage", &rCoreSet)
: SfxTabPage(pPage, pController, u"svx/ui/optgridpage.ui"_ustr, u"OptGridPage"_ustr, &rCoreSet)
, bAttrModified(false)
, m_Emode(WRITER_MODE)
, m_xCbxUseGridsnap(m_xBuilder->weld_check_button("usegridsnap"))
, m_xCbxUseGridsnapImg(m_xBuilder->weld_widget("lockusegridsnap"))
, m_xCbxGridVisible(m_xBuilder->weld_check_button("gridvisible"))
, m_xCbxGridVisibleImg(m_xBuilder->weld_widget("lockgridvisible"))
, m_xMtrFldDrawX(m_xBuilder->weld_metric_spin_button("mtrflddrawx", FieldUnit::CM))
, m_xMtrFldDrawXImg(m_xBuilder->weld_widget("lockmtrflddrawx"))
, m_xMtrFldDrawY(m_xBuilder->weld_metric_spin_button("mtrflddrawy", FieldUnit::CM))
, m_xMtrFldDrawYImg(m_xBuilder->weld_widget("lockmtrflddrawy"))
, m_xNumFldDivisionX(m_xBuilder->weld_spin_button("numflddivisionx"))
, m_xNumFldDivisionXImg(m_xBuilder->weld_widget("locknumflddivisionx"))
, m_xNumFldDivisionY(m_xBuilder->weld_spin_button("numflddivisiony"))
, m_xNumFldDivisionYImg(m_xBuilder->weld_widget("locknumflddivisiony"))
, m_xCbxSynchronize(m_xBuilder->weld_check_button("synchronize"))
, m_xCbxSynchronizeImg(m_xBuilder->weld_widget("locksynchronize"))
, m_xSnapFrames(m_xBuilder->weld_widget("snapframes"))
, m_xCbxSnapHelplines(m_xBuilder->weld_check_button("snaphelplines"))
, m_xCbxSnapHelplinesImg(m_xBuilder->weld_widget("locksnaphelplines"))
, m_xCbxSnapBorder(m_xBuilder->weld_check_button("snapborder"))
, m_xCbxSnapBorderImg(m_xBuilder->weld_widget("locksnapborder"))
, m_xCbxSnapFrame(m_xBuilder->weld_check_button("snapframe"))
, m_xCbxSnapFrameImg(m_xBuilder->weld_widget("locksnapframe"))
, m_xCbxSnapPoints(m_xBuilder->weld_check_button("snappoints"))
, m_xCbxSnapPointsImg(m_xBuilder->weld_widget("locksnappoints"))
, m_xMtrFldSnapArea(m_xBuilder->weld_metric_spin_button("mtrfldsnaparea", FieldUnit::PIXEL))
, m_xMtrFldSnapAreaImg(m_xBuilder->weld_widget("lockmtrfldsnaparea"))
, m_xCbxOrtho(m_xBuilder->weld_check_button("ortho"))
, m_xCbxOrthoImg(m_xBuilder->weld_widget("lockortho"))
, m_xCbxBigOrtho(m_xBuilder->weld_check_button("bigortho"))
, m_xCbxBigOrthoImg(m_xBuilder->weld_widget("lockbigortho"))
, m_xCbxRotate(m_xBuilder->weld_check_button("rotate"))
, m_xCbxRotateImg(m_xBuilder->weld_widget("lockrotate"))
, m_xMtrFldAngle(m_xBuilder->weld_metric_spin_button("mtrfldangle", FieldUnit::DEGREE))
, m_xMtrFldBezAngle(m_xBuilder->weld_metric_spin_button("mtrfldbezangle", FieldUnit::DEGREE))
, m_xMtrFldBezAngleImg(m_xBuilder->weld_widget("lockmtrfldbezangle"))
, m_xCbxUseGridsnap(m_xBuilder->weld_check_button(u"usegridsnap"_ustr))
, m_xCbxUseGridsnapImg(m_xBuilder->weld_widget(u"lockusegridsnap"_ustr))
, m_xCbxGridVisible(m_xBuilder->weld_check_button(u"gridvisible"_ustr))
, m_xCbxGridVisibleImg(m_xBuilder->weld_widget(u"lockgridvisible"_ustr))
, m_xMtrFldDrawX(m_xBuilder->weld_metric_spin_button(u"mtrflddrawx"_ustr, FieldUnit::CM))
, m_xMtrFldDrawXImg(m_xBuilder->weld_widget(u"lockmtrflddrawx"_ustr))
, m_xMtrFldDrawY(m_xBuilder->weld_metric_spin_button(u"mtrflddrawy"_ustr, FieldUnit::CM))
, m_xMtrFldDrawYImg(m_xBuilder->weld_widget(u"lockmtrflddrawy"_ustr))
, m_xNumFldDivisionX(m_xBuilder->weld_spin_button(u"numflddivisionx"_ustr))
, m_xNumFldDivisionXImg(m_xBuilder->weld_widget(u"locknumflddivisionx"_ustr))
, m_xNumFldDivisionY(m_xBuilder->weld_spin_button(u"numflddivisiony"_ustr))
, m_xNumFldDivisionYImg(m_xBuilder->weld_widget(u"locknumflddivisiony"_ustr))
, m_xCbxSynchronize(m_xBuilder->weld_check_button(u"synchronize"_ustr))
, m_xCbxSynchronizeImg(m_xBuilder->weld_widget(u"locksynchronize"_ustr))
, m_xSnapFrames(m_xBuilder->weld_widget(u"snapframes"_ustr))
, m_xCbxSnapHelplines(m_xBuilder->weld_check_button(u"snaphelplines"_ustr))
, m_xCbxSnapHelplinesImg(m_xBuilder->weld_widget(u"locksnaphelplines"_ustr))
, m_xCbxSnapBorder(m_xBuilder->weld_check_button(u"snapborder"_ustr))
, m_xCbxSnapBorderImg(m_xBuilder->weld_widget(u"locksnapborder"_ustr))
, m_xCbxSnapFrame(m_xBuilder->weld_check_button(u"snapframe"_ustr))
, m_xCbxSnapFrameImg(m_xBuilder->weld_widget(u"locksnapframe"_ustr))
, m_xCbxSnapPoints(m_xBuilder->weld_check_button(u"snappoints"_ustr))
, m_xCbxSnapPointsImg(m_xBuilder->weld_widget(u"locksnappoints"_ustr))
, m_xMtrFldSnapArea(m_xBuilder->weld_metric_spin_button(u"mtrfldsnaparea"_ustr, FieldUnit::PIXEL))
, m_xMtrFldSnapAreaImg(m_xBuilder->weld_widget(u"lockmtrfldsnaparea"_ustr))
, m_xCbxOrtho(m_xBuilder->weld_check_button(u"ortho"_ustr))
, m_xCbxOrthoImg(m_xBuilder->weld_widget(u"lockortho"_ustr))
, m_xCbxBigOrtho(m_xBuilder->weld_check_button(u"bigortho"_ustr))
, m_xCbxBigOrthoImg(m_xBuilder->weld_widget(u"lockbigortho"_ustr))
, m_xCbxRotate(m_xBuilder->weld_check_button(u"rotate"_ustr))
, m_xCbxRotateImg(m_xBuilder->weld_widget(u"lockrotate"_ustr))
, m_xMtrFldAngle(m_xBuilder->weld_metric_spin_button(u"mtrfldangle"_ustr, FieldUnit::DEGREE))
, m_xMtrFldBezAngle(m_xBuilder->weld_metric_spin_button(u"mtrfldbezangle"_ustr, FieldUnit::DEGREE))
, m_xMtrFldBezAngleImg(m_xBuilder->weld_widget(u"lockmtrfldbezangle"_ustr))
{
// This page requires exchange Support
SetExchangeSupport();
@@ -205,8 +205,8 @@ OUString SvxGridTabPage::GetAllStrings()
{
OUString sAllStrings;
OUString labels[]
= { "label1", "label2", "flddrawx", "flddrawy", "label6", "label7", "label3",
"divisionx", "label4", "divisiony", "label5", "label8", "label9" };
= { u"label1"_ustr, u"label2"_ustr, u"flddrawx"_ustr, u"flddrawy"_ustr, u"label6"_ustr, u"label7"_ustr, u"label3"_ustr,
u"divisionx"_ustr, u"label4"_ustr, u"divisiony"_ustr, u"label5"_ustr, u"label8"_ustr, u"label9"_ustr };
for (const auto& label : labels)
{
@@ -215,8 +215,8 @@ OUString SvxGridTabPage::GetAllStrings()
}
OUString checkButton[]
= { "usegridsnap", "gridvisible", "synchronize", "snaphelplines", "snapborder",
"snapframe", "snappoints", "ortho", "bigortho", "rotate" };
= { u"usegridsnap"_ustr, u"gridvisible"_ustr, u"synchronize"_ustr, u"snaphelplines"_ustr, u"snapborder"_ustr,
u"snapframe"_ustr, u"snappoints"_ustr, u"ortho"_ustr, u"bigortho"_ustr, u"rotate"_ustr };
for (const auto& check : checkButton)
{
+1 -1
View File
@@ -227,7 +227,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
Size aDrawSize(0,aRect.GetHeight() / 6);
aFont.SetFontSize(aDrawSize);
rRenderContext.SetFont(aFont);
OUString sText("ABC");
OUString sText(u"ABC"_ustr);
Point aMove(1, rRenderContext.GetTextHeight());
sal_Unicode cArrow = 0x2193;
tools::Long nAWidth = rRenderContext.GetTextWidth(sText.copy(0,1));
+1 -1
View File
@@ -320,7 +320,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext,
// and in Impress' "Bullets and Numbering" dialog
//#i5153# painting gray or black rectangles as 'normal' numbering text
tools::Long nWidth = pVDev->GetTextWidth("Preview");
tools::Long nWidth = pVDev->GetTextWidth(u"Preview"_ustr);
tools::Long nTextHeight = pVDev->GetTextHeight();
tools::Long nRectHeight = nTextHeight * 2 / 3;
tools::Long nTopOffset = nTextHeight - nRectHeight;
+10 -10
View File
@@ -33,8 +33,8 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, weld::Button&, void)
VclMessageType::Warning, VclButtonsType::Ok,
m_aRepeatPasswdErrStr));
xBox->run();
m_xNewPasswdED->set_text("");
m_xRepeatPasswdED->set_text("");
m_xNewPasswdED->set_text(u""_ustr);
m_xRepeatPasswdED->set_text(u""_ustr);
m_xNewPasswdED->grab_focus();
bOK = false;
}
@@ -45,7 +45,7 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, weld::Button&, void)
VclMessageType::Warning, VclButtonsType::Ok,
m_aOldPasswdErrStr));
xBox->run();
m_xOldPasswdED->set_text("");
m_xOldPasswdED->set_text(u""_ustr);
m_xOldPasswdED->grab_focus();
bOK = false;
}
@@ -61,15 +61,15 @@ IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl, weld::Entry&, void)
}
SvxPasswordDialog::SvxPasswordDialog(weld::Window* pParent, bool bDisableOldPassword)
: SfxDialogController(pParent, "svx/ui/passwd.ui", "PasswordDialog")
: SfxDialogController(pParent, u"svx/ui/passwd.ui"_ustr, u"PasswordDialog"_ustr)
, m_aOldPasswdErrStr(SvxResId(RID_SVXSTR_ERR_OLD_PASSWD))
, m_aRepeatPasswdErrStr(SvxResId(RID_SVXSTR_ERR_REPEAT_PASSWD ))
, m_xOldFL(m_xBuilder->weld_label("oldpass"))
, m_xOldPasswdFT(m_xBuilder->weld_label("oldpassL"))
, m_xOldPasswdED(m_xBuilder->weld_entry("oldpassEntry"))
, m_xNewPasswdED(m_xBuilder->weld_entry("newpassEntry"))
, m_xRepeatPasswdED(m_xBuilder->weld_entry("confirmpassEntry"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
, m_xOldFL(m_xBuilder->weld_label(u"oldpass"_ustr))
, m_xOldPasswdFT(m_xBuilder->weld_label(u"oldpassL"_ustr))
, m_xOldPasswdED(m_xBuilder->weld_entry(u"oldpassEntry"_ustr))
, m_xNewPasswdED(m_xBuilder->weld_entry(u"newpassEntry"_ustr))
, m_xRepeatPasswdED(m_xBuilder->weld_entry(u"confirmpassEntry"_ustr))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
m_xOKBtn->connect_clicked(LINK(this, SvxPasswordDialog, ButtonHdl));
m_xRepeatPasswdED->connect_changed(LINK(this, SvxPasswordDialog, EditModifyHdl));
+23 -23
View File
@@ -186,33 +186,33 @@ void SvxRubyData_Impl::AssertOneEntry()
}
SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Window* pParent)
: SfxModelessDialogController(pBind, pCW, pParent, "svx/ui/asianphoneticguidedialog.ui",
"AsianPhoneticGuideDialog")
: SfxModelessDialogController(pBind, pCW, pParent, u"svx/ui/asianphoneticguidedialog.ui"_ustr,
u"AsianPhoneticGuideDialog"_ustr)
, nLastPos(0)
, nCurrentEdit(0)
, bModified(false)
, pBindings(pBind)
, m_pImpl(new SvxRubyData_Impl)
, m_xLeft1ED(m_xBuilder->weld_entry("Left1ED"))
, m_xRight1ED(m_xBuilder->weld_entry("Right1ED"))
, m_xLeft2ED(m_xBuilder->weld_entry("Left2ED"))
, m_xRight2ED(m_xBuilder->weld_entry("Right2ED"))
, m_xLeft3ED(m_xBuilder->weld_entry("Left3ED"))
, m_xRight3ED(m_xBuilder->weld_entry("Right3ED"))
, m_xLeft4ED(m_xBuilder->weld_entry("Left4ED"))
, m_xRight4ED(m_xBuilder->weld_entry("Right4ED"))
, m_xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow", true))
, m_xAdjustLB(m_xBuilder->weld_combo_box("adjustlb"))
, m_xPositionLB(m_xBuilder->weld_combo_box("positionlb"))
, m_xCharStyleFT(m_xBuilder->weld_label("styleft"))
, m_xCharStyleLB(m_xBuilder->weld_combo_box("stylelb"))
, m_xStylistPB(m_xBuilder->weld_button("styles"))
, m_xApplyPB(m_xBuilder->weld_button("ok"))
, m_xClosePB(m_xBuilder->weld_button("close"))
, m_xLeft1ED(m_xBuilder->weld_entry(u"Left1ED"_ustr))
, m_xRight1ED(m_xBuilder->weld_entry(u"Right1ED"_ustr))
, m_xLeft2ED(m_xBuilder->weld_entry(u"Left2ED"_ustr))
, m_xRight2ED(m_xBuilder->weld_entry(u"Right2ED"_ustr))
, m_xLeft3ED(m_xBuilder->weld_entry(u"Left3ED"_ustr))
, m_xRight3ED(m_xBuilder->weld_entry(u"Right3ED"_ustr))
, m_xLeft4ED(m_xBuilder->weld_entry(u"Left4ED"_ustr))
, m_xRight4ED(m_xBuilder->weld_entry(u"Right4ED"_ustr))
, m_xScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true))
, m_xAdjustLB(m_xBuilder->weld_combo_box(u"adjustlb"_ustr))
, m_xPositionLB(m_xBuilder->weld_combo_box(u"positionlb"_ustr))
, m_xCharStyleFT(m_xBuilder->weld_label(u"styleft"_ustr))
, m_xCharStyleLB(m_xBuilder->weld_combo_box(u"stylelb"_ustr))
, m_xStylistPB(m_xBuilder->weld_button(u"styles"_ustr))
, m_xApplyPB(m_xBuilder->weld_button(u"ok"_ustr))
, m_xClosePB(m_xBuilder->weld_button(u"close"_ustr))
, m_xContentArea(m_xDialog->weld_content_area())
, m_xGrid(m_xBuilder->weld_widget("grid"))
, m_xGrid(m_xBuilder->weld_widget(u"grid"_ustr))
, m_xPreviewWin(new RubyPreview)
, m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", *m_xPreviewWin))
, m_xPreview(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xPreviewWin))
{
m_xCharStyleLB->make_sorted();
m_xPreviewWin->setRubyDialog(this);
@@ -301,13 +301,13 @@ void SvxRubyDialog::Activate()
try
{
Reference<XNameAccess> xFam = xSupplier->getStyleFamilies();
Any aChar = xFam->getByName("CharacterStyles");
Any aChar = xFam->getByName(u"CharacterStyles"_ustr);
Reference<XNameContainer> xChar;
aChar >>= xChar;
Reference<XIndexAccess> xCharIdx(xChar, UNO_QUERY);
if (xCharIdx.is())
{
OUString sUIName("DisplayName");
OUString sUIName(u"DisplayName"_ustr);
for (sal_Int32 nStyle = 0; nStyle < xCharIdx->getCount(); nStyle++)
{
Any aStyle = xCharIdx->getByIndex(nStyle);
@@ -796,7 +796,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
break;
case RubyAdjust_INDENT_BLOCK:
{
tools::Long nCharWidth = rRenderContext.GetTextWidth("X");
tools::Long nCharWidth = rRenderContext.GetTextWidth(u"X"_ustr);
if (nOutTextWidth < (nRightEnd - nLeftStart - nCharWidth))
{
nCharWidth /= 2;
+8 -6
View File
@@ -120,7 +120,7 @@ uno::Reference<graphic::XGraphic> importSVG(std::u16string_view rSVG)
= graphic::GraphicProvider::create(xContext);
uno::Sequence<beans::PropertyValue> aMediaProperties{ comphelper::makePropertyValue(
"InputStream", xInputStream) };
u"InputStream"_ustr, xInputStream) };
uno::Reference<graphic::XGraphic> xGraphic(xProvider->queryGraphic(aMediaProperties));
return xGraphic;
}
@@ -144,12 +144,14 @@ void setShapeCertificate(const SdrView* pView,
// Remember the selected certificate.
uno::Reference<drawing::XShape> xShape = pSignatureLine->getUnoShape();
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
comphelper::SequenceAsHashMap aMap(xShapeProps->getPropertyValue("InteropGrabBag"));
aMap["SignatureCertificate"] <<= xCertificate;
xShapeProps->setPropertyValue("InteropGrabBag", uno::Any(aMap.getAsConstPropertyValueList()));
comphelper::SequenceAsHashMap aMap(xShapeProps->getPropertyValue(u"InteropGrabBag"_ustr));
aMap[u"SignatureCertificate"_ustr] <<= xCertificate;
xShapeProps->setPropertyValue(u"InteropGrabBag"_ustr,
uno::Any(aMap.getAsConstPropertyValueList()));
// Read svg and replace placeholder texts.
OUString aSvgImage(svx::SignatureLineHelper::getSignatureImage("signature-line-draw.svg"));
OUString aSvgImage(
svx::SignatureLineHelper::getSignatureImage(u"signature-line-draw.svg"_ustr));
aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", SvxResId(RID_SVXSTR_SIGNATURELINE_DSIGNED_BY));
OUString aSignerName = svx::SignatureLineHelper::getSignerName(xCertificate);
aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", aSignerName);
@@ -158,7 +160,7 @@ void setShapeCertificate(const SdrView* pView,
aSvgImage = aSvgImage.replaceAll("[DATE]", aDate);
uno::Reference<graphic::XGraphic> xGraphic = svx::SignatureLineHelper::importSVG(aSvgImage);
xShapeProps->setPropertyValue("Graphic", uno::Any(xGraphic));
xShapeProps->setPropertyValue(u"Graphic"_ustr, uno::Any(xGraphic));
}
}
+65 -65
View File
@@ -243,8 +243,8 @@ void SearchAttrItemList::Remove(size_t nPos)
SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind)
: SfxModelessDialogController(&rBind, pChildWin, pParent,
IsMobile() ? OUString("svx/ui/findreplacedialog-mobile.ui") : OUString("svx/ui/findreplacedialog.ui"),
"FindReplaceDialog")
IsMobile() ? u"svx/ui/findreplacedialog-mobile.ui"_ustr : u"svx/ui/findreplacedialog.ui"_ustr,
u"FindReplaceDialog"_ustr)
, rBindings(rBind)
, m_aPresentIdle("Bring SvxSearchDialog to Foreground")
, bWriter(false)
@@ -257,55 +257,55 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi
, nModifyFlag(ModifyFlags::NONE)
, pReplaceList(new SearchAttrItemList)
, nTransliterationFlags(TransliterationFlags::NONE)
, m_xSearchFrame(m_xBuilder->weld_frame("searchframe"))
, m_xSearchLB(m_xBuilder->weld_combo_box("searchterm"))
, m_xSearchTmplLB(m_xBuilder->weld_combo_box("searchlist"))
, m_xSearchAttrText(m_xBuilder->weld_label("searchdesc"))
, m_xSearchLabel(m_xBuilder->weld_label("searchlabel"))
, m_xSearchIcon(m_xBuilder->weld_image("searchicon"))
, m_xSearchBox(m_xBuilder->weld_box("searchbox"))
, m_xReplaceFrame(m_xBuilder->weld_frame("replaceframe"))
, m_xReplaceLB(m_xBuilder->weld_combo_box("replaceterm"))
, m_xReplaceTmplLB(m_xBuilder->weld_combo_box("replacelist"))
, m_xReplaceAttrText(m_xBuilder->weld_label("replacedesc"))
, m_xSearchBtn(m_xBuilder->weld_button("search"))
, m_xBackSearchBtn(m_xBuilder->weld_button("backsearch"))
, m_xSearchAllBtn(m_xBuilder->weld_button("searchall"))
, m_xReplaceBtn(m_xBuilder->weld_button("replace"))
, m_xReplaceAllBtn(m_xBuilder->weld_button("replaceall"))
, m_xComponentFrame(m_xBuilder->weld_frame("componentframe"))
, m_xSearchComponent1PB(m_xBuilder->weld_button("component1"))
, m_xSearchComponent2PB(m_xBuilder->weld_button("component2"))
, m_xMatchCaseCB(m_xBuilder->weld_check_button("matchcase"))
, m_xSearchFormattedCB(m_xBuilder->weld_check_button("searchformatted"))
, m_xWordBtn(m_xBuilder->weld_check_button("wholewords"))
, m_xCloseBtn(m_xBuilder->weld_button("close"))
, m_xHelpBtn(m_xBuilder->weld_button("help"))
, m_xIncludeDiacritics(m_xBuilder->weld_check_button("includediacritics"))
, m_xIncludeKashida(m_xBuilder->weld_check_button("includekashida"))
, m_xOtherOptionsExpander(m_xBuilder->weld_expander("OptionsExpander"))
, m_xSelectionBtn(m_xBuilder->weld_check_button("selection"))
, m_xRegExpBtn(m_xBuilder->weld_check_button("regexp"))
, m_xWildcardBtn(m_xBuilder->weld_check_button("wildcard"))
, m_xSimilarityBox(m_xBuilder->weld_check_button("similarity"))
, m_xSimilarityBtn(m_xBuilder->weld_button("similaritybtn"))
, m_xLayoutBtn(m_xBuilder->weld_check_button("layout"))
, m_xNotesBtn(m_xBuilder->weld_check_button("notes"))
, m_xJapMatchFullHalfWidthCB(m_xBuilder->weld_check_button("matchcharwidth"))
, m_xJapOptionsCB(m_xBuilder->weld_check_button("soundslike"))
, m_xReplaceBackwardsCB(m_xBuilder->weld_check_button("replace_backwards"))
, m_xJapOptionsBtn(m_xBuilder->weld_button("soundslikebtn"))
, m_xAttributeBtn(m_xBuilder->weld_button("attributes"))
, m_xFormatBtn(m_xBuilder->weld_button("format"))
, m_xNoFormatBtn(m_xBuilder->weld_button("noformat"))
, m_xCalcGrid(m_xBuilder->weld_widget("calcgrid"))
, m_xCalcSearchInFT(m_xBuilder->weld_label("searchinlabel"))
, m_xCalcSearchInLB(m_xBuilder->weld_combo_box("calcsearchin"))
, m_xCalcSearchDirFT(m_xBuilder->weld_label("searchdir"))
, m_xRowsBtn(m_xBuilder->weld_radio_button("rows"))
, m_xColumnsBtn(m_xBuilder->weld_radio_button("cols"))
, m_xAllSheetsCB(m_xBuilder->weld_check_button("allsheets"))
, m_xCalcStrFT(m_xBuilder->weld_label("entirecells"))
, m_xSearchFrame(m_xBuilder->weld_frame(u"searchframe"_ustr))
, m_xSearchLB(m_xBuilder->weld_combo_box(u"searchterm"_ustr))
, m_xSearchTmplLB(m_xBuilder->weld_combo_box(u"searchlist"_ustr))
, m_xSearchAttrText(m_xBuilder->weld_label(u"searchdesc"_ustr))
, m_xSearchLabel(m_xBuilder->weld_label(u"searchlabel"_ustr))
, m_xSearchIcon(m_xBuilder->weld_image(u"searchicon"_ustr))
, m_xSearchBox(m_xBuilder->weld_box(u"searchbox"_ustr))
, m_xReplaceFrame(m_xBuilder->weld_frame(u"replaceframe"_ustr))
, m_xReplaceLB(m_xBuilder->weld_combo_box(u"replaceterm"_ustr))
, m_xReplaceTmplLB(m_xBuilder->weld_combo_box(u"replacelist"_ustr))
, m_xReplaceAttrText(m_xBuilder->weld_label(u"replacedesc"_ustr))
, m_xSearchBtn(m_xBuilder->weld_button(u"search"_ustr))
, m_xBackSearchBtn(m_xBuilder->weld_button(u"backsearch"_ustr))
, m_xSearchAllBtn(m_xBuilder->weld_button(u"searchall"_ustr))
, m_xReplaceBtn(m_xBuilder->weld_button(u"replace"_ustr))
, m_xReplaceAllBtn(m_xBuilder->weld_button(u"replaceall"_ustr))
, m_xComponentFrame(m_xBuilder->weld_frame(u"componentframe"_ustr))
, m_xSearchComponent1PB(m_xBuilder->weld_button(u"component1"_ustr))
, m_xSearchComponent2PB(m_xBuilder->weld_button(u"component2"_ustr))
, m_xMatchCaseCB(m_xBuilder->weld_check_button(u"matchcase"_ustr))
, m_xSearchFormattedCB(m_xBuilder->weld_check_button(u"searchformatted"_ustr))
, m_xWordBtn(m_xBuilder->weld_check_button(u"wholewords"_ustr))
, m_xCloseBtn(m_xBuilder->weld_button(u"close"_ustr))
, m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr))
, m_xIncludeDiacritics(m_xBuilder->weld_check_button(u"includediacritics"_ustr))
, m_xIncludeKashida(m_xBuilder->weld_check_button(u"includekashida"_ustr))
, m_xOtherOptionsExpander(m_xBuilder->weld_expander(u"OptionsExpander"_ustr))
, m_xSelectionBtn(m_xBuilder->weld_check_button(u"selection"_ustr))
, m_xRegExpBtn(m_xBuilder->weld_check_button(u"regexp"_ustr))
, m_xWildcardBtn(m_xBuilder->weld_check_button(u"wildcard"_ustr))
, m_xSimilarityBox(m_xBuilder->weld_check_button(u"similarity"_ustr))
, m_xSimilarityBtn(m_xBuilder->weld_button(u"similaritybtn"_ustr))
, m_xLayoutBtn(m_xBuilder->weld_check_button(u"layout"_ustr))
, m_xNotesBtn(m_xBuilder->weld_check_button(u"notes"_ustr))
, m_xJapMatchFullHalfWidthCB(m_xBuilder->weld_check_button(u"matchcharwidth"_ustr))
, m_xJapOptionsCB(m_xBuilder->weld_check_button(u"soundslike"_ustr))
, m_xReplaceBackwardsCB(m_xBuilder->weld_check_button(u"replace_backwards"_ustr))
, m_xJapOptionsBtn(m_xBuilder->weld_button(u"soundslikebtn"_ustr))
, m_xAttributeBtn(m_xBuilder->weld_button(u"attributes"_ustr))
, m_xFormatBtn(m_xBuilder->weld_button(u"format"_ustr))
, m_xNoFormatBtn(m_xBuilder->weld_button(u"noformat"_ustr))
, m_xCalcGrid(m_xBuilder->weld_widget(u"calcgrid"_ustr))
, m_xCalcSearchInFT(m_xBuilder->weld_label(u"searchinlabel"_ustr))
, m_xCalcSearchInLB(m_xBuilder->weld_combo_box(u"calcsearchin"_ustr))
, m_xCalcSearchDirFT(m_xBuilder->weld_label(u"searchdir"_ustr))
, m_xRowsBtn(m_xBuilder->weld_radio_button(u"rows"_ustr))
, m_xColumnsBtn(m_xBuilder->weld_radio_button(u"cols"_ustr))
, m_xAllSheetsCB(m_xBuilder->weld_check_button(u"allsheets"_ustr))
, m_xCalcStrFT(m_xBuilder->weld_label(u"entirecells"_ustr))
{
if (comphelper::LibreOfficeKit::isActive())
{
@@ -320,7 +320,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi
m_xSearchAttrText->hide();
m_xSearchLabel->set_font_color(Color(0x00, 0x47, 0x85));
this->SetSearchLabel(""); // hide the message but keep the box height
this->SetSearchLabel(u""_ustr); // hide the message but keep the box height
m_xSearchIcon->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - too large here
m_xReplaceTmplLB->make_sorted();
@@ -454,7 +454,7 @@ void SvxSearchDialog::Construct_Impl()
bool bSearchComponent2 = false;
if(xDispatchProv.is())
{
OUString sTarget("_self");
OUString sTarget(u"_self"_ustr);
pImpl->xCommand1Dispatch = xDispatchProv->queryDispatch(pImpl->aCommand1URL, sTarget, 0);
if (pImpl->xCommand1Dispatch.is())
bSearchComponent1 = true;
@@ -471,22 +471,22 @@ void SvxSearchDialog::Construct_Impl()
uno::Reference< lang::XMultiServiceFactory > xConfigurationProvider =
configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() );
uno::Sequence< uno::Any > aArgs {
Any(OUString( "/org.openoffice.Office.Common/SearchOptions/")) };
Any(u"/org.openoffice.Office.Common/SearchOptions/"_ustr) };
uno::Reference< uno::XInterface > xIFace = xConfigurationProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess",
u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr,
aArgs);
uno::Reference< container::XNameAccess> xDirectAccess(xIFace, uno::UNO_QUERY);
if(xDirectAccess.is())
{
OUString sTemp;
uno::Any aRet = xDirectAccess->getByName("ComponentSearchGroupLabel");
uno::Any aRet = xDirectAccess->getByName(u"ComponentSearchGroupLabel"_ustr);
aRet >>= sTemp;
m_xComponentFrame->set_label(sTemp);
aRet = xDirectAccess->getByName("ComponentSearchCommandLabel1");
aRet = xDirectAccess->getByName(u"ComponentSearchCommandLabel1"_ustr);
aRet >>= sTemp;
m_xSearchComponent1PB->set_label( sTemp );
aRet = xDirectAccess->getByName("ComponentSearchCommandLabel2");
aRet = xDirectAccess->getByName(u"ComponentSearchCommandLabel2"_ustr);
aRet >>= sTemp;
m_xSearchComponent2PB->set_label( sTemp );
}
@@ -2039,7 +2039,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl, weld::Button&, void)
if ( bSearch )
{
pSearchList->Clear();
m_xSearchAttrText->set_label( "" );
m_xSearchAttrText->set_label( u""_ustr );
if (m_xSearchAttrText->get_visible())
{
m_xSearchAttrText->hide();
@@ -2049,7 +2049,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl, weld::Button&, void)
else
{
pReplaceList->Clear();
m_xReplaceAttrText->set_label( "" );
m_xReplaceAttrText->set_label( u""_ustr );
if (m_xReplaceAttrText->get_visible())
{
m_xReplaceAttrText->hide();
@@ -2211,7 +2211,7 @@ void SvxSearchDialog::SetModifyFlag_Impl( const weld::Widget* pCtrl )
nModifyFlag |= ModifyFlags::Search;
m_xSearchLB->set_entry_message_type(weld::EntryMessageType::Normal);
if (!SvxSearchDialogWrapper::GetSearchLabel().isEmpty())
SvxSearchDialogWrapper::SetSearchLabel("");
SvxSearchDialogWrapper::SetSearchLabel(u""_ustr);
}
else if ( m_xReplaceLB.get() == pCtrl )
nModifyFlag |= ModifyFlags::Replace;
@@ -2355,9 +2355,9 @@ static void lcl_SetSearchLabelWindow(const OUString& rStr, SfxViewFrame& rViewFr
css::uno::Reference< css::beans::XPropertySet > xPropSet(
rViewFrame.GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager;
css::uno::Reference< css::ui::XUIElement > xUIElement =
xLayoutManager->getElement("private:resource/toolbar/findbar");
xLayoutManager->getElement(u"private:resource/toolbar/findbar"_ustr);
if (!xUIElement.is())
return;
css::uno::Reference< css::awt::XWindow > xWindow(
@@ -2387,11 +2387,11 @@ OUString SvxSearchDialogWrapper::GetSearchLabel()
css::uno::Reference< css::beans::XPropertySet > xPropSet(
pViewFrame->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager;
if (!xLayoutManager.is())
return OUString();
css::uno::Reference< css::ui::XUIElement > xUIElement =
xLayoutManager->getElement("private:resource/toolbar/findbar");
xLayoutManager->getElement(u"private:resource/toolbar/findbar"_ustr);
if (!xUIElement.is())
return OUString();
css::uno::Reference< css::awt::XWindow > xWindow(
+1 -1
View File
@@ -51,7 +51,7 @@ static vcl::Font& lcl_GetDefaultBulletFont()
{
static vcl::Font aDefBulletFont = []()
{
static vcl::Font tmp("OpenSymbol", "", Size(0, 14));
static vcl::Font tmp(u"OpenSymbol"_ustr, u""_ustr, Size(0, 14));
tmp.SetCharSet( RTL_TEXTENCODING_SYMBOL );
tmp.SetFamily( FAMILY_DONTKNOW );
tmp.SetPitch( PITCH_DONTKNOW );
+4 -4
View File
@@ -538,7 +538,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
if (aSelection.eType == RulerType::DontKnow)
{
SetQuickHelpText("");
SetQuickHelpText(u""_ustr);
return;
}
@@ -624,7 +624,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
}
default:
{
SetQuickHelpText("");
SetQuickHelpText(u""_ustr);
break;
}
}
@@ -3313,8 +3313,8 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent )
tools::Rectangle aRect(rCommandEvent.GetMousePosPixel(), Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/rulermenu.ui"));
std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"svx/ui/rulermenu.ui"_ustr));
std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr));
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
if ( !mpTabs.empty() &&
+12 -8
View File
@@ -113,13 +113,13 @@ void WeldEditView::makeEditEngine()
vcl::Font aAppFont(Application::GetSettings().GetStyleSettings().GetAppFont());
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO));
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CJK));
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CTL));
pItemPool->SetUserDefaultItem(
@@ -829,7 +829,10 @@ public:
m_xTextHelper->RemoveEventListener(rListener);
}
virtual OUString SAL_CALL getImplementationName() override { return "WeldEditAccessible"; }
virtual OUString SAL_CALL getImplementationName() override
{
return u"WeldEditAccessible"_ustr;
}
virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override
{
@@ -838,8 +841,9 @@ public:
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
{
return { "css::accessibility::Accessible", "css::accessibility::AccessibleComponent",
"css::accessibility::AccessibleContext" };
return { u"css::accessibility::Accessible"_ustr,
u"css::accessibility::AccessibleComponent"_ustr,
u"css::accessibility::AccessibleContext"_ustr };
}
};
@@ -1705,12 +1709,12 @@ public:
virtual StringMap get_state() override
{
StringMap aMap = WindowUIObject::get_state();
aMap["Text"] = mpEditView->GetText();
aMap[u"Text"_ustr] = mpEditView->GetText();
return aMap;
}
private:
virtual OUString get_name() const override { return "WeldEditViewUIObject"; }
virtual OUString get_name() const override { return u"WeldEditViewUIObject"_ustr; }
};
}
+110 -110
View File
@@ -86,110 +86,110 @@ namespace {
Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent)
: SfxDockingWindow(pInBindings, pCW, pParent,
"Docking3DEffects", "svx/ui/docking3deffects.ui")
u"Docking3DEffects"_ustr, u"svx/ui/docking3deffects.ui"_ustr)
, m_xBtnGeo(m_xBuilder->weld_toggle_button("geometry"))
, m_xBtnRepresentation(m_xBuilder->weld_toggle_button("representation"))
, m_xBtnLight(m_xBuilder->weld_toggle_button("light"))
, m_xBtnTexture(m_xBuilder->weld_toggle_button("texture"))
, m_xBtnMaterial(m_xBuilder->weld_toggle_button("material"))
, m_xBtnUpdate(m_xBuilder->weld_toggle_button("update"))
, m_xBtnAssign(m_xBuilder->weld_button("assign"))
, m_xBtnGeo(m_xBuilder->weld_toggle_button(u"geometry"_ustr))
, m_xBtnRepresentation(m_xBuilder->weld_toggle_button(u"representation"_ustr))
, m_xBtnLight(m_xBuilder->weld_toggle_button(u"light"_ustr))
, m_xBtnTexture(m_xBuilder->weld_toggle_button(u"texture"_ustr))
, m_xBtnMaterial(m_xBuilder->weld_toggle_button(u"material"_ustr))
, m_xBtnUpdate(m_xBuilder->weld_toggle_button(u"update"_ustr))
, m_xBtnAssign(m_xBuilder->weld_button(u"assign"_ustr))
, m_xFLGeometrie(m_xBuilder->weld_container("geoframe"))
, m_xFtPercentDiagonal(m_xBuilder->weld_label("diagonalft"))
, m_xMtrPercentDiagonal(m_xBuilder->weld_metric_spin_button("diagonal", FieldUnit::PERCENT))
, m_xFtBackscale(m_xBuilder->weld_label("scaleddepthft"))
, m_xMtrBackscale(m_xBuilder->weld_metric_spin_button("scaleddepth", FieldUnit::PERCENT))
, m_xFtEndAngle(m_xBuilder->weld_label("angleft"))
, m_xMtrEndAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE))
, m_xFtDepth(m_xBuilder->weld_label("depthft"))
, m_xMtrDepth(m_xBuilder->weld_metric_spin_button("depth", FieldUnit::CM))
, m_xFLGeometrie(m_xBuilder->weld_container(u"geoframe"_ustr))
, m_xFtPercentDiagonal(m_xBuilder->weld_label(u"diagonalft"_ustr))
, m_xMtrPercentDiagonal(m_xBuilder->weld_metric_spin_button(u"diagonal"_ustr, FieldUnit::PERCENT))
, m_xFtBackscale(m_xBuilder->weld_label(u"scaleddepthft"_ustr))
, m_xMtrBackscale(m_xBuilder->weld_metric_spin_button(u"scaleddepth"_ustr, FieldUnit::PERCENT))
, m_xFtEndAngle(m_xBuilder->weld_label(u"angleft"_ustr))
, m_xMtrEndAngle(m_xBuilder->weld_metric_spin_button(u"angle"_ustr, FieldUnit::DEGREE))
, m_xFtDepth(m_xBuilder->weld_label(u"depthft"_ustr))
, m_xMtrDepth(m_xBuilder->weld_metric_spin_button(u"depth"_ustr, FieldUnit::CM))
, m_xFLSegments(m_xBuilder->weld_container("segmentsframe"))
, m_xNumHorizontal(m_xBuilder->weld_spin_button("hori"))
, m_xNumVertical(m_xBuilder->weld_spin_button("veri"))
, m_xFLSegments(m_xBuilder->weld_container(u"segmentsframe"_ustr))
, m_xNumHorizontal(m_xBuilder->weld_spin_button(u"hori"_ustr))
, m_xNumVertical(m_xBuilder->weld_spin_button(u"veri"_ustr))
, m_xFLNormals(m_xBuilder->weld_container("normals"))
, m_xBtnNormalsObj(m_xBuilder->weld_toggle_button("objspecific"))
, m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button("flat"))
, m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button("spherical"))
, m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button("invertnormals"))
, m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button("doublesidedillum"))
, m_xBtnDoubleSided(m_xBuilder->weld_toggle_button("doublesided"))
, m_xFLNormals(m_xBuilder->weld_container(u"normals"_ustr))
, m_xBtnNormalsObj(m_xBuilder->weld_toggle_button(u"objspecific"_ustr))
, m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button(u"flat"_ustr))
, m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button(u"spherical"_ustr))
, m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button(u"invertnormals"_ustr))
, m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button(u"doublesidedillum"_ustr))
, m_xBtnDoubleSided(m_xBuilder->weld_toggle_button(u"doublesided"_ustr))
, m_xFLRepresentation(m_xBuilder->weld_container("shadingframe"))
, m_xLbShademode(m_xBuilder->weld_combo_box("mode"))
, m_xFLRepresentation(m_xBuilder->weld_container(u"shadingframe"_ustr))
, m_xLbShademode(m_xBuilder->weld_combo_box(u"mode"_ustr))
, m_xFLShadow(m_xBuilder->weld_container("shadowframe"))
, m_xBtnShadow3d(m_xBuilder->weld_toggle_button("shadow"))
, m_xFtSlant(m_xBuilder->weld_label("slantft"))
, m_xMtrSlant(m_xBuilder->weld_metric_spin_button("slant", FieldUnit::DEGREE))
, m_xFLShadow(m_xBuilder->weld_container(u"shadowframe"_ustr))
, m_xBtnShadow3d(m_xBuilder->weld_toggle_button(u"shadow"_ustr))
, m_xFtSlant(m_xBuilder->weld_label(u"slantft"_ustr))
, m_xMtrSlant(m_xBuilder->weld_metric_spin_button(u"slant"_ustr, FieldUnit::DEGREE))
, m_xFLCamera(m_xBuilder->weld_container("cameraframe"))
, m_xMtrDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM))
, m_xMtrFocalLength(m_xBuilder->weld_metric_spin_button("focal", FieldUnit::CM))
, m_xFLCamera(m_xBuilder->weld_container(u"cameraframe"_ustr))
, m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"distance"_ustr, FieldUnit::CM))
, m_xMtrFocalLength(m_xBuilder->weld_metric_spin_button(u"focal"_ustr, FieldUnit::CM))
, m_xFLLight(m_xBuilder->weld_container("illumframe"))
, m_xBtnLight1(new LightButton(m_xBuilder->weld_toggle_button("light1")))
, m_xBtnLight2(new LightButton(m_xBuilder->weld_toggle_button("light2")))
, m_xBtnLight3(new LightButton(m_xBuilder->weld_toggle_button("light3")))
, m_xBtnLight4(new LightButton(m_xBuilder->weld_toggle_button("light4")))
, m_xBtnLight5(new LightButton(m_xBuilder->weld_toggle_button("light5")))
, m_xBtnLight6(new LightButton(m_xBuilder->weld_toggle_button("light6")))
, m_xBtnLight7(new LightButton(m_xBuilder->weld_toggle_button("light7")))
, m_xBtnLight8(new LightButton(m_xBuilder->weld_toggle_button("light8")))
, m_xLbLight1(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor1"), [this]{ return GetFrameWeld(); }))
, m_xLbLight2(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor2"), [this]{ return GetFrameWeld(); }))
, m_xLbLight3(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor3"), [this]{ return GetFrameWeld(); }))
, m_xLbLight4(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor4"), [this]{ return GetFrameWeld(); }))
, m_xLbLight5(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor5"), [this]{ return GetFrameWeld(); }))
, m_xLbLight6(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor6"), [this]{ return GetFrameWeld(); }))
, m_xLbLight7(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor7"), [this]{ return GetFrameWeld(); }))
, m_xLbLight8(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor8"), [this]{ return GetFrameWeld(); }))
, m_xBtnLightColor(m_xBuilder->weld_button("colorbutton1"))
, m_xLbAmbientlight(new ColorListBox(m_xBuilder->weld_menu_button("ambientcolor"), [this]{ return GetFrameWeld(); }))
, m_xBtnAmbientColor(m_xBuilder->weld_button("colorbutton2"))
, m_xFLLight(m_xBuilder->weld_container(u"illumframe"_ustr))
, m_xBtnLight1(new LightButton(m_xBuilder->weld_toggle_button(u"light1"_ustr)))
, m_xBtnLight2(new LightButton(m_xBuilder->weld_toggle_button(u"light2"_ustr)))
, m_xBtnLight3(new LightButton(m_xBuilder->weld_toggle_button(u"light3"_ustr)))
, m_xBtnLight4(new LightButton(m_xBuilder->weld_toggle_button(u"light4"_ustr)))
, m_xBtnLight5(new LightButton(m_xBuilder->weld_toggle_button(u"light5"_ustr)))
, m_xBtnLight6(new LightButton(m_xBuilder->weld_toggle_button(u"light6"_ustr)))
, m_xBtnLight7(new LightButton(m_xBuilder->weld_toggle_button(u"light7"_ustr)))
, m_xBtnLight8(new LightButton(m_xBuilder->weld_toggle_button(u"light8"_ustr)))
, m_xLbLight1(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor1"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight2(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor2"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight3(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor3"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight4(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor4"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight5(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor5"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight6(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor6"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight7(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor7"_ustr), [this]{ return GetFrameWeld(); }))
, m_xLbLight8(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor8"_ustr), [this]{ return GetFrameWeld(); }))
, m_xBtnLightColor(m_xBuilder->weld_button(u"colorbutton1"_ustr))
, m_xLbAmbientlight(new ColorListBox(m_xBuilder->weld_menu_button(u"ambientcolor"_ustr), [this]{ return GetFrameWeld(); }))
, m_xBtnAmbientColor(m_xBuilder->weld_button(u"colorbutton2"_ustr))
, m_xFLTexture(m_xBuilder->weld_container("textureframe"))
, m_xBtnTexLuminance(m_xBuilder->weld_toggle_button("textype"))
, m_xBtnTexColor(m_xBuilder->weld_toggle_button("texcolor"))
, m_xBtnTexReplace(m_xBuilder->weld_toggle_button("texreplace"))
, m_xBtnTexModulate(m_xBuilder->weld_toggle_button("texmodulate"))
, m_xBtnTexObjectX(m_xBuilder->weld_toggle_button("texobjx"))
, m_xBtnTexParallelX(m_xBuilder->weld_toggle_button("texparallelx"))
, m_xBtnTexCircleX(m_xBuilder->weld_toggle_button("texcirclex"))
, m_xBtnTexObjectY(m_xBuilder->weld_toggle_button("texobjy"))
, m_xBtnTexParallelY(m_xBuilder->weld_toggle_button("texparallely"))
, m_xBtnTexCircleY(m_xBuilder->weld_toggle_button("texcircley"))
, m_xBtnTexFilter(m_xBuilder->weld_toggle_button("texfilter"))
, m_xFLTexture(m_xBuilder->weld_container(u"textureframe"_ustr))
, m_xBtnTexLuminance(m_xBuilder->weld_toggle_button(u"textype"_ustr))
, m_xBtnTexColor(m_xBuilder->weld_toggle_button(u"texcolor"_ustr))
, m_xBtnTexReplace(m_xBuilder->weld_toggle_button(u"texreplace"_ustr))
, m_xBtnTexModulate(m_xBuilder->weld_toggle_button(u"texmodulate"_ustr))
, m_xBtnTexObjectX(m_xBuilder->weld_toggle_button(u"texobjx"_ustr))
, m_xBtnTexParallelX(m_xBuilder->weld_toggle_button(u"texparallelx"_ustr))
, m_xBtnTexCircleX(m_xBuilder->weld_toggle_button(u"texcirclex"_ustr))
, m_xBtnTexObjectY(m_xBuilder->weld_toggle_button(u"texobjy"_ustr))
, m_xBtnTexParallelY(m_xBuilder->weld_toggle_button(u"texparallely"_ustr))
, m_xBtnTexCircleY(m_xBuilder->weld_toggle_button(u"texcircley"_ustr))
, m_xBtnTexFilter(m_xBuilder->weld_toggle_button(u"texfilter"_ustr))
, m_xFLMaterial(m_xBuilder->weld_container("materialframe"))
, m_xLbMatFavorites(m_xBuilder->weld_combo_box("favorites"))
, m_xLbMatColor(new ColorListBox(m_xBuilder->weld_menu_button("objcolor"), [this]{ return GetFrameWeld(); }))
, m_xBtnMatColor(m_xBuilder->weld_button("colorbutton3"))
, m_xLbMatEmission(new ColorListBox(m_xBuilder->weld_menu_button("illumcolor"), [this]{ return GetFrameWeld(); }))
, m_xBtnEmissionColor(m_xBuilder->weld_button("colorbutton4"))
, m_xFLMaterial(m_xBuilder->weld_container(u"materialframe"_ustr))
, m_xLbMatFavorites(m_xBuilder->weld_combo_box(u"favorites"_ustr))
, m_xLbMatColor(new ColorListBox(m_xBuilder->weld_menu_button(u"objcolor"_ustr), [this]{ return GetFrameWeld(); }))
, m_xBtnMatColor(m_xBuilder->weld_button(u"colorbutton3"_ustr))
, m_xLbMatEmission(new ColorListBox(m_xBuilder->weld_menu_button(u"illumcolor"_ustr), [this]{ return GetFrameWeld(); }))
, m_xBtnEmissionColor(m_xBuilder->weld_button(u"colorbutton4"_ustr))
, m_xFLMatSpecular(m_xBuilder->weld_container("specframe"))
, m_xLbMatSpecular(new ColorListBox(m_xBuilder->weld_menu_button("speccolor"), [this]{ return GetFrameWeld(); }))
, m_xBtnSpecularColor(m_xBuilder->weld_button("colorbutton5"))
, m_xMtrMatSpecularIntensity(m_xBuilder->weld_metric_spin_button("intensity", FieldUnit::PERCENT))
, m_xFLMatSpecular(m_xBuilder->weld_container(u"specframe"_ustr))
, m_xLbMatSpecular(new ColorListBox(m_xBuilder->weld_menu_button(u"speccolor"_ustr), [this]{ return GetFrameWeld(); }))
, m_xBtnSpecularColor(m_xBuilder->weld_button(u"colorbutton5"_ustr))
, m_xMtrMatSpecularIntensity(m_xBuilder->weld_metric_spin_button(u"intensity"_ustr, FieldUnit::PERCENT))
, m_xCtlPreview(new Svx3DPreviewControl)
, m_xCtlPreviewWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlPreview))
, m_xCtlPreviewWin(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xCtlPreview))
, m_xLightPreviewGrid(m_xBuilder->weld_container("lightpreviewgrid"))
, m_xHoriScale(m_xBuilder->weld_scale("horiscale"))
, m_xVertScale(m_xBuilder->weld_scale("vertscale"))
, m_xBtn_Corner(m_xBuilder->weld_button("corner"))
, m_xLightPreviewGrid(m_xBuilder->weld_container(u"lightpreviewgrid"_ustr))
, m_xHoriScale(m_xBuilder->weld_scale(u"horiscale"_ustr))
, m_xVertScale(m_xBuilder->weld_scale(u"vertscale"_ustr))
, m_xBtn_Corner(m_xBuilder->weld_button(u"corner"_ustr))
, m_xLightPreview(new Svx3DLightControl)
, m_xCtlLightPreviewWin(new weld::CustomWeld(*m_xBuilder, "lightpreview", *m_xLightPreview))
, m_xCtlLightPreviewWin(new weld::CustomWeld(*m_xBuilder, u"lightpreview"_ustr, *m_xLightPreview))
, m_xCtlLightPreview(new SvxLightCtl3D(*m_xLightPreview, *m_xHoriScale, *m_xVertScale, *m_xBtn_Corner)) // TODO might be other body widget as arg 1
, m_xBtnConvertTo3D(m_xBuilder->weld_button("to3d"))
, m_xBtnLatheObject(m_xBuilder->weld_button("tolathe"))
, m_xBtnPerspective(m_xBuilder->weld_toggle_button("perspective"))
, m_xBtnConvertTo3D(m_xBuilder->weld_button(u"to3d"_ustr))
, m_xBtnLatheObject(m_xBuilder->weld_button(u"tolathe"_ustr))
, m_xBtnPerspective(m_xBuilder->weld_toggle_button(u"perspective"_ustr))
, bUpdate(false)
, eViewType(ViewType3D::Geo)
@@ -521,40 +521,40 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
m_xMtrDepth->set_sensitive( !bCube && !bSphere );
if( bCube )
{
m_xNumHorizontal->set_text("");
m_xNumVertical->set_text("");
m_xNumHorizontal->set_text(u""_ustr);
m_xNumVertical->set_text(u""_ustr);
}
if( bCube || bSphere )
{
m_xMtrPercentDiagonal->set_text("");
m_xMtrBackscale->set_text("");
m_xMtrDepth->set_text("");
m_xMtrPercentDiagonal->set_text(u""_ustr);
m_xMtrBackscale->set_text(u""_ustr);
m_xMtrDepth->set_text(u""_ustr);
}
// There is a final angle only for Lathe objects.
m_xFtEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere );
m_xMtrEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere );
if( bExtrude || bCube || bSphere )
m_xMtrEndAngle->set_text("");
m_xMtrEndAngle->set_text(u""_ustr);
}
else
{
// Geometry
m_xNumHorizontal->set_text("");
m_xNumVertical->set_text("");
m_xNumHorizontal->set_text(u""_ustr);
m_xNumVertical->set_text(u""_ustr);
m_xFLSegments->set_sensitive( false );
m_xFtEndAngle->set_sensitive( false );
m_xMtrEndAngle->set_sensitive( false );
m_xMtrEndAngle->set_text("");
m_xMtrEndAngle->set_text(u""_ustr);
m_xFtDepth->set_sensitive( false );
m_xMtrDepth->set_sensitive( false );
m_xMtrDepth->set_text("");
m_xMtrDepth->set_text(u""_ustr);
// Representation
m_xFLShadow->set_sensitive(false);
m_xMtrDistance->set_text("");
m_xMtrFocalLength->set_text("");
m_xMtrDistance->set_text(u""_ustr);
m_xMtrFocalLength->set_text(u""_ustr);
m_xFLCamera->set_sensitive( false );
//Lower Range
@@ -593,7 +593,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xNumHorizontal->get_text().isEmpty() )
{
m_xNumHorizontal->set_text("");
m_xNumHorizontal->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -618,7 +618,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xNumVertical->get_text().isEmpty() )
{
m_xNumVertical->set_text("");
m_xNumVertical->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -647,7 +647,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrDepth->get_text().isEmpty() )
{
m_xMtrDepth->set_text("");
m_xMtrDepth->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -694,7 +694,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrPercentDiagonal->get_text().isEmpty() )
{
m_xMtrPercentDiagonal->set_text("");
m_xMtrPercentDiagonal->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -719,7 +719,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrBackscale->get_text().isEmpty() )
{
m_xMtrBackscale->set_text("");
m_xMtrBackscale->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -742,7 +742,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrEndAngle->get_text().isEmpty() )
{
m_xMtrEndAngle->set_text("");
m_xMtrEndAngle->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -881,7 +881,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrSlant->get_text().isEmpty() )
{
m_xMtrSlant->set_text("");
m_xMtrSlant->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -905,7 +905,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrDepth->get_text().isEmpty() )
{
m_xMtrDepth->set_text("");
m_xMtrDepth->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -929,7 +929,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrFocalLength->get_text().isEmpty() )
{
m_xMtrFocalLength->set_text("");
m_xMtrFocalLength->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -1559,7 +1559,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
{
if( !m_xMtrMatSpecularIntensity->get_text().isEmpty() )
{
m_xMtrMatSpecularIntensity->set_text("");
m_xMtrMatSpecularIntensity->set_text(u""_ustr);
bUpdate = true;
}
}
@@ -2122,7 +2122,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
if (!m_xLbMatColor->IsNoSelection())
{
aColor = m_xLbMatColor->GetSelectEntryColor();
rAttrs.Put( XFillColorItem( "", aColor) );
rAttrs.Put( XFillColorItem( u""_ustr, aColor) );
}
else
{
+3 -3
View File
@@ -106,7 +106,7 @@ namespace svx
try
{
Reference< XTablesSupplier > xSupTab;
_rxForm->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab;
_rxForm->getPropertyValue(u"SingleSelectQueryComposer"_ustr) >>= xSupTab;
if(xSupTab.is())
{
@@ -145,7 +145,7 @@ namespace svx
static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1);
if (static_cast<SotClipboardFormatId>(-1) == s_nFormat)
{
s_nFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.ColumnDescriptorTransfer\"");
s_nFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.ColumnDescriptorTransfer\""_ustr);
OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!");
}
return s_nFormat;
@@ -575,7 +575,7 @@ namespace svx
static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1);
if (static_cast<SotClipboardFormatId>(-1) == s_nFormat)
{
s_nFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.MultipleColumnDescriptorTransfer\"");
s_nFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.MultipleColumnDescriptorTransfer\""_ustr);
OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!");
}
return s_nFormat;
+3 -3
View File
@@ -58,12 +58,12 @@ namespace svx
static SotClipboardFormatId s_nFormFormat = static_cast<SotClipboardFormatId>(-1);
if ( _bExtractForm && static_cast<SotClipboardFormatId>(-1) == s_nFormFormat )
{
s_nFormFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.FormComponentDescriptorTransfer\"");
s_nFormFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.FormComponentDescriptorTransfer\""_ustr);
OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!");
}
else if ( !_bExtractForm && static_cast<SotClipboardFormatId>(-1) == s_nReportFormat)
{
s_nReportFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.ReportComponentDescriptorTransfer\"");
s_nReportFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.ReportComponentDescriptorTransfer\""_ustr);
OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nReportFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!");
}
return _bExtractForm ? s_nFormFormat : s_nReportFormat;
@@ -78,7 +78,7 @@ namespace svx
Reference<XPropertySet> xProp;
m_aDescriptor[DataAccessDescriptorProperty::Component] >>= xProp;
if ( xProp.is() )
xProp->getPropertyValue("IsForm") >>= bForm;
xProp->getPropertyValue(u"IsForm"_ustr) >>= bForm;
}
catch(const Exception&)
{}
+46 -46
View File
@@ -306,7 +306,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt )
// not interested in any results
Reference< XPropertySet > xStatProps(xStatement,UNO_QUERY);
xStatProps->setPropertyValue("MaxRows", Any(sal_Int32(0)));
xStatProps->setPropertyValue(u"MaxRows"_ustr, Any(sal_Int32(0)));
xResultSet = xStatement->executeQuery();
Reference< XColumnsSupplier > xSupplyCols(xResultSet, UNO_QUERY);
@@ -487,7 +487,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
if ( ::comphelper::hasProperty(FM_PROP_ISCURRENCY, xField)
&& ::comphelper::getBOOL(xField->getPropertyValue(FM_PROP_ISCURRENCY)))
{
aPossibleTypes.insert(aPossibleTypes.begin(), FM_COL_CURRENCYFIELD);
aPossibleTypes.insert(aPossibleTypes.begin(), u"" FM_COL_CURRENCYFIELD ""_ustr);
aImgResId.insert(aImgResId.begin(), RID_SVXBMP_CURRENCYFIELD);
aStrResId.insert(aStrResId.begin(), RID_STR_PROPTITLE_CURRENCYFIELD);
}
@@ -505,8 +505,8 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
OUString sPreferredType = aPossibleTypes[0];
if ((m_pImpl->nDropAction == DND_ACTION_LINK) && (aPossibleTypes.size() > 1))
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/colsmenu.ui"));
std::unique_ptr<weld::Menu> xTypeMenu(xBuilder->weld_menu("insertmenu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/colsmenu.ui"_ustr));
std::unique_ptr<weld::Menu> xTypeMenu(xBuilder->weld_menu(u"insertmenu"_ustr));
int nMenuPos = 0;
std::vector<OUString>::const_iterator iter;
@@ -678,16 +678,16 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM
if (bDesignMode)
{
int nMenuPos = 0;
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_TEXTFIELD, SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_CHECKBOX, SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_COMBOBOX, SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_LISTBOX, SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_DATEFIELD, SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_TIMEFIELD, SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_NUMERICFIELD, SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_CURRENCYFIELD, SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_PATTERNFIELD, SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_FORMATTEDFIELD, SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_TEXTFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_CHECKBOX ""_ustr, SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_COMBOBOX ""_ustr, SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_LISTBOX ""_ustr, SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_DATEFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_TIMEFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_NUMERICFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_CURRENCYFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_PATTERNFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD);
InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_FORMATTEDFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD);
}
if (xCols.is() && nColId)
@@ -712,43 +712,43 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM
{
int nMenuPos = 0;
if (nColType != TYPE_TEXTFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_TEXTFIELD"1", SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_TEXTFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX);
if (nColType != TYPE_CHECKBOX)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_CHECKBOX"1", SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_CHECKBOX"1"_ustr, SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX);
if (nColType != TYPE_COMBOBOX)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_COMBOBOX"1", SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_COMBOBOX"1"_ustr, SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX);
if (nColType != TYPE_LISTBOX)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_LISTBOX"1", SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_LISTBOX"1"_ustr, SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX);
if (nColType != TYPE_DATEFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_DATEFIELD"1", SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_DATEFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD);
if (nColType != TYPE_TIMEFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_TIMEFIELD"1", SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_TIMEFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD);
if (nColType != TYPE_NUMERICFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_NUMERICFIELD"1", SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_NUMERICFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD);
if (nColType != TYPE_CURRENCYFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_CURRENCYFIELD"1", SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_CURRENCYFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD);
if (nColType != TYPE_PATTERNFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_PATTERNFIELD"1", SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_PATTERNFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD);
if (nColType != TYPE_FORMATTEDFIELD)
InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_FORMATTEDFIELD"1", SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD);
InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_FORMATTEDFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD);
}
rMenu.set_visible("change", bDesignMode && bMarked && xCols.is());
rMenu.set_sensitive("change", bDesignMode && bMarked && xCols.is());
rMenu.set_visible(u"change"_ustr, bDesignMode && bMarked && xCols.is());
rMenu.set_sensitive(u"change"_ustr, bDesignMode && bMarked && xCols.is());
}
else
{
rMenu.set_visible("change", false);
rMenu.set_sensitive("change", false);
rMenu.set_visible(u"change"_ustr, false);
rMenu.set_sensitive(u"change"_ustr, false);
}
rMenu.set_visible("insert", bDesignMode && xCols.is());
rMenu.set_sensitive("insert", bDesignMode && xCols.is());
rMenu.set_visible("delete", bDesignMode && bMarked && xCols.is());
rMenu.set_sensitive("delete", bDesignMode && bMarked && xCols.is());
rMenu.set_visible("column", bDesignMode && bMarked && xCols.is());
rMenu.set_sensitive("column", bDesignMode && bMarked && xCols.is());
rMenu.set_visible(u"insert"_ustr, bDesignMode && xCols.is());
rMenu.set_sensitive(u"insert"_ustr, bDesignMode && xCols.is());
rMenu.set_visible(u"delete"_ustr, bDesignMode && bMarked && xCols.is());
rMenu.set_sensitive(u"delete"_ustr, bDesignMode && bMarked && xCols.is());
rMenu.set_visible(u"column"_ustr, bDesignMode && bMarked && xCols.is());
rMenu.set_sensitive(u"column"_ustr, bDesignMode && bMarked && xCols.is());
sal_uInt16 nHiddenCols = 0;
if (xCols.is())
@@ -778,17 +778,17 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM
}
}
}
rShowMenu.set_visible("more", xCols.is() && (nHiddenCols > 16));
rMenu.set_visible("show", xCols.is() && (nHiddenCols > 0));
rMenu.set_sensitive("show", xCols.is() && (nHiddenCols > 0));
rShowMenu.set_visible(u"more"_ustr, xCols.is() && (nHiddenCols > 16));
rMenu.set_visible(u"show"_ustr, xCols.is() && (nHiddenCols > 0));
rMenu.set_sensitive(u"show"_ustr, xCols.is() && (nHiddenCols > 0));
// allow the 'hide column' item ?
bool bAllowHide = bMarked; // a column is marked
bAllowHide = bAllowHide || (!bDesignMode && (nPos != sal_uInt16(-1))); // OR we are in alive mode and have hit a column
bAllowHide = bAllowHide && xCols.is(); // AND we have a column container
bAllowHide = bAllowHide && (xCols->getCount()-nHiddenCols > 1); // AND there are at least two visible columns
rMenu.set_visible("hide", bAllowHide);
rMenu.set_sensitive("hide", bAllowHide);
rMenu.set_visible(u"hide"_ustr, bAllowHide);
rMenu.set_sensitive(u"hide"_ustr, bAllowHide);
if (!bMarked)
return;
@@ -803,7 +803,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM
if (eState >= SfxItemState::DEFAULT && pItem != nullptr)
{
bool bChecked = pItem && pItem->GetValue();
rMenu.set_active("column", bChecked);
rMenu.set_active(u"column"_ustr, bChecked);
}
}
}
@@ -837,7 +837,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const weld::M
}
else if (rExecutionResult == "column")
{
eInspectorAction = rMenu.get_active("column") ? eOpenInspector : eCloseInspector;
eInspectorAction = rMenu.get_active(u"column"_ustr) ? eOpenInspector : eCloseInspector;
}
else if (rExecutionResult.startsWith(FM_COL_TEXTFIELD))
{
@@ -1007,11 +1007,11 @@ void FmGridHeader::triggerColumnContextMenu( const ::Point& _rPreferredPos )
sal_uInt16 nColId = GetItemId( _rPreferredPos );
// the menu
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/colsmenu.ui"));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu("insertmenu"));
std::unique_ptr<weld::Menu> xChangeMenu(xBuilder->weld_menu("changemenu"));
std::unique_ptr<weld::Menu> xShowMenu(xBuilder->weld_menu("showmenu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/colsmenu.ui"_ustr));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu(u"insertmenu"_ustr));
std::unique_ptr<weld::Menu> xChangeMenu(xBuilder->weld_menu(u"changemenu"_ustr));
std::unique_ptr<weld::Menu> xShowMenu(xBuilder->weld_menu(u"showmenu"_ustr));
// let derivatives modify the menu
PreExecuteColumnContextMenu(nColId, *xContextMenu, *xInsertMenu, *xChangeMenu, *xShowMenu);
+6 -6
View File
@@ -377,12 +377,12 @@ sal_Bool SAL_CALL FmXGridControl::supportsService(const OUString& ServiceName)
OUString SAL_CALL FmXGridControl::getImplementationName()
{
return "com.sun.star.form.FmXGridControl";
return u"com.sun.star.form.FmXGridControl"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL FmXGridControl::getSupportedServiceNames()
{
return { FM_SUN_CONTROL_GRIDCONTROL, "com.sun.star.awt.UnoControl" };
return { FM_SUN_CONTROL_GRIDCONTROL, u"com.sun.star.awt.UnoControl"_ustr };
}
@@ -402,7 +402,7 @@ void SAL_CALL FmXGridControl::dispose()
OUString FmXGridControl::GetComponentServiceName() const
{
return "DBGrid";
return u"DBGrid"_ustr;
}
@@ -1037,7 +1037,7 @@ void FmXGridPeer::columnChanged()
FmXGridPeer::FmXGridPeer(const Reference< XComponentContext >& _rxContext)
:m_xContext(_rxContext)
,m_aMode("DataMode")
,m_aMode(u"DataMode"_ustr)
,m_nCursorListening(0)
,m_bInterceptingDispatch(false)
{
@@ -2370,8 +2370,8 @@ css::uno::Sequence<OUString> FmXGridPeer::getSupportedModes()
{
static css::uno::Sequence<OUString> const aModes
{
"DataMode",
"FilterMode"
u"DataMode"_ustr,
u"FilterMode"_ustr
};
return aModes;
}
+2 -2
View File
@@ -2964,7 +2964,7 @@ bool DbFilterField::commitControl()
m_rColumn.GetField(),
OUString(),
aAppLocale,
".",
u"."_ustr,
getParseContext());
m_aText = aPreparedText;
}
@@ -3052,7 +3052,7 @@ void DbFilterField::Update()
Reference<XPropertySet> xFormProp(xForm,UNO_QUERY);
Reference< XTablesSupplier > xSupTab;
xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab;
xFormProp->getPropertyValue(u"SingleSelectQueryComposer"_ustr) >>= xSupTab;
Reference< XConnection > xConnection(getConnection(xForm));
if (!xSupTab.is())
+18 -18
View File
@@ -303,16 +303,16 @@ void NavigationBar::PositionDataSource(sal_Int32 nRecord)
}
NavigationBar::NavigationBar(vcl::Window* pParent)
: InterimItemWindow(pParent, "svx/ui/navigationbar.ui", "NavigationBar")
, m_xRecordText(m_xBuilder->weld_label("recordtext"))
, m_xAbsolute(new NavigationBar::AbsolutePos(m_xBuilder->weld_entry("entry-noframe"), this))
, m_xRecordOf(m_xBuilder->weld_label("recordof"))
, m_xRecordCount(m_xBuilder->weld_label("recordcount"))
, m_xFirstBtn(m_xBuilder->weld_button("first"))
, m_xPrevBtn(m_xBuilder->weld_button("prev"))
, m_xNextBtn(m_xBuilder->weld_button("next"))
, m_xLastBtn(m_xBuilder->weld_button("last"))
, m_xNewBtn(m_xBuilder->weld_button("new"))
: InterimItemWindow(pParent, u"svx/ui/navigationbar.ui"_ustr, u"NavigationBar"_ustr)
, m_xRecordText(m_xBuilder->weld_label(u"recordtext"_ustr))
, m_xAbsolute(new NavigationBar::AbsolutePos(m_xBuilder->weld_entry(u"entry-noframe"_ustr), this))
, m_xRecordOf(m_xBuilder->weld_label(u"recordof"_ustr))
, m_xRecordCount(m_xBuilder->weld_label(u"recordcount"_ustr))
, m_xFirstBtn(m_xBuilder->weld_button(u"first"_ustr))
, m_xPrevBtn(m_xBuilder->weld_button(u"prev"_ustr))
, m_xNextBtn(m_xBuilder->weld_button(u"next"_ustr))
, m_xLastBtn(m_xBuilder->weld_button(u"last"_ustr))
, m_xNewBtn(m_xBuilder->weld_button(u"new"_ustr))
, m_xPrevRepeater(std::make_shared<weld::ButtonPressRepeater>(*m_xPrevBtn, LINK(this,NavigationBar,OnClick)))
, m_xNextRepeater(std::make_shared<weld::ButtonPressRepeater>(*m_xNextBtn, LINK(this,NavigationBar,OnClick)))
, m_nCurrentPos(-1)
@@ -1195,7 +1195,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, DbGridCo
// retrieve the datebase of the Numberformatter
try
{
xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate;
xSupplier->getNumberFormatSettings()->getPropertyValue(u"NullDate"_ustr) >>= m_aNullDate;
}
catch(Exception&)
{
@@ -2406,8 +2406,8 @@ void DbGridControl::PreExecuteRowContextMenu(weld::Menu& rMenu)
// if only a blank row is selected then do not delete
bDelete = bDelete && !((m_nOptions & DbGridControlOptions::Insert) && GetSelectRowCount() == 1 && IsRowSelected(GetRowCount() - 1));
rMenu.set_visible("delete", bDelete);
rMenu.set_visible("save", IsModified());
rMenu.set_visible(u"delete"_ustr, bDelete);
rMenu.set_visible(u"save"_ustr, IsModified());
// the undo is more difficult
bool bCanUndo = IsModified();
@@ -2416,7 +2416,7 @@ void DbGridControl::PreExecuteRowContextMenu(weld::Menu& rMenu)
nState = m_aMasterStateProvider.Call(DbGridControlNavigationBarState::Undo);
bCanUndo &= ( 0 != nState );
rMenu.set_visible("undo", bCanUndo);
rMenu.set_visible(u"undo"_ustr, bCanUndo);
}
void DbGridControl::PostExecuteRowContextMenu(const OUString& rExecutionResult)
@@ -2523,8 +2523,8 @@ void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
void DbGridControl::executeRowContextMenu(const Point& _rPreferredPos)
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/rowsmenu.ui"));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/rowsmenu.ui"_ustr));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
tools::Rectangle aRect(_rPreferredPos, Size(1,1));
weld::Window* pParent = weld::GetPopupParent(*this, aRect);
@@ -2570,8 +2570,8 @@ void DbGridControl::Command(const CommandEvent& rEvt)
{
::tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/cellmenu.ui"));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"svx/ui/cellmenu.ui"_ustr));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
if (!xContextMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
copyCellText(nRow, nColId);
}
+1 -1
View File
@@ -42,7 +42,7 @@ namespace svx
const SotClipboardFormatId nFormatId = SotExchange::GetFormat( _rFlavor );
if ( SotClipboardFormatId::XFORMS == nFormatId )
{
return SetString("XForms-Transferable");
return SetString(u"XForms-Transferable"_ustr);
}
return false;
}
+1 -1
View File
@@ -148,7 +148,7 @@ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const OS
ONeutralParseContext::ONeutralParseContext()
: OSystemParseContext(false)
{
std::locale aLocale = Translate::Create("svx", LanguageTag("en-US"));
std::locale aLocale = Translate::Create("svx", LanguageTag(u"en-US"_ustr));
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_RSC_SQL_INTERNATIONAL); ++i)
m_aLocalizedKeywords.push_back(Translate::get(RID_RSC_SQL_INTERNATIONAL[i], aLocale));
}
+14 -14
View File
@@ -158,20 +158,20 @@ namespace svx
// the properties we know
static MapString2PropertyEntry s_aProperties
{
{ OUString("ActiveConnection"), DataAccessDescriptorProperty::Connection, },
{ OUString("BookmarkSelection"), DataAccessDescriptorProperty::BookmarkSelection, },
{ OUString("Column"), DataAccessDescriptorProperty::ColumnObject, },
{ OUString("ColumnName"), DataAccessDescriptorProperty::ColumnName, },
{ OUString("Command"), DataAccessDescriptorProperty::Command, },
{ OUString("CommandType"), DataAccessDescriptorProperty::CommandType, },
{ OUString("Component"), DataAccessDescriptorProperty::Component, },
{ OUString("ConnectionResource"), DataAccessDescriptorProperty::ConnectionResource, },
{ OUString("Cursor"), DataAccessDescriptorProperty::Cursor, },
{ OUString("DataSourceName"), DataAccessDescriptorProperty::DataSource, },
{ OUString("DatabaseLocation"), DataAccessDescriptorProperty::DatabaseLocation, },
{ OUString("EscapeProcessing"), DataAccessDescriptorProperty::EscapeProcessing, },
{ OUString("Filter"), DataAccessDescriptorProperty::Filter, },
{ OUString("Selection"), DataAccessDescriptorProperty::Selection, }
{ u"ActiveConnection"_ustr, DataAccessDescriptorProperty::Connection, },
{ u"BookmarkSelection"_ustr, DataAccessDescriptorProperty::BookmarkSelection, },
{ u"Column"_ustr, DataAccessDescriptorProperty::ColumnObject, },
{ u"ColumnName"_ustr, DataAccessDescriptorProperty::ColumnName, },
{ u"Command"_ustr, DataAccessDescriptorProperty::Command, },
{ u"CommandType"_ustr, DataAccessDescriptorProperty::CommandType, },
{ u"Component"_ustr, DataAccessDescriptorProperty::Component, },
{ u"ConnectionResource"_ustr, DataAccessDescriptorProperty::ConnectionResource, },
{ u"Cursor"_ustr, DataAccessDescriptorProperty::Cursor, },
{ u"DataSourceName"_ustr, DataAccessDescriptorProperty::DataSource, },
{ u"DatabaseLocation"_ustr, DataAccessDescriptorProperty::DatabaseLocation, },
{ u"EscapeProcessing"_ustr, DataAccessDescriptorProperty::EscapeProcessing, },
{ u"Filter"_ustr, DataAccessDescriptorProperty::Filter, },
{ u"Selection"_ustr, DataAccessDescriptorProperty::Selection, }
};
return s_aProperties;
+7 -7
View File
@@ -139,26 +139,26 @@ namespace svx
::utl::OConfigurationTreeRoot aConfig(
::utl::OConfigurationTreeRoot::createWithComponentContext(
m_xContext,
"/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument"
u"/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument"_ustr
) );
OUString sDatabaseFilter;
OSL_VERIFY( aConfig.getNodeValue( "ooSetupFactoryActualFilter" ) >>= sDatabaseFilter );
// get the type this filter is responsible for
Reference< XNameAccess > xFilterFactory(
m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", m_xContext),
m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.document.FilterFactory"_ustr, m_xContext),
UNO_QUERY_THROW );
::comphelper::NamedValueCollection aFilterProperties( xFilterFactory->getByName( sDatabaseFilter ) );
OUString sDocumentType = aFilterProperties.getOrDefault( "Type", OUString() );
OUString sDocumentType = aFilterProperties.getOrDefault( u"Type"_ustr, OUString() );
// get the extension(s) for this type
Reference< XNameAccess > xTypeDetection(
m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", m_xContext),
m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.document.TypeDetection"_ustr, m_xContext),
UNO_QUERY_THROW );
::comphelper::NamedValueCollection aTypeProperties( xTypeDetection->getByName( sDocumentType ) );
m_aFilterExtensions = aTypeProperties.getOrDefault( "Extensions", m_aFilterExtensions );
m_sFilterUIName = aTypeProperties.getOrDefault( "UIName", m_sFilterUIName );
m_aFilterExtensions = aTypeProperties.getOrDefault( u"Extensions"_ustr, m_aFilterExtensions );
m_sFilterUIName = aTypeProperties.getOrDefault( u"UIName"_ustr, m_sFilterUIName );
}
catch( const Exception& )
{
@@ -170,7 +170,7 @@ namespace svx
"DatabaseLocationInputController_Impl::impl_initFilterProperties_nothrow: unable to determine the file extension(s)!" );
if ( !m_aFilterExtensions.hasElements() )
{
m_aFilterExtensions = { "*.odb" };
m_aFilterExtensions = { u"*.odb"_ustr };
}
}
+112 -112
View File
@@ -146,28 +146,28 @@ namespace svxform
ItemSelectHdl(*m_xItemList);
}
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xItemList.get(), "svx/ui/formdatamenu.ui"));
m_xMenu = xBuilder->weld_menu("menu");
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xItemList.get(), u"svx/ui/formdatamenu.ui"_ustr));
m_xMenu = xBuilder->weld_menu(u"menu"_ustr);
m_aRemovedMenuEntries.clear();
if (DGTInstance == m_eGroup)
m_aRemovedMenuEntries.insert("additem");
m_aRemovedMenuEntries.insert(u"additem"_ustr);
else
{
m_aRemovedMenuEntries.insert("addelement");
m_aRemovedMenuEntries.insert("addattribute");
m_aRemovedMenuEntries.insert(u"addelement"_ustr);
m_aRemovedMenuEntries.insert(u"addattribute"_ustr);
if (DGTSubmission == m_eGroup)
{
m_xMenu->set_label("additem", SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
m_xMenu->set_label("edit", SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
m_xMenu->set_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
m_xMenu->set_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
m_xMenu->set_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
m_xMenu->set_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
}
else
{
m_xMenu->set_label("additem", SvxResId(RID_STR_DATANAV_ADD_BINDING));
m_xMenu->set_label("edit", SvxResId(RID_STR_DATANAV_EDIT_BINDING));
m_xMenu->set_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
m_xMenu->set_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_BINDING));
m_xMenu->set_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_BINDING));
m_xMenu->set_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
}
}
for (const auto& rRemove : m_aRemovedMenuEntries)
@@ -199,10 +199,10 @@ namespace svxform
}
XFormsPage::XFormsPage(weld::Container* pPage, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup)
: BuilderPage(pPage, nullptr, "svx/ui/xformspage.ui", "XFormsPage")
: BuilderPage(pPage, nullptr, u"svx/ui/xformspage.ui"_ustr, u"XFormsPage"_ustr)
, m_pParent(pPage)
, m_xToolBox(m_xBuilder->weld_toolbar("toolbar"))
, m_xItemList(m_xBuilder->weld_tree_view("items"))
, m_xToolBox(m_xBuilder->weld_toolbar(u"toolbar"_ustr))
, m_xItemList(m_xBuilder->weld_tree_view(u"items"_ustr))
, m_xScratchIter(m_xItemList->make_iterator())
, m_aDropHelper(*m_xItemList)
, m_pNaviWin(_pNaviWin)
@@ -213,23 +213,23 @@ namespace svxform
m_xItemList->set_show_expanders(DGTInstance == m_eGroup || DGTSubmission == m_eGroup);
if ( DGTInstance == m_eGroup )
m_xToolBox->set_item_visible("additem", false);
m_xToolBox->set_item_visible(u"additem"_ustr, false);
else
{
m_xToolBox->set_item_visible("addelement", false);
m_xToolBox->set_item_visible("addattribute", false);
m_xToolBox->set_item_visible(u"addelement"_ustr, false);
m_xToolBox->set_item_visible(u"addattribute"_ustr, false);
if ( DGTSubmission == m_eGroup )
{
m_xToolBox->set_item_label("additem", SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
m_xToolBox->set_item_label("edit", SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
m_xToolBox->set_item_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
m_xToolBox->set_item_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
m_xToolBox->set_item_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
m_xToolBox->set_item_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
}
else
{
m_xToolBox->set_item_label("additem", SvxResId(RID_STR_DATANAV_ADD_BINDING));
m_xToolBox->set_item_label("edit", SvxResId(RID_STR_DATANAV_EDIT_BINDING));
m_xToolBox->set_item_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
m_xToolBox->set_item_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_BINDING));
m_xToolBox->set_item_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_BINDING));
m_xToolBox->set_item_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
}
}
@@ -1239,19 +1239,19 @@ namespace svxform
else if ( m_eGroup != DGTInstance )
bEnableAdd = true;
m_xToolBox->set_item_sensitive("additem", bEnableAdd);
m_xToolBox->set_item_sensitive("addelement", bEnableAdd);
m_xToolBox->set_item_sensitive("addattribute", bEnableAdd);
m_xToolBox->set_item_sensitive("edit", bEnableEdit);
m_xToolBox->set_item_sensitive("delete", bEnableRemove);
m_xToolBox->set_item_sensitive(u"additem"_ustr, bEnableAdd);
m_xToolBox->set_item_sensitive(u"addelement"_ustr, bEnableAdd);
m_xToolBox->set_item_sensitive(u"addattribute"_ustr, bEnableAdd);
m_xToolBox->set_item_sensitive(u"edit"_ustr, bEnableEdit);
m_xToolBox->set_item_sensitive(u"delete"_ustr, bEnableRemove);
if (m_xMenu)
{
SetMenuEntrySensitive("additem", bEnableAdd);
SetMenuEntrySensitive("addelement", bEnableAdd);
SetMenuEntrySensitive("addattribute", bEnableAdd);
SetMenuEntrySensitive("edit", bEnableEdit);
SetMenuEntrySensitive("delete", bEnableRemove);
SetMenuEntrySensitive(u"additem"_ustr, bEnableAdd);
SetMenuEntrySensitive(u"addelement"_ustr, bEnableAdd);
SetMenuEntrySensitive(u"addattribute"_ustr, bEnableAdd);
SetMenuEntrySensitive(u"edit"_ustr, bEnableEdit);
SetMenuEntrySensitive(u"delete"_ustr, bEnableRemove);
}
if ( DGTInstance != m_eGroup )
return;
@@ -1278,21 +1278,21 @@ namespace svxform
}
}
}
m_xToolBox->set_item_label("edit", SvxResId(pResId1));
m_xToolBox->set_item_label("delete", SvxResId(pResId2));
m_xToolBox->set_item_label(u"edit"_ustr, SvxResId(pResId1));
m_xToolBox->set_item_label(u"delete"_ustr, SvxResId(pResId2));
if (m_xMenu)
{
m_xMenu->set_label("edit", SvxResId( pResId1 ) );
m_xMenu->set_label("delete", SvxResId( pResId2 ) );
m_xMenu->set_label(u"edit"_ustr, SvxResId( pResId1 ) );
m_xMenu->set_label(u"delete"_ustr, SvxResId( pResId2 ) );
}
}
DataNavigatorWindow::DataNavigatorWindow(vcl::Window* pParent, weld::Builder& rBuilder, SfxBindings const * pBindings)
: m_xParent(pParent)
, m_xModelsBox(rBuilder.weld_combo_box("modelslist"))
, m_xModelBtn(rBuilder.weld_menu_button("modelsbutton"))
, m_xTabCtrl(rBuilder.weld_notebook("tabcontrol"))
, m_xInstanceBtn(rBuilder.weld_menu_button("instances"))
, m_xModelsBox(rBuilder.weld_combo_box(u"modelslist"_ustr))
, m_xModelBtn(rBuilder.weld_menu_button(u"modelsbutton"_ustr))
, m_xTabCtrl(rBuilder.weld_notebook(u"tabcontrol"_ustr))
, m_xInstanceBtn(rBuilder.weld_menu_button(u"instances"_ustr))
, m_nLastSelectedPos(-1)
, m_bShowDetails(false)
, m_bIsNotifyDisabled(false)
@@ -1312,7 +1312,7 @@ namespace svxform
m_aUpdateTimer.SetInvokeHandler( LINK( this, DataNavigatorWindow, UpdateHdl ) );
// init tabcontrol
OUString sPageId("instance");
OUString sPageId(u"instance"_ustr);
SvtViewOptions aViewOpt( EViewType::TabDialog, CFGNAME_DATANAVIGATOR );
if ( aViewOpt.Exists() )
{
@@ -1322,7 +1322,7 @@ namespace svxform
aViewOpt.GetUserItem(CFGNAME_SHOWDETAILS) >>= m_bShowDetails;
}
m_xInstanceBtn->set_item_active("instancesdetails", m_bShowDetails);
m_xInstanceBtn->set_item_active(u"instancesdetails"_ustr, m_bShowDetails);
m_xTabCtrl->set_current_page(sPageId);
ActivatePageHdl(sPageId);
@@ -1436,7 +1436,7 @@ namespace svxform
xUIHelper->newModel( m_xFrameModel, sNewName ), UNO_SET_THROW );
Reference< XPropertySet > xModelProps( xNewModel, UNO_QUERY_THROW );
xModelProps->setPropertyValue("ExternalData", Any( !bDocumentData ) );
xModelProps->setPropertyValue(u"ExternalData"_ustr, Any( !bDocumentData ) );
m_xModelsBox->append_text(sNewName);
m_xModelsBox->set_active(m_xModelsBox->get_count() - 1);
@@ -1463,7 +1463,7 @@ namespace svxform
Reference< XNameContainer > xXForms( xFormsSupp->getXForms(), UNO_SET_THROW );
Reference< XPropertySet > xModelProps( xXForms->getByName( sSelectedModel ), UNO_QUERY_THROW );
bool bExternalData = false;
OSL_VERIFY( xModelProps->getPropertyValue( "ExternalData" ) >>= bExternalData );
OSL_VERIFY( xModelProps->getPropertyValue( u"ExternalData"_ustr ) >>= bExternalData );
bDocumentData = !bExternalData;
}
catch( const Exception& )
@@ -1482,7 +1482,7 @@ namespace svxform
Reference< css::xforms::XFormsSupplier > xFormsSupp( m_xFrameModel, UNO_QUERY_THROW );
Reference< XNameContainer > xXForms( xFormsSupp->getXForms(), UNO_SET_THROW );
Reference< XPropertySet > xModelProps( xXForms->getByName( sSelectedModel ), UNO_QUERY_THROW );
xModelProps->setPropertyValue( "ExternalData", Any( !bDocumentData ) );
xModelProps->setPropertyValue( u"ExternalData"_ustr, Any( !bDocumentData ) );
bIsDocModified = true;
}
catch( const Exception& )
@@ -1650,7 +1650,7 @@ namespace svxform
TOOLS_WARN_EXCEPTION( "svx.form", "DataNavigatorWindow::MenuSelectHdl()" );
}
m_xTabCtrl->remove_page(sIdent);
m_xTabCtrl->set_current_page("instance");
m_xTabCtrl->set_current_page(u"instance"_ustr);
ModelSelectHdl( nullptr );
bIsDocModified = true;
}
@@ -1660,7 +1660,7 @@ namespace svxform
else if (rIdent == "instancesdetails")
{
m_bShowDetails = !m_bShowDetails;
m_xInstanceBtn->set_item_active("instancesdetails", m_bShowDetails);
m_xInstanceBtn->set_item_active(u"instancesdetails"_ustr, m_bShowDetails);
ModelSelectHdl(m_xModelsBox.get());
}
else
@@ -1685,15 +1685,15 @@ namespace svxform
{
OUString sIdent(m_xTabCtrl->get_current_page_ident());
bool bIsInstPage = (IsAdditionalPage(sIdent) || sIdent == "instance");
m_xInstanceBtn->set_item_sensitive( "instancesedit", bIsInstPage );
m_xInstanceBtn->set_item_sensitive( "instancesremove",
m_xInstanceBtn->set_item_sensitive( u"instancesedit"_ustr, bIsInstPage );
m_xInstanceBtn->set_item_sensitive( u"instancesremove"_ustr,
bIsInstPage && m_xTabCtrl->get_n_pages() > MIN_PAGE_COUNT );
m_xInstanceBtn->set_item_sensitive( "instancesdetails", bIsInstPage );
m_xInstanceBtn->set_item_sensitive( u"instancesdetails"_ustr, bIsInstPage );
}
else if (m_xModelBtn.get() == &rBtn)
{
// we need at least one model!
m_xModelBtn->set_item_sensitive("modelsremove", m_xModelsBox->get_count() > 1 );
m_xModelBtn->set_item_sensitive(u"modelsremove"_ustr, m_xModelsBox->get_count() > 1 );
}
else
{
@@ -2023,7 +2023,7 @@ namespace svxform
}
DataNavigator::DataNavigator(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Window* _pParent)
: SfxDockingWindow(_pBindings, _pMgr, _pParent, "DataNavigator", "svx/ui/datanavigator.ui")
: SfxDockingWindow(_pBindings, _pMgr, _pParent, u"DataNavigator"_ustr, u"svx/ui/datanavigator.ui"_ustr)
, SfxControllerItem(SID_FM_DATANAVIGATOR_CONTROL, *_pBindings)
, m_xDataWin(new DataNavigatorWindow(this, *m_xBuilder, _pBindings))
{
@@ -2088,7 +2088,7 @@ namespace svxform
AddDataItemDialog::AddDataItemDialog(weld::Window* pParent, ItemNode* _pNode,
const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper)
: GenericDialogController(pParent, "svx/ui/adddataitemdialog.ui", "AddDataItemDialog")
: GenericDialogController(pParent, u"svx/ui/adddataitemdialog.ui"_ustr, u"AddDataItemDialog"_ustr)
, m_xUIHelper(_rUIHelper)
, m_pItemNode(_pNode)
, m_eItemType(DITNone)
@@ -2096,25 +2096,25 @@ namespace svxform
, m_sFL_Attribute(SvxResId(RID_STR_ATTRIBUTE))
, m_sFL_Binding(SvxResId(RID_STR_BINDING))
, m_sFT_BindingExp(SvxResId(RID_STR_BINDING_EXPR))
, m_xItemFrame(m_xBuilder->weld_frame("itemframe"))
, m_xNameFT(m_xBuilder->weld_label("nameft"))
, m_xNameED(m_xBuilder->weld_entry("name"))
, m_xDefaultFT(m_xBuilder->weld_label("valueft"))
, m_xDefaultED(m_xBuilder->weld_entry("value"))
, m_xDefaultBtn(m_xBuilder->weld_button("browse"))
, m_xSettingsFrame(m_xBuilder->weld_widget("settingsframe"))
, m_xDataTypeLB(m_xBuilder->weld_combo_box("datatype"))
, m_xRequiredCB(m_xBuilder->weld_check_button("required"))
, m_xRequiredBtn(m_xBuilder->weld_button("requiredcond"))
, m_xRelevantCB(m_xBuilder->weld_check_button("relevant"))
, m_xRelevantBtn(m_xBuilder->weld_button("relevantcond"))
, m_xConstraintCB(m_xBuilder->weld_check_button("constraint"))
, m_xConstraintBtn(m_xBuilder->weld_button("constraintcond"))
, m_xReadonlyCB(m_xBuilder->weld_check_button("readonly"))
, m_xReadonlyBtn(m_xBuilder->weld_button("readonlycond"))
, m_xCalculateCB(m_xBuilder->weld_check_button("calculate"))
, m_xCalculateBtn(m_xBuilder->weld_button("calculatecond"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
, m_xItemFrame(m_xBuilder->weld_frame(u"itemframe"_ustr))
, m_xNameFT(m_xBuilder->weld_label(u"nameft"_ustr))
, m_xNameED(m_xBuilder->weld_entry(u"name"_ustr))
, m_xDefaultFT(m_xBuilder->weld_label(u"valueft"_ustr))
, m_xDefaultED(m_xBuilder->weld_entry(u"value"_ustr))
, m_xDefaultBtn(m_xBuilder->weld_button(u"browse"_ustr))
, m_xSettingsFrame(m_xBuilder->weld_widget(u"settingsframe"_ustr))
, m_xDataTypeLB(m_xBuilder->weld_combo_box(u"datatype"_ustr))
, m_xRequiredCB(m_xBuilder->weld_check_button(u"required"_ustr))
, m_xRequiredBtn(m_xBuilder->weld_button(u"requiredcond"_ustr))
, m_xRelevantCB(m_xBuilder->weld_check_button(u"relevant"_ustr))
, m_xRelevantBtn(m_xBuilder->weld_button(u"relevantcond"_ustr))
, m_xConstraintCB(m_xBuilder->weld_check_button(u"constraint"_ustr))
, m_xConstraintBtn(m_xBuilder->weld_button(u"constraintcond"_ustr))
, m_xReadonlyCB(m_xBuilder->weld_check_button(u"readonly"_ustr))
, m_xReadonlyBtn(m_xBuilder->weld_button(u"readonlycond"_ustr))
, m_xCalculateCB(m_xBuilder->weld_check_button(u"calculate"_ustr))
, m_xCalculateBtn(m_xBuilder->weld_button(u"calculatecond"_ustr))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
InitDialog();
InitFromNode();
@@ -2553,14 +2553,14 @@ namespace svxform
AddConditionDialog::AddConditionDialog(weld::Window* pParent,
OUString _aPropertyName,
const Reference< XPropertySet >& _rPropSet)
: GenericDialogController(pParent, "svx/ui/addconditiondialog.ui", "AddConditionDialog")
: GenericDialogController(pParent, u"svx/ui/addconditiondialog.ui"_ustr, u"AddConditionDialog"_ustr)
, m_aResultIdle("svx AddConditionDialog m_aResultIdle")
, m_sPropertyName(std::move(_aPropertyName))
, m_xBinding(_rPropSet)
, m_xConditionED(m_xBuilder->weld_text_view("condition"))
, m_xResultWin(m_xBuilder->weld_text_view("result"))
, m_xEditNamespacesBtn(m_xBuilder->weld_button("edit"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
, m_xConditionED(m_xBuilder->weld_text_view(u"condition"_ustr))
, m_xResultWin(m_xBuilder->weld_text_view(u"result"_ustr))
, m_xEditNamespacesBtn(m_xBuilder->weld_button(u"edit"_ustr))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
DBG_ASSERT( m_xBinding.is(), "AddConditionDialog::Ctor(): no Binding" );
@@ -2661,14 +2661,14 @@ namespace svxform
}
NamespaceItemDialog::NamespaceItemDialog(AddConditionDialog* pCondDlg, Reference<XNameContainer>& rContainer)
: GenericDialogController(pCondDlg->getDialog(), "svx/ui/namespacedialog.ui", "NamespaceDialog")
: GenericDialogController(pCondDlg->getDialog(), u"svx/ui/namespacedialog.ui"_ustr, u"NamespaceDialog"_ustr)
, m_pConditionDlg(pCondDlg)
, m_rNamespaces(rContainer)
, m_xNamespacesList(m_xBuilder->weld_tree_view("namespaces"))
, m_xAddNamespaceBtn(m_xBuilder->weld_button("add"))
, m_xEditNamespaceBtn(m_xBuilder->weld_button("edit"))
, m_xDeleteNamespaceBtn(m_xBuilder->weld_button("delete"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
, m_xNamespacesList(m_xBuilder->weld_tree_view(u"namespaces"_ustr))
, m_xAddNamespaceBtn(m_xBuilder->weld_button(u"add"_ustr))
, m_xEditNamespaceBtn(m_xBuilder->weld_button(u"edit"_ustr))
, m_xDeleteNamespaceBtn(m_xBuilder->weld_button(u"delete"_ustr))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
m_xNamespacesList->set_size_request(m_xNamespacesList->get_approximate_digit_width() * 80,
m_xNamespacesList->get_height_rows(8));
@@ -2803,12 +2803,12 @@ namespace svxform
}
ManageNamespaceDialog::ManageNamespaceDialog(weld::Window* pParent, AddConditionDialog* pCondDlg, bool bIsEdit)
: GenericDialogController(pParent, "svx/ui/addnamespacedialog.ui", "AddNamespaceDialog")
: GenericDialogController(pParent, u"svx/ui/addnamespacedialog.ui"_ustr, u"AddNamespaceDialog"_ustr)
, m_pConditionDlg(pCondDlg)
, m_xPrefixED(m_xBuilder->weld_entry("prefix"))
, m_xUrlED(m_xBuilder->weld_entry("url"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
, m_xAltTitle(m_xBuilder->weld_label("alttitle"))
, m_xPrefixED(m_xBuilder->weld_entry(u"prefix"_ustr))
, m_xUrlED(m_xBuilder->weld_entry(u"url"_ustr))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
, m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr))
{
if (bIsEdit)
m_xDialog->set_title(m_xAltTitle->get_label());
@@ -2848,17 +2848,17 @@ namespace svxform
AddSubmissionDialog::AddSubmissionDialog(
weld::Window* pParent, ItemNode* _pNode,
const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper)
: GenericDialogController(pParent, "svx/ui/addsubmissiondialog.ui", "AddSubmissionDialog")
: GenericDialogController(pParent, u"svx/ui/addsubmissiondialog.ui"_ustr, u"AddSubmissionDialog"_ustr)
, m_pItemNode(_pNode)
, m_xUIHelper(_rUIHelper)
, m_xNameED(m_xBuilder->weld_entry("name"))
, m_xActionED(m_xBuilder->weld_entry("action"))
, m_xMethodLB(m_xBuilder->weld_combo_box("method"))
, m_xRefED(m_xBuilder->weld_entry("expression"))
, m_xRefBtn(m_xBuilder->weld_button("browse"))
, m_xBindLB(m_xBuilder->weld_combo_box("binding"))
, m_xReplaceLB(m_xBuilder->weld_combo_box("replace"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
, m_xNameED(m_xBuilder->weld_entry(u"name"_ustr))
, m_xActionED(m_xBuilder->weld_entry(u"action"_ustr))
, m_xMethodLB(m_xBuilder->weld_combo_box(u"method"_ustr))
, m_xRefED(m_xBuilder->weld_entry(u"expression"_ustr))
, m_xRefBtn(m_xBuilder->weld_button(u"browse"_ustr))
, m_xBindLB(m_xBuilder->weld_combo_box(u"binding"_ustr))
, m_xReplaceLB(m_xBuilder->weld_combo_box(u"replace"_ustr))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
FillAllBoxes();
@@ -3064,10 +3064,10 @@ namespace svxform
}
AddModelDialog::AddModelDialog(weld::Window* pParent, bool bIsEdit)
: GenericDialogController(pParent, "svx/ui/addmodeldialog.ui", "AddModelDialog")
, m_xNameED(m_xBuilder->weld_entry("name"))
, m_xModifyCB(m_xBuilder->weld_check_button("modify"))
, m_xAltTitle(m_xBuilder->weld_label("alttitle"))
: GenericDialogController(pParent, u"svx/ui/addmodeldialog.ui"_ustr, u"AddModelDialog"_ustr)
, m_xNameED(m_xBuilder->weld_entry(u"name"_ustr))
, m_xModifyCB(m_xBuilder->weld_check_button(u"modify"_ustr))
, m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr))
{
if (bIsEdit)
m_xDialog->set_title(m_xAltTitle->get_label());
@@ -3078,12 +3078,12 @@ namespace svxform
}
AddInstanceDialog::AddInstanceDialog(weld::Window* pParent, bool _bEdit)
: GenericDialogController(pParent, "svx/ui/addinstancedialog.ui", "AddInstanceDialog")
, m_xNameED(m_xBuilder->weld_entry("name"))
, m_xURLED(new SvtURLBox(m_xBuilder->weld_combo_box("url")))
, m_xFilePickerBtn(m_xBuilder->weld_button("browse"))
, m_xLinkInstanceCB(m_xBuilder->weld_check_button("link"))
, m_xAltTitle(m_xBuilder->weld_label("alttitle"))
: GenericDialogController(pParent, u"svx/ui/addinstancedialog.ui"_ustr, u"AddInstanceDialog"_ustr)
, m_xNameED(m_xBuilder->weld_entry(u"name"_ustr))
, m_xURLED(new SvtURLBox(m_xBuilder->weld_combo_box(u"url"_ustr)))
, m_xFilePickerBtn(m_xBuilder->weld_button(u"browse"_ustr))
, m_xLinkInstanceCB(m_xBuilder->weld_check_button(u"link"_ustr))
, m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr))
{
if (_bEdit)
m_xDialog->set_title(m_xAltTitle->get_label());
@@ -3107,8 +3107,8 @@ namespace svxform
aDlg.SetContext(sfx2::FileDialogHelper::FormsAddInstance);
aDlg.AddFilter( m_sAllFilterName, FILEDIALOG_FILTER_ALL );
OUString sFilterName( "XML" );
aDlg.AddFilter( sFilterName, "*.xml" );
OUString sFilterName( u"XML"_ustr );
aDlg.AddFilter( sFilterName, u"*.xml"_ustr );
aDlg.SetCurrentFilter( sFilterName );
if (aDlg.Execute() == ERRCODE_NONE)
@@ -3116,8 +3116,8 @@ namespace svxform
}
LinkedInstanceWarningBox::LinkedInstanceWarningBox(weld::Widget* pParent)
: MessageDialogController(pParent, "svx/ui/formlinkwarndialog.ui",
"FormLinkWarnDialog")
: MessageDialogController(pParent, u"svx/ui/formlinkwarndialog.ui"_ustr,
u"FormLinkWarnDialog"_ustr)
{
}
+12 -12
View File
@@ -99,7 +99,7 @@ void OFilterItemExchange::AddSupportedFormats()
SotClipboardFormatId OFilterItemExchange::getFormatId()
{
static SotClipboardFormatId s_nFormat =
SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"form.FilterControlExchange\"");
SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"form.FilterControlExchange\""_ustr);
DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OFilterExchangeHelper::getFormatId: bad exchange id!");
return s_nFormat;
}
@@ -796,7 +796,7 @@ bool FmFilterModel::ValidateText(FmFilterItem const * pItem, OUString& rText, OU
OUString aPreparedText;
Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale();
pParseNode->parseNodeToPredicateStr(
aPreparedText, xConnection, xFormatter, xField, OUString(), aAppLocale, ".", getParseContext() );
aPreparedText, xConnection, xFormatter, xField, OUString(), aAppLocale, u"."_ustr, getParseContext() );
rText = aPreparedText;
return true;
}
@@ -1495,15 +1495,15 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
aSelectList.clear();
}
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "svx/ui/filtermenu.ui"));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), u"svx/ui/filtermenu.ui"_ustr));
std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
// every condition could be deleted except the first one if it's the only one
bool bNoDelete = false;
if (aSelectList.empty())
{
bNoDelete = true;
xContextMenu->remove("delete");
xContextMenu->remove(u"delete"_ustr);
}
FmFilterData* pFilterEntry = weld::fromId<FmFilterData*>(m_xTreeView->get_id(*xClicked));
@@ -1519,9 +1519,9 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
if (!bEdit)
{
xContextMenu->remove("edit");
xContextMenu->remove("isnull");
xContextMenu->remove("isnotnull");
xContextMenu->remove(u"edit"_ustr);
xContextMenu->remove(u"isnull"_ustr);
xContextMenu->remove(u"isnotnull"_ustr);
}
OUString sIdent = xContextMenu->popup_at_rect(m_xTreeView.get(), tools::Rectangle(aWhere, ::Size(1, 1)));
@@ -1532,7 +1532,7 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
else if (sIdent == "isnull")
{
OUString aErrorMsg;
OUString aText = "IS NULL";
OUString aText = u"IS NULL"_ustr;
assert(pFilterItem && "if item is null this menu entry was removed and unavailable");
m_pModel->ValidateText(pFilterItem, aText, aErrorMsg);
m_pModel->SetTextForItem(pFilterItem, aText);
@@ -1540,7 +1540,7 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
else if (sIdent == "isnotnull")
{
OUString aErrorMsg;
OUString aText = "IS NOT NULL";
OUString aText = u"IS NOT NULL"_ustr;
assert(pFilterItem && "if item is null this menu entry was removed and unavailable");
m_pModel->ValidateText(pFilterItem, aText, aErrorMsg);
@@ -1723,9 +1723,9 @@ void FmFilterNavigator::DeleteSelection()
FmFilterNavigatorWin::FmFilterNavigatorWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr,
vcl::Window* _pParent)
: SfxDockingWindow(_pBindings, _pMgr, _pParent, "FilterNavigator", "svx/ui/filternavigator.ui")
: SfxDockingWindow(_pBindings, _pMgr, _pParent, u"FilterNavigator"_ustr, u"svx/ui/filternavigator.ui"_ustr)
, SfxControllerItem( SID_FM_FILTER_NAVIGATOR_CONTROL, *_pBindings )
, m_xNavigatorTree(new FmFilterNavigator(this, m_xBuilder->weld_tree_view("treeview")))
, m_xNavigatorTree(new FmFilterNavigator(this, m_xBuilder->weld_tree_view(u"treeview"_ustr)))
{
SetHelpId( HID_FILTER_NAVIGATOR_WIN );
+13 -13
View File
@@ -171,13 +171,13 @@ static OUString GetUIHeadlineName(sal_Int16 nClassId, const Any& aUnoObj)
FmPropBrw::FmPropBrw(const Reference< XComponentContext >& _xORB, SfxBindings* _pBindings,
SfxChildWindow* _pMgr, weld::Window* _pParent, const SfxChildWinInfo* _pInfo)
: SfxModelessDialogController(_pBindings, _pMgr, _pParent, "svx/ui/formpropertydialog.ui", "FormPropertyDialog")
: SfxModelessDialogController(_pBindings, _pMgr, _pParent, u"svx/ui/formpropertydialog.ui"_ustr, u"FormPropertyDialog"_ustr)
, SfxControllerItem(SID_FM_PROPERTY_CONTROL, *_pBindings)
, m_bInitialStateChange(true)
, m_pParent(_pParent)
, m_nAsyncGetFocusId(nullptr)
, m_xDialogBox(m_xBuilder->weld_box("dialog-vbox1"))
, m_xContainer(m_xBuilder->weld_container("container"))
, m_xDialogBox(m_xBuilder->weld_box(u"dialog-vbox1"_ustr))
, m_xContainer(m_xBuilder->weld_container(u"container"_ustr))
, m_xORB(_xORB)
{
m_xContainer->set_size_request(m_xContainer->get_approximate_digit_width() * 72, m_xContainer->get_text_height() * 20);
@@ -190,7 +190,7 @@ FmPropBrw::FmPropBrw(const Reference< XComponentContext >& _xORB, SfxBindings* _
// transport the container area of this dialog to be the container window of the frame
css::uno::Reference<css::awt::XWindow> xFrameContainerWindow(new weld::TransportAsXWindow(m_xContainer.get()));
m_xMeAsFrame->initialize(xFrameContainerWindow);
m_xMeAsFrame->setName("form property browser");
m_xMeAsFrame->setName(u"form property browser"_ustr);
}
catch (const Exception&)
{
@@ -220,10 +220,10 @@ FmPropBrw::~FmPropBrw()
Reference<XNameContainer> xName(m_xInspectorContext,uno::UNO_QUERY);
if ( xName.is() )
{
const OUString pProps[] = { OUString( "ContextDocument" )
, OUString( "DialogParentWindow" )
, OUString( "ControlContext" )
, OUString( "ControlShapeAccess" ) };
const OUString pProps[] = { u"ContextDocument"_ustr
, u"DialogParentWindow"_ustr
, u"ControlContext"_ustr
, u"ControlShapeAccess"_ustr };
for (const auto & i : pProps)
xName->removeByName( i );
}
@@ -405,7 +405,7 @@ namespace
::utl::OConfigurationTreeRoot aConfiguration(
::utl::OConfigurationTreeRoot::createWithComponentContext(
_rxContext,
"/org.openoffice.Office.Common/Forms/PropertyBrowser/" ) );
u"/org.openoffice.Office.Common/Forms/PropertyBrowser/"_ustr ) );
bool bEnabled = false;
OSL_VERIFY( aConfiguration.getNodeValue( "DirectHelp" ) >>= bEnabled );
@@ -451,10 +451,10 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell )
// a ComponentContext for the
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
::cppu::ContextEntry_Init( "ContextDocument", Any( xDocument ) ),
::cppu::ContextEntry_Init( "DialogParentWindow", Any( xParentWindow ) ),
::cppu::ContextEntry_Init( "ControlContext", Any( xControlContext ) ),
::cppu::ContextEntry_Init( "ControlShapeAccess", Any( xControlMap ) )
::cppu::ContextEntry_Init( u"ContextDocument"_ustr, Any( xDocument ) ),
::cppu::ContextEntry_Init( u"DialogParentWindow"_ustr, Any( xParentWindow ) ),
::cppu::ContextEntry_Init( u"ControlContext"_ustr, Any( xControlContext ) ),
::cppu::ContextEntry_Init( u"ControlShapeAccess"_ustr, Any( xControlMap ) )
};
m_xInspectorContext.set(
::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ),
+10 -10
View File
@@ -104,20 +104,20 @@ namespace svxform
Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY );
if ( xDocumentSI.is() )
{
if ( xDocumentSI->supportsService("com.sun.star.text.TextDocument")
|| xDocumentSI->supportsService("com.sun.star.text.WebDocument")
if ( xDocumentSI->supportsService(u"com.sun.star.text.TextDocument"_ustr)
|| xDocumentSI->supportsService(u"com.sun.star.text.WebDocument"_ustr)
)
{
_rFamilyName = "ParagraphStyles";
_rStyleName = "Standard";
}
else if ( xDocumentSI->supportsService("com.sun.star.sheet.SpreadsheetDocument") )
else if ( xDocumentSI->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr) )
{
_rFamilyName = "CellStyles";
_rStyleName = "Default";
}
else if ( xDocumentSI->supportsService("com.sun.star.drawing.DrawingDocument")
|| xDocumentSI->supportsService("com.sun.star.presentation.PresentationDocument")
else if ( xDocumentSI->supportsService(u"com.sun.star.drawing.DrawingDocument"_ustr)
|| xDocumentSI->supportsService(u"com.sun.star.presentation.PresentationDocument"_ustr)
)
{
_rFamilyName = "graphics";
@@ -185,7 +185,7 @@ namespace svxform
// retrieve a default font for this locale, and set it at the control
vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS, LanguageTag::convertToLanguageType( aDocumentCharLocale ), GetDefaultFontFlags::OnlyOne );
FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont );
_rxModel->setPropertyValue("FontDescriptor", Any( aFontDesc )
_rxModel->setPropertyValue(u"FontDescriptor"_ustr, Any( aFontDesc )
);
}
catch( const Exception& )
@@ -208,7 +208,7 @@ namespace svxform
// the names of the family, and the style - depends on the document type we live in
OUString sFamilyName, sStyleName;
if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies, sFamilyName, sStyleName ) )
throw RuntimeException("unknown document type!");
throw RuntimeException(u"unknown document type!"_ustr);
// the concrete style
Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW );
@@ -236,7 +236,7 @@ namespace svxform
// let's see what the configuration says about the visual effect
OConfigurationNode aConfig = getLayoutSettings( _eDocType );
Any aVisualEffect = aConfig.getNodeValue( OUString( "VisualEffect" ) );
Any aVisualEffect = aConfig.getNodeValue( u"VisualEffect"_ustr );
if ( aVisualEffect.hasValue() )
{
OUString sVisualEffect;
@@ -287,7 +287,7 @@ namespace svxform
bool ControlLayouter::useDynamicBorderColor( DocumentType _eDocType )
{
OConfigurationNode aConfig = getLayoutSettings( _eDocType );
Any aDynamicBorderColor = aConfig.getNodeValue( OUString( "DynamicBorderColors" ) );
Any aDynamicBorderColor = aConfig.getNodeValue( u"DynamicBorderColors"_ustr );
bool bDynamicBorderColor = false;
OSL_VERIFY( aDynamicBorderColor >>= bDynamicBorderColor );
return bDynamicBorderColor;
@@ -299,7 +299,7 @@ namespace svxform
if ( _eDocType == eUnknownDocumentType )
return false;
OConfigurationNode aConfig = getLayoutSettings( _eDocType );
Any aUseRefDevice = aConfig.getNodeValue( OUString( "UseDocumentTextMetrics" ) );
Any aUseRefDevice = aConfig.getNodeValue( u"UseDocumentTextMetrics"_ustr );
bool bUseRefDevice = false;
OSL_VERIFY( aUseRefDevice >>= bUseRefDevice );
return bUseRefDevice;
+3 -3
View File
@@ -283,7 +283,7 @@ namespace svxform
SotClipboardFormatId OControlExchange::getControlPathFormatId()
{
static SotClipboardFormatId s_nFormat =
SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"svxform.ControlPathExchange\"");
SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"svxform.ControlPathExchange\""_ustr);
DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getControlPathFormatId: bad exchange id!");
return s_nFormat;
}
@@ -291,7 +291,7 @@ namespace svxform
SotClipboardFormatId OControlExchange::getHiddenControlModelsFormatId()
{
static SotClipboardFormatId s_nFormat =
SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"svxform.HiddenControlModelsExchange\"");
SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"svxform.HiddenControlModelsExchange\""_ustr);
DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getHiddenControlModelsFormatId: bad exchange id!");
return s_nFormat;
}
@@ -300,7 +300,7 @@ namespace svxform
SotClipboardFormatId OControlExchange::getFieldExchangeFormatId()
{
static SotClipboardFormatId s_nFormat =
SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"svxform.FieldNameExchange\"");
SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"svxform.FieldNameExchange\""_ustr);
DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getFieldExchangeFormatId: bad exchange id!");
return s_nFormat;
}
+2 -2
View File
@@ -439,9 +439,9 @@ namespace svxform
NavigatorFrame::NavigatorFrame( SfxBindings* _pBindings, SfxChildWindow* _pMgr,
vcl::Window* _pParent )
: SfxDockingWindow(_pBindings, _pMgr, _pParent, "FormNavigator", "svx/ui/formnavigator.ui")
: SfxDockingWindow(_pBindings, _pMgr, _pParent, u"FormNavigator"_ustr, u"svx/ui/formnavigator.ui"_ustr)
, SfxControllerItem( SID_FM_FMEXPLORER_CONTROL, *_pBindings )
, m_xNavigatorTree(new NavigatorTree(m_xBuilder->weld_tree_view("treeview")))
, m_xNavigatorTree(new NavigatorTree(m_xBuilder->weld_tree_view(u"treeview"_ustr)))
{
SetHelpId( HID_FORM_NAVIGATOR_WIN );
+2 -2
View File
@@ -62,7 +62,7 @@ FmFormObj::FmFormObj(
}
FmFormObj::FmFormObj(SdrModel& rSdrModel)
: SdrUnoObj(rSdrModel, "")
: SdrUnoObj(rSdrModel, u""_ustr)
,m_nPos(-1)
,m_pLastKnownRefDevice(nullptr)
{
@@ -521,7 +521,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
{
// create and insert (into the destination) a copy of the form
xCurrentDestForm.set(
::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.form.component.DataForm"),
::comphelper::getProcessServiceFactory()->createInstance(u"com.sun.star.form.component.DataForm"_ustr),
UNO_QUERY_THROW );
::comphelper::copyProperties( xCurrentSourceForm, xCurrentDestForm );
+2 -2
View File
@@ -104,7 +104,7 @@ namespace
size_t lhsCount = FormComponentInfo::childCount( _components.first );
size_t rhsCount = FormComponentInfo::childCount( _components.second );
if ( lhsCount != rhsCount )
throw RuntimeException( "Found inconsistent form component hierarchies (1)!" );
throw RuntimeException( u"Found inconsistent form component hierarchies (1)!"_ustr );
return lhsCount;
}
@@ -132,7 +132,7 @@ namespace
Reference< XControlModel > lhsControlModel( _component.first, UNO_QUERY );
Reference< XControlModel > rhsControlModel( _component.second, UNO_QUERY );
if ( lhsControlModel.is() != rhsControlModel.is() )
throw RuntimeException( "Found inconsistent form component hierarchies (2)!" );
throw RuntimeException( u"Found inconsistent form component hierarchies (2)!"_ustr );
if ( lhsControlModel.is() )
m_rControlModelMap[ lhsControlModel ] = rhsControlModel;
+1 -1
View File
@@ -825,7 +825,7 @@ namespace svxform
{
Reference< XControl > xControl( aEvent.Source, UNO_QUERY_THROW );
Reference< XPropertySet > xProps( xControl->getModel(), UNO_QUERY_THROW );
aCaller = xProps->getPropertyValue("Name");
aCaller = xProps->getPropertyValue(u"Name"_ustr);
}
catch( Exception& ) {}
}
+4 -4
View File
@@ -170,7 +170,7 @@ FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView )
,m_bHasForms(false)
{
SetPool( &SfxGetpApp()->GetPool() );
SetName( "Form" );
SetName( u"Form"_ustr );
SetView(m_pFormView);
}
@@ -225,8 +225,8 @@ bool FmFormShell::PrepareClose(bool bUI)
SfxViewShell* pShell = GetViewShell();
vcl::Window* pShellWnd = pShell ? pShell->GetWindow() : nullptr;
weld::Widget* pFrameWeld = pShellWnd ? pShellWnd->GetFrameWeld() : nullptr;
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pFrameWeld, "svx/ui/savemodifieddialog.ui"));
std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog("SaveModifiedDialog"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pFrameWeld, u"svx/ui/savemodifieddialog.ui"_ustr));
std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog(u"SaveModifiedDialog"_ustr));
switch (xQry->run())
{
case RET_YES:
@@ -713,7 +713,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
}
if ( nRecord != -1 )
rController->execute( nSlot, "Position", Any( nRecord ) );
rController->execute( nSlot, u"Position"_ustr, Any( nRecord ) );
rReq.Done();
} break;
+11 -11
View File
@@ -605,7 +605,7 @@ FmXFormShell_Base_Disambiguation::FmXFormShell_Base_Disambiguation( ::osl::Mutex
FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame )
:FmXFormShell_BASE(m_aMutex)
,FmXFormShell_CFGBASE("Office.Common/Misc", ConfigItemMode::NONE)
,FmXFormShell_CFGBASE(u"Office.Common/Misc"_ustr, ConfigItemMode::NONE)
,m_aMarkTimer("svx::FmXFormShell m_aMarkTimer")
,m_eNavigate( NavigationBarMode_NONE )
,m_nInvalidationEvent( nullptr )
@@ -641,7 +641,7 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame )
// cache the current configuration settings we're interested in
implAdjustConfigCache_Lock();
// and register for changes on this settings
Sequence< OUString > aNames { "FormControlPilotsEnabled" };
Sequence< OUString > aNames { u"FormControlPilotsEnabled"_ustr };
EnableNotification(aNames);
}
@@ -1579,7 +1579,7 @@ bool FmXFormShell::GetY2KState_Lock(sal_uInt16& n)
{
try
{
Any aVal( xSet->getPropertyValue("TwoDigitDateStart") );
Any aVal( xSet->getPropertyValue(u"TwoDigitDateStart"_ustr) );
aVal >>= n;
return true;
}
@@ -1610,7 +1610,7 @@ void FmXFormShell::SetY2KState_Lock(sal_uInt16 n)
{
try
{
xSet->setPropertyValue("TwoDigitDateStart", Any(sal_uInt16(n)));
xSet->setPropertyValue(u"TwoDigitDateStart"_ustr, Any(sal_uInt16(n)));
}
catch(Exception&)
{
@@ -1649,7 +1649,7 @@ void FmXFormShell::SetY2KState_Lock(sal_uInt16 n)
{
try
{
xSet->setPropertyValue("TwoDigitDateStart", Any(sal_uInt16(n)));
xSet->setPropertyValue(u"TwoDigitDateStart"_ustr, Any(sal_uInt16(n)));
}
catch(Exception&)
{
@@ -2908,7 +2908,7 @@ void FmXFormShell::startFiltering_Lock()
{
Reference< XModeSelector> xModeSelector(rpController, UNO_QUERY);
if (xModeSelector.is())
xModeSelector->setMode( "FilterMode" );
xModeSelector->setMode( u"FilterMode"_ustr );
}
}
@@ -3008,7 +3008,7 @@ void FmXFormShell::stopFiltering_Lock(bool bSave)
Reference< XModeSelector> xModeSelector(rController, UNO_QUERY);
if (xModeSelector.is())
xModeSelector->setMode( "DataMode" );
xModeSelector->setMode( u"DataMode"_ustr );
}
if (bSave) // execute the filter
{
@@ -3104,7 +3104,7 @@ void FmXFormShell::CreateExternalView_Lock()
// load the component for external form views
if (!bAlreadyExistent)
{
OUString sFrameName("_beamer");
OUString sFrameName(u"_beamer"_ustr);
URL aWantToDispatch;
aWantToDispatch.Complete = FMURL_COMPONENT_FORMGRIDVIEW;
@@ -3396,7 +3396,7 @@ void FmXFormShell::CreateExternalView_Lock()
// column type : listbox
pDispatchArgs->Name = FMARG_ADDCOL_COLUMNTYPE;
pDispatchArgs->Value <<= OUString(FM_COL_LISTBOX);
pDispatchArgs->Value <<= u"" FM_COL_LISTBOX ""_ustr;
// pDispatchArgs->Value <<= (OUString)FM_COL_LISTBOX;
++pDispatchArgs;
@@ -3466,7 +3466,7 @@ void FmXFormShell::implAdjustConfigCache_Lock()
return;
// get (cache) the wizard usage flag
Sequence< OUString > aNames { "FormControlPilotsEnabled" };
Sequence< OUString > aNames { u"FormControlPilotsEnabled"_ustr };
Sequence< Any > aFlags = GetProperties(aNames);
if (1 == aFlags.getLength())
m_bUseWizards = ::cppu::any2bool(aFlags[0]);
@@ -3496,7 +3496,7 @@ void FmXFormShell::SetWizardUsing_Lock(bool _bUseThem)
{
m_bUseWizards = _bUseThem;
Sequence< OUString > aNames { "FormControlPilotsEnabled" };
Sequence< OUString > aNames { u"FormControlPilotsEnabled"_ustr };
Sequence< Any > aValues{ Any(m_bUseWizards) };
PutProperties(aNames, aValues);
}
+2 -2
View File
@@ -175,8 +175,8 @@ OUString CheckBoxWrapper::getCurrentText() const
{
switch (static_cast<TriState>(m_xBox->getState()))
{
case TRISTATE_FALSE: return "0";
case TRISTATE_TRUE: return "1";
case TRISTATE_FALSE: return u"0"_ustr;
case TRISTATE_TRUE: return u"1"_ustr;
default: break;
}
return OUString();
+10 -10
View File
@@ -32,12 +32,12 @@ namespace svx
{
TextControlCharAttribDialog::TextControlCharAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet, SvxFontListItem aFontList)
: SfxTabDialogController(pParent, "svx/ui/textcontrolchardialog.ui", "TextControlCharacterPropertiesDialog", &rCoreSet)
: SfxTabDialogController(pParent, u"svx/ui/textcontrolchardialog.ui"_ustr, u"TextControlCharacterPropertiesDialog"_ustr, &rCoreSet)
, m_aFontList(std::move(aFontList))
{
AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("position", RID_SVXPAGE_CHAR_POSITION);
AddTabPage(u"font"_ustr, RID_SVXPAGE_CHAR_NAME);
AddTabPage(u"fonteffects"_ustr, RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage(u"position"_ustr, RID_SVXPAGE_CHAR_POSITION);
}
void TextControlCharAttribDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
@@ -62,17 +62,17 @@ namespace svx
}
TextControlParaAttribDialog::TextControlParaAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
: SfxTabDialogController(pParent, "svx/ui/textcontrolparadialog.ui", "TextControlParagraphPropertiesDialog", &rCoreSet)
: SfxTabDialogController(pParent, u"svx/ui/textcontrolparadialog.ui"_ustr, u"TextControlParagraphPropertiesDialog"_ustr, &rCoreSet)
{
AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH);
AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH);
AddTabPage(u"labelTP_PARA_STD"_ustr, RID_SVXPAGE_STD_PARAGRAPH);
AddTabPage(u"labelTP_PARA_ALIGN"_ustr, RID_SVXPAGE_ALIGN_PARAGRAPH);
if( SvtCJKOptions::IsAsianTypographyEnabled() )
AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN);
AddTabPage(u"labelTP_PARA_ASIAN"_ustr, RID_SVXPAGE_PARA_ASIAN);
else
RemoveTabPage("labelTP_PARA_ASIAN");
RemoveTabPage(u"labelTP_PARA_ASIAN"_ustr);
AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR);
AddTabPage(u"labelTP_TABULATOR"_ustr, RID_SVXPAGE_TABULATOR);
}
}
+3 -3
View File
@@ -496,7 +496,7 @@ namespace svx
Reference< XPropertySetInfo > xPSI;
if ( xModelProps.is() )
xPSI = xModelProps->getPropertySetInfo();
OUString sRichTextPropertyName = "RichText";
OUString sRichTextPropertyName = u"RichText"_ustr;
if ( xPSI.is() && xPSI->hasPropertyByName( sRichTextPropertyName ) )
{
OSL_VERIFY( xModelProps->getPropertyValue( sRichTextPropertyName ) >>= bIsRichText );
@@ -687,7 +687,7 @@ namespace svx
DBG_ASSERT( pBoolItem, "FmTextControlShell::executeAttributeDialog: no bool item?!" );
if ( pBoolItem )
{
aArgs = { comphelper::makePropertyValue("Enable",
aArgs = { comphelper::makePropertyValue(u"Enable"_ustr,
pBoolItem->GetValue()) };
}
}
@@ -1297,7 +1297,7 @@ namespace svx
void FmTextControlShell::contextMenuRequested()
{
m_rBindings.GetDispatcher()->ExecutePopup( "formrichtext" );
m_rBindings.GetDispatcher()->ExecutePopup( u"formrichtext"_ustr );
}
+1 -1
View File
@@ -84,7 +84,7 @@ void displayException(const Any& _rExcept, const css::uno::Reference<css::awt::X
try
{
Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create(::comphelper::getProcessComponentContext(), "", rParent, _rExcept);
Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create(::comphelper::getProcessComponentContext(), u""_ustr, rParent, _rExcept);
xErrorDialog->execute();
}
catch(const Exception&)
+2 -2
View File
@@ -119,13 +119,13 @@ private:
comphelper::getProcessComponentContext());
Reference< XScriptListener > const xScriptListener(
context->getServiceManager()->createInstanceWithContext(
"ooo.vba.EventListener", context),
u"ooo.vba.EventListener"_ustr, context),
UNO_QUERY_THROW);
Reference< XPropertySet > const xListenerProps( xScriptListener, UNO_QUERY_THROW );
// SfxObjectShellRef is good here since the model controls the lifetime of the shell
SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell();
ENSURE_OR_THROW( xObjectShell.is(), "no object shell!" );
xListenerProps->setPropertyValue("Model", Any( xObjectShell->GetModel() ) );
xListenerProps->setPropertyValue(u"Model"_ustr, Any( xObjectShell->GetModel() ) );
m_vbaListener = xScriptListener;
}
+1 -1
View File
@@ -103,7 +103,7 @@ void FmFormView::Init()
if ( const SfxUnoAnyItem *pItem = pObjShell->GetMedium()->GetItemSet().GetItemIfSet( SID_COMPONENTDATA, false ) )
{
::comphelper::NamedValueCollection aComponentData( pItem->GetValue() );
bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode );
bInitDesignMode = aComponentData.getOrDefault( u"ApplyFormDesignMode"_ustr, bInitDesignMode );
}
}
+3 -3
View File
@@ -1053,8 +1053,8 @@ IMPL_LINK_NOARG( FmXFormView, OnStartControlWizard, void*, void )
{
// build the argument list
::comphelper::NamedValueCollection aWizardArgs;
aWizardArgs.put("ObjectModel", m_xLastCreatedControlModel);
aWizardArgs.put("ParentWindow", GetParentWindow());
aWizardArgs.put(u"ObjectModel"_ustr, m_xLastCreatedControlModel);
aWizardArgs.put(u"ParentWindow"_ustr, GetParentWindow());
// create the wizard object
Reference< XExecutableDialog > xWizard;
@@ -1402,7 +1402,7 @@ rtl::Reference<SdrObject> FmXFormView::implCreateXFormsControl( const svx::OXFor
rtl::Reference<SdrUnoObj> pLabel;
rtl::Reference<SdrUnoObj> pControl;
if ( !createControlLabelPair( *pOutDev, 0, 0, nullptr, xNumberFormats, nOBJID, sLabelPostfix,
pLabel, pControl, nullptr, "", "", -1 )
pLabel, pControl, nullptr, u""_ustr, u""_ustr, -1 )
)
{
return nullptr;
+3 -3
View File
@@ -194,7 +194,7 @@ namespace svxform
if ( !sDataSourceName.isEmpty() )
xDsProperties.set(getDataSource( sDataSourceName, _rContext ), css::uno::UNO_QUERY);
if ( xDsProperties.is() )
xDsProperties->getPropertyValue("Info") >>= aInfo;
xDsProperties->getPropertyValue(u"Info"_ustr) >>= aInfo;
}
catch( const Exception& )
{
@@ -377,7 +377,7 @@ namespace svxform
switch ( nClassId )
{
case FormComponentType::SCROLLBAR:
_rxControlModel->setPropertyValue("LiveScroll", Any( true ) );
_rxControlModel->setPropertyValue(u"LiveScroll"_ustr, Any( true ) );
[[fallthrough]];
case FormComponentType::SPINBUTTON:
{
@@ -417,7 +417,7 @@ namespace svxform
case FormComponentType::CHECKBOX:
case FormComponentType::FIXEDTEXT:
{
OUString sVertAlignPropertyName( "VerticalAlign" );
OUString sVertAlignPropertyName( u"VerticalAlign"_ustr );
if ( xPSI->hasPropertyByName( sVertAlignPropertyName ) )
_rxControlModel->setPropertyValue( sVertAlignPropertyName, Any( VerticalAlignment_MIDDLE ) );
}

Some files were not shown because too many files have changed in this diff Show More