loplugin:ostr in various
Change-Id: I7aa8ed716998a185996482dc561219b398a1c919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
89a80d637e
commit
0572ef356b
@ -1254,7 +1254,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen
|
||||
catch( const Exception& )
|
||||
{
|
||||
Any aError = ::cppu::getCaughtException();
|
||||
m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToFailed", nullptr, aError );
|
||||
m_aEventNotifier.notifyDocumentEventAsync( u"OnSaveToFailed"_ustr, nullptr, aError );
|
||||
|
||||
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|
||||
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
|
||||
@ -1267,7 +1267,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen
|
||||
impl_throwIOExceptionCausedBySave_throw( aError, _rURL );
|
||||
}
|
||||
|
||||
m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToDone", nullptr, Any( _rURL ) );
|
||||
m_aEventNotifier.notifyDocumentEventAsync( u"OnSaveToDone"_ustr, nullptr, Any( _rURL ) );
|
||||
}
|
||||
|
||||
// XModifyBroadcaster
|
||||
|
@ -542,7 +542,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
|
||||
// open in viewmode
|
||||
eCurrentEvent = CommandLineEvent::Start;
|
||||
// start on the first slide unless a valid starting slide # was provided
|
||||
m_startListParams = rest.toUInt32() > 0 ? rest : "1";
|
||||
m_startListParams = rest.toUInt32() > 0 ? rest : u"1"_ustr;
|
||||
}
|
||||
else if ( oArg == "display" )
|
||||
{
|
||||
|
@ -810,7 +810,7 @@ void Test::testHTMLPaste()
|
||||
EditDoc& rDoc = aEditEngine.GetEditDoc();
|
||||
//OString aHTML("<!DOCTYPE html>\n<html><body>test</body></html>"_ostr);
|
||||
std::vector<OString> aContent({ "<!DOCTYPE html>\n<html><body>test</body></html>"_ostr });
|
||||
std::vector<OUString> aMime({ "text/html" });
|
||||
std::vector<OUString> aMime({ u"text/html"_ustr });
|
||||
|
||||
uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime));
|
||||
// When trying to paste HTML:
|
||||
@ -830,7 +830,7 @@ void Test::testHTMLFragmentPaste()
|
||||
EditEngine aEditEngine(mpItemPool.get());
|
||||
EditDoc& rDoc = aEditEngine.GetEditDoc();
|
||||
std::vector<OString> aContent({ "a<b>b</b>c"_ostr });
|
||||
std::vector<OUString> aMime({ "text/html" });
|
||||
std::vector<OUString> aMime({ u"text/html"_ustr });
|
||||
|
||||
uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime));
|
||||
|
||||
@ -852,7 +852,7 @@ void Test::testRTFPaste()
|
||||
EditDoc& rDoc = aEditEngine.GetEditDoc();
|
||||
std::vector<OString> aContent(
|
||||
{ "{\\rtf1\\adeflang1025\\ansi{\\ul www.libreoffice.org}}"_ostr });
|
||||
std::vector<OUString> aMime({ "text/richtext" });
|
||||
std::vector<OUString> aMime({ u"text/richtext"_ustr });
|
||||
uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime));
|
||||
|
||||
// When trying to paste HTML:
|
||||
@ -863,7 +863,7 @@ void Test::testRTFPaste()
|
||||
// - Expected: www.libreoffice.org
|
||||
// - Actual :
|
||||
// i.e. RTF and plain text paste worked, but not HTML.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("www.libreoffice.org"),
|
||||
CPPUNIT_ASSERT_EQUAL(u"www.libreoffice.org"_ustr,
|
||||
rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
|
||||
}
|
||||
|
||||
@ -886,8 +886,8 @@ void Test::testRTFHTMLPaste()
|
||||
"</head><body lang=\"de-DE\" link=\"#000080\" vlink=\"#800000\" dir=\"ltr\">"
|
||||
"<p style=\"line-height: 100%; margin-bottom: 0cm\">abc</p></body></html>"_ostr });
|
||||
std::vector<OUString> aMime(
|
||||
{ "text/richtext",
|
||||
"application/x-openoffice-html-simple;windows_formatname=\"HTML Format\"" });
|
||||
{ u"text/richtext"_ustr,
|
||||
u"application/x-openoffice-html-simple;windows_formatname=\"HTML Format\""_ustr });
|
||||
uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime));
|
||||
|
||||
// When trying to paste HTML:
|
||||
@ -897,7 +897,7 @@ void Test::testRTFHTMLPaste()
|
||||
// expected "abc"
|
||||
// wrong: www.libreoffice.org
|
||||
// i.e. HTML is preferred over HTML.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("abc"), rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
|
||||
CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
|
||||
}
|
||||
void Test::testMultiParaSelCopyPaste()
|
||||
{
|
||||
|
@ -524,12 +524,12 @@ bool SvxAutoCorrect::FnChgOrdinalNumber(
|
||||
( sEnd[0] == 'a' || sEnd[0] == 'o' || sEnd[0] == 'r' ) )
|
||||
{
|
||||
auto aExtendedSuffixes = comphelper::sequenceToContainer< std::vector<OUString> >(aSuffixes);
|
||||
aExtendedSuffixes.push_back("as"); // plural form of 'a'
|
||||
aExtendedSuffixes.push_back("os"); // plural form of 'o'
|
||||
aExtendedSuffixes.push_back("ra"); // alternative form of 'a'
|
||||
aExtendedSuffixes.push_back("ro"); // alternative form of 'o'
|
||||
aExtendedSuffixes.push_back("ras"); // alternative form of "as"
|
||||
aExtendedSuffixes.push_back("ros"); // alternative form of "os"
|
||||
aExtendedSuffixes.push_back(u"as"_ustr); // plural form of 'a'
|
||||
aExtendedSuffixes.push_back(u"os"_ustr); // plural form of 'o'
|
||||
aExtendedSuffixes.push_back(u"ra"_ustr); // alternative form of 'a'
|
||||
aExtendedSuffixes.push_back(u"ro"_ustr); // alternative form of 'o'
|
||||
aExtendedSuffixes.push_back(u"ras"_ustr); // alternative form of "as"
|
||||
aExtendedSuffixes.push_back(u"ros"_ustr); // alternative form of "os"
|
||||
aSuffixes = comphelper::containerToSequence(aExtendedSuffixes);
|
||||
}
|
||||
|
||||
@ -552,7 +552,7 @@ bool SvxAutoCorrect::FnChgOrdinalNumber(
|
||||
rDoc.Delete( nNumEnd + 1, nNumEnd + 2 );
|
||||
nSuffixChanged = -1;
|
||||
}
|
||||
rDoc.Insert( nNumEnd + 1, "." );
|
||||
rDoc.Insert( nNumEnd + 1, u"."_ustr );
|
||||
nNumberChanged = 1;
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator )
|
||||
{
|
||||
OUString referer;
|
||||
getPropertyValue("Referer") >>= referer;
|
||||
getPropertyValue(u"Referer"_ustr) >>= referer;
|
||||
if (SvtSecurityOptions::isUntrustedReferer(referer)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -758,7 +758,7 @@ namespace frm
|
||||
m_bProdStarted = false;
|
||||
|
||||
OUString referer;
|
||||
getPropertyValue("Referer") >>= referer;
|
||||
getPropertyValue(u"Referer"_ustr) >>= referer;
|
||||
if (!SvtSecurityOptions::isUntrustedReferer(referer)) {
|
||||
// Kick off download (caution: can be synchronous).
|
||||
m_pMedium->Download(LINK(this, OClickableImageBaseModel, DownloadDoneLink));
|
||||
|
@ -40,8 +40,9 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle)
|
||||
// and asserts that the title doesn't change.
|
||||
|
||||
// Load document
|
||||
uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue("Hidden", false) };
|
||||
loadWithParams("private:factory/swriter", aLoadArgs);
|
||||
uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue(u"Hidden"_ustr,
|
||||
false) };
|
||||
loadWithParams(u"private:factory/swriter"_ustr, aLoadArgs);
|
||||
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<frame::XController> xController(xModel->getCurrentController());
|
||||
@ -58,7 +59,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle)
|
||||
xParser->parseStrict(printPreviewURL);
|
||||
uno::Reference<frame::XDispatchProvider> xDispatchProvider(xModel->getCurrentController(),
|
||||
uno::UNO_QUERY);
|
||||
xDispatchProvider->queryDispatch(printPreviewURL, "", 0);
|
||||
xDispatchProvider->queryDispatch(printPreviewURL, u""_ustr, 0);
|
||||
uno::Reference<frame::XTitle> xTitle2(xFrame, css::uno::UNO_QUERY);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
@ -71,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle)
|
||||
xParser->parseStrict(closePreviewURL);
|
||||
uno::Reference<frame::XDispatchProvider> xDispatchProvider2(xModel->getCurrentController(),
|
||||
uno::UNO_QUERY);
|
||||
xDispatchProvider2->queryDispatch(closePreviewURL, "", 0);
|
||||
xDispatchProvider2->queryDispatch(closePreviewURL, u""_ustr, 0);
|
||||
uno::Reference<frame::XTitle> xTitle3(xFrame, css::uno::UNO_QUERY);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
@ -84,7 +85,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkTitleSuggestedFileName)
|
||||
uno::Sequence<beans::PropertyValue> aArguments
|
||||
= { comphelper::makePropertyValue(u"SuggestedSaveAsName"_ustr, u"suggestedname.odt"_ustr),
|
||||
comphelper::makePropertyValue(u"Hidden"_ustr, false) };
|
||||
loadWithParams("private:factory/swriter", aArguments);
|
||||
loadWithParams(u"private:factory/swriter"_ustr, aArguments);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<frame::XController> xController(xModel->getCurrentController());
|
||||
uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY);
|
||||
@ -100,8 +101,9 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck)
|
||||
// Set the frame title, then cycle through default and print preview. Close the window
|
||||
// and check for infinite recursion.
|
||||
|
||||
uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue("Hidden", false) };
|
||||
loadWithParams("private:factory/swriter", aLoadArgs);
|
||||
uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue(u"Hidden"_ustr,
|
||||
false) };
|
||||
loadWithParams(u"private:factory/swriter"_ustr, aLoadArgs);
|
||||
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<frame::XController> xController(xModel->getCurrentController());
|
||||
@ -116,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck)
|
||||
util::URL printPreviewURL;
|
||||
printPreviewURL.Complete = u".uno::PrintPreview"_ustr;
|
||||
xParser->parseStrict(printPreviewURL);
|
||||
xDispatchProvider->queryDispatch(printPreviewURL, "", 0);
|
||||
xDispatchProvider->queryDispatch(printPreviewURL, u""_ustr, 0);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
util::URL closePreviewURL;
|
||||
@ -124,7 +126,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck)
|
||||
xParser->parseStrict(closePreviewURL);
|
||||
uno::Reference<frame::XDispatchProvider> xDispatchProvider2(xModel->getCurrentController(),
|
||||
uno::UNO_QUERY);
|
||||
xDispatchProvider2->queryDispatch(closePreviewURL, "", 0);
|
||||
xDispatchProvider2->queryDispatch(closePreviewURL, u""_ustr, 0);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
util::URL closeDocURL;
|
||||
@ -137,7 +139,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(windowTitle, u"documentTitle"_ustr);
|
||||
|
||||
xDispatchProvider3->queryDispatch(closeDocURL, "", 0);
|
||||
xDispatchProvider3->queryDispatch(closeDocURL, u""_ustr, 0);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
}
|
||||
}
|
||||
|
@ -78,8 +78,9 @@ ScFunctionListObj::ScFunctionListObj()
|
||||
: UnoApiTest(u"/sc/qa/extras/testdocuments"_ustr)
|
||||
, XElementAccess(cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get())
|
||||
, XIndexAccess(404)
|
||||
, XNameAccess("IF")
|
||||
, XServiceInfo("stardiv.StarCalc.ScFunctionListObj", "com.sun.star.sheet.FunctionDescriptions")
|
||||
, XNameAccess(u"IF"_ustr)
|
||||
, XServiceInfo(u"stardiv.StarCalc.ScFunctionListObj"_ustr,
|
||||
u"com.sun.star.sheet.FunctionDescriptions"_ustr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ CPPUNIT_TEST_FIXTURE(ScGoalSeekTest, testTdf161511)
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
|
||||
// Without the fix in place, this test would have crashed
|
||||
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, "100");
|
||||
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, u"100"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(0.0, res.Result);
|
||||
CPPUNIT_ASSERT_EQUAL(DBL_MAX, res.Divergence);
|
||||
}
|
||||
@ -65,7 +65,7 @@ CPPUNIT_TEST_FIXTURE(ScGoalSeekTest, testTdf68034)
|
||||
ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
|
||||
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, "2");
|
||||
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, u"2"_ustr);
|
||||
// Without the fix in place, this test would have failed with
|
||||
// - Expected: 4
|
||||
// - Actual : 0
|
||||
|
@ -3972,9 +3972,9 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testLeftOverflowEdit)
|
||||
|
||||
// Go to Cell B5000
|
||||
uno::Sequence<beans::PropertyValue> aPropertyValues = {
|
||||
comphelper::makePropertyValue("ToPoint", OUString("$B$5000")),
|
||||
comphelper::makePropertyValue(u"ToPoint"_ustr, u"$B$5000"_ustr),
|
||||
};
|
||||
dispatchCommand(mxComponent, ".uno:GoToCell", aPropertyValues);
|
||||
dispatchCommand(mxComponent, u".uno:GoToCell"_ustr, aPropertyValues);
|
||||
|
||||
// Enter edit mode and select all text.
|
||||
aView.m_aTextSelectionResult.clear();
|
||||
|
@ -1508,7 +1508,7 @@ OUString ScIconSetFormat::getIconSetName( ScIconSetType eType )
|
||||
if (pMap)
|
||||
return pMap->aName;
|
||||
|
||||
return "";
|
||||
return u""_ustr;
|
||||
}
|
||||
|
||||
sal_Int32 ScIconSetFormat::getIconSetElements( ScIconSetType eType )
|
||||
|
@ -110,8 +110,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
|
||||
, mxSourceLabel(mxSourceFrame->weld_label_widget())
|
||||
, mxDestFrame(m_xBuilder->weld_frame(u"frame1"_ustr))
|
||||
, mxDestLabel(mxDestFrame->weld_label_widget())
|
||||
, mxOptions(m_xBuilder->weld_expander("options"))
|
||||
, mxMore(m_xBuilder->weld_expander("more"))
|
||||
, mxOptions(m_xBuilder->weld_expander(u"options"_ustr))
|
||||
, mxMore(m_xBuilder->weld_expander(u"more"_ustr))
|
||||
{
|
||||
// Source UI
|
||||
Link<weld::Toggleable&,void> aLink2 = LINK(this, ScPivotLayoutDialog, ToggleSource);
|
||||
|
@ -148,7 +148,7 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
|
||||
, m_xModifyPB(m_xBuilder->weld_button(u"modify"_ustr))
|
||||
, m_xInvalidFT(m_xBuilder->weld_label(u"invalid"_ustr))
|
||||
, m_xFrameLabel(m_xAssignFrame->weld_label_widget())
|
||||
, m_xExpander(m_xBuilder->weld_expander("more"))
|
||||
, m_xExpander(m_xBuilder->weld_expander(u"more"_ustr))
|
||||
{
|
||||
m_xEdName->set_height_request_by_rows(4);
|
||||
m_xEdAssign->SetReferences(this, m_xFrameLabel.get());
|
||||
|
@ -362,22 +362,22 @@ ScTPValidationValue::ScTPValidationValue(weld::Container* pPage, weld::DialogCon
|
||||
, maStrRange(ScResId(SCSTR_VALID_RANGE))
|
||||
, maStrList(ScResId(SCSTR_VALID_LIST))
|
||||
, m_pRefEdit(nullptr)
|
||||
, m_xLbAllow(m_xBuilder->weld_combo_box("allow"))
|
||||
, m_xCbAllow(m_xBuilder->weld_check_button("allowempty"))
|
||||
, m_xCbCaseSens(m_xBuilder->weld_check_button("casesens"))
|
||||
, m_xCbShow(m_xBuilder->weld_check_button("showlist"))
|
||||
, m_xCbSort(m_xBuilder->weld_check_button("sortascend"))
|
||||
, m_xFtValue(m_xBuilder->weld_label("valueft"))
|
||||
, m_xLbValue(m_xBuilder->weld_combo_box("data"))
|
||||
, m_xFtMin(m_xBuilder->weld_label("minft"))
|
||||
, m_xMinGrid(m_xBuilder->weld_widget("mingrid"))
|
||||
, m_xEdMin(new formula::RefEdit(m_xBuilder->weld_entry("min")))
|
||||
, m_xEdList(m_xBuilder->weld_text_view("minlist"))
|
||||
, m_xFtMax(m_xBuilder->weld_label("maxft"))
|
||||
, m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry("max")))
|
||||
, m_xFtHint(m_xBuilder->weld_label("hintft"))
|
||||
, m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button("validref")))
|
||||
, m_xRefGrid(m_xBuilder->weld_container("refgrid"))
|
||||
, m_xLbAllow(m_xBuilder->weld_combo_box(u"allow"_ustr))
|
||||
, m_xCbAllow(m_xBuilder->weld_check_button(u"allowempty"_ustr))
|
||||
, m_xCbCaseSens(m_xBuilder->weld_check_button(u"casesens"_ustr))
|
||||
, m_xCbShow(m_xBuilder->weld_check_button(u"showlist"_ustr))
|
||||
, m_xCbSort(m_xBuilder->weld_check_button(u"sortascend"_ustr))
|
||||
, m_xFtValue(m_xBuilder->weld_label(u"valueft"_ustr))
|
||||
, m_xLbValue(m_xBuilder->weld_combo_box(u"data"_ustr))
|
||||
, m_xFtMin(m_xBuilder->weld_label(u"minft"_ustr))
|
||||
, m_xMinGrid(m_xBuilder->weld_widget(u"mingrid"_ustr))
|
||||
, m_xEdMin(new formula::RefEdit(m_xBuilder->weld_entry(u"min"_ustr)))
|
||||
, m_xEdList(m_xBuilder->weld_text_view(u"minlist"_ustr))
|
||||
, m_xFtMax(m_xBuilder->weld_label(u"maxft"_ustr))
|
||||
, m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry(u"max"_ustr)))
|
||||
, m_xFtHint(m_xBuilder->weld_label(u"hintft"_ustr))
|
||||
, m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button(u"validref"_ustr)))
|
||||
, m_xRefGrid(m_xBuilder->weld_container(u"refgrid"_ustr))
|
||||
, m_pRefEditParent(m_xRefGrid.get())
|
||||
, m_pBtnRefParent(m_xRefGrid.get())
|
||||
{
|
||||
|
@ -37,19 +37,19 @@ ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window*
|
||||
, maErrInvalidNameCellRefStr( ScResId(STR_ERR_NAME_INVALID_CELL_REF))
|
||||
, maErrNameInUse ( ScResId(STR_ERR_NAME_EXISTS))
|
||||
, maRangeMap( std::move(aRangeMap) )
|
||||
, m_xEdName(m_xBuilder->weld_entry("edit"))
|
||||
, m_xEdRange(new formula::RefEdit(m_xBuilder->weld_entry("range")))
|
||||
, m_xRbRange(new formula::RefButton(m_xBuilder->weld_button("refbutton")))
|
||||
, m_xLbScope(m_xBuilder->weld_combo_box("scope"))
|
||||
, m_xBtnRowHeader(m_xBuilder->weld_check_button("rowheader"))
|
||||
, m_xBtnColHeader(m_xBuilder->weld_check_button("colheader"))
|
||||
, m_xBtnPrintArea(m_xBuilder->weld_check_button("printarea"))
|
||||
, m_xBtnCriteria(m_xBuilder->weld_check_button("filter"))
|
||||
, m_xBtnAdd(m_xBuilder->weld_button("add"))
|
||||
, m_xBtnCancel(m_xBuilder->weld_button("cancel"))
|
||||
, m_xFtInfo(m_xBuilder->weld_label("label"))
|
||||
, m_xExpander(m_xBuilder->weld_expander("more"))
|
||||
, m_xFtRange(m_xBuilder->weld_label("label3"))
|
||||
, m_xEdName(m_xBuilder->weld_entry(u"edit"_ustr))
|
||||
, m_xEdRange(new formula::RefEdit(m_xBuilder->weld_entry(u"range"_ustr)))
|
||||
, m_xRbRange(new formula::RefButton(m_xBuilder->weld_button(u"refbutton"_ustr)))
|
||||
, m_xLbScope(m_xBuilder->weld_combo_box(u"scope"_ustr))
|
||||
, m_xBtnRowHeader(m_xBuilder->weld_check_button(u"rowheader"_ustr))
|
||||
, m_xBtnColHeader(m_xBuilder->weld_check_button(u"colheader"_ustr))
|
||||
, m_xBtnPrintArea(m_xBuilder->weld_check_button(u"printarea"_ustr))
|
||||
, m_xBtnCriteria(m_xBuilder->weld_check_button(u"filter"_ustr))
|
||||
, m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr))
|
||||
, m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
|
||||
, m_xFtInfo(m_xBuilder->weld_label(u"label"_ustr))
|
||||
, m_xExpander(m_xBuilder->weld_expander(u"more"_ustr))
|
||||
, m_xFtRange(m_xBuilder->weld_label(u"label3"_ustr))
|
||||
{
|
||||
m_xEdRange->SetReferences(this, m_xFtRange.get());
|
||||
m_xRbRange->SetReferences(this, m_xEdRange.get());
|
||||
|
@ -58,21 +58,21 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParen
|
||||
, mbDataChanged(false)
|
||||
, mbCloseWithoutUndo(false)
|
||||
|
||||
, m_xEdName(m_xBuilder->weld_entry("name"))
|
||||
, m_xFtAssign(m_xBuilder->weld_label("label3"))
|
||||
, m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry("range")))
|
||||
, m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button("assign")))
|
||||
, m_xLbScope(m_xBuilder->weld_combo_box("scope"))
|
||||
, m_xBtnPrintArea(m_xBuilder->weld_check_button("printrange"))
|
||||
, m_xBtnColHeader(m_xBuilder->weld_check_button("colheader"))
|
||||
, m_xBtnCriteria(m_xBuilder->weld_check_button("filter"))
|
||||
, m_xBtnRowHeader(m_xBuilder->weld_check_button("rowheader"))
|
||||
, m_xBtnAdd(m_xBuilder->weld_button("add"))
|
||||
, m_xBtnDelete(m_xBuilder->weld_button("delete"))
|
||||
, m_xBtnOk(m_xBuilder->weld_button("ok"))
|
||||
, m_xBtnCancel(m_xBuilder->weld_button("cancel"))
|
||||
, m_xFtInfo(m_xBuilder->weld_label("info"))
|
||||
, m_xExpander(m_xBuilder->weld_expander("more"))
|
||||
, m_xEdName(m_xBuilder->weld_entry(u"name"_ustr))
|
||||
, m_xFtAssign(m_xBuilder->weld_label(u"label3"_ustr))
|
||||
, m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry(u"range"_ustr)))
|
||||
, m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button(u"assign"_ustr)))
|
||||
, m_xLbScope(m_xBuilder->weld_combo_box(u"scope"_ustr))
|
||||
, m_xBtnPrintArea(m_xBuilder->weld_check_button(u"printrange"_ustr))
|
||||
, m_xBtnColHeader(m_xBuilder->weld_check_button(u"colheader"_ustr))
|
||||
, m_xBtnCriteria(m_xBuilder->weld_check_button(u"filter"_ustr))
|
||||
, m_xBtnRowHeader(m_xBuilder->weld_check_button(u"rowheader"_ustr))
|
||||
, m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr))
|
||||
, m_xBtnDelete(m_xBuilder->weld_button(u"delete"_ustr))
|
||||
, m_xBtnOk(m_xBuilder->weld_button(u"ok"_ustr))
|
||||
, m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
|
||||
, m_xFtInfo(m_xBuilder->weld_label(u"info"_ustr))
|
||||
, m_xExpander(m_xBuilder->weld_expander(u"more"_ustr))
|
||||
{
|
||||
m_xEdAssign->SetReferences(this, m_xFtAssign.get());
|
||||
m_xRbAssign->SetReferences(this, m_xEdAssign.get());
|
||||
|
@ -33,7 +33,7 @@ class AnnotationTest : public SdModelTestBase
|
||||
{
|
||||
public:
|
||||
AnnotationTest()
|
||||
: SdModelTestBase("/sd/qa/unit/data/")
|
||||
: SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -52,9 +52,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotation)
|
||||
rtl::Reference<sdr::annotation::Annotation> xAnnotation = pPage->createAnnotation();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
|
||||
|
||||
xAnnotation->setAuthor("A");
|
||||
xAnnotation->setAuthor(u"A"_ustr);
|
||||
uno::Reference<text::XText> xText(xAnnotation->getTextRange());
|
||||
xText->setString("X");
|
||||
xText->setString(u"X"_ustr);
|
||||
|
||||
xAnnotation->setPosition(geometry::RealPoint2D(0.0, 0.0));
|
||||
xAnnotation->setSize(geometry::RealSize2D(10.0, 10.0));
|
||||
@ -72,9 +72,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotation)
|
||||
rtl::Reference<sdr::annotation::Annotation> xAnnotation = pPage->createAnnotation();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
|
||||
|
||||
xAnnotation->setAuthor("B");
|
||||
xAnnotation->setAuthor(u"B"_ustr);
|
||||
uno::Reference<text::XText> xText(xAnnotation->getTextRange());
|
||||
xText->setString("XXX");
|
||||
xText->setString(u"XXX"_ustr);
|
||||
|
||||
xAnnotation->setPosition(geometry::RealPoint2D(10.0, 10.0));
|
||||
xAnnotation->setSize(geometry::RealSize2D(10.0, 10.0));
|
||||
@ -100,7 +100,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsert)
|
||||
SdPage* pPage = pViewShell->GetActualPage();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
|
||||
@ -117,9 +117,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationDelete)
|
||||
SdPage* pPage = pViewShell->GetActualPage();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(3), pPage->GetObjCount());
|
||||
@ -136,7 +136,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationDelete)
|
||||
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({
|
||||
{ "Id", uno::Any(OUString::number(xAnnotation->GetId())) },
|
||||
}));
|
||||
dispatchCommand(mxComponent, ".uno:DeleteAnnotation", aPropertyValues);
|
||||
dispatchCommand(mxComponent, u".uno:DeleteAnnotation"_ustr, aPropertyValues);
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
|
||||
@ -156,8 +156,8 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsertUndoRedo)
|
||||
SdPage* pPage = pViewShell->GetActualPage();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
|
||||
@ -169,24 +169,24 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsertUndoRedo)
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 1), pPage->getAnnotations().at(1)->GetId());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:Undo", {});
|
||||
dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->getAnnotations().size());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:Redo", {});
|
||||
dispatchCommand(mxComponent, u".uno:Redo"_ustr, {});
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->getAnnotations().size());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 1), pPage->getAnnotations().at(1)->GetId());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:DeleteAnnotation", {});
|
||||
dispatchCommand(mxComponent, u".uno:DeleteAnnotation"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->getAnnotations().size());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:Undo", {});
|
||||
dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->getAnnotations().size());
|
||||
@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationUpdate)
|
||||
aArgs = comphelper::InitPropertySequence({
|
||||
{ "Text", uno::Any(u"Comment"_ustr) },
|
||||
});
|
||||
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
|
||||
dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, aArgs);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
|
||||
SdrObject* pObject = pPage->GetObj(0);
|
||||
@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationUpdate)
|
||||
{ "PositionX", uno::Any(sal_Int32(1440)) },
|
||||
{ "PositionY", uno::Any(sal_Int32(14400)) } });
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:EditAnnotation", aArgs);
|
||||
dispatchCommand(mxComponent, u".uno:EditAnnotation"_ustr, aArgs);
|
||||
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL(25.4, pAnnotationData->mxAnnotation->getPosition().X, 1E-4);
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL(254.0, pAnnotationData->mxAnnotation->getPosition().Y, 1E-4);
|
||||
|
@ -2027,7 +2027,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
|
||||
CPPUNIT_ASSERT_EQUAL(u"a"_ustr, run->getString());
|
||||
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
|
||||
double fCharHeight = 0;
|
||||
xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
|
||||
xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
|
||||
CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
|
||||
// No more runs
|
||||
CPPUNIT_ASSERT_THROW(getRunFromParagraph(1, paragraph), container::NoSuchElementException);
|
||||
@ -2041,7 +2041,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
|
||||
CPPUNIT_ASSERT_EQUAL(u""_ustr, run->getString());
|
||||
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
|
||||
double fCharHeight = 0;
|
||||
xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
|
||||
xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
|
||||
// Without the fix, this would fail with
|
||||
// - Expected: 10
|
||||
// - Actual : 18
|
||||
@ -2058,7 +2058,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
|
||||
CPPUNIT_ASSERT_EQUAL(u"c"_ustr, run->getString());
|
||||
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
|
||||
double fCharHeight = 0;
|
||||
xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
|
||||
xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
|
||||
CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
|
||||
// No more runs
|
||||
CPPUNIT_ASSERT_THROW(getRunFromParagraph(1, paragraph), container::NoSuchElementException);
|
||||
|
@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf156955)
|
||||
xmlDocUniquePtr pXmlDoc = load("odp/tdf156955.odp");
|
||||
|
||||
// Make sure text box has the right size - without the fix it was 2759.
|
||||
assertXPath(pXmlDoc, "/metafile/push/push/textarray[5]"_ostr, "y"_ostr, "3183");
|
||||
assertXPath(pXmlDoc, "/metafile/push/push/textarray[5]"_ostr, "y"_ostr, u"3183"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf148966)
|
||||
|
@ -840,7 +840,7 @@ void SdDrawDocument::UpdateAllLinks()
|
||||
rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
|
||||
}
|
||||
|
||||
m_pLinkManager->UpdateAllLinks(true, false, nullptr, ""); // query box: update all links?
|
||||
m_pLinkManager->UpdateAllLinks(true, false, nullptr, u""_ustr); // query box: update all links?
|
||||
|
||||
if (s_pDocLockedInsertingLinks == this)
|
||||
s_pDocLockedInsertingLinks = nullptr; // unlock inserting links
|
||||
|
@ -49,21 +49,21 @@ ModuleController::ModuleController(const rtl::Reference<::sd::DrawController>& r
|
||||
mpResourceToFactoryMap member.
|
||||
*/
|
||||
ProcessFactory(
|
||||
"com.sun.star.drawing.framework.BasicPaneFactory",
|
||||
{ "private:resource/pane/CenterPane",
|
||||
"private:resource/pane/LeftImpressPane",
|
||||
"private:resource/pane/BottomImpressPane",
|
||||
"private:resource/pane/LeftDrawPane" });
|
||||
u"com.sun.star.drawing.framework.BasicPaneFactory"_ustr,
|
||||
{ u"private:resource/pane/CenterPane"_ustr,
|
||||
u"private:resource/pane/LeftImpressPane"_ustr,
|
||||
u"private:resource/pane/BottomImpressPane"_ustr,
|
||||
u"private:resource/pane/LeftDrawPane"_ustr });
|
||||
ProcessFactory(
|
||||
"com.sun.star.drawing.framework.BasicViewFactory",
|
||||
{ "private:resource/view/ImpressView",
|
||||
"private:resource/view/GraphicView",
|
||||
"private:resource/view/OutlineView",
|
||||
"private:resource/view/NotesView",
|
||||
"private:resource/view/NotesPanelView",
|
||||
"private:resource/view/HandoutView",
|
||||
"private:resource/view/SlideSorter",
|
||||
"private:resource/view/PresentationView" });
|
||||
u"com.sun.star.drawing.framework.BasicViewFactory"_ustr,
|
||||
{ u"private:resource/view/ImpressView"_ustr,
|
||||
u"private:resource/view/GraphicView"_ustr,
|
||||
u"private:resource/view/OutlineView"_ustr,
|
||||
u"private:resource/view/NotesView"_ustr,
|
||||
u"private:resource/view/NotesPanelView"_ustr,
|
||||
u"private:resource/view/HandoutView"_ustr,
|
||||
u"private:resource/view/SlideSorter"_ustr,
|
||||
u"private:resource/view/PresentationView"_ustr });
|
||||
ProcessFactory(
|
||||
u"com.sun.star.drawing.framework.BasicToolBarFactory"_ustr,
|
||||
{ u"private:resource/toolbar/ViewTabBar"_ustr });
|
||||
|
@ -624,8 +624,8 @@ SfxDocumentDescPage::SfxDocumentDescPage(weld::Container* pPage, weld::DialogCon
|
||||
, m_xTitleEd(m_xBuilder->weld_entry(u"title"_ustr))
|
||||
, m_xThemaEd(m_xBuilder->weld_entry(u"subject"_ustr))
|
||||
, m_xKeywordsEd(m_xBuilder->weld_entry(u"keywords"_ustr))
|
||||
, m_xMoreTypes(m_xBuilder->weld_combo_box("cbMoreTypes"))
|
||||
, m_xMoreValue(m_xBuilder->weld_entry("edMoreValue"))
|
||||
, m_xMoreTypes(m_xBuilder->weld_combo_box(u"cbMoreTypes"_ustr))
|
||||
, m_xMoreValue(m_xBuilder->weld_entry(u"edMoreValue"_ustr))
|
||||
, m_xCommentEd(m_xBuilder->weld_text_view(u"comments"_ustr))
|
||||
{
|
||||
m_xCommentEd->set_size_request(-1, //m_xKeywordsEd->get_preferred_size().Width(),
|
||||
|
@ -1645,7 +1645,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
|
||||
wantsWhatsNew = false;
|
||||
if (officecfg::Setup::Product::WhatsNew::get())
|
||||
{
|
||||
VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", "", SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO);
|
||||
VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar(u"whatsnew"_ustr, u""_ustr, SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO);
|
||||
if (pInfoBar)
|
||||
{
|
||||
weld::Button& rWhatsNewButton = pInfoBar->addButton();
|
||||
|
@ -830,10 +830,10 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testContourText)
|
||||
// Text should be inside the shape and start at the bottom-right of the shape because of 180°
|
||||
// rotation. Without fix the text was rotated but positioned left-top of the shape. The first
|
||||
// line of text has started at (10000|7353), last line at (10000|5007).
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "x"_ostr, "15998");
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "y"_ostr, "11424");
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "x"_ostr, "15998");
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "y"_ostr, "9291");
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "x"_ostr, u"15998"_ustr);
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "y"_ostr, u"11424"_ustr);
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "x"_ostr, u"15998"_ustr);
|
||||
assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "y"_ostr, u"9291"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SvdrawTest, testContourTextCJK)
|
||||
|
@ -235,7 +235,7 @@ IMPL_LINK_NOARG(NumberingPopup, VSSelectValueSetDocHdl, ValueSet*, void)
|
||||
OUString sFont(aCustomBullets[nSelItem].second);
|
||||
auto aArgs(comphelper::InitPropertySequence(
|
||||
{ { "BulletChar", css::uno::Any(nChar) }, { "BulletFont", css::uno::Any(sFont) } }));
|
||||
mrController.dispatchCommand(".uno:SetBullet", aArgs);
|
||||
mrController.dispatchCommand(u".uno:SetBullet"_ustr, aArgs);
|
||||
mrController.EndPopupMode();
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Test : public SwModelTestBase
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: SwModelTestBase("/sw/qa/core/text/data/")
|
||||
: SwModelTestBase(u"/sw/qa/core/text/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -869,9 +869,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf152872)
|
||||
|
||||
assertXPath(pXmlDoc, "/root/page[1]/body/txt"_ostr, 2);
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[1]/SwParaPortion/SwLineLayout"_ostr, "portion"_ostr,
|
||||
"C DE");
|
||||
u"C DE"_ustr);
|
||||
// 5 is empty and hidden
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr);
|
||||
|
||||
dispatchCommand(mxComponent, u".uno:ControlCodes"_ustr, {});
|
||||
|
||||
@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf152872)
|
||||
// 5 is an empty paragraph with RES_CHRATR_HIDDEN which results in 0-height
|
||||
// frame; ideally it should only be hidden when control codes are hidden
|
||||
// and be a full-height frame now, but that needs more work...
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[5]/infos/bounds"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[5]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr);
|
||||
|
||||
dispatchCommand(mxComponent, u".uno:ControlCodes"_ustr, {});
|
||||
|
||||
@ -901,9 +901,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf152872)
|
||||
|
||||
assertXPath(pXmlDoc, "/root/page[1]/body/txt"_ostr, 2);
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[1]/SwParaPortion/SwLineLayout"_ostr, "portion"_ostr,
|
||||
"C DE");
|
||||
u"C DE"_ustr);
|
||||
// 5 is empty and hidden
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf151954)
|
||||
@ -2339,7 +2339,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf116925)
|
||||
|
||||
assertXPathContent(
|
||||
pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[6]/push[1]/push[3]/textarray/text"_ostr,
|
||||
"hello");
|
||||
u"hello"_ustr);
|
||||
// This failed, text color was #000000.
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
|
@ -2765,7 +2765,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf160958_page_break)
|
||||
assertXPath(pExportDump, "//page/body/txt"_ostr, 3);
|
||||
assertXPath(pExportDump, "//page/body/section"_ostr, 1);
|
||||
|
||||
assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr);
|
||||
assertXPath(pExportDump, "//page/body/txt[1]/SwParaPortion/SwLineLayout"_ostr, 6);
|
||||
assertXPath(pExportDump, "//page/body/section/txt"_ostr, 7);
|
||||
assertXPath(pExportDump, "//page/body/section/txt[1]/SwParaPortion"_ostr, 0);
|
||||
@ -2854,7 +2854,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf160958_orphans)
|
||||
assertXPath(pExportDump, "//page"_ostr, 1);
|
||||
assertXPath(pExportDump, "//page/body/txt"_ostr, 22);
|
||||
assertXPath(pExportDump, "//page/body/section"_ostr, 1);
|
||||
assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr);
|
||||
|
||||
// Show the section again
|
||||
xSection->setPropertyValue(u"IsVisible"_ustr, css::uno::Any(true));
|
||||
|
@ -239,7 +239,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_always)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table)
|
||||
{
|
||||
uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
|
||||
if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
|
||||
if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString())))
|
||||
return;
|
||||
|
||||
// last full line of the table is not hyphenated on page 1
|
||||
@ -248,14 +248,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table)
|
||||
// This was 2 (not handling hyphenation-keep in tables)
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//style:style[@style:family='paragraph']/style:paragraph-properties[@loext:hyphenation-keep-type='page']"_ostr, 1);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_default_paragraph_style)
|
||||
{
|
||||
uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
|
||||
if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
|
||||
if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString())))
|
||||
return;
|
||||
|
||||
// fo:hyphenation-keep="page" defined in default paragraph style
|
||||
@ -266,7 +266,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_default_paragraph_style)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_default_paragraph_style)
|
||||
{
|
||||
uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
|
||||
if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
|
||||
if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString())))
|
||||
return;
|
||||
|
||||
// fo:hyphenation-keep="auto" defined in default paragraph style
|
||||
@ -277,7 +277,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_default_paragraph_style)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_text_body_style)
|
||||
{
|
||||
uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
|
||||
if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
|
||||
if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString())))
|
||||
return;
|
||||
|
||||
// fo:hyphenation-keep="page" defined in text body style
|
||||
@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_text_body_style)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_text_body_style)
|
||||
{
|
||||
uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
|
||||
if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
|
||||
if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString())))
|
||||
return;
|
||||
|
||||
// fo:hyphenation-keep="auto" defined in text body style
|
||||
@ -1689,13 +1689,13 @@ DECLARE_ODFEXPORT_TEST(testTdf160877, "tdf160877.odt")
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
uno::Reference<text::XText> xHeaderTextPage1 = getProperty<uno::Reference<text::XText>>(
|
||||
getStyles("PageStyles")->getByName("Standard"), "HeaderTextFirst");
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Classification: General Business"), xHeaderTextPage1->getString());
|
||||
getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), u"HeaderTextFirst"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(u"Classification: General Business"_ustr, xHeaderTextPage1->getString());
|
||||
|
||||
// Without the fix in place, this test would have failed with
|
||||
// - Expected: (Sign GB)Test
|
||||
// - Actual : Test
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("(Sign GB)Test"), getParagraph(1)->getString());
|
||||
CPPUNIT_ASSERT_EQUAL(u"(Sign GB)Test"_ustr, getParagraph(1)->getString());
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testMidnightRedlineDatetime)
|
||||
|
@ -1579,7 +1579,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161054)
|
||||
CPPUNIT_ASSERT_EQUAL(u"a"_ustr, run->getString());
|
||||
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
|
||||
double fCharHeight = 0;
|
||||
xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
|
||||
xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
|
||||
CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
|
||||
// No more runs
|
||||
CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException);
|
||||
@ -1593,7 +1593,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161054)
|
||||
CPPUNIT_ASSERT_EQUAL(u""_ustr, run->getString());
|
||||
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
|
||||
double fCharHeight = 0;
|
||||
xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
|
||||
xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
|
||||
// Without the fix, this would fail with
|
||||
// - Expected: 10
|
||||
// - Actual : 18
|
||||
@ -1610,7 +1610,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161054)
|
||||
CPPUNIT_ASSERT_EQUAL(u"c"_ustr, run->getString());
|
||||
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
|
||||
double fCharHeight = 0;
|
||||
xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
|
||||
xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
|
||||
CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
|
||||
// No more runs
|
||||
CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException);
|
||||
|
@ -716,14 +716,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf156484, "tdf156484.docx")
|
||||
{
|
||||
auto xShape(getShape(1));
|
||||
// Without the fix in place, this test would have failed here
|
||||
CPPUNIT_ASSERT_MESSAGE("First shape should not be visible.", !getProperty<bool>(xShape, "Visible"));
|
||||
CPPUNIT_ASSERT_MESSAGE("First shape should not be printable.", !getProperty<bool>(xShape, "Printable"));
|
||||
CPPUNIT_ASSERT_MESSAGE("First shape should not be visible.", !getProperty<bool>(xShape, u"Visible"_ustr));
|
||||
CPPUNIT_ASSERT_MESSAGE("First shape should not be printable.", !getProperty<bool>(xShape, u"Printable"_ustr));
|
||||
xShape = getShape(2);
|
||||
CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, "Visible"));
|
||||
CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, "Printable"));
|
||||
CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, u"Visible"_ustr));
|
||||
CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, u"Printable"_ustr));
|
||||
xShape = getShape(3);
|
||||
CPPUNIT_ASSERT_MESSAGE("Third shape should not be visible.", !getProperty<bool>(xShape, "Visible"));
|
||||
CPPUNIT_ASSERT_MESSAGE("Third shape should not be printable.", !getProperty<bool>(xShape, "Printable"));
|
||||
CPPUNIT_ASSERT_MESSAGE("Third shape should not be visible.", !getProperty<bool>(xShape, u"Visible"_ustr));
|
||||
CPPUNIT_ASSERT_MESSAGE("Third shape should not be printable.", !getProperty<bool>(xShape, u"Printable"_ustr));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
|
||||
|
@ -1498,8 +1498,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_page_in_default_paragraph_style)
|
||||
{
|
||||
// default paragraph style contains hyphenation settings
|
||||
loadAndReload("tdf160518_page_in_default_paragraph_style.fodt");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, 0);
|
||||
}
|
||||
|
||||
@ -1507,17 +1507,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_auto_in_default_paragraph_style)
|
||||
{
|
||||
// default paragraph style contains hyphenation settings
|
||||
loadAndReload("tdf160518_auto_in_default_paragraph_style.fodt");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1");
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, "1");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, u"1"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf160518_page_in_text_body_style)
|
||||
{
|
||||
// text body style contains hyphenation settings
|
||||
loadAndReload("tdf160518_page_in_text_body_style.fodt");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, 0);
|
||||
}
|
||||
|
||||
@ -1525,9 +1525,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_auto_in_text_body_style)
|
||||
{
|
||||
// text body style contains hyphenation settings
|
||||
loadAndReload("tdf160518_auto_in_text_body_style.fodt");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1");
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, "1");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, u"1"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testHyphenationAuto)
|
||||
|
@ -1053,12 +1053,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf159158_zOrder_headerBehind2, "tdf159158_zOrder_h
|
||||
// and an overlapping blue rectangle anchored in the body text.
|
||||
uno::Reference<beans::XPropertySet> zOrder0(getShape(1), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); // higher
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("HeaderImage"),
|
||||
getProperty<OUString>(zOrder0, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("BodyBlueRectangle"),
|
||||
getProperty<OUString>(zOrder1, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); // higher
|
||||
CPPUNIT_ASSERT_EQUAL(u"HeaderImage"_ustr,
|
||||
getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(u"BodyBlueRectangle"_ustr,
|
||||
getProperty<OUString>(zOrder1, u"LinkDisplayName"_ustr));
|
||||
// The logo should not be opaque since it is in the header.
|
||||
CPPUNIT_ASSERT(!getProperty<bool>(zOrder0, u"Opaque"_ustr)); // logo should be invisible
|
||||
CPPUNIT_ASSERT(!getProperty<bool>(zOrder1, u"Opaque"_ustr));
|
||||
@ -1070,10 +1070,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder, "tdf100037_inlineZOrder.doc
|
||||
// an inline image should always be behind a heaven-layer floating object.
|
||||
uno::Reference<beans::XPropertySet> zOrder0(getShape(1), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); // higher
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Image 2"), getProperty<OUString>(zOrder0, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Frame1"), getProperty<OUString>(zOrder1, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); // higher
|
||||
CPPUNIT_ASSERT_EQUAL(u"Image 2"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder1, u"LinkDisplayName"_ustr));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder2, "tdf100037_inlineZOrder2.docx")
|
||||
@ -1087,14 +1087,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder2, "tdf100037_inlineZOrder2.d
|
||||
uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> zOrder2(getShape(3), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> zOrder3(getShape(4), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, "ZOrder")); // higher
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, u"ZOrder"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, u"ZOrder"_ustr)); // higher
|
||||
// yellow textbox (Frame1) is the lowest
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Frame1"), getProperty<OUString>(zOrder0, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr));
|
||||
//CPPUNIT_ASSERT_EQUAL(OUString("Image1"), getProperty<OUString>(zOrder1, "Name"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Frame2"), getProperty<OUString>(zOrder2, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Frame2"_ustr, getProperty<OUString>(zOrder2, u"LinkDisplayName"_ustr));
|
||||
// CPPUNIT_ASSERT_EQUAL(OUString("Image2"), getProperty<OUString>(zOrder3, "LinkDisplayName"));
|
||||
}
|
||||
|
||||
@ -1109,14 +1109,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder3, "tdf100037_inlineZOrder3.d
|
||||
uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> zOrder2(getShape(3), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> zOrder3(getShape(4), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, "ZOrder")); // higher
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, u"ZOrder"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, u"ZOrder"_ustr)); // higher
|
||||
// blue textbox (Frame2) is the lowest
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Frame2"), getProperty<OUString>(zOrder0, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Frame2"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr));
|
||||
// CPPUNIT_ASSERT_EQUAL(OUString("Image2"), getProperty<OUString>(zOrder1, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Frame1"), getProperty<OUString>(zOrder2, "LinkDisplayName"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder2, u"LinkDisplayName"_ustr));
|
||||
// CPPUNIT_ASSERT_EQUAL(OUString("Image1"), getProperty<OUString>(zOrder3, "LinkDisplayName"));
|
||||
}
|
||||
|
||||
|
@ -319,18 +319,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf158597, "tdf158597.docx")
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf156105_percentSuffix, "tdf156105_percentSuffix.odt")
|
||||
{
|
||||
// given a numbered list with a non-escaping percent symbol in the prefix and suffix
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("(%)[%]"),
|
||||
getProperty<OUString>(getParagraph(3), "ListLabelString"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"(%)[%]"_ustr,
|
||||
getProperty<OUString>(getParagraph(3), u"ListLabelString"_ustr));
|
||||
|
||||
// tdf#149258 - NONE number should not export separator since LO doesn't currently show it
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("showing levels 1, 2, and 4", OUString("(%)1.1.1[%]"),
|
||||
getProperty<OUString>(getParagraph(4), "ListLabelString"));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("showing levels 1, 2, and 4", u"(%)1.1.1[%]"_ustr,
|
||||
getProperty<OUString>(getParagraph(4), u"ListLabelString"_ustr));
|
||||
if (isExported())
|
||||
{
|
||||
xmlDocUniquePtr pXmlNum = parseExport("word/numbering.xml");
|
||||
xmlDocUniquePtr pXmlNum = parseExport(u"word/numbering.xml"_ustr);
|
||||
// The 3rd level is NONE. If we include the separator, MS Word will display it.
|
||||
assertXPath(pXmlNum, "/w:numbering/w:abstractNum[1]/w:lvl[4]/w:lvlText"_ostr, "val"_ostr,
|
||||
"(%)%1.%2.%3%4[%]");
|
||||
u"(%)%1.%2.%3%4[%]"_ustr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,8 +570,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf131098_imageFill, "tdf131098_imageFill.docx")
|
||||
{
|
||||
// given a document with an image background transparency (blue-white)
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,
|
||||
getProperty<drawing::FillStyle>(getShape(1), "FillStyle"));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), getProperty<Color>(getShape(1), "FillColor"));
|
||||
getProperty<drawing::FillStyle>(getShape(1), u"FillStyle"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), getProperty<Color>(getShape(1), u"FillColor"_ustr));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf154369, "tdf154369.docx")
|
||||
@ -599,11 +599,11 @@ CPPUNIT_TEST_FIXTURE(Test, testScreenTip)
|
||||
{
|
||||
loadAndSave("tdf159897.docx");
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Hyperlink with ScreenTip
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:hyperlink"_ostr, "tooltip"_ostr,
|
||||
"This is a hyperlink");
|
||||
u"This is a hyperlink"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testEmptyObjectRange)
|
||||
|
@ -318,7 +318,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeleft)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeTableInTable)
|
||||
{
|
||||
loadAndSave("ooo96040-2.odt");
|
||||
parseExport("word/document.xml");
|
||||
parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Check tdf#161202 - this document has all kinds of tables inside hidden sections.
|
||||
// The page count must be 13, but for unclear reason, it is 12 in some tests on Linux
|
||||
|
@ -64,8 +64,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159897Broken_link)
|
||||
{
|
||||
auto xPara(getParagraph(i));
|
||||
auto xRun = getRun(xPara, 0);
|
||||
OUString sURL = getProperty<OUString>(xRun, "HyperLinkURL");
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), sURL);
|
||||
OUString sURL = getProperty<OUString>(xRun, u"HyperLinkURL"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(u"https://libreoffice.org/"_ustr, sURL);
|
||||
|
||||
OUString sText;
|
||||
switch (i)
|
||||
@ -99,7 +99,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159897Broken_link)
|
||||
break;
|
||||
}
|
||||
|
||||
OUString sScreenTip = getProperty<OUString>(xRun, "HyperLinkName");
|
||||
OUString sScreenTip = getProperty<OUString>(xRun, u"HyperLinkName"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(sText, sScreenTip);
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class Test : public SwModelTestBase
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: SwModelTestBase("/sw/qa/extras/rtfexport/data/", "Rich Text Format")
|
||||
: SwModelTestBase(u"/sw/qa/extras/rtfexport/data/"_ustr, u"Rich Text Format"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -48,7 +48,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPictureWrapPolygon)
|
||||
auto verify = [this]() {
|
||||
// The problem was that the wrap polygon was ignored during import.
|
||||
drawing::PointSequenceSequence aSeqSeq
|
||||
= getProperty<drawing::PointSequenceSequence>(getShape(1), "ContourPolyPolygon");
|
||||
= getProperty<drawing::PointSequenceSequence>(getShape(1), u"ContourPolyPolygon"_ustr);
|
||||
// This was 0: the polygon list was empty.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeqSeq.getLength());
|
||||
|
||||
@ -57,9 +57,9 @@ CPPUNIT_TEST_FIXTURE(Test, testPictureWrapPolygon)
|
||||
|
||||
// The shape also didn't have negative top / left coordinates.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-1177)),
|
||||
getProperty<sal_Int32>(getShape(1), "HoriOrientPosition"));
|
||||
getProperty<sal_Int32>(getShape(1), u"HoriOrientPosition"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-67)),
|
||||
getProperty<sal_Int32>(getShape(1), "VertOrientPosition"));
|
||||
getProperty<sal_Int32>(getShape(1), u"VertOrientPosition"_ustr));
|
||||
};
|
||||
createSwDoc("picture-wrap-polygon.rtf");
|
||||
verify();
|
||||
@ -72,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113408)
|
||||
auto verify = [this]() {
|
||||
// This was 0, left margin was not inherited from style properly.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaLeftMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf113408.rtf");
|
||||
verify();
|
||||
@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAbi10039)
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Make sure we don't just crash on export, and additionally the shape should not be inline (as it's at-page anchored originally).
|
||||
CPPUNIT_ASSERT(text::TextContentAnchorType_AS_CHARACTER
|
||||
!= getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
|
||||
!= getProperty<text::TextContentAnchorType>(getShape(1), u"AnchorType"_ustr));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testAbi10076)
|
||||
@ -101,18 +101,23 @@ CPPUNIT_TEST_FIXTURE(Test, testEm)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
// Test all possible \acc* control words.
|
||||
CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::NONE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharEmphasis"));
|
||||
CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_ABOVE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 2), "CharEmphasis"));
|
||||
CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::ACCENT_ABOVE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 3), "CharEmphasis"));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
text::FontEmphasis::NONE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 1), u"CharEmphasis"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
text::FontEmphasis::DOT_ABOVE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 2), u"CharEmphasis"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
text::FontEmphasis::ACCENT_ABOVE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 3), u"CharEmphasis"_ustr));
|
||||
// This was missing.
|
||||
CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::CIRCLE_ABOVE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 4), "CharEmphasis"));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
text::FontEmphasis::CIRCLE_ABOVE,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 4), u"CharEmphasis"_ustr));
|
||||
// This one, too.
|
||||
CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_BELOW,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 5), "CharEmphasis"));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
text::FontEmphasis::DOT_BELOW,
|
||||
getProperty<sal_Int16>(getRun(getParagraph(1), 5), u"CharEmphasis"_ustr));
|
||||
};
|
||||
createSwDoc("em.rtf");
|
||||
verify();
|
||||
@ -124,10 +129,10 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberingFont)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<beans::XPropertySet> xStyle(
|
||||
getStyles("CharacterStyles")->getByName("ListLabel 1"), uno::UNO_QUERY);
|
||||
getStyles(u"CharacterStyles"_ustr)->getByName(u"ListLabel 1"_ustr), uno::UNO_QUERY);
|
||||
// This was Liberation Serif, i.e. custom font of the numbering itself ("1.\t") was lost on import.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Impact"), getProperty<OUString>(xStyle, "CharFontName"));
|
||||
CPPUNIT_ASSERT_EQUAL(72.f, getProperty<float>(xStyle, "CharHeight"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Impact"_ustr, getProperty<OUString>(xStyle, u"CharFontName"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(72.f, getProperty<float>(xStyle, u"CharHeight"_ustr));
|
||||
};
|
||||
createSwDoc("numbering-font.rtf");
|
||||
verify();
|
||||
@ -145,7 +150,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82860)
|
||||
// 2) The exporter did not handle "shape with textbox" text.
|
||||
uno::Reference<text::XTextRange> xTextRange(getShape(1), uno::UNO_QUERY);
|
||||
uno::Reference<text::XText> xText = xTextRange->getText();
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("hello"), getParagraphOfText(1, xText)->getString());
|
||||
CPPUNIT_ASSERT_EQUAL(u"hello"_ustr, getParagraphOfText(1, xText)->getString());
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo82858)
|
||||
@ -153,19 +158,21 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82858)
|
||||
loadAndReload("fdo82858.docx");
|
||||
// This was table::BorderLineStyle::SOLID, exporter failed to write explicit no line when line color was written.
|
||||
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONE,
|
||||
getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineStyle);
|
||||
getProperty<table::BorderLine2>(getShape(1), u"TopBorder"_ustr).LineStyle);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf104936)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<text::XTextRange> xShape1(getShape(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xShape1, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
|
||||
getProperty<sal_Int32>(xShape1, u"ZOrder"_ustr));
|
||||
// This failed, the shape without text covered the shape with text.
|
||||
CPPUNIT_ASSERT(xShape1->getString().isEmpty());
|
||||
uno::Reference<text::XTextRange> xShape2(getShape(2), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), getProperty<sal_Int32>(xShape2, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xShape2->getString());
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
|
||||
getProperty<sal_Int32>(xShape2, u"ZOrder"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(u"Hello"_ustr, xShape2->getString());
|
||||
};
|
||||
createSwDoc("tdf104936.rtf");
|
||||
verify();
|
||||
@ -182,7 +189,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableRtl)
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
// This was text::WritingMode2::LR_TB, i.e. direction of the table was ignored.
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB,
|
||||
getProperty<sal_Int16>(xTable, "WritingMode"));
|
||||
getProperty<sal_Int16>(xTable, u"WritingMode"_ustr));
|
||||
};
|
||||
createSwDoc("table-rtl.rtf");
|
||||
verify();
|
||||
@ -196,13 +203,14 @@ CPPUNIT_TEST_FIXTURE(Test, testNumOverrideStart)
|
||||
// The numbering on the second level was "3.1", not "1.3".
|
||||
uno::Reference<container::XIndexAccess> xRules
|
||||
= getProperty<uno::Reference<container::XIndexAccess>>(
|
||||
getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
sal_Int16(1),
|
||||
comphelper::SequenceAsHashMap(xRules->getByIndex(0))["StartWith"].get<sal_Int16>());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
sal_Int16(3),
|
||||
comphelper::SequenceAsHashMap(xRules->getByIndex(1))["StartWith"].get<sal_Int16>());
|
||||
getStyles(u"NumberingStyles"_ustr)->getByName(u"WWNum1"_ustr),
|
||||
u"NumberingRules"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(1),
|
||||
comphelper::SequenceAsHashMap(xRules->getByIndex(0))[u"StartWith"_ustr]
|
||||
.get<sal_Int16>());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(3),
|
||||
comphelper::SequenceAsHashMap(xRules->getByIndex(1))[u"StartWith"_ustr]
|
||||
.get<sal_Int16>());
|
||||
};
|
||||
createSwDoc("num-override-start.rtf");
|
||||
verify();
|
||||
@ -215,13 +223,13 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82006)
|
||||
auto verify = [this]() {
|
||||
// These were 176 (100 twips), as \sbauto and \sbbefore were ignored.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaTopMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaBottomMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
|
||||
getProperty<sal_Int32>(getParagraph(2), "ParaTopMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(2), u"ParaTopMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
|
||||
getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(2), u"ParaBottomMargin"_ustr));
|
||||
};
|
||||
createSwDoc("fdo82006.rtf");
|
||||
verify();
|
||||
@ -234,9 +242,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104081)
|
||||
auto verify = [this]() {
|
||||
// These were 494 (280 twips), as \htmautsp was ignored.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaTopMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaBottomMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf104081.rtf");
|
||||
verify();
|
||||
@ -250,8 +258,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88583)
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// This was FillStyle_NONE, as background color was missing from the color table during export.
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID,
|
||||
getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), "FillColor"));
|
||||
getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), u"FillColor"_ustr));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testMargmirror)
|
||||
@ -259,9 +267,10 @@ CPPUNIT_TEST_FIXTURE(Test, testMargmirror)
|
||||
auto verify = [this]() {
|
||||
// \margmirror was not handled, this was PageStyleLayout_ALL.
|
||||
uno::Reference<beans::XPropertySet> xPageStyle(
|
||||
getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(style::PageStyleLayout_MIRRORED,
|
||||
getProperty<style::PageStyleLayout>(xPageStyle, "PageStyleLayout"));
|
||||
getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::PageStyleLayout_MIRRORED,
|
||||
getProperty<style::PageStyleLayout>(xPageStyle, u"PageStyleLayout"_ustr));
|
||||
};
|
||||
createSwDoc("margmirror.rtf");
|
||||
verify();
|
||||
@ -274,11 +283,11 @@ CPPUNIT_TEST_FIXTURE(Test, testSautoupd)
|
||||
auto verify = [this]() {
|
||||
// \sautoupd was ignored during import and export.
|
||||
uno::Reference<beans::XPropertySet> xHeading1(
|
||||
getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xHeading1, "IsAutoUpdate"));
|
||||
getStyles(u"ParagraphStyles"_ustr)->getByName(u"Heading 1"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xHeading1, u"IsAutoUpdate"_ustr));
|
||||
uno::Reference<beans::XPropertySet> xHeading2(
|
||||
getStyles("ParagraphStyles")->getByName("Heading 2"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xHeading2, "IsAutoUpdate"));
|
||||
getStyles(u"ParagraphStyles"_ustr)->getByName(u"Heading 2"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xHeading2, u"IsAutoUpdate"_ustr));
|
||||
};
|
||||
createSwDoc("sautoupd.rtf");
|
||||
verify();
|
||||
@ -289,7 +298,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSautoupd)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testHyphauto)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getParagraph(1), "ParaIsHyphenation"));
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getParagraph(1), u"ParaIsHyphenation"_ustr));
|
||||
};
|
||||
createSwDoc("hyphauto.rtf");
|
||||
verify();
|
||||
@ -301,7 +310,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHyphpar)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
// Hyphenation was enabled for all 3 paragraphs, but it should be disabled for the 2nd one.
|
||||
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getParagraph(2), "ParaIsHyphenation"));
|
||||
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getParagraph(2), u"ParaIsHyphenation"_ustr));
|
||||
};
|
||||
createSwDoc("hyphpar.rtf");
|
||||
verify();
|
||||
@ -313,9 +322,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf108955)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID,
|
||||
getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
|
||||
getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr));
|
||||
// This was 0xffffff, i.e. non-white background was overwritten from the paragraph style.
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0xffff99), getProperty<Color>(getParagraph(1), "FillColor"));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0xffff99),
|
||||
getProperty<Color>(getParagraph(1), u"FillColor"_ustr));
|
||||
};
|
||||
createSwDoc("tdf108955.rtf");
|
||||
verify();
|
||||
@ -334,7 +344,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf80708)
|
||||
// This was 2, i.e. the second table had 3 cols, now 2 as expected.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
|
||||
getProperty<uno::Sequence<text::TableColumnSeparator>>(
|
||||
xTableRows->getByIndex(0), "TableColumnSeparators")
|
||||
xTableRows->getByIndex(0), u"TableColumnSeparators"_ustr)
|
||||
.getLength());
|
||||
};
|
||||
createSwDoc("tdf80708.rtf");
|
||||
@ -348,8 +358,8 @@ CPPUNIT_TEST_FIXTURE(Test, testHyperlinkWithoutURL)
|
||||
createSwDoc("tdf90421.fodt");
|
||||
// Change the hyperlink, so its URL is empty.
|
||||
uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 2), uno::UNO_QUERY);
|
||||
xRun->setPropertyValue("HyperLinkURL", uno::Any(OUString()));
|
||||
saveAndReload("Rich Text Format");
|
||||
xRun->setPropertyValue(u"HyperLinkURL"_ustr, uno::Any(OUString()));
|
||||
saveAndReload(u"Rich Text Format"_ustr);
|
||||
SvMemoryStream aMemoryStream;
|
||||
SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
|
||||
aStream.ReadStream(aMemoryStream);
|
||||
@ -371,10 +381,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf114309)
|
||||
auto verify = [this]() {
|
||||
// Without the fix in place, this test would have failed with
|
||||
// - the property is of unexpected type or void: TextSection
|
||||
auto xTextSection
|
||||
= getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1), "TextSection");
|
||||
auto xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1),
|
||||
u"TextSection"_ustr);
|
||||
auto xTextColumns
|
||||
= getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
|
||||
= getProperty<uno::Reference<text::XTextColumns>>(xTextSection, u"TextColumns"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
|
||||
};
|
||||
createSwDoc("tdf114309.rtf");
|
||||
@ -386,13 +396,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf114309)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf94043)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
auto xTextSection
|
||||
= getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2), "TextSection");
|
||||
auto xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2),
|
||||
u"TextSection"_ustr);
|
||||
auto xTextColumns
|
||||
= getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
|
||||
= getProperty<uno::Reference<text::XTextColumns>>(xTextSection, u"TextColumns"_ustr);
|
||||
// This was 0, the separator line was not visible due to 0 width.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
|
||||
getProperty<sal_Int32>(xTextColumns, "SeparatorLineWidth"));
|
||||
getProperty<sal_Int32>(xTextColumns, u"SeparatorLineWidth"_ustr));
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(7, getParagraphs());
|
||||
};
|
||||
@ -410,16 +420,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94377)
|
||||
xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY);
|
||||
auto xText = getProperty<uno::Reference<text::XText>>(xPropertySet, "TextRange");
|
||||
auto xText = getProperty<uno::Reference<text::XText>>(xPropertySet, u"TextRange"_ustr);
|
||||
// This failed, as:
|
||||
// 1) multiple paragraphs were not exported, so the text was "Asdf10asdf12".
|
||||
// 2) direct formatting of runs were not exported, so this was 12 (the document default).
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
10.f,
|
||||
getProperty<float>(getRun(getParagraphOfText(1, xText, "Asdf10"), 1), "CharHeight"));
|
||||
10.f, getProperty<float>(getRun(getParagraphOfText(1, xText, u"Asdf10"_ustr), 1),
|
||||
u"CharHeight"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
12.f,
|
||||
getProperty<float>(getRun(getParagraphOfText(2, xText, "asdf12"), 1), "CharHeight"));
|
||||
12.f, getProperty<float>(getRun(getParagraphOfText(2, xText, u"asdf12"_ustr), 1),
|
||||
u"CharHeight"_ustr));
|
||||
};
|
||||
createSwDoc("tdf94377.rtf");
|
||||
verify();
|
||||
@ -441,7 +451,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104079)
|
||||
bFound = true;
|
||||
// This was 0, 3rd paragraph of ToC lost its bottom paragraph margin.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212),
|
||||
getProperty<sal_Int32>(xParagraph, "ParaBottomMargin"));
|
||||
getProperty<sal_Int32>(xParagraph, u"ParaBottomMargin"_ustr));
|
||||
}
|
||||
};
|
||||
createSwDoc("tdf104079.rtf");
|
||||
@ -455,8 +465,8 @@ CPPUNIT_TEST_FIXTURE(Test, testPageBackground)
|
||||
auto verify = [this]() {
|
||||
// The problem was that \background was ignored.
|
||||
uno::Reference<beans::XPropertySet> xPageStyle(
|
||||
getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getProperty<Color>(xPageStyle, "BackColor"));
|
||||
getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getProperty<Color>(xPageStyle, u"BackColor"_ustr));
|
||||
};
|
||||
createSwDoc("page-background.rtf");
|
||||
verify();
|
||||
@ -475,8 +485,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf96175)
|
||||
uno::Reference<beans::XPropertyContainer> xUserDefinedProperties
|
||||
= xDocumentProperties->getUserDefinedProperties();
|
||||
// This resulted in a beans::UnknownPropertyException.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("foobar"),
|
||||
getProperty<OUString>(xUserDefinedProperties, "Company"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"foobar"_ustr,
|
||||
getProperty<OUString>(xUserDefinedProperties, u"Company"_ustr));
|
||||
};
|
||||
createSwDoc("tdf96175.rtf");
|
||||
verify();
|
||||
@ -487,10 +497,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf96175)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRedline)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Rebecca Lopez"),
|
||||
getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineAuthor"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Dorothy Jones"),
|
||||
getProperty<OUString>(getRun(getParagraph(2), 2), "RedlineAuthor"));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
u"Rebecca Lopez"_ustr,
|
||||
getProperty<OUString>(getRun(getParagraph(1), 2), u"RedlineAuthor"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
u"Dorothy Jones"_ustr,
|
||||
getProperty<OUString>(getRun(getParagraph(2), 2), u"RedlineAuthor"_ustr));
|
||||
};
|
||||
createSwDoc("redline.rtf");
|
||||
verify();
|
||||
@ -509,28 +521,29 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomDocProps)
|
||||
uno::Reference<beans::XPropertyContainer> xUserDefinedProperties
|
||||
= xDocumentProperties->getUserDefinedProperties();
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
OUString("2016-03-08T10:55:18,531376147"),
|
||||
getProperty<OUString>(xUserDefinedProperties,
|
||||
"urn:bails:IntellectualProperty:Authorization:StartValidity"));
|
||||
u"2016-03-08T10:55:18,531376147"_ustr,
|
||||
getProperty<OUString>(
|
||||
xUserDefinedProperties,
|
||||
u"urn:bails:IntellectualProperty:Authorization:StartValidity"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
OUString("None"),
|
||||
getProperty<OUString>(xUserDefinedProperties,
|
||||
"urn:bails:IntellectualProperty:Authorization:StopValidity"));
|
||||
u"None"_ustr, getProperty<OUString>(
|
||||
xUserDefinedProperties,
|
||||
u"urn:bails:IntellectualProperty:Authorization:StopValidity"_ustr));
|
||||
// Test roundtrip of numbers. This failed as getProperty() did not find "n".
|
||||
CPPUNIT_ASSERT_EQUAL(42.0, getProperty<double>(xUserDefinedProperties, "n"));
|
||||
CPPUNIT_ASSERT_EQUAL(42.0, getProperty<double>(xUserDefinedProperties, u"n"_ustr));
|
||||
// Test boolean "yes".
|
||||
CPPUNIT_ASSERT(getProperty<bool>(xUserDefinedProperties, "by"));
|
||||
CPPUNIT_ASSERT(getProperty<bool>(xUserDefinedProperties, u"by"_ustr));
|
||||
// Test boolean "no".
|
||||
CPPUNIT_ASSERT(!getProperty<bool>(xUserDefinedProperties, "bn"));
|
||||
CPPUNIT_ASSERT(!getProperty<bool>(xUserDefinedProperties, u"bn"_ustr));
|
||||
|
||||
// Test roundtrip of date in general, and year/month/day in particular.
|
||||
util::DateTime aDate = getProperty<util::DateTime>(xUserDefinedProperties, "d");
|
||||
util::DateTime aDate = getProperty<util::DateTime>(xUserDefinedProperties, u"d"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2016), aDate.Year);
|
||||
CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(1), aDate.Month);
|
||||
CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(30), aDate.Day);
|
||||
|
||||
// Test real number.
|
||||
CPPUNIT_ASSERT_EQUAL(3.14, getProperty<double>(xUserDefinedProperties, "pi"));
|
||||
CPPUNIT_ASSERT_EQUAL(3.14, getProperty<double>(xUserDefinedProperties, u"pi"_ustr));
|
||||
};
|
||||
createSwDoc("custom-doc-props.rtf");
|
||||
verify();
|
||||
@ -541,21 +554,21 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomDocProps)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf65642)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
|
||||
uno::UNO_QUERY);
|
||||
xCursor->jumpToLastPage();
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr);
|
||||
// The second page's numbering type: this was style::NumberingType::ARABIC.
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::NumberingType::CHARS_UPPER_LETTER_N,
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType"));
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr));
|
||||
// The second page's restart value: this was 0.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
|
||||
getProperty<sal_Int32>(getParagraph(2), "PageNumberOffset"));
|
||||
getProperty<sal_Int32>(getParagraph(2), u"PageNumberOffset"_ustr));
|
||||
};
|
||||
createSwDoc("tdf65642.rtf");
|
||||
verify();
|
||||
@ -566,18 +579,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf65642)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPgnlcltr)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
|
||||
uno::UNO_QUERY);
|
||||
xCursor->jumpToLastPage();
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr);
|
||||
// The second page's numbering type: this was style::NumberingType::ARABIC.
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::NumberingType::CHARS_LOWER_LETTER_N,
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType"));
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr));
|
||||
};
|
||||
createSwDoc("pgnlcltr.rtf");
|
||||
verify();
|
||||
@ -588,18 +601,18 @@ CPPUNIT_TEST_FIXTURE(Test, testPgnlcltr)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPgnucrm)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
|
||||
uno::UNO_QUERY);
|
||||
xCursor->jumpToLastPage();
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr);
|
||||
// The second page's numbering type: this was style::NumberingType::ARABIC.
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::NumberingType::ROMAN_UPPER,
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType"));
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr));
|
||||
};
|
||||
createSwDoc("pgnucrm.rtf");
|
||||
verify();
|
||||
@ -610,18 +623,18 @@ CPPUNIT_TEST_FIXTURE(Test, testPgnucrm)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPgnlcrm)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
|
||||
uno::UNO_QUERY);
|
||||
xCursor->jumpToLastPage();
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr);
|
||||
// The second page's numbering type: this was style::NumberingType::ARABIC.
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::NumberingType::ROMAN_LOWER,
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType"));
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr));
|
||||
};
|
||||
createSwDoc("pgnlcrm.rtf");
|
||||
verify();
|
||||
@ -632,22 +645,22 @@ CPPUNIT_TEST_FIXTURE(Test, testPgnlcrm)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPgndec)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
|
||||
uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
|
||||
uno::UNO_QUERY);
|
||||
xCursor->jumpToLastPage();
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
|
||||
OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr);
|
||||
// The second page's numbering type: this was style::NumberingType::ROMAN_LOWER.
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::NumberingType::ARABIC,
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType"));
|
||||
getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr));
|
||||
|
||||
// tdf#82111 ensure a paragraph exists before a section break.
|
||||
// This was only two paragraphs, and both page number fields were in one para on page 2 ("11").
|
||||
getParagraph(2, "1");
|
||||
getParagraph(2, u"1"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL(3, getParagraphs());
|
||||
};
|
||||
createSwDoc("pgndec.rtf");
|
||||
@ -661,9 +674,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf98806)
|
||||
auto verify = [this]() {
|
||||
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextContent> xBookmark(
|
||||
xBookmarksSupplier->getBookmarks()->getByName("bookmark"), uno::UNO_QUERY);
|
||||
xBookmarksSupplier->getBookmarks()->getByName(u"bookmark"_ustr), uno::UNO_QUERY);
|
||||
// This was empty, bookmark in table wasn't imported correctly.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("BBB"), xBookmark->getAnchor()->getString());
|
||||
CPPUNIT_ASSERT_EQUAL(u"BBB"_ustr, xBookmark->getAnchor()->getString());
|
||||
};
|
||||
createSwDoc("tdf98806.rtf");
|
||||
verify();
|
||||
@ -694,7 +707,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103925)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
// This was true, \animtext0 resulted in setting the blinking font effect.
|
||||
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getRun(getParagraph(1), 1), "CharFlash"));
|
||||
CPPUNIT_ASSERT_EQUAL(false,
|
||||
getProperty<bool>(getRun(getParagraph(1), 1), u"CharFlash"_ustr));
|
||||
};
|
||||
createSwDoc("tdf103925.rtf");
|
||||
verify();
|
||||
@ -706,12 +720,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104228)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("C1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"C1"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xCell->getText());
|
||||
// This was 2103, implicit 0 as direct formatting was ignored on the
|
||||
// paragraph (and the style had this larger value).
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
|
||||
getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
|
||||
getProperty<sal_Int32>(xParagraph, u"ParaLeftMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf104228.rtf");
|
||||
verify();
|
||||
@ -725,7 +739,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104085)
|
||||
uno::Reference<text::XTextRange> xPara(getParagraph(1));
|
||||
uno::Reference<beans::XPropertySet> properties(xPara, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xLevels(
|
||||
properties->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
|
||||
properties->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY);
|
||||
uno::Sequence<beans::PropertyValue> aProps;
|
||||
xLevels->getByIndex(0) >>= aProps;
|
||||
for (beans::PropertyValue const& prop : aProps)
|
||||
@ -745,12 +759,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113550)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xCell->getText());
|
||||
// This was 2501, 0 as direct formatting was ignored on the paragraph (and
|
||||
// the style had this larger value).
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
|
||||
getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
|
||||
getProperty<sal_Int32>(xParagraph, u"ParaLeftMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf113550.rtf");
|
||||
verify();
|
||||
@ -765,7 +779,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLeveljcCenter)
|
||||
uno::Reference<text::XTextRange> xPara(getParagraph(1));
|
||||
uno::Reference<beans::XPropertySet> properties(xPara, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xLevels(
|
||||
properties->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
|
||||
properties->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY);
|
||||
uno::Sequence<beans::PropertyValue> aProps;
|
||||
xLevels->getByIndex(0) >>= aProps;
|
||||
for (beans::PropertyValue const& prop : aProps)
|
||||
@ -790,8 +804,8 @@ CPPUNIT_TEST_FIXTURE(Test, testHyperlinkTarget)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
// This was empty, hyperlink target was lost on import.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("_blank"),
|
||||
getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkTarget"));
|
||||
CPPUNIT_ASSERT_EQUAL(u"_blank"_ustr, getProperty<OUString>(getRun(getParagraph(1), 1),
|
||||
u"HyperLinkTarget"_ustr));
|
||||
};
|
||||
createSwDoc("hyperlink-target.rtf");
|
||||
verify();
|
||||
@ -806,9 +820,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107620)
|
||||
// original bugdoc resulting in 2 pages instead of 1.
|
||||
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xSettings(
|
||||
xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
|
||||
xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY);
|
||||
bool bAddParaTableSpacing = true;
|
||||
xSettings->getPropertyValue("AddParaTableSpacing") >>= bAddParaTableSpacing;
|
||||
xSettings->getPropertyValue(u"AddParaTableSpacing"_ustr) >>= bAddParaTableSpacing;
|
||||
CPPUNIT_ASSERT(!bAddParaTableSpacing);
|
||||
}
|
||||
|
||||
@ -821,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104937)
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
|
||||
auto aSeparators = getProperty<uno::Sequence<text::TableColumnSeparator>>(
|
||||
xTableRows->getByIndex(1), "TableColumnSeparators");
|
||||
xTableRows->getByIndex(1), u"TableColumnSeparators"_ustr);
|
||||
// First table's second row had 9 cells (so 8 separators).
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8), aSeparators.getLength());
|
||||
// This was 3174, i.e. last cell was wider than expected, while others were
|
||||
@ -843,7 +857,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf112507)
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
|
||||
auto aSeparators = getProperty<uno::Sequence<text::TableColumnSeparator>>(
|
||||
xTableRows->getByIndex(1), "TableColumnSeparators");
|
||||
xTableRows->getByIndex(1), u"TableColumnSeparators"_ustr);
|
||||
// First table's second row had 3 cells (so 2 separators).
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aSeparators.getLength());
|
||||
// This was 3333, i.e. the B2 cell was too narrow and the text needed 2 lines.
|
||||
@ -860,13 +874,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107480)
|
||||
auto verify = [this]() {
|
||||
// These were 176 (100 twips), as \htmautsp was parsed too late.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaTopMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaBottomMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
|
||||
getProperty<sal_Int32>(getParagraph(2), "ParaTopMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(2), u"ParaTopMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
|
||||
getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(2), u"ParaBottomMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf107480.rtf");
|
||||
verify();
|
||||
@ -878,21 +892,22 @@ CPPUNIT_TEST_FIXTURE(Test, testWatermark)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("WatermarkRTF"), xShape->getString());
|
||||
CPPUNIT_ASSERT_EQUAL(u"WatermarkRTF"_ustr, xShape->getString());
|
||||
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
|
||||
OUString aFont;
|
||||
float nFontSize;
|
||||
|
||||
// Check transparency
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty<sal_Int16>(xShape, "FillTransparence"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(50),
|
||||
getProperty<sal_Int16>(xShape, u"FillTransparence"_ustr));
|
||||
|
||||
// Check font family
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("CharFontName") >>= aFont);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("DejaVu Serif"), aFont);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"CharFontName"_ustr) >>= aFont);
|
||||
CPPUNIT_ASSERT_EQUAL(u"DejaVu Serif"_ustr, aFont);
|
||||
|
||||
// Check font size
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("CharHeight") >>= nFontSize);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize);
|
||||
CPPUNIT_ASSERT_EQUAL(float(66), nFontSize);
|
||||
};
|
||||
createSwDoc("watermark.rtf");
|
||||
@ -907,11 +922,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153194Compat)
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
// no \spltpgpar => paragraph 2 on page 1
|
||||
CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
|
||||
getProperty<style::BreakType>(getParagraph(1), "BreakType"));
|
||||
getProperty<style::BreakType>(getParagraph(1), u"BreakType"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE,
|
||||
getProperty<style::BreakType>(getParagraph(2), "BreakType"));
|
||||
getProperty<style::BreakType>(getParagraph(2), u"BreakType"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
|
||||
getProperty<style::BreakType>(getParagraph(3), "BreakType"));
|
||||
getProperty<style::BreakType>(getParagraph(3), u"BreakType"_ustr));
|
||||
};
|
||||
createSwDoc("page-break-emptyparas.rtf");
|
||||
verify();
|
||||
@ -925,11 +940,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153194New)
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
// \spltpgpar => paragraph 2 on page 2
|
||||
CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
|
||||
getProperty<style::BreakType>(getParagraph(1), "BreakType"));
|
||||
getProperty<style::BreakType>(getParagraph(1), u"BreakType"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
|
||||
getProperty<style::BreakType>(getParagraph(2), "BreakType"));
|
||||
getProperty<style::BreakType>(getParagraph(2), u"BreakType"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE,
|
||||
getProperty<style::BreakType>(getParagraph(3), "BreakType"));
|
||||
getProperty<style::BreakType>(getParagraph(3), u"BreakType"_ustr));
|
||||
};
|
||||
createSwDoc("page-break-emptyparas-spltpgpar.rtf");
|
||||
verify();
|
||||
@ -956,11 +971,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109790)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
|
||||
// Style information was reset, which caused character height to be 22.
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
10.f,
|
||||
getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharHeight"));
|
||||
CPPUNIT_ASSERT_EQUAL(10.f,
|
||||
getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()), 1),
|
||||
u"CharHeight"_ustr));
|
||||
};
|
||||
createSwDoc("tdf109790.rtf");
|
||||
verify();
|
||||
@ -973,10 +988,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf112211)
|
||||
auto verify = [this]() {
|
||||
// This was 0, \fi in a list level definition was not imported.
|
||||
auto xRules = getProperty<uno::Reference<container::XIndexAccess>>(
|
||||
getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
|
||||
getStyles(u"NumberingStyles"_ustr)->getByName(u"WWNum1"_ustr), u"NumberingRules"_ustr);
|
||||
comphelper::SequenceAsHashMap aRule(xRules->getByIndex(0));
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-635),
|
||||
aRule["FirstLineIndent"].get<sal_Int32>());
|
||||
aRule[u"FirstLineIndent"_ustr].get<sal_Int32>());
|
||||
};
|
||||
createSwDoc("tdf112211.rtf");
|
||||
verify();
|
||||
@ -988,7 +1003,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113202)
|
||||
{
|
||||
auto verify = [this]() {
|
||||
// This failed, contextual spacing in 4th paragraph was lost.
|
||||
CPPUNIT_ASSERT(getProperty<bool>(getParagraph(4), "ParaContextMargin"));
|
||||
CPPUNIT_ASSERT(getProperty<bool>(getParagraph(4), u"ParaContextMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf113202.rtf");
|
||||
verify();
|
||||
@ -1007,17 +1022,19 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156030)
|
||||
// As usual, fields given by FieldsAccess are not in same order as in the document
|
||||
// (mostly in reverse order, thanks to SwModify::Add)
|
||||
std::vector<std::vector<OUString>> aExpectedValues = {
|
||||
{ "1 FORMULA 2", "true value 1", "false value 1" }, // #1, condition should be 1 = 2
|
||||
{ "", "", "" }, // #9, not enough field params
|
||||
{ "1 1 FORMULA 1 2 1 true value 8 fal", "se",
|
||||
"value 8" }, // #8, nonsense in field params
|
||||
{ "1 1 FORMULA 1 2 1 true value 7 false", "value", "7" }, // #7, another parse error
|
||||
{ "1 < 2", "true value 6", "false value 6" }, // #6
|
||||
{ "1 > 2", "true value 5", "false value 5" }, // #5
|
||||
{ "1 <> 2", "true value 4", "false value 4" }, // #4
|
||||
{ "1 != 2", "true value 3", "false value 3" }, // #3
|
||||
{ "1 FORMULA FORMULA 2", "true value 2",
|
||||
"false value 2" }, // #2, condition expected 1 == 2
|
||||
{ u"1 FORMULA 2"_ustr, u"true value 1"_ustr,
|
||||
u"false value 1"_ustr }, // #1, condition should be 1 = 2
|
||||
{ u""_ustr, u""_ustr, u""_ustr }, // #9, not enough field params
|
||||
{ u"1 1 FORMULA 1 2 1 true value 8 fal"_ustr, u"se"_ustr,
|
||||
u"value 8"_ustr }, // #8, nonsense in field params
|
||||
{ u"1 1 FORMULA 1 2 1 true value 7 false"_ustr, u"value"_ustr,
|
||||
u"7"_ustr }, // #7, another parse error
|
||||
{ u"1 < 2"_ustr, u"true value 6"_ustr, u"false value 6"_ustr }, // #6
|
||||
{ u"1 > 2"_ustr, u"true value 5"_ustr, u"false value 5"_ustr }, // #5
|
||||
{ u"1 <> 2"_ustr, u"true value 4"_ustr, u"false value 4"_ustr }, // #4
|
||||
{ u"1 != 2"_ustr, u"true value 3"_ustr, u"false value 3"_ustr }, // #3
|
||||
{ u"1 FORMULA FORMULA 2"_ustr, u"true value 2"_ustr,
|
||||
u"false value 2"_ustr }, // #2, condition expected 1 == 2
|
||||
};
|
||||
uno::Reference<beans::XPropertySet> xPropertySet;
|
||||
OUString sValue;
|
||||
@ -1026,11 +1043,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156030)
|
||||
{
|
||||
xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT(xPropertySet.is());
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Condition") >>= sValue);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Condition"_ustr) >>= sValue);
|
||||
CPPUNIT_ASSERT_EQUAL(aValues[0], sValue);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("TrueContent") >>= sValue);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"TrueContent"_ustr) >>= sValue);
|
||||
CPPUNIT_ASSERT_EQUAL(aValues[1], sValue);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("FalseContent") >>= sValue);
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"FalseContent"_ustr) >>= sValue);
|
||||
CPPUNIT_ASSERT_EQUAL(aValues[2], sValue);
|
||||
}
|
||||
|
||||
@ -1052,9 +1069,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153195)
|
||||
|
||||
// Table margin test (cannot be set to exact value, it jumps between -1991 and -1983)
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL(
|
||||
sal_Int32(-2182), getProperty<sal_Int32>(xTables->getByIndex(0), "LeftMargin"), 10);
|
||||
sal_Int32(-2182), getProperty<sal_Int32>(xTables->getByIndex(0), u"LeftMargin"_ustr),
|
||||
10);
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL(
|
||||
sal_Int32(-2182), getProperty<sal_Int32>(xTables->getByIndex(1), "LeftMargin"), 10);
|
||||
sal_Int32(-2182), getProperty<sal_Int32>(xTables->getByIndex(1), u"LeftMargin"_ustr),
|
||||
10);
|
||||
};
|
||||
createSwDoc("tdf153195.rtf");
|
||||
verify();
|
||||
@ -1070,7 +1089,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158762)
|
||||
uno::Reference<text::XTextRange> xPara(getParagraph(paragraph));
|
||||
uno::Reference<beans::XPropertySet> properties(xPara, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xLevels(
|
||||
properties->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
|
||||
properties->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xLevels.is());
|
||||
}
|
||||
};
|
||||
|
@ -69,13 +69,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf155663)
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2013), xShape->getSize().Width);
|
||||
}
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(123),
|
||||
getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Top);
|
||||
getProperty<text::GraphicCrop>(xShape, u"GraphicCrop"_ustr).Top);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(123),
|
||||
getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Bottom);
|
||||
getProperty<text::GraphicCrop>(xShape, u"GraphicCrop"_ustr).Bottom);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(123),
|
||||
getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Left);
|
||||
getProperty<text::GraphicCrop>(xShape, u"GraphicCrop"_ustr).Left);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(123),
|
||||
getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Right);
|
||||
getProperty<text::GraphicCrop>(xShape, u"GraphicCrop"_ustr).Right);
|
||||
};
|
||||
createSwDoc("piccrop.rtf");
|
||||
verify();
|
||||
@ -93,7 +93,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158586_0)
|
||||
// There should be no empty paragraph at the start
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
assertXPath(pLayout, "//anchored"_ostr, 1);
|
||||
assertXPathContent(pLayout, "/root/page[1]/body//txt"_ostr, "First page");
|
||||
assertXPathContent(pLayout, "/root/page[1]/body//txt"_ostr, u"First page"_ustr);
|
||||
};
|
||||
createSwDoc("tdf158586_pageBreak0.rtf");
|
||||
verify();
|
||||
@ -111,7 +111,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158586_0B)
|
||||
// There should be no empty paragraph at the start
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
assertXPath(pLayout, "//anchored"_ostr, 1);
|
||||
assertXPathContent(pLayout, "/root/page[1]/body//txt"_ostr, "First page");
|
||||
assertXPathContent(pLayout, "/root/page[1]/body//txt"_ostr, u"First page"_ustr);
|
||||
};
|
||||
createSwDoc("tdf158586_pageBreak0B.rtf");
|
||||
verify();
|
||||
@ -130,7 +130,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158586_1)
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
// on import there is a section on page 2; on reimport there is no section
|
||||
// (probably not an important difference?)
|
||||
assertXPathContent(pLayout, "/root/page[2]/body//txt"_ostr, "Second page");
|
||||
assertXPathContent(pLayout, "/root/page[2]/body//txt"_ostr, u"Second page"_ustr);
|
||||
};
|
||||
createSwDoc("tdf158586_pageBreak1.rtf");
|
||||
verify();
|
||||
@ -149,7 +149,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158586_1header)
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
// on import there is a section on page 2; on reimport there is no section
|
||||
// (probably not an important difference?)
|
||||
assertXPathContent(pLayout, "/root/page[2]/body//txt"_ostr, "Second page");
|
||||
assertXPathContent(pLayout, "/root/page[2]/body//txt"_ostr, u"Second page"_ustr);
|
||||
};
|
||||
createSwDoc("tdf158586_pageBreak1_header.rtf");
|
||||
verify();
|
||||
@ -163,8 +163,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158586_lostFrame)
|
||||
// The anchor and align properties are sufficient to define a frame
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
assertXPath(pLayout, "//anchored"_ostr, 1);
|
||||
assertXPathContent(pLayout, "//page[1]/body//txt"_ostr, "1st page");
|
||||
assertXPathContent(pLayout, "//page[2]/body//txt"_ostr, "2nd page");
|
||||
assertXPathContent(pLayout, "//page[1]/body//txt"_ostr, u"1st page"_ustr);
|
||||
assertXPathContent(pLayout, "//page[2]/body//txt"_ostr, u"2nd page"_ustr);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
};
|
||||
@ -182,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnotesAtSectEndRTF)
|
||||
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
|
||||
pWrtShell->SplitNode();
|
||||
pWrtShell->Up(/*bSelect=*/false);
|
||||
pWrtShell->Insert("x");
|
||||
pWrtShell->Insert(u"x"_ustr);
|
||||
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
|
||||
SwSectionData aSection(SectionType::Content, pWrtShell->GetUniqueSectionName());
|
||||
pWrtShell->StartAction();
|
||||
@ -239,13 +239,15 @@ CPPUNIT_TEST_FIXTURE(Test, testAnnotationPar)
|
||||
// the problem was that the paragraph break following annotation was missing
|
||||
CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
OUString("Annotation"),
|
||||
u"Annotation"_ustr,
|
||||
getProperty<OUString>(
|
||||
getRun(getParagraph(1, "I ax xoixx xuxixx xxe xixxx. (Xaxxexx 1989 x.x. xaxax a)"),
|
||||
getRun(getParagraph(
|
||||
1, u"I ax xoixx xuxixx xxe xixxx. (Xaxxexx 1989 x.x. xaxax a)"_ustr),
|
||||
2),
|
||||
"TextPortionType"));
|
||||
u"TextPortionType"_ustr));
|
||||
CPPUNIT_ASSERT(
|
||||
!getProperty<OUString>(getParagraph(2, "Xix\txaxa\tx-a\t\t\txix\tx xi = xa."), "ListId")
|
||||
!getProperty<OUString>(getParagraph(2, u"Xix\txaxa\tx-a\t\t\txix\tx xi = xa."_ustr),
|
||||
u"ListId"_ustr)
|
||||
.isEmpty());
|
||||
};
|
||||
createSwDoc("tdf136445-1-min.rtf");
|
||||
@ -301,8 +303,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159824_gradientAngle1)
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,
|
||||
getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, "FillGradient");
|
||||
getProperty<drawing::FillStyle>(xFrame, u"FillStyle"_ustr));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, u"FillGradient"_ustr);
|
||||
|
||||
// MCGR: Use the completely imported transparency gradient to check for correctness
|
||||
basegfx::BColorStops aColorStops
|
||||
@ -332,8 +334,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159824_gradientAngle2)
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,
|
||||
getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, "FillGradient");
|
||||
getProperty<drawing::FillStyle>(xFrame, u"FillStyle"_ustr));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, u"FillGradient"_ustr);
|
||||
|
||||
// MCGR: Use the completely imported transparency gradient to check for correctness
|
||||
basegfx::BColorStops aColorStops
|
||||
@ -363,8 +365,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159824_gradientAngle3)
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,
|
||||
getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, "FillGradient");
|
||||
getProperty<drawing::FillStyle>(xFrame, u"FillStyle"_ustr));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, u"FillGradient"_ustr);
|
||||
|
||||
// MCGR: Use the completely imported transparency gradient to check for correctness
|
||||
basegfx::BColorStops aColorStops
|
||||
@ -393,8 +395,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159824_gradientAngle4)
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,
|
||||
getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, "FillGradient");
|
||||
getProperty<drawing::FillStyle>(xFrame, u"FillStyle"_ustr));
|
||||
awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, u"FillGradient"_ustr);
|
||||
|
||||
// MCGR: Use the completely imported transparency gradient to check for correctness
|
||||
basegfx::BColorStops aColorStops
|
||||
@ -421,11 +423,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158830)
|
||||
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xPara = getParagraphOfText(1, xCell->getText());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::ParagraphAdjust_CENTER,
|
||||
static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, "ParaAdjust")));
|
||||
static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, u"ParaAdjust"_ustr)));
|
||||
};
|
||||
createSwDoc("tdf158830.rtf");
|
||||
verify();
|
||||
@ -441,11 +443,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158978)
|
||||
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xPara = getParagraphOfText(1, xCell->getText());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
style::ParagraphAdjust_RIGHT,
|
||||
static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, "ParaAdjust")));
|
||||
static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, u"ParaAdjust"_ustr)));
|
||||
};
|
||||
createSwDoc("tdf158978.rtf");
|
||||
verify();
|
||||
@ -464,10 +466,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158982)
|
||||
uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTables->getCount());
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(5), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A2"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"A2"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xPara = getParagraphOfText(1, xCell->getText());
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(508),
|
||||
getProperty<sal_Int32>(xPara, "ParaLeftMargin"));
|
||||
getProperty<sal_Int32>(xPara, u"ParaLeftMargin"_ustr));
|
||||
};
|
||||
createSwDoc("tdf158982.rtf");
|
||||
verify();
|
||||
|
@ -1510,8 +1510,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf157833)
|
||||
|
||||
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
|
||||
CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
|
||||
uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xTableNames->hasByName(u"Table1"_ustr));
|
||||
uno::Reference<text::XTextTable> xTable1(xTableNames->getByName(u"Table1"_ustr),
|
||||
uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1->getRows()->getCount());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable1->getColumns()->getCount());
|
||||
|
||||
@ -1577,8 +1578,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf155692)
|
||||
|
||||
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
|
||||
CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
|
||||
uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xTableNames->hasByName(u"Table1"_ustr));
|
||||
uno::Reference<text::XTextTable> xTable1(xTableNames->getByName(u"Table1"_ustr),
|
||||
uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1->getRows()->getCount());
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable1->getColumns()->getCount());
|
||||
|
||||
@ -1812,7 +1814,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161332)
|
||||
CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType);
|
||||
|
||||
// remove selection
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
// select text frame by clicking on it at the right side of the bottom cell
|
||||
auto pRow2 = pRow1->GetNext();
|
||||
@ -1873,7 +1875,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161426)
|
||||
CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType);
|
||||
|
||||
// remove selection
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
// select text frame by clicking on it at the right side of the bottom right cell
|
||||
auto pRow2 = pRow1->GetNext();
|
||||
@ -2028,7 +2030,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161360)
|
||||
|
||||
// select the text frame instead of the image
|
||||
// by pressing Escape
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
// Then make sure that the cursor in the table:
|
||||
SelectionType eType2 = pWrtShell->GetSelectionType();
|
||||
@ -2037,13 +2039,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161360)
|
||||
CPPUNIT_ASSERT(bCursorInTable);
|
||||
|
||||
// select the text frame by pressing Escape again
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
eType2 = pWrtShell->GetSelectionType();
|
||||
CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType2);
|
||||
|
||||
// deselect the text frame by pressing Escape again
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
eType2 = pWrtShell->GetSelectionType();
|
||||
// The text cursor is after the floating table
|
||||
@ -2066,7 +2068,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf157533)
|
||||
uno::Reference<view::XSelectionSupplier> xCtrl(xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
xCtrl->select(uno::Any(xShape));
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
// Then make sure that the cursor in the table:
|
||||
SelectionType eType2 = pWrtShell->GetSelectionType();
|
||||
@ -2081,7 +2083,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf157533)
|
||||
uno::Reference<drawing::XShape> xShape2(getShapeByName(u"Objet11"));
|
||||
xCtrl->select(uno::Any(xShape2));
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
SwTextNode* pTextNode2 = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
|
||||
// This was false (lost text cursor inside the frame of the formula)
|
||||
@ -2089,19 +2091,19 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf157533)
|
||||
SwTableNode* pTableNode = pWrtShell->GetCursor()->GetPointNode().FindTableNode();
|
||||
SwTable& rTable = pTableNode->GetTable();
|
||||
// cursor in the same cell
|
||||
bool bSameBox = pTextNode2->GetTableBox() == rTable.GetTableBox("A1");
|
||||
bool bSameBox = pTextNode2->GetTableBox() == rTable.GetTableBox(u"A1"_ustr);
|
||||
CPPUNIT_ASSERT(bSameBox);
|
||||
|
||||
uno::Reference<drawing::XShape> xShape3(getShapeByName(u"Objet10"));
|
||||
xCtrl->select(uno::Any(xShape3));
|
||||
|
||||
dispatchCommand(mxComponent, ".uno:Escape", {});
|
||||
dispatchCommand(mxComponent, u".uno:Escape"_ustr, {});
|
||||
|
||||
SwTextNode* pTextNode3 = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
|
||||
// This was false (lost text cursor inside the frame of the formula)
|
||||
CPPUNIT_ASSERT(pTextNode3->GetTableBox());
|
||||
// cursor in the same cell
|
||||
bSameBox = pTextNode3->GetTableBox() == rTable.GetTableBox("B1");
|
||||
bSameBox = pTextNode3->GetTableBox() == rTable.GetTableBox(u"B1"_ustr);
|
||||
CPPUNIT_ASSERT(bSameBox);
|
||||
}
|
||||
|
||||
|
@ -881,7 +881,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testInsertAutoTextIntoListFromParaStyle)
|
||||
pWrtShell->FwdPara();
|
||||
pWrtShell->EndPara(/*bSelect=*/false);
|
||||
// expands autotext (via F3)
|
||||
pWrtShell->Insert(" jacr");
|
||||
pWrtShell->Insert(u" jacr"_ustr);
|
||||
|
||||
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
|
||||
pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_F3);
|
||||
@ -2748,8 +2748,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf128106)
|
||||
pMasterDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks().size());
|
||||
// no way to set SwDocShell::m_nUpdateDocMode away from NO_UPDATE ?
|
||||
// pMasterDoc->getIDocumentLinksAdministration().UpdateLinks();
|
||||
pMasterDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(false, false,
|
||||
nullptr, "");
|
||||
pMasterDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(
|
||||
false, false, nullptr, u""_ustr);
|
||||
// note: this has called SwGetRefFieldType::UpdateGetReferences()
|
||||
SwFieldType const* const pType(
|
||||
pMasterDoc->getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::GetRef));
|
||||
@ -2803,8 +2803,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf103612)
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
size_t(1),
|
||||
pGlobalDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks().size());
|
||||
pGlobalDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(false, false,
|
||||
nullptr, "");
|
||||
pGlobalDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(
|
||||
false, false, nullptr, u""_ustr);
|
||||
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
|
||||
|
@ -506,7 +506,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf158375_dde_disable)
|
||||
size_t(1), pDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks().size());
|
||||
|
||||
pDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(false, false, nullptr,
|
||||
"");
|
||||
u""_ustr);
|
||||
|
||||
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
|
||||
@ -667,13 +667,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf144752)
|
||||
CPPUNIT_ASSERT(!pWrtShell->HasSelection());
|
||||
|
||||
// Undo and check, that the "Text" is selected
|
||||
dispatchCommand(mxComponent, ".uno:Undo", {});
|
||||
dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
|
||||
// Without the fix, this would fail
|
||||
CPPUNIT_ASSERT(pWrtShell->HasSelection());
|
||||
CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, pWrtShell->GetSelText());
|
||||
|
||||
// Redo and check, that the "Word" is selected
|
||||
dispatchCommand(mxComponent, ".uno:Redo", {});
|
||||
dispatchCommand(mxComponent, u".uno:Redo"_ustr, {});
|
||||
CPPUNIT_ASSERT(pWrtShell->HasSelection());
|
||||
CPPUNIT_ASSERT_EQUAL(u"Word"_ustr, pWrtShell->GetSelText());
|
||||
}
|
||||
|
@ -61,21 +61,21 @@ DECLARE_WW8EXPORT_TEST(testTdf72511_editengLRSpace, "tdf72511_editengLRSpace.doc
|
||||
// given a default paragraph style with a left indent of 2 inches,
|
||||
// the comment should ignore the indent, but the textbox must not.
|
||||
uno::Reference<beans::XPropertySet> xRun(
|
||||
getProperty<uno::Reference<beans::XPropertySet>>(getRun(getParagraph(1), 3), "TextField"));
|
||||
uno::Reference<text::XText> xComment(getProperty<uno::Reference<text::XText>>(xRun, "TextRange"));
|
||||
getProperty<uno::Reference<beans::XPropertySet>>(getRun(getParagraph(1), 3), u"TextField"_ustr));
|
||||
uno::Reference<text::XText> xComment(getProperty<uno::Reference<text::XText>>(xRun, u"TextRange"_ustr));
|
||||
uno::Reference<beans::XPropertySet> xParagraph(getParagraphOfText(1, xComment), uno::UNO_QUERY);
|
||||
// The comment was indented by 4001 (2 inches) instead of nothing
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, u"ParaLeftMargin"_ustr));
|
||||
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY_THROW);
|
||||
uno::Reference<drawing::XShape> xShape2(xGroupShape->getByIndex(1), uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.TextShape"), xShape2->getShapeType());
|
||||
CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.TextShape"_ustr, xShape2->getShapeType());
|
||||
uno::Reference<text::XTextRange> xTextbox(xShape2, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<beans::XPropertySet> xTBPara(xTextbox, uno::UNO_QUERY);
|
||||
// Textbox paragraphs had no indent instead of 5080 (2 inches - the same as normal paragraphs).
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(5080), getProperty<sal_Int32>(xTBPara, "ParaLeftMargin"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(5080), getProperty<sal_Int32>(xTBPara, u"ParaLeftMargin"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("sanity check: normal paragraph's indent", sal_Int32(5080),
|
||||
getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
|
||||
getProperty<sal_Int32>(getParagraph(1), u"ParaLeftMargin"_ustr));
|
||||
}
|
||||
|
||||
DECLARE_WW8EXPORT_TEST(testTdf160049_anchorMargin, "tdf160049_anchorMargin.doc")
|
||||
@ -131,7 +131,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnotesAtSectEndDOC)
|
||||
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
|
||||
pWrtShell->SplitNode();
|
||||
pWrtShell->Up(/*bSelect=*/false);
|
||||
pWrtShell->Insert("x");
|
||||
pWrtShell->Insert(u"x"_ustr);
|
||||
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
|
||||
SwSectionData aSection(SectionType::Content, pWrtShell->GetUniqueSectionName());
|
||||
pWrtShell->StartAction();
|
||||
@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnotesAtSectEndDOC)
|
||||
}
|
||||
|
||||
// When saving to DOC:
|
||||
saveAndReload("MS Word 97");
|
||||
saveAndReload(u"MS Word 97"_ustr);
|
||||
|
||||
// Then make sure the endnote position is section end:
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
|
@ -32,7 +32,7 @@ class Test : public SwModelTestBase
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: SwModelTestBase("/sw/qa/filter/ascii/data/")
|
||||
: SwModelTestBase(u"/sw/qa/filter/ascii/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -48,8 +48,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf144576_ascii)
|
||||
|
||||
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
|
||||
CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
|
||||
uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xTableNames->hasByName(u"Table1"_ustr));
|
||||
uno::Reference<text::XTextTable> xTable1(xTableNames->getByName(u"Table1"_ustr),
|
||||
uno::UNO_QUERY);
|
||||
|
||||
pWrtShell->GotoTable(u"Table1"_ustr);
|
||||
pWrtShell->Insert(u"A"_ustr);
|
||||
@ -61,9 +62,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf144576_ascii)
|
||||
pWrtShell->Insert(u"D"_ustr);
|
||||
|
||||
// Select the whole table
|
||||
dispatchCommand(mxComponent, ".uno:SelectAll", {});
|
||||
dispatchCommand(mxComponent, ".uno:SelectAll", {});
|
||||
dispatchCommand(mxComponent, ".uno:SelectAll", {});
|
||||
dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
|
||||
|
||||
rtl::Reference<SwTransferable> xTransferable(new SwTransferable(*pWrtShell));
|
||||
xTransferable->Copy(); // Ctl-C
|
||||
@ -95,9 +96,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf144576_ascii)
|
||||
|
||||
// Add some newlines in the first two cells
|
||||
// and test to see if they're handled correctly
|
||||
uno::Reference<text::XTextRange> xCellA1(xTable1->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCellA1(xTable1->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
|
||||
xCellA1->setString(u""_ustr);
|
||||
uno::Reference<text::XTextRange> xCellB1(xTable1->getCellByName("B1"), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCellB1(xTable1->getCellByName(u"B1"_ustr), uno::UNO_QUERY);
|
||||
xCellB1->setString(u""_ustr);
|
||||
|
||||
pWrtShell->GotoTable(u"Table1"_ustr);
|
||||
@ -115,9 +116,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf144576_ascii)
|
||||
= u"A"_ustr SAL_NEWLINE_STRING u"A1\tB"_ustr SAL_NEWLINE_STRING u"B1"_ustr SAL_NEWLINE_STRING u"B2"_ustr SAL_NEWLINE_STRING u"C\tD"_ustr SAL_NEWLINE_STRING u""_ustr;
|
||||
|
||||
// Select the whole table
|
||||
dispatchCommand(mxComponent, ".uno:SelectAll", {});
|
||||
dispatchCommand(mxComponent, ".uno:SelectAll", {});
|
||||
dispatchCommand(mxComponent, ".uno:SelectAll", {});
|
||||
dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
|
||||
|
||||
// Get the plain text version of the selection
|
||||
rtl::Reference<SwTransferable> xNewTransferable(new SwTransferable(*pWrtShell));
|
||||
|
@ -577,7 +577,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnotesAtSectEnd)
|
||||
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
|
||||
pWrtShell->SplitNode();
|
||||
pWrtShell->Up(/*bSelect=*/false);
|
||||
pWrtShell->Insert("x");
|
||||
pWrtShell->Insert(u"x"_ustr);
|
||||
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
|
||||
SwSectionData aSection(SectionType::Content, pWrtShell->GetUniqueSectionName());
|
||||
pWrtShell->StartAction();
|
||||
@ -588,15 +588,15 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnotesAtSectEnd)
|
||||
pWrtShell->InsertFootnote(OUString(), /*bEndNote=*/true);
|
||||
|
||||
// When saving to DOCX:
|
||||
save("Office Open XML Text");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
|
||||
// Then make sure the endnote position is section end:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
OUString aPos = getXPath(pXmlDoc, "/w:settings/w:endnotePr/w:pos"_ostr, "val"_ostr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - XPath '/w:settings/w:endnotePr/w:pos' number of nodes is incorrect
|
||||
// i.e. the default position was used: document end.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("sectEnd"), aPos);
|
||||
CPPUNIT_ASSERT_EQUAL(u"sectEnd"_ustr, aPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -176,9 +176,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyleParaBorder)
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
|
||||
uno::Reference<text::XTextTable> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xCell(xPara->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xCell(xPara->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
|
||||
sal_Int32 nLeftBorderDistance{};
|
||||
xCell->getPropertyValue("LeftBorderDistance") >>= nLeftBorderDistance;
|
||||
xCell->getPropertyValue(u"LeftBorderDistance"_ustr) >>= nLeftBorderDistance;
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 203
|
||||
// - Actual : 0
|
||||
|
@ -30,7 +30,7 @@ class Test : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiXmlTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiXmlTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -242,11 +242,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyleParaBorderSpacing)
|
||||
uno::Reference<container::XEnumerationAccess> xText(xTextDocument->getText(), uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumeration> xParaEnum = xText->createEnumeration();
|
||||
uno::Reference<text::XTextTable> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xCell(xPara->getCellByName("A1"), uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xCell(xPara->getCellByName(u"A1"_ustr),
|
||||
uno::UNO_QUERY);
|
||||
xParaEnum = xCell->createEnumeration();
|
||||
uno::Reference<beans::XPropertySet> xParaProps(xParaEnum->nextElement(), uno::UNO_QUERY);
|
||||
sal_Int32 nTopBorderDistance{};
|
||||
xParaProps->getPropertyValue("TopBorderDistance") >>= nTopBorderDistance;
|
||||
xParaProps->getPropertyValue(u"TopBorderDistance"_ustr) >>= nTopBorderDistance;
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 35
|
||||
// - Actual : 0
|
||||
|
@ -21,7 +21,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -435,7 +435,7 @@ CPPUNIT_TEST_FIXTURE(Test, testClearingBreakSectEnd)
|
||||
// - Actual : Text
|
||||
// i.e. the clearing break at sect end was lost, leading to text overlap.
|
||||
CPPUNIT_ASSERT_EQUAL(u"LineBreak"_ustr,
|
||||
xPortion->getPropertyValue("TextPortionType").get<OUString>());
|
||||
xPortion->getPropertyValue(u"TextPortionType"_ustr).get<OUString>());
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testParaStyleLostNumbering)
|
||||
|
@ -32,7 +32,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ class Test : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiXmlTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiXmlTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -102,9 +102,9 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnoteAtSectionEnd)
|
||||
xParaEnum->nextElement();
|
||||
uno::Reference<beans::XPropertySet> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xSection;
|
||||
xPara->getPropertyValue("TextSection") >>= xSection;
|
||||
xPara->getPropertyValue(u"TextSection"_ustr) >>= xSection;
|
||||
bool bEndnoteIsCollectAtTextEnd = false;
|
||||
xSection->getPropertyValue("EndnoteIsCollectAtTextEnd") >>= bEndnoteIsCollectAtTextEnd;
|
||||
xSection->getPropertyValue(u"EndnoteIsCollectAtTextEnd"_ustr) >>= bEndnoteIsCollectAtTextEnd;
|
||||
// Without the accompanying fix in place, this test would have failed, endnotes were always at
|
||||
// document end.
|
||||
CPPUNIT_ASSERT(bEndnoteIsCollectAtTextEnd);
|
||||
|
@ -20,7 +20,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/dmapper/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/dmapper/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ class Test : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiXmlTest("/sw/qa/writerfilter/filter/data/")
|
||||
: UnoApiXmlTest(u"/sw/qa/writerfilter/filter/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -59,7 +59,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineEndnoteAndFootnoteDOCX)
|
||||
// When laying out that document:
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
css::uno::Reference<qa::XDumper> xDumper(xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
OString aDump = xDumper->dump("layout").toUtf8();
|
||||
OString aDump = xDumper->dump(u"layout"_ustr).toUtf8();
|
||||
auto pCharBuffer = reinterpret_cast<const xmlChar*>(aDump.getStr());
|
||||
xmlDocUniquePtr pXmlDoc(xmlParseDoc(pCharBuffer));
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/ooxml/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/ooxml/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("sw/qa//writerfilter/rtftok/data/")
|
||||
: UnoApiTest(u"sw/qa//writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -116,9 +116,9 @@ CPPUNIT_TEST_FIXTURE(Test, testEndnoteAtSectionEndRTFImport)
|
||||
xParaEnum->nextElement();
|
||||
uno::Reference<beans::XPropertySet> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xSection;
|
||||
xPara->getPropertyValue("TextSection") >>= xSection;
|
||||
xPara->getPropertyValue(u"TextSection"_ustr) >>= xSection;
|
||||
bool bEndnoteIsCollectAtTextEnd = false;
|
||||
xSection->getPropertyValue("EndnoteIsCollectAtTextEnd") >>= bEndnoteIsCollectAtTextEnd;
|
||||
xSection->getPropertyValue(u"EndnoteIsCollectAtTextEnd"_ustr) >>= bEndnoteIsCollectAtTextEnd;
|
||||
// Without the accompanying fix in place, this test would have failed, endnotes were always at
|
||||
// document end.
|
||||
CPPUNIT_ASSERT(bEndnoteIsCollectAtTextEnd);
|
||||
|
@ -23,7 +23,7 @@ class Test : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiXmlTest("/sw/qa/writerfilter/rtftok/data/")
|
||||
: UnoApiXmlTest(u"/sw/qa/writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/rtftok/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/rtftok/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/rtftok/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/rtftok/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("/sw/qa/writerfilter/rtftok/data/")
|
||||
: UnoApiTest(u"/sw/qa/writerfilter/rtftok/data/"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -1012,7 +1012,7 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool bTryCombined) const
|
||||
continue;
|
||||
}
|
||||
|
||||
OUString sPairTrimmed = "";
|
||||
OUString sPairTrimmed = u""_ustr;
|
||||
SwRedlineTable::size_type nPairStart = nPosAct;
|
||||
SwRedlineTable::size_type nPairEnd = nPosAct;
|
||||
|
||||
|
@ -1247,7 +1247,7 @@ static void lcl_UpdateLinksInSect( const SwBaseLink& rUpdLnk, SwSectionNode& rSe
|
||||
if ( pSrcDoc != pDoc &&
|
||||
rSection.IsProtectFlag() )
|
||||
{
|
||||
pSrcDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks( false, false, nullptr, "" );
|
||||
pSrcDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks( false, false, nullptr, u""_ustr );
|
||||
}
|
||||
|
||||
if( oCpyRg )
|
||||
|
@ -112,7 +112,7 @@ bool SwFEShell::FinishOLEObj() // Server is terminated
|
||||
// if we have more than one link let's update them too
|
||||
sfx2::LinkManager& rLinkManager = GetDoc()->getIDocumentLinksAdministration().GetLinkManager();
|
||||
if (rLinkManager.GetLinks().size() > 1)
|
||||
rLinkManager.UpdateAllLinks(false, false, nullptr, "");
|
||||
rLinkManager.UpdateAllLinks(false, false, nullptr, u""_ustr);
|
||||
|
||||
// return back original value of the "update of the link preview" flag
|
||||
rEmbeddedObjectContainer.setUserAllowsLinkUpdate(aUserAllowsLinkUpdate);
|
||||
|
@ -2176,7 +2176,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport(LanguageType const eLanguageDe
|
||||
|
||||
vcl::pdf::PDFNote aNote;
|
||||
// The title should consist of the author and the date:
|
||||
aNote.maTitle = pField->GetPar1() + ", " + sDate + ", " + (pField->GetResolved() ? SwResId(STR_RESOLVED) : "");
|
||||
aNote.maTitle = pField->GetPar1() + ", " + sDate + ", " + (pField->GetResolved() ? SwResId(STR_RESOLVED) : u""_ustr);
|
||||
// Guess what the contents contains...
|
||||
aNote.maContents = pField->GetText();
|
||||
|
||||
|
@ -2980,7 +2980,7 @@ css::uno::Any SAL_CALL SwXTextFieldTypes::getByUniqueID(const OUString& ID)
|
||||
|
||||
void SAL_CALL SwXTextFieldTypes::removeByUniqueID(const OUString& /*ID*/)
|
||||
{
|
||||
throw uno::RuntimeException("unsupported");
|
||||
throw uno::RuntimeException(u"unsupported"_ustr);
|
||||
}
|
||||
|
||||
class SwXFieldEnumeration::Impl
|
||||
|
@ -2570,15 +2570,15 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin, cons
|
||||
}
|
||||
|
||||
SwCompareOptionsTabPage::SwCompareOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet)
|
||||
: SfxTabPage(pPage, pController, "modules/swriter/ui/optcomparison.ui", "OptComparison", &rSet)
|
||||
, m_xAutoRB(m_xBuilder->weld_radio_button("auto"))
|
||||
, m_xWordRB(m_xBuilder->weld_radio_button("byword"))
|
||||
, m_xCharRB(m_xBuilder->weld_radio_button("bycharacter"))
|
||||
, m_xCompareModeImg(m_xBuilder->weld_widget("lockcomparemode"))
|
||||
, m_xRsidCB(m_xBuilder->weld_check_button("useRSID"))
|
||||
, m_xRsidImg(m_xBuilder->weld_widget("lockuseRSID"))
|
||||
, m_xStoreRsidCB(m_xBuilder->weld_check_button("storeRSID"))
|
||||
, m_xStoreRsidImg(m_xBuilder->weld_widget("lockstoreRSID"))
|
||||
: SfxTabPage(pPage, pController, u"modules/swriter/ui/optcomparison.ui"_ustr, u"OptComparison"_ustr, &rSet)
|
||||
, m_xAutoRB(m_xBuilder->weld_radio_button(u"auto"_ustr))
|
||||
, m_xWordRB(m_xBuilder->weld_radio_button(u"byword"_ustr))
|
||||
, m_xCharRB(m_xBuilder->weld_radio_button(u"bycharacter"_ustr))
|
||||
, m_xCompareModeImg(m_xBuilder->weld_widget(u"lockcomparemode"_ustr))
|
||||
, m_xRsidCB(m_xBuilder->weld_check_button(u"useRSID"_ustr))
|
||||
, m_xRsidImg(m_xBuilder->weld_widget(u"lockuseRSID"_ustr))
|
||||
, m_xStoreRsidCB(m_xBuilder->weld_check_button(u"storeRSID"_ustr))
|
||||
, m_xStoreRsidImg(m_xBuilder->weld_widget(u"lockstoreRSID"_ustr))
|
||||
{
|
||||
Link<weld::Toggleable&,void> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) );
|
||||
m_xAutoRB->connect_toggled( aLnk );
|
||||
@ -2606,7 +2606,7 @@ OUString SwCompareOptionsTabPage::GetAllStrings()
|
||||
sAllStrings += pString->get_label() + " ";
|
||||
}
|
||||
|
||||
OUString radioButton[] = { "auto", "byword", "bycharacter" };
|
||||
OUString radioButton[] = { u"auto"_ustr, u"byword"_ustr, u"bycharacter"_ustr };
|
||||
|
||||
for (const auto& radio : radioButton)
|
||||
{
|
||||
|
@ -97,21 +97,21 @@ IMPL_LINK(SwFootNotePage, LineColorSelected_Impl, ColorListBox&, rColorBox, void
|
||||
SwFootNotePage::SwFootNotePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet)
|
||||
: SfxTabPage(pPage, pController, u"modules/swriter/ui/footnoteareapage.ui"_ustr, u"FootnoteAreaPage"_ustr, &rSet)
|
||||
, m_lMaxHeight(0)
|
||||
, m_xMaxHeightPageBtn(m_xBuilder->weld_radio_button("maxheightpage"))
|
||||
, m_xMaxHeightBtn(m_xBuilder->weld_radio_button("maxheight"))
|
||||
, m_xMaxHeightEdit(m_xBuilder->weld_metric_spin_button("maxheightsb", FieldUnit::CM))
|
||||
, m_xDistLabel(m_xBuilder->weld_label("spacetotextlabel"))
|
||||
, m_xDistEdit(m_xBuilder->weld_metric_spin_button("spacetotext", FieldUnit::CM))
|
||||
, m_xLinePosLabel(m_xBuilder->weld_label("positionlabel"))
|
||||
, m_xLinePosBox(m_xBuilder->weld_combo_box("position"))
|
||||
, m_xLineTypeBox(new SvtLineListBox(m_xBuilder->weld_menu_button("style")))
|
||||
, m_xLineWidthEdit(m_xBuilder->weld_metric_spin_button("thickness", FieldUnit::POINT))
|
||||
, m_xLineColorBox(new ColorListBox(m_xBuilder->weld_menu_button("color"),
|
||||
, m_xMaxHeightPageBtn(m_xBuilder->weld_radio_button(u"maxheightpage"_ustr))
|
||||
, m_xMaxHeightBtn(m_xBuilder->weld_radio_button(u"maxheight"_ustr))
|
||||
, m_xMaxHeightEdit(m_xBuilder->weld_metric_spin_button(u"maxheightsb"_ustr, FieldUnit::CM))
|
||||
, m_xDistLabel(m_xBuilder->weld_label(u"spacetotextlabel"_ustr))
|
||||
, m_xDistEdit(m_xBuilder->weld_metric_spin_button(u"spacetotext"_ustr, FieldUnit::CM))
|
||||
, m_xLinePosLabel(m_xBuilder->weld_label(u"positionlabel"_ustr))
|
||||
, m_xLinePosBox(m_xBuilder->weld_combo_box(u"position"_ustr))
|
||||
, m_xLineTypeBox(new SvtLineListBox(m_xBuilder->weld_menu_button(u"style"_ustr)))
|
||||
, m_xLineWidthEdit(m_xBuilder->weld_metric_spin_button(u"thickness"_ustr, FieldUnit::POINT))
|
||||
, m_xLineColorBox(new ColorListBox(m_xBuilder->weld_menu_button(u"color"_ustr),
|
||||
[this]{ return GetDialogController()->getDialog(); }))
|
||||
, m_xLineLengthLabel(m_xBuilder->weld_label("lengthlabel"))
|
||||
, m_xLineLengthEdit(m_xBuilder->weld_metric_spin_button("length", FieldUnit::PERCENT))
|
||||
, m_xLineDistLabel(m_xBuilder->weld_label("spacingtocontentslabel"))
|
||||
, m_xLineDistEdit(m_xBuilder->weld_metric_spin_button("spacingtocontents", FieldUnit::CM))
|
||||
, m_xLineLengthLabel(m_xBuilder->weld_label(u"lengthlabel"_ustr))
|
||||
, m_xLineLengthEdit(m_xBuilder->weld_metric_spin_button(u"length"_ustr, FieldUnit::PERCENT))
|
||||
, m_xLineDistLabel(m_xBuilder->weld_label(u"spacingtocontentslabel"_ustr))
|
||||
, m_xLineDistEdit(m_xBuilder->weld_metric_spin_button(u"spacingtocontents"_ustr, FieldUnit::CM))
|
||||
{
|
||||
SetExchangeSupport();
|
||||
FieldUnit aMetric = ::GetDfltMetric(false);
|
||||
@ -125,7 +125,7 @@ SwFootNotePage::SwFootNotePage(weld::Container* pPage, weld::DialogController* p
|
||||
bool bContinuousEndnotes = false;
|
||||
if (const SfxGrabBagItem* pGragbagItem = rSet.GetItemIfSet(SID_ATTR_CHAR_GRABBAG))
|
||||
{
|
||||
auto it = pGragbagItem->GetGrabBag().find("ContinuousEndnotes");
|
||||
auto it = pGragbagItem->GetGrabBag().find(u"ContinuousEndnotes"_ustr);
|
||||
if (it != pGragbagItem->GetGrabBag().end())
|
||||
{
|
||||
it->second >>= bContinuousEndnotes;
|
||||
|
@ -212,7 +212,7 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
|
||||
SwTwips SwViewOption::GetPostItsWidth(const OutputDevice* pOut)
|
||||
{
|
||||
assert(pOut && "no Outdev");
|
||||
return pOut->GetTextWidth(" ");
|
||||
return pOut->GetTextWidth(u" "_ustr);
|
||||
}
|
||||
|
||||
void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool bIsScript ) const
|
||||
|
@ -453,7 +453,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
|
||||
*(m_rView.GetDocShell()->GetDoc()), aPos, &aPos));
|
||||
|
||||
OUString sName;
|
||||
xRange->getPropertyValue("HyperLinkName") >>= sName;
|
||||
xRange->getPropertyValue(u"HyperLinkName"_ustr) >>= sName;
|
||||
if (!sName.isEmpty())
|
||||
{
|
||||
bScreenTip = true;
|
||||
|
@ -210,66 +210,66 @@ static rtl::Reference<MasterPropertySetInfo> lcl_createSettingsInfo()
|
||||
{ u"ConsiderTextWrapOnObjPos"_ustr, HANDLE_CONSIDER_WRAP_ON_OBJPOS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"IgnoreFirstLineIndentInNumbering"_ustr, HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"NoGapAfterNoteNumber"_ustr, HANDLE_NO_GAP_AFTER_NOTE_NUMBER, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("DoNotJustifyLinesWithManualBreak"), HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("DoNotResetParaAttrsForNumFont"), HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("TableRowKeep"), HANDLE_TABLE_ROW_KEEP, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("IgnoreTabsAndBlanksForLineCalculation"), HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("LoadReadonly"), HANDLE_LOAD_READONLY, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("DoNotCaptureDrawObjsOnPage"), HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("ClipAsCharacterAnchoredWriterFlyFrames"), HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("UnxForceZeroExtLeading"), HANDLE_UNIX_FORCE_ZERO_EXT_LEADING, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("UseOldPrinterMetrics"), HANDLE_USE_OLD_PRINTER_METRICS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("TabsRelativeToIndent"), HANDLE_TABS_RELATIVE_TO_INDENT, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("Rsid"), HANDLE_RSID, cppu::UnoType<sal_Int32>::get(), 0},
|
||||
{ OUString("RsidRoot"), HANDLE_RSID_ROOT, cppu::UnoType<sal_Int32>::get(), 0},
|
||||
{ OUString("ProtectForm"), HANDLE_PROTECT_FORM, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("MsWordCompTrailingBlanks"), HANDLE_MS_WORD_COMP_TRAILING_BLANKS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("MsWordCompMinLineHeightByFly"), HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), 0},
|
||||
{ OUString("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("TabOverflow"), HANDLE_TAB_OVERFLOW, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("StylesNoDefault"), HANDLE_STYLES_NODEFAULT, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("ClippedPictures"), HANDLE_CLIPPED_PICTURES, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("BackgroundParaOverDrawings"), HANDLE_BACKGROUND_PARA_OVER_DRAWINGS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmbedFonts"), HANDLE_EMBED_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmbedOnlyUsedFonts"), HANDLE_EMBED_USED_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmbedLatinScriptFonts"), HANDLE_EMBED_LATIN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmbedAsianScriptFonts"), HANDLE_EMBED_ASIAN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmbedComplexScriptFonts"), HANDLE_EMBED_COMPLEX_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("TabOverSpacing"), HANDLE_TAB_OVER_SPACING, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("TreatSingleColumnBreakAsPageBreak"), HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("PropLineSpacingShrinksFirstLine"), HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("SubtractFlysAnchoredAtFlys"), HANDLE_SUBTRACT_FLYS, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("DisableOffPagePositioning"), HANDLE_DISABLE_OFF_PAGE_POSITIONING, cppu::UnoType<bool>::get(), 0},
|
||||
{ OUString("EmptyDbFieldHidesPara"), HANDLE_EMPTY_DB_FIELD_HIDES_PARA, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("ContinuousEndnotes"), HANDLE_CONTINUOUS_ENDNOTES, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("ProtectBookmarks"), HANDLE_PROTECT_BOOKMARKS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("ProtectFields"), HANDLE_PROTECT_FIELDS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("HeaderSpacingBelowLastPara"), HANDLE_HEADER_SPACING_BELOW_LAST_PARA, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("FrameAutowidthWithMorePara"), HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("GutterAtTop"), HANDLE_GUTTER_AT_TOP, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("FootnoteInColumnToPageEnd"), HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("ImagePreferredDPI"), HANDLE_IMAGE_PREFERRED_DPI, cppu::UnoType<sal_Int32>::get(), 0 },
|
||||
{ OUString("AutoFirstLineIndentDisregardLineSpace"), HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("HyphenateURLs"), HANDLE_HYPHENATE_URLS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("DoNotBreakWrappedTables"), HANDLE_DO_NOT_BREAK_WRAPPED_TABLES, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("AllowTextAfterFloatingTableBreak"), HANDLE_ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("JustifyLinesWithShrinking"), HANDLE_JUSTIFY_LINES_WITH_SHRINKING, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("NoNumberingShowFollowBy"), HANDLE_NO_NUMBERING_SHOW_FOLLOWBY, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("DropCapPunctuation"), HANDLE_DROP_CAP_PUNCTUATION, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("UseVariableWidthNBSP"), HANDLE_USE_VARIABLE_WIDTH_NBSP, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("ApplyTextAttrToEmptyLineAtEndOfParagraph"), HANDLE_APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("DoNotMirrorRtlDrawObjs"), HANDLE_DO_NOT_MIRROR_RTL_DRAW_OBJS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ OUString("PaintHellOverHeaderFooter"), HANDLE_PAINT_HELL_OVER_HEADER_FOOTER, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"DoNotJustifyLinesWithManualBreak"_ustr, HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"DoNotResetParaAttrsForNumFont"_ustr, HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"TableRowKeep"_ustr, HANDLE_TABLE_ROW_KEEP, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"IgnoreTabsAndBlanksForLineCalculation"_ustr, HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"LoadReadonly"_ustr, HANDLE_LOAD_READONLY, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"DoNotCaptureDrawObjsOnPage"_ustr, HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"ClipAsCharacterAnchoredWriterFlyFrames"_ustr, HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"UnxForceZeroExtLeading"_ustr, HANDLE_UNIX_FORCE_ZERO_EXT_LEADING, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"UseOldPrinterMetrics"_ustr, HANDLE_USE_OLD_PRINTER_METRICS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"TabsRelativeToIndent"_ustr, HANDLE_TABS_RELATIVE_TO_INDENT, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"Rsid"_ustr, HANDLE_RSID, cppu::UnoType<sal_Int32>::get(), 0},
|
||||
{ u"RsidRoot"_ustr, HANDLE_RSID_ROOT, cppu::UnoType<sal_Int32>::get(), 0},
|
||||
{ u"ProtectForm"_ustr, HANDLE_PROTECT_FORM, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"MsWordCompTrailingBlanks"_ustr, HANDLE_MS_WORD_COMP_TRAILING_BLANKS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"MsWordCompMinLineHeightByFly"_ustr, HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"TabAtLeftIndentForParagraphsInList"_ustr, HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"ModifyPasswordInfo"_ustr, HANDLE_MODIFYPASSWORDINFO, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), 0},
|
||||
{ u"MathBaselineAlignment"_ustr, HANDLE_MATH_BASELINE_ALIGNMENT, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"InvertBorderSpacing"_ustr, HANDLE_INVERT_BORDER_SPACING, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"CollapseEmptyCellPara"_ustr, HANDLE_COLLAPSE_EMPTY_CELL_PARA, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"SmallCapsPercentage66"_ustr, HANDLE_SMALL_CAPS_PERCENTAGE_66, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"TabOverflow"_ustr, HANDLE_TAB_OVERFLOW, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"UnbreakableNumberings"_ustr, HANDLE_UNBREAKABLE_NUMBERINGS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"StylesNoDefault"_ustr, HANDLE_STYLES_NODEFAULT, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"ClippedPictures"_ustr, HANDLE_CLIPPED_PICTURES, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"BackgroundParaOverDrawings"_ustr, HANDLE_BACKGROUND_PARA_OVER_DRAWINGS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmbedFonts"_ustr, HANDLE_EMBED_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmbedOnlyUsedFonts"_ustr, HANDLE_EMBED_USED_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmbedLatinScriptFonts"_ustr, HANDLE_EMBED_LATIN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmbedAsianScriptFonts"_ustr, HANDLE_EMBED_ASIAN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmbedComplexScriptFonts"_ustr, HANDLE_EMBED_COMPLEX_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmbedSystemFonts"_ustr, HANDLE_EMBED_SYSTEM_FONTS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"TabOverMargin"_ustr, HANDLE_TAB_OVER_MARGIN, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"TabOverSpacing"_ustr, HANDLE_TAB_OVER_SPACING, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"TreatSingleColumnBreakAsPageBreak"_ustr, HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"SurroundTextWrapSmall"_ustr, HANDLE_SURROUND_TEXT_WRAP_SMALL, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"ApplyParagraphMarkFormatToNumbering"_ustr, HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"PropLineSpacingShrinksFirstLine"_ustr, HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"SubtractFlysAnchoredAtFlys"_ustr, HANDLE_SUBTRACT_FLYS, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"DisableOffPagePositioning"_ustr, HANDLE_DISABLE_OFF_PAGE_POSITIONING, cppu::UnoType<bool>::get(), 0},
|
||||
{ u"EmptyDbFieldHidesPara"_ustr, HANDLE_EMPTY_DB_FIELD_HIDES_PARA, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"ContinuousEndnotes"_ustr, HANDLE_CONTINUOUS_ENDNOTES, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"ProtectBookmarks"_ustr, HANDLE_PROTECT_BOOKMARKS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"ProtectFields"_ustr, HANDLE_PROTECT_FIELDS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"HeaderSpacingBelowLastPara"_ustr, HANDLE_HEADER_SPACING_BELOW_LAST_PARA, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"FrameAutowidthWithMorePara"_ustr, HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"GutterAtTop"_ustr, HANDLE_GUTTER_AT_TOP, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"FootnoteInColumnToPageEnd"_ustr, HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"ImagePreferredDPI"_ustr, HANDLE_IMAGE_PREFERRED_DPI, cppu::UnoType<sal_Int32>::get(), 0 },
|
||||
{ u"AutoFirstLineIndentDisregardLineSpace"_ustr, HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"HyphenateURLs"_ustr, HANDLE_HYPHENATE_URLS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"DoNotBreakWrappedTables"_ustr, HANDLE_DO_NOT_BREAK_WRAPPED_TABLES, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"AllowTextAfterFloatingTableBreak"_ustr, HANDLE_ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"JustifyLinesWithShrinking"_ustr, HANDLE_JUSTIFY_LINES_WITH_SHRINKING, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"NoNumberingShowFollowBy"_ustr, HANDLE_NO_NUMBERING_SHOW_FOLLOWBY, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"DropCapPunctuation"_ustr, HANDLE_DROP_CAP_PUNCTUATION, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"UseVariableWidthNBSP"_ustr, HANDLE_USE_VARIABLE_WIDTH_NBSP, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"ApplyTextAttrToEmptyLineAtEndOfParagraph"_ustr, HANDLE_APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"DoNotMirrorRtlDrawObjs"_ustr, HANDLE_DO_NOT_MIRROR_RTL_DRAW_OBJS, cppu::UnoType<bool>::get(), 0 },
|
||||
{ u"PaintHellOverHeaderFooter"_ustr, HANDLE_PAINT_HELL_OVER_HEADER_FOOTER, cppu::UnoType<bool>::get(), 0 },
|
||||
|
||||
/*
|
||||
* As OS said, we don't have a view when we need to set this, so I have to
|
||||
|
@ -2336,7 +2336,7 @@ void SwXTextDocument::updateLinks( )
|
||||
if( !rLnkMan.GetLinks().empty() )
|
||||
{
|
||||
UnoActionContext aAction(&rDoc);
|
||||
rLnkMan.UpdateAllLinks( false, true, nullptr, "" );
|
||||
rLnkMan.UpdateAllLinks( false, true, nullptr, u""_ustr );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1980,8 +1980,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
|
||||
if (nContentType == ContentTypeId::POSTIT)
|
||||
{
|
||||
const SwViewOption* m_pViewOpt = m_pActiveShell->GetViewOptions();
|
||||
xPop->set_active("showcomments", m_pViewOpt->IsPostIts());
|
||||
xPop->set_active("showresolvedcomments", m_pViewOpt->IsResolvedPostIts());
|
||||
xPop->set_active(u"showcomments"_ustr, m_pViewOpt->IsPostIts());
|
||||
xPop->set_active(u"showresolvedcomments"_ustr, m_pViewOpt->IsResolvedPostIts());
|
||||
bRemovePostItEntries = false;
|
||||
}
|
||||
else if (nContentType == ContentTypeId::FOOTNOTE)
|
||||
@ -2014,8 +2014,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
|
||||
|
||||
if (bRemovePostItEntries)
|
||||
{
|
||||
xPop->remove("showcomments");
|
||||
xPop->remove("showresolvedcomments");
|
||||
xPop->remove(u"showcomments"_ustr);
|
||||
xPop->remove(u"showresolvedcomments"_ustr);
|
||||
xPop->remove(OUString::number(602));
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ void SwGlobalTree::ExecuteContextMenuAction(std::u16string_view rSelectedPopupEn
|
||||
}
|
||||
else if (rSelectedPopupEntry == u"updatelinks" || rSelectedPopupEntry == u"updateall")
|
||||
{
|
||||
m_pActiveShell->GetLinkManager().UpdateAllLinks(true, false, nullptr, "");
|
||||
m_pActiveShell->GetLinkManager().UpdateAllLinks(true, false, nullptr, u""_ustr);
|
||||
if (rSelectedPopupEntry == u"updateall")
|
||||
nSlot = FN_UPDATE_TOX;
|
||||
pCont = nullptr;
|
||||
|
@ -638,7 +638,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
|
||||
const IDocumentSettingAccess& rIDSA = rMaster.getIDocumentSettingAccess();
|
||||
if (rIDSA.get(DocumentSettingId::CONTINUOUS_ENDNOTES))
|
||||
{
|
||||
oGrabBag->GetGrabBag()["ContinuousEndnotes"] <<= true;
|
||||
oGrabBag->GetGrabBag()[u"ContinuousEndnotes"_ustr] <<= true;
|
||||
}
|
||||
|
||||
rSet.Put(*oGrabBag);
|
||||
|
@ -146,9 +146,9 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
|
||||
m_pImpl->SetDocumentSettingsProperty(u"NoGapAfterNoteNumber"_ustr, uno::Any(true));
|
||||
|
||||
// Enable only for new documents, since pasting from clipboard can influence existing doc
|
||||
m_pImpl->SetDocumentSettingsProperty("NoNumberingShowFollowBy", uno::Any(true));
|
||||
m_pImpl->SetDocumentSettingsProperty(u"NoNumberingShowFollowBy"_ustr, uno::Any(true));
|
||||
//paint background frames after header/footer when anchored in body
|
||||
m_pImpl->SetDocumentSettingsProperty("PaintHellOverHeaderFooter",uno::Any(true));
|
||||
m_pImpl->SetDocumentSettingsProperty(u"PaintHellOverHeaderFooter"_ustr,uno::Any(true));
|
||||
}
|
||||
|
||||
// Initialize RDF metadata, to be able to add statements during the import.
|
||||
|
@ -1954,54 +1954,54 @@ rtl::Reference<SwXTextGraphicObject> GraphicImport::createGraphicObject(uno::Ref
|
||||
}
|
||||
|
||||
// copy the image fill area properties
|
||||
xGraphicObject->setPropertyValue("FillBackground",
|
||||
xShapeProps->getPropertyValue("FillBackground"));
|
||||
xGraphicObject->setPropertyValue("FillBitmap",
|
||||
xShapeProps->getPropertyValue("FillBitmap"));
|
||||
xGraphicObject->setPropertyValue(u"FillBackground"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBackground"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmap"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmap"_ustr));
|
||||
xGraphicObject->setPropertyValue(
|
||||
"FillBitmapLogicalSize", xShapeProps->getPropertyValue("FillBitmapLogicalSize"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapMode",
|
||||
xShapeProps->getPropertyValue("FillBitmapMode"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapOffsetX",
|
||||
xShapeProps->getPropertyValue("FillBitmapOffsetX"));
|
||||
u"FillBitmapLogicalSize"_ustr, xShapeProps->getPropertyValue(u"FillBitmapLogicalSize"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapMode"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapMode"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapOffsetX"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapOffsetX"_ustr));
|
||||
xGraphicObject->setPropertyValue(
|
||||
"FillBitmapPositionOffsetX",
|
||||
xShapeProps->getPropertyValue("FillBitmapPositionOffsetX"));
|
||||
u"FillBitmapPositionOffsetX"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapPositionOffsetX"_ustr));
|
||||
xGraphicObject->setPropertyValue(
|
||||
"FillBitmapPositionOffsetY",
|
||||
xShapeProps->getPropertyValue("FillBitmapPositionOffsetY"));
|
||||
u"FillBitmapPositionOffsetY"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapPositionOffsetY"_ustr));
|
||||
xGraphicObject->setPropertyValue(
|
||||
"FillBitmapRectanglePoint",
|
||||
xShapeProps->getPropertyValue("FillBitmapRectanglePoint"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapSizeX",
|
||||
xShapeProps->getPropertyValue("FillBitmapSizeX"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapSizeY",
|
||||
xShapeProps->getPropertyValue("FillBitmapSizeY"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapStretch",
|
||||
xShapeProps->getPropertyValue("FillBitmapStretch"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapTile",
|
||||
xShapeProps->getPropertyValue("FillBitmapTile"));
|
||||
xGraphicObject->setPropertyValue("FillBitmapURL",
|
||||
xShapeProps->getPropertyValue("FillBitmapURL"));
|
||||
xGraphicObject->setPropertyValue("FillColor",
|
||||
xShapeProps->getPropertyValue("FillColor"));
|
||||
xGraphicObject->setPropertyValue("FillColor2",
|
||||
xShapeProps->getPropertyValue("FillColor2"));
|
||||
xGraphicObject->setPropertyValue("FillComplexColor",
|
||||
xShapeProps->getPropertyValue("FillComplexColor"));
|
||||
xGraphicObject->setPropertyValue("FillGradient",
|
||||
xShapeProps->getPropertyValue("FillGradient"));
|
||||
u"FillBitmapRectanglePoint"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapRectanglePoint"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapSizeX"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapSizeX"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapSizeY"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapSizeY"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapStretch"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapStretch"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapTile"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapTile"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillBitmapURL"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillBitmapURL"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillColor"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillColor"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillColor2"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillColor2"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillComplexColor"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillComplexColor"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillGradient"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillGradient"_ustr));
|
||||
xGraphicObject->setPropertyValue(
|
||||
"FillGradientStepCount", xShapeProps->getPropertyValue("FillGradientStepCount"));
|
||||
xGraphicObject->setPropertyValue("FillHatch",
|
||||
xShapeProps->getPropertyValue("FillHatch"));
|
||||
xGraphicObject->setPropertyValue("FillStyle",
|
||||
xShapeProps->getPropertyValue("FillStyle"));
|
||||
xGraphicObject->setPropertyValue("FillTransparence",
|
||||
xShapeProps->getPropertyValue("FillTransparence"));
|
||||
u"FillGradientStepCount"_ustr, xShapeProps->getPropertyValue(u"FillGradientStepCount"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillHatch"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillHatch"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillStyle"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillStyle"_ustr));
|
||||
xGraphicObject->setPropertyValue(u"FillTransparence"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillTransparence"_ustr));
|
||||
xGraphicObject->setPropertyValue(
|
||||
"FillTransparenceGradient",
|
||||
xShapeProps->getPropertyValue("FillTransparenceGradient"));
|
||||
u"FillTransparenceGradient"_ustr,
|
||||
xShapeProps->getPropertyValue(u"FillTransparenceGradient"_ustr));
|
||||
|
||||
m_pImpl->applyZOrder(xGraphicObject);
|
||||
|
||||
|
@ -766,7 +766,7 @@ void SectionPropertyMap::ApplySectionProperties( const uno::Reference< beans::XP
|
||||
{
|
||||
std::optional< PropertyMap::Property > pProp = getProperty( PROP_WRITING_MODE );
|
||||
if ( pProp )
|
||||
xSection->setPropertyValue( "WritingMode", pProp->second );
|
||||
xSection->setPropertyValue( u"WritingMode"_ustr, pProp->second );
|
||||
|
||||
if (rDM_Impl.GetSettingsTable()->GetEndnoteIsCollectAtSectionEnd())
|
||||
{
|
||||
|
@ -323,19 +323,19 @@ void WriterFilter::setTargetDocument(const uno::Reference<lang::XComponent>& xDo
|
||||
xSettings->setPropertyValue(u"TabOverSpacing"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"UnbreakableNumberings"_ustr, uno::Any(true));
|
||||
|
||||
xSettings->setPropertyValue("ClippedPictures", uno::Any(true));
|
||||
xSettings->setPropertyValue("BackgroundParaOverDrawings", uno::Any(true));
|
||||
xSettings->setPropertyValue("TreatSingleColumnBreakAsPageBreak", uno::Any(true));
|
||||
xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::Any(true));
|
||||
xSettings->setPropertyValue("DoNotCaptureDrawObjsOnPage", uno::Any(true));
|
||||
xSettings->setPropertyValue("DisableOffPagePositioning", uno::Any(true));
|
||||
xSettings->setPropertyValue("DropCapPunctuation", uno::Any(true));
|
||||
xSettings->setPropertyValue("PaintHellOverHeaderFooter", uno::Any(true));
|
||||
xSettings->setPropertyValue(u"ClippedPictures"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"BackgroundParaOverDrawings"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"TreatSingleColumnBreakAsPageBreak"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"PropLineSpacingShrinksFirstLine"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"DoNotCaptureDrawObjsOnPage"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"DisableOffPagePositioning"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"DropCapPunctuation"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"PaintHellOverHeaderFooter"_ustr, uno::Any(true));
|
||||
|
||||
// rely on default for HyphenateURLs=false
|
||||
// rely on default for APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH=true
|
||||
xSettings->setPropertyValue("DoNotMirrorRtlDrawObjs", uno::Any(true));
|
||||
xSettings->setPropertyValue("ContinuousEndnotes", uno::Any(true));
|
||||
xSettings->setPropertyValue(u"DoNotMirrorRtlDrawObjs"_ustr, uno::Any(true));
|
||||
xSettings->setPropertyValue(u"ContinuousEndnotes"_ustr, uno::Any(true));
|
||||
}
|
||||
|
||||
void WriterFilter::setSourceDocument(const uno::Reference<lang::XComponent>& xDoc)
|
||||
|
@ -417,7 +417,7 @@ void UnoDialogControl::PrepareWindowDescriptor( css::awt::WindowDescriptor& rDes
|
||||
( !aImageURL.isEmpty() ))
|
||||
{
|
||||
OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(PROPERTY_DIALOGSOURCEURL), uno::Any(aImageURL));
|
||||
xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl, "" );
|
||||
xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl, u""_ustr );
|
||||
ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::Any( xGraphic ), true );
|
||||
}
|
||||
}
|
||||
@ -632,7 +632,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang
|
||||
( !aImageURL.isEmpty() ))
|
||||
{
|
||||
OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(GetPropertyName(BASEPROPERTY_DIALOGSOURCEURL)), uno::Any(aImageURL));
|
||||
xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl, "" );
|
||||
xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl, u""_ustr );
|
||||
}
|
||||
ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC), uno::Any( xGraphic ), true );
|
||||
break;
|
||||
|
@ -62,7 +62,7 @@ uno::Reference< graphic::XGraphic >
|
||||
ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& xOutGraphicObj, const OUString& _rURL )
|
||||
{
|
||||
xOutGraphicObj = nullptr;
|
||||
return ImageHelper::getGraphicFromURL_nothrow( _rURL, "" );
|
||||
return ImageHelper::getGraphicFromURL_nothrow( _rURL, u""_ustr );
|
||||
}
|
||||
|
||||
css::uno::Reference< css::graphic::XGraphic >
|
||||
|
@ -628,7 +628,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf107612)
|
||||
CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testPartialKoreanJamoComposition)
|
||||
{
|
||||
OUString aStr = u"은"_ustr;
|
||||
vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
|
||||
vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
|
||||
|
||||
ScopedVclPtrInstance<VirtualDevice> pOutDev;
|
||||
pOutDev->SetFont(aFont);
|
||||
@ -664,7 +664,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testPartialKoreanJamoComposition)
|
||||
CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testPartialArabicComposition)
|
||||
{
|
||||
OUString aStr = u"سُكُونْ"_ustr;
|
||||
vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
|
||||
vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
|
||||
|
||||
ScopedVclPtrInstance<VirtualDevice> pOutDev;
|
||||
pOutDev->SetFont(aFont);
|
||||
|
@ -5012,7 +5012,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf159817)
|
||||
// Tests that kerning is correctly applied across color changes
|
||||
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf61444)
|
||||
{
|
||||
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
|
||||
aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
|
||||
saveAsPDF(u"tdf61444.odt");
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
|
||||
@ -5061,7 +5061,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf61444)
|
||||
// tdf#124116 - Tests that track-changes inside a grapheme cluster does not break positioning
|
||||
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf124116TrackUntrack)
|
||||
{
|
||||
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
|
||||
aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
|
||||
saveAsPDF(u"tdf124116-hebrew-track-untrack.odt");
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
|
||||
@ -5118,7 +5118,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf124116TrackUntrack)
|
||||
// tdf#134226 - Tests that shaping is not broken by invisible spans
|
||||
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf134226)
|
||||
{
|
||||
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
|
||||
aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
|
||||
saveAsPDF(u"tdf134226-shadda-in-hidden-span.fodt");
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
|
||||
@ -5176,7 +5176,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf134226)
|
||||
// tdf#71956 - Tests that glyphs can be individually styled
|
||||
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf71956)
|
||||
{
|
||||
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
|
||||
aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
|
||||
saveAsPDF(u"tdf71956-styled-diacritics.fodt");
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
|
||||
|
@ -883,8 +883,8 @@ void SvmTest::checkTextArrayWithContext(const GDIMetaFile& rMetaFile)
|
||||
{ "length", "4" },
|
||||
{ "layoutcontextindex", "0" },
|
||||
{ "layoutcontextlength", "5" } });
|
||||
assertXPathContent(pDoc, "/metafile/textarray[1]/dxarray"_ostr, "15 20 25 ");
|
||||
assertXPathContent(pDoc, "/metafile/textarray[1]/text"_ostr, "123456");
|
||||
assertXPathContent(pDoc, "/metafile/textarray[1]/dxarray"_ostr, u"15 20 25 "_ustr);
|
||||
assertXPathContent(pDoc, "/metafile/textarray[1]/text"_ostr, u"123456"_ustr);
|
||||
}
|
||||
|
||||
void SvmTest::testTextArrayWithContext()
|
||||
@ -893,7 +893,7 @@ void SvmTest::testTextArrayWithContext()
|
||||
ScopedVclPtrInstance<VirtualDevice> pVirtualDev;
|
||||
setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
|
||||
sal_Int32 const aDX[] = { 10, 15, 20, 25, 30, 35 };
|
||||
pVirtualDev->DrawPartialTextArray(Point(4, 6), "123456", KernArraySpan(aDX), {}, 0, 5, 1, 4);
|
||||
pVirtualDev->DrawPartialTextArray(Point(4, 6), u"123456"_ustr, KernArraySpan(aDX), {}, 0, 5, 1, 4);
|
||||
|
||||
checkTextArrayWithContext(writeAndReadStream(aGDIMetaFile));
|
||||
checkTextArrayWithContext(readFile(u"textarraycontext.svm"));
|
||||
|
@ -1024,7 +1024,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetRightBottomAlignedMultiLineTextRect)
|
||||
CPPUNIT_TEST_FIXTURE(VclTextTest, testPartialTextArraySizeMatch)
|
||||
{
|
||||
OUString aWater = u"Water"_ustr;
|
||||
vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
|
||||
vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
|
||||
|
||||
ScopedVclPtrInstance<VirtualDevice> pOutDev;
|
||||
pOutDev->SetFont(aFont);
|
||||
|
@ -51,7 +51,7 @@ namespace {
|
||||
SvMemoryStream aOStm(65535, 65535);
|
||||
// Use fastest compression "1"
|
||||
css::uno::Sequence<css::beans::PropertyValue> aFilterData{
|
||||
comphelper::makePropertyValue("Compression", sal_Int32(1)),
|
||||
comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(1)),
|
||||
};
|
||||
vcl::PngImageWriter aPNGWriter(aOStm);
|
||||
aPNGWriter.setParameters(aFilterData);
|
||||
|
@ -73,6 +73,7 @@ X11SalInstance::X11SalInstance(std::unique_ptr<SalYieldMutex> pMutex)
|
||||
, mpXLib(nullptr)
|
||||
{
|
||||
ImplSVData* pSVData = ImplGetSVData();
|
||||
// [-loplugin:ostr] if we use a literal here, we get use-after-free on shutdown
|
||||
pSVData->maAppData.mxToolkitName = OUString("x11");
|
||||
m_bSupportsOpenGL = true;
|
||||
#if HAVE_FEATURE_SKIA
|
||||
|
@ -245,8 +245,10 @@ void GtkInstance::EnsureInit()
|
||||
|
||||
ImplSVData* pSVData = ImplGetSVData();
|
||||
#ifdef GTK_TOOLKIT_NAME
|
||||
// [-loplugin:ostr] if we use a literal here, we get use-after-free on shutdown
|
||||
pSVData->maAppData.mxToolkitName = OUString(GTK_TOOLKIT_NAME);
|
||||
#else
|
||||
// [-loplugin:ostr] if we use a literal here, we get use-after-free on shutdown
|
||||
pSVData->maAppData.mxToolkitName = OUString("gtk3");
|
||||
#endif
|
||||
|
||||
|
@ -571,7 +571,7 @@ namespace xmloff
|
||||
{
|
||||
try {
|
||||
props->setPropertyValue(
|
||||
"Referer", css::uno::Any(m_rFormImport.getGlobalContext().GetBaseURL()));
|
||||
u"Referer"_ustr, css::uno::Any(m_rFormImport.getGlobalContext().GetBaseURL()));
|
||||
} catch (css::uno::Exception &) {
|
||||
TOOLS_INFO_EXCEPTION("xmloff.forms", "setPropertyValue Referer failed");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user