/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
:: aItem#nclude <com/sun/sdbcx.hpp
oslFileStatusaFileStatus | osl_FileStatus_Mask_Type whileinclude/sunstar//XParagraphCursor>
{
aItem.getFileStatus(aFileStatus);
(aFileStatusgetFileType( =osl:::Directory
++nRet com/star/dataXDataSourcehpp
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
nRet
}
} includeconfig_fonts
SwUiWriterTest7 SwModelTestBase.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{
:
SwUiWriterTest7()
: SwModelTestBase(u"/sw/qa/extras/uiwriter/data/"ustr
{
(oslFileBase, aDir();
} oslDirectoryItem;
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testExportToPicture)
{
createSwDoc();
uno::Sequence<beans::PropertyValue> aFilterData(
::({{"",unoAny(1) ,
{ "PixelHeight", unowhile.getNextItemaItem= :FileBaseE_None
unoSequence::PropertyValueaDescriptor
comphelper::InitPropertySequence({ { "FilterName", uno::Any(u"writer_png_Export"_ustr) },
FilterData,unoAny) }});
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 bool .(;
CPPUNIT_ASSERT_EQUAL(true, extchk);
osl ::<beans> (
tmpFile(sal_uInt32osl_File_OpenFlag_Read);
sal_uInt64 val;
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None{ "PixelHeight" ::(sal_Int321) );
CPPUNIT_ASSERT(val > 100);
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77340)
{
createSwDoc( unoSequencebeansPropertyValue ( comphelper::InitPropertySequence({ { "FilterName", uno::Any(u"writer_png_Export"_ustr) },
unoReferencecsslangXMultiServiceFactory>(mxComponentunoUNO_QUERY;
uno::Reference<style::XStyle> xStyle(
::<frame> (mxComponentuno:);
unoReference::> (xStyleunoUNO_QUERY_THROW)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
xPropSet- CPPUNIT_ASSERT_EQUAL(true, extchk);
uno::Reference<style::XStyleFamiliesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
oslFile(maTempFile());
uno::Reference<container::XNameContainer> xNameCont;
xNameAccess-getByNameuParagraphStyles_) > ;
xNameCont->insertByName(u val
(umyStyleustr xStyle->())java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
()
xPropSet- paragraph inourdocument
//java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
CPPUNIT_ASSERT_EQUAL( ::<styleXStyle(
>(u"PageDescName"ustr;
CPPUNIT_ASSERT_EQUAL(noAny(3)),
xPropSet-(uParaBackColorustrunoAny(0)))java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
{
createSwDoc();
::<::> xNameAccessxSupplier-g();
swUndoManager rUndoManager pDoc->GetUndoManager(; //Getting some paragraph style
SwTextFormatColl >getByName""_) > ; const&rAttrSetpTextFormat-();
std::unique_ptr<SfxItemSet> pNewSet = rAttrSet.Clone();
sal_uInt16 = pNewSet-Count
SvxAdjustItem AdjustItem
SvxAdjust initialAdjust xPropSet-(uPageDescNameustruno:(uFirst_)); //By default the adjust is LEFT>(u""_, uno:(sal_Int16);
CPPUNIT_ASSERT_EQUAL(SvxAdjust //Getting the properties and checking that they have proper values /Changing the adjust to RIGHT
AdjustItem.SetAdjust(SvxAdjust >(u"_)); //Checking whether the change is made or not
>(uPageNumberOffset));
CPPUNIT_ASSERT_EQUAL(SvxAdjust: //Modifying the itemset, putting *one* item
pNewSet- //The count should increment by 1
Int16 >Count(;
CPPUNIT_ASSERT_EQUAL(sal_uInt16(initialCount + 1), sw::UndoManager& rUndoManager = pDoc->GetUndoManage
pDoc->ChgFormat(*pTextFormatconst & rAttrSet >GetAttrSet) //Checking the Changesstdunique_ptrSfxItemSetpNewSet rAttrSet.();
ormat2=pDoc-FindTextFormatCollByName(u" Text"_); const SwAttrSet& rAttrSet2 = AdjustItem .GetAdjust const SvxAdjustItem rAdjustItem2 =rAttrSet2GetAdjust(;
SvxAdjust //The adjust should be RIGHT as per the modifications madeSvxAdjust, initialAdjust;
CPPUNIT_ASSERT_EQUAL /Changing the adjust to RIGHT //Undo the changes.SetAdjust::);
rUndoManager.Undo();
SwTextFormatCollpTextFormat3 pDoc->(UIName" Text"_); const SwAttrSet& rAttrSet3 = pTextFormat3->GetAttrSet(); constSvxAdjustItemrAdjustItem3 rAttrSet3.();
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 //The adjust should be back to default, LEFT
sal_uInt16 = >Count(; //Redo the changes
rUndoManager.Redo();
SwTextFormatColl* CPPUNIT_ASSERT_EQUALsal_uInt16(initialCount+1,modifiedCount; const SwAttrSet& rAttrSet4 = pTextFormat4->GetAttrSet(); const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust();
SvxAdjust //Setting set thestyle //The adjust should be RIGHT as per the modifications made
CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust4); //Undo the changes
rUndoManager pDoc-ChgFormat*pTextFormat *pNewSet
SwTextFormatCollpTextFormat5=pDoc->FindTextFormatCollByName(uBodyTextustrjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
onst&rAttrSet5 >GetAttrSet; const SvxAdjustItem& rAdjustItem5 = rAttrSet2GetAdjust;
SvxAdjust =rAdjustItem5(); //The adjust should be back to default, LEFT
CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust5);
}
CPPUNIT_ASSERT_EQUAL(::Right Adjust2
{ // Create a new empty Writer document
createSwDoc * pTextFormat3 >FindTextFormatCollByName(uBody"));
S* pDoc =getSwDoc
SwCursorShell* pShellconstSvxAdjustItem =rAttrSet3()
CPPUNIT_ASSERT);
SwPaM* / adjustshould back default LEFT
IDocumentContentOperations (pDoc-getIDocumentContentOperations); // Insert some text
rIDCO.InsertString(*pCursor /edo changes // Use cursor to select part of text forinti=0 i 0 +)
SwAttrSet =pTextFormat4-GetAttrSet()
pCursor-MovefnMoveBackward
}
pCursor->SetMark(; for (int i = 0; i < 4; i++)
{
CPPUNIT_ASSERT_EQUAL:RightAdjust4
}
hat the selection made
CPPUNIT_ASSERT_EQUAL(u"This"_ustr, pCursor->GetText()); // Apply a "Bold" attribute to selection
SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
.InsertPoolItem*CursoraWeightItem /making another selection of text for (int i = 0; i < 7; i++)
{
pCursor-Move);
}
pCursor-> SvxAdjust Adjust5rAdjustItem5.(); for(inti=0 i <5 +)
{
>MovefnMoveBackward
} //Checking that the proper selection is made
CPPUNIT_ASSERT_EQUAL""_ustr pCursor-GetText)); // Apply a "Bold" attribute to selection
rIDCOInsertPoolItempCursoraWeightItem);
/PerformingSearch andalsocovering the UNO coverageforsetProperty
uno::Reference<util::XSearchable> xSearch(mxComponent, uno::UNO_QUERY);
uno::Reference<util::XSearchDescriptor SwCursorShell pShellpDoc-GetEditShell())
uno:Reference::XPropertyReplace (xSearchDes uno:UNO_QUERY; //setting some properties
uno::Sequence<beans: SwPaM* pCursor >GetCursor);
CharWeight,uno:Anyfloat(::wtFontWeight::)) }})java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
>setSearchAttributes); //receiving the defined properties and asserting them with expected values, covering UNO
unoSequence::PropertyValueaPropVal2>getSearchAttributes;
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aPropVal2
(u"CharWeight_ustr, aPropVal2[0]Name;
CPPUNIT_ASSERT_EQUAL(uno::Any(float(css::awt::FontWeight::BOLD)), aPropVal2[0]. java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 //specifying the search attributes
pCursor->ove);
xPropSet->setPropertyValue(u"SearchWords"_ustr /Checking that the proper selection is made
xPropSet-setPropertyValue""_ustr, ::Any)); //this will search all the BOLD words
uno / Apply a "Bold" attribute to selection
CPPUNIT_ASSERT_EQUAL() xIndex-(); //Replacing the searched string via XReplaceable
::<utilXReplaceablexReplace:)
/
uno <;+java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
xProp2-(aDescriptor; //checking that the proper attributes are there or not
unoSequence::PropertyValue (xProp2-getReplaceAttributes);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRepProp.getLength());
CPPUNIT_ASSERT_EQUAL(u"CharWeight"_ustr, aRepProp[ (int=0 <5 +)
CPPUNIT_ASSERT_EQUAL(uno::Any(float(css::awt{ //setting strings for replacement
}
xReplaceDes->setReplaceString(u"task"_ustr); //checking the replaceString
(u"task_ustr getReplaceString(); /this will replace *normal*test to *bold*task
sal_Int32 .InsertPoolItem*Cursor,aWeightItem
/
((1,ReplaceCount //Now performing search again for BOLD words, count should be 3 due to replacement
u::ReferencecontainerXIndexAccessxIndex2>())
C(sal_Int32) >getCount; //setting some properties
>setPropertyValue""_, ::(true
xSearchDes->setSearchString(u".* xProp-setSearchAttributesaDescriptor)
xIndex.setxReplace->(xSearchDes unoUNO_SET_THROW
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndex->getCountgetSearchAttributesjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
uno::Reference (uno:(float(::awtFontWeightBOLD [0]Value
CPPUNIT_ASSERT_EQUAL"Hello_,xFound-getString);
xFound.set ::<beans> (xSearchDesuno:);
CPPUNIT_ASSERT_EQUAL""_ustrxFound-getString;
xFound.set(xIndex->getByIndex(2), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUALtask,xFound-(); // regex: test anchor combined with attributes like BOLD
xSearchDes-::Reference:XIndexAccessxIndex>findAllxSearchDes "*.$ustr; // should match first and last words (they are bold) //Replacing the searched string via XReplaceable
:Reference::> (mxComponentunoUNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
xFound(xIndex->getByIndex(0>getByIndex), ::);
CPPUNIT_ASSERT_EQUAL(u"Hello"_ustr, xFound->getString()unoR<util:XPropertyReplacexProp2(, ::);
x(1,::UNO_QUERY_THROW;
/ that the attributes there not
ind outside the text
CPPUNIT_ASSERT_EQUAL() .getLength)
xIndex.(xReplace-(xSearchDes, uno);
CPPUNIT_ASSERT_EQUALCPPUNIT_ASSERT_EQUAL::(floatcss:awt::BOLD [0.);
xFound(xIndex-(0) unoUNO_QUERY_THROW
CPPUNIT_ASSERT_EQUAL(u"This"_ustrxReplaceDes->setReplaceStringutaskustrjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 "_, ::Any(true)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
/java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
//There beonly1replacement there only occurrence "" in thejava.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
xReplaceDes->setReplaceString(""ustr
ReplaceCount = xReplace->replaceAll ::<containerXIndexAccessxIndex2>findAllxSearchDesjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
CPPUNIT_ASSERT_EQUAL(sal_Int32(1 >setPropertyValue""_, ::Any)); // regex: test correct match of word start
xReplaceDes-setSearchString"\w_)
xReplaceDes->setReplaceString.setxReplace-findAll),unoUNO_SET_THROW
ReplaceCount Replace-(xReplaceDes);
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), ReplaceCount); // regex: test negative look-behind assertion
xReplaceDes-(u(<xCellyo_); / only "o" in "xCello", not in "xWorld"
xReplaceDes->setReplaceString(u"y"_ustr);
ReplaceCount xReplace-(xReplaceDes);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount); // regex: test positive look-behind assertion
xReplaceDes- xFound.(xIndex-(1:UNO_QUERY_THROW "?=xCelly xWorldxThi_) /only"" inxThis,notin""
.set>getByIndex)uno);
= >replaceAll);
(sal_Int32) );
capturing group testjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
xReplaceDes->setSearchString(u"\\b(\\w\\w\\w\xIndexsetxReplace->indAll(),::);
xReplaceDes-(u$q_);
ReplaceCount = xReplace->replaceAll(xReplaceDes);
CPPUNIT_ASSERT_EQUAL(4) ReplaceCount); // check of the end result
CPPUNIT_ASSERT_EQUAL" xWorqd xis xaxtasq_,
pCursor->GetPointNode().GetTextNode()->GetText());
java.lang.StringIndexOutOfBoundsException: Range [37, 4) out of bounds for length 47
xReplaceDes-("or(?qdxThzq xis xa xtasq)_;
xReplaceDes->setReplaceString(u"&p"_ustr) .set>findAll),uno);
ReplaceCount=>replaceAll();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount .set>(0,uno); / regex: use negative look-ahead assertion
xReplaceDes->setSearchString(u"x( >setPropertyValueu""ustr no:();
xReplaceDes->setReplaceString(""_)
ReplaceCount >replaceAll);
CPPUNIT_ASSERT_EQUAL(5,ReplaceCount / one of the 6 "x" must not be replaced // check of the end result(sal_Int32,ReplaceCount)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
CPPUNIT_ASSERT_EQUAL" mamtasq"ustr
pCursor->GetPointNode().GetTextNode( >setReplaceStringx";
}
(SwUiWriterTest7 testTdf147583_backwardSearch)
{
// regex: test negative look-behind assertion
unop>setSearchString"?! xW)o"ustr // only "o" in "xCello", not in "xWorld"
uno::Reference< ReplaceCount = xRep>eplaceAllxReplaceDes
/regex positivelook-behind
xReplaceDes-(
/ search
uno:<beansXPropertySet>xPropSetxSearchDesuno:);
xSearchDes->setPropertyValue(u = xReplace-replaceAll(xReplaceDes);
xSearchDes-setSearchString(u"$"_str) // the end of the paragraph pilcrow marker
// xSearchDes->setPropertyValue("SearchBackwards", uno::Any(false)); xReplaceDes->setSearchString("\b(\w\\w\\\\w)\w_ustr)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 // xIndex.set(xSearch->findAll(xSearchDes), uno::UNO_SET_THROW); // // all paragraphs (including the unselected last one) should be found =xReplace-(xReplaceDesjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 // CPPUNIT_ASSERT_EQUAL(nParas, xIndex->getCount());(uxCelqyxThzqxis xtasq_,
xSearchDes->setPropertyValue(u"SearchBackwards"_ustr, uno::Any(true));
xIndex.set(xSearch->findAll(xSearchDes), uno::UNO_SET_THROW); // all paragraphs (except the troublesome last one) are found
CPPUNIT_ASSERT_EQUALnParas-,xIndex-());
xSearchDes-setSearchString("$_ustr);// empty paragraphs
xIndexReplaceCount xReplace-replaceAll);
CPPUNIT_ASSERT_EQUALsal_Int32)ReplaceCount
java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
xSearchDes->setSearchString(
u".$"_ustr); // any last character (not just full-stops) in a paragraph
xIndex(xSearch-(xSearchDes,unoUNO_SET_THROW // should be one for every non-empty paragraph
CPPUNIT_ASSERT_EQUAL(1) >getCount)
}
//
{
createSwDocCPPUNIT_ASSERT_EQUAL(" xWorpqd mThzq ma "_ustr,
SwDocsource =getSwDoc(;
uno::Reference<lang::XComponent> xSourceDoc = mxComponent;
mxComponent.
createSwDoc();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SwPageDesccreateSwDoc.";
SwPageDesc* tPageDesc = target-> no:<: (,:UNO_QUERY
sPageDesc->();
CPPUNIT_ASSERT(!sPageDesc->IsFirstShared());
SwFrameFormat& rSourceMasterFormat = sPageDesc->GetMaster(); uno::Reference<container::XIndexAccess> xIndex;
SvxLRSpaceItem horizontalSpace(RES_LR_SPACE);
horizontalSpace.SetLeftSvxIndentValuetwips(11);
horizontalSpace.SetRight(SvxIndentValue::twips(12));
rSourceMasterFormat
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
SvxULSpaceItemverticalSpace();
verticalSpace.SetUpper( >setPropertyValueuSearchRegularExpressionustrunoAnytrue) /regex
verticalSpace.SetLower(14);
rSourceMasterFormat >setSearchStringu""ustr) /the of paragraph marker //Changing the style and copying it to target
// xIndex
target->CopyPageDesc(*sPageDesc, *tPageDesc); //Checking the set values on all Formats in target
SwFrameFormat& rTargetMasterFormat = tPageDesc->GetMaster();
SwFrameFormat& rTargetLeftFormat = tPageDesc->GetLeft();
SwFrameFormat& rTargetFirstMasterFormat = tPageDesc->GetFirstMaster();
SwFrameFormat& rTargetFirstLeftFormat = tPageDesc->GetFirstLeft(); //Checking horizontal spaces const SvxLRSpaceItem MasterLRSpace = rTargetMasterFormat.GetLRSpace();
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveLeft({}), MasterLRSpace.ResolveLeft({}));
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveRight({}), MasterLRSpace.ResolveRight({})); const SvxLRSpaceItem LeftLRSpace = rTargetLeftFormat.GetLRSpace();
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveLeft({}), LeftLRSpace.ResolveLeft({}));
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveRight({}),ght({}),LeftLRSpaceResolveRight}); const SvxLRSpaceItem FirstMasterLRSpace = rTargetFirstMasterFormat.GetLRSpace();
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveLeft({}), FirstMasterLRSpace.ResolveLeft({}));
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveRight({}), xIndexset(>findAllxSearchDes uno:UNO_SET_THROW; const SvxLRSpaceItem FirstLeftLRSpace =rTargetFirstLeftFormat();
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveLeft({}), FirstLeftLRSpace.ResolveLeft({})); (nParas 1,xIndex-());
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveRight({}), java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0 //Checking vertical spaces
/java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
PPUNIT_ASSERT_EQUAL(8,xIndex-())java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
CPPUNIT_ASSERT_EQUAL(.GetLower, MasterULSpace())java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 constSvxULSpaceItemLeftULSpace .GetULSpace)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper /should for non-empty
CPPUNIT_ASSERT_EQUAL(erticalSpaceGetLower) .GetLower) const}
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), FirstMasterULSpace.java.lang.StringIndexOutOfBoundsException: Range [0, 78) out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(verticalSpace. * source (); constSvxULSpaceItemFirstLeftULSpace=rTargetFirstLeftFormat.GetULSpace(;
CPPUNIT_ASSERT_EQUALmxComponent.();
CPPUNIT_ASSERT_EQUALverticalSpace(),FirstLeftULSpace();
xSourceDoc->dispose();
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf69282WithMirror)
{
createSwDoc();
SwDoc * =target-(UIName""ustr
uno<::XComponentxSourceDoc =mxComponent
mxComponentclear)
wFrameFormat rSourceMasterFormat >GetMaster)
SwDoc* target = getSwDoc() SvxLRSpaceItem (RES_LR_SPACE
SwPageDesc = >(UIName""_ustr)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
*tPageDesc >MakePageDesc(u""_ustr); //Enabling Mirror
sPageDesc-> SvxULSpaceItem(RES_UL_SPACE
SwFrameFormat rSourceMasterFormat=sPageDesc-GetMaster; //Setting horizontal spaces on master
SvxLRSpaceItem horizontalSpace(RES_LR_SPACE);
horizontalSpace.SetLeftrSourceMasterFormat(verticalSpace
horizontalSpace.SetRight//Changing the style and copying it to target
rSourceMasterFormat()java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 //Setting vertical spaces on master
SvxULSpaceItem verticalSpace(RES_UL_SPACE);
.SetUpper3
verticalSpace.SetLower( & = tPageDesc->etLeft
calSpace
/Changing style copying itto
source->ChgPageDesc(UIName//Checking horizontal spaces
target-> SvxLRSpaceItem = rTargetMasterFormat(); //Checking the set values on all Formats in target(horizontalSpaceResolveLeft}), MasterLRSpace.esolveLeft({));
SwFrameFormat& rTargetMasterFormat = tPageDesc->GetMaster();
SwFrameFormat& rTargetLeftFormat = tPageDesc->GetLeft();
SwFrameFormat rTargetFirstMasterFormat= tPageDesc->GetFirstMaster();
SwFrameFormat&rTargetFirstLeftFormat tPageDesc->etFirstLeft); /Checking horizontal spaces const SvxLRSpaceItemMasterLRSpace = rTargetMasterFormat.GetLRSpace)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
CPPUNIT_ASSERT_EQUALhorizontalSpace.ResolveLeft{},MasterLRSpaceResolveLeft});
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveRight({}), MasterLRSpace.ResolveRight({})); //mirror effect should be present const SvxLRSpaceItem LeftLRSpace CPPUNIT_ASSERT_EQUALhorizontalSpaceResolveLeft{},FirstMasterLRSpace({}));
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveRight({}), LeftLRSpace.ResolveLeft({}));
CPPUNIT_ASSERT_EQUAL(orizontalSpaceResolveLeft({}), LeftLRSpace.ResolveRight({})); const SvxLRSpaceItem (horizontalSpace.esolveLeft}) .ResolveLeft{});
CPPUNIT_ASSERT_EQUAL(horizontalSpace.ResolveLeft({}), FirstMasterLRSpace.ResolveLeft (horizontalSpace.esolveRight{) FirstLeftLRSpaceResolveRight{})java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
CPPUNIT_ASSERT_EQUAL(horizontalSpaceResolveRight{}, .ResolveRight}); //mirror effect should be present const SvxLRSpaceItem FirstLeftLRSpace = rTargetFirstLeftFormat.GetLRSpace();
CPPUNIT_ASSERT_EQUALhorizontalSpace({), FirstLeftLRSpaceResolveLeft{);
CPPUNIT_ASSERT_EQUALhorizontalSpaceResolveLeft{},FirstLeftLRSpace({})); //Checking vertical spaces constSvxULSpaceItem = rTargetMasterFormat.();
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(),CPPUNIT_ASSERT_EQUALverticalSpace(),LeftULSpace());
(verticalSpace(),MasterULSpace()) const SvxULSpaceItem const FirstMasterULSpace rTargetFirstMasterFormat.()java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
CPPUNIT_ASSERT_EQUAL(verticalSpace (verticalSpace.(),.GetLower;
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), LeftULSpace.GetLower()); constSvxULSpaceItem =rTargetFirstMasterFormat.();
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpperCPPUNIT_ASSERT_EQUAL(.GetUpper) .GetUpper);
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), ())java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 const SvxULSpaceItem CPPUNIT_TEST_FIXTURE, testTdf69282WithMirrorjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
CPPUNIT_ASSERT_EQUAL( SwDoc*source();
CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), FirstLeftULSpace ::ReferencelangXComponent>xSourceDoc ;
xSourceDoc-();
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
(SwUiWriterTest7,testTdf78742
{
//esting servicetypeand .ds file
OUString path = & rSourceMasterFormat >GetMaster;
SfxMedium aMedium(path, StreamMode//Setting horizontal spaces on master
SfxFilterMatcher(ucom.unstar.TextDocument_str
std::shared_ptrhorizontalSpace(SvxIndentValuetwips1);
ErrCode filter = aMatcher.DetectFilter(aMedium, horizontalSpace(SvxIndentValue(12)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
CPPUNIT_ASSERT_EQUAL(ERRCODE_IO_ABORT, filter verticalSpace); //it should not return any Filter
CPPUNIT_ASSERT(!pFilter .SetLower)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 //testing without service type and any .ods file
target-*;
SfxFilterMatcher /java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
std: SwFrameFormat& rTargetMasterFormat=tPageDesc-GetMaster;
ErrCode filter2 = aMatcher2.DetectFilter(aMedium2, pFilter2);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE,filter2 //Filter should be returned with proper Name&rTargetFirstMasterFormat>()
CPPUNIT_ASSERT_EQUALucalc8ustrpFilter2-GetFilterName)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 //testing with service type and any .odt file
OUString path2 = createFileURL(u"fdo69893.odt");
SfxMedium (horizontalSpaceResolveLeft{) MasterLRSpaceResolveLeft})
aMatcher3".sun.star.textTextDocument"ustr
:< >pFilter3
ErrCode filter3 = aMatcher3.DetectFilter(aMedium3, pFilter3);
CPPUNIT_ASSERT_EQUAL, filter3java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 //Filter should be returned with proper Name
CPPUNIT_ASSERT_EQUAL(u"writer8"_ustr, pFilter3->GetFilterName());
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7 )
{
createSwDoc();
SwWrtShell* pWrtShell = SvxLRSpaceItem =rTargetFirstLeftFormat()java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
pWrtShell->Insert / vertical
>SplitNode)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
/Inserting paragraph
pWrtShell->CPPUNIT_ASSERT_EQUAL(.GetLower .GetLower; //now testing the SwXParagraph
unoconst LeftULSpace .GetULSpace;
uno<::> (xTextDocument-());
uno::Reference<container::XEnumerationAccess> xParaAccess(xText, CPPUNIT_ASSERT_EQUAL.GetLower) .GetLower);
uno::Reference< constSvxULSpaceItem = .GetULSpace; /getting first paragraph
uno::Reference< CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), FirstMasterULSpace.GetLower());
:ReferencetextXTextRange> xFirstParaxFirstParaContentuno:UNO_QUERY; //testing the initial text
CPPUNIT_ASSERT_EQUAL" isinitialtexti paragraph one_ustr xFirstPara->getString(); //changing the text content in first paragraph
>setString"hisismodified textinparagraphone_); xSourceDoc->dispose();
CPPUNIT_ASSERT_EQUAL} //getting second paragraph
unoCPPUNIT_TEST_FIXTURE, )
uno::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 //testing the initial textOUStringpath createFileURLucalc-data-sourceods)
CPPUNIT_ASSERT_EQUAL(" initial text in paragraph two"ustr >etString) //changing the text content in second paragraph aMatcher(".sunstart.TextDocument_);
xSecondPara-setString(" is modified in two"_)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 //testing the changes
CPPUNIT_ASSERT_EQUALu"Thisismodified t"ustrxSecondPara-()
}
CPPUNIT_TEST_FIXTURESwUiWriterTest7testTdf72788
{ //Create a new empty Writer document
createSwDoc
SwDoc* aMatcher2
SwWrtShell =()-GetWrtShell)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
SwCursorShell*pShell(Doc-GetEditShell)
CPPUNIT_ASSERT(pShell);
)
//Filter be with Name //Insert some text - two paragraphs
.(*Cursor" "ustr //Position of word 9876543210
/Positiono 13479 //Change Paragraph
pWrtShell->SplitNode(); //Insert second paragraph
::shared_ptrconst> ; //Position of word 012345678 //Make the following selection *bold* //this[is text //more] text //Move cursor back
( i = ;i<5 i+
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} //Start selection
Mark
0 i 2 +)
{
pCursor->Move(fnMoveBackward);
}
selection
CPPUNIT_ASSERT_EQUAL>SplitNode;
pCursor->GetText()); //Apply a *Bold* attribute to selection
SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHTunoReference::XTextDocument xTextDocument(, ::UNO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
:Referencecontainer:XEnumerationAccess (xText ::UNO_QUERY
aSet>GetAttrPool, svl:<RES_CHRATR_WEIGHTRES_CHRATR_WEIGHT; //Add selected text's attributes to aSet
>GetPointNode.(-GetParaAttr, 5 2;
SfxPoolItem const* pPoolItem = ::ReferencetextXTextContent xFirstParaContent>nextElement,unoUNO_QUERY) //Check that bold is active on the selection and it's in aSet
CPPUNIT_ASSERT_EQUAL /esting the text
/java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 //[this is text/java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
pWrtShell->StartOfSection(); //Start selection
pCursor- / second for::<textXTextContent (xPara-nextElement) ::);
pCursor-Move(fnMoveForward
}
//Clear ( Ctrl+ M )
SwTextNode* pTextNode = pCursor->GetPointNode().GetTextNode();
sal_Int32 nEnd = pTextNode->Len();
pTextNode->RstTextAttr(0, nEnd; //In case of Regression RstTextAttr() call will result to infinite recursionxSecondPara-setString(" is modified text in paragraph "_);
CPPUNIT_ASSERT_EQUALu" is modifiedtextinparagraphtwo"ustr xSecondPara-getString);
aSet.ClearItem();
pTextNode->GetParaAttr(aSet, 5, 12);
}
CPPUNIT_ASSERT_EQUAL(true, (*pPoolItem2 !
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf60967)
{
createSwDoccreateSwDoc;
SwDoc = getSwDoc;
* =getSwDocShell-GetWrtShell;
* (pDoc-())
CPPUNIT_ASSERT(pShell);
SwPaM* SwPaM* pCursorpShell->()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
sw::UndoManager& .InsertString*pCursor " is "_ustr;
pWrtShell->ChangeHeaderOrFooter(UIName(u"Default Page Style"_ustr) / ofword0123579 //Inserting table
SwInsertTableOptions pWrtShell->SplitNode(
pWrtShell- //getting the cursor's position just after the table insert
SwPosition aPosAfterTable(*(pCursor->GetPoint())); //moving cursor to B2 (bottom right cell)
pCursor->Move (int =0;i<5;i+)
{
pCursor->(fnMoveBackward)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(trueval //getting the cursor's position just after the paragraph deletion
(*pCursor-GetPoint); //moving cursor forward to check whether there is any node following the table, BTW there should not be any such node
pCursor-
SwPosition //checking the positions to verify that the paragraph is actually deleted (WEIGHT_BOLD );
CPPUNIT_ASSERT_EQUAL(aPosAfterDel aSetpDoc-() svl:temsRES_CHRATR_WEIGHT,RES_CHRATR_WEIGHT;
CPPUNIT_ASSERT_EQUAL(aPosMoveAfterDel, aPosInTable); //Undo the changes
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 //paragraph *text node* should be back
aPosAfterUndo((>GetPoint)
//
CPPUNIT_ASSERT(aPosAfterTable ); //moving cursor forward to check whether there is any node following the paragraph, BTW there should not be any such node as paragraph node is the last one in header
pCursor->Movep>StartOfSectionjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
SwPosition aPosMoveAfterUndo(*for i=0i <3 +) //checking positions to verify that paragraph node is the last one and we are paragraph node onlyMove);
CPPUNIT_ASSERT(aPosAfterTable > aPosMoveAfterUndo);
(aPosAfterUndoaPosMoveAfterUndo
nEnd >Len //Redo the changes
rUndoManager.Redo(); //paragraph *text node* should not be there
SwPosition aPosAfterRedo(*(pCursor->GetPointaSet.ClearItem() //position should be exactly same as it was after deletion of *text node*
CPPUNIT_ASSERT_EQUAL, aPosMoveAfterDel //moving the cursor forward, but it should not actually move as there is no *text node* after the table due to this same position is expected after move as it was before move != ))java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
pCursor->Move(fnMoveForward* = getSwDoc();
aPosAfterUndoMovepCursor-());
CPPUNIT_ASSERT_EQUALaPosAfterRedo,aPosAfterUndoMove
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testSearchWithTransliterate)
{
createSwDocsw:& >GetUndoManager
SwDoc =getSwDoc
SwWrtShell* java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 21
{
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx>InsertTable, 2 2java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
pDoc-SwPosition (*pCursor-());
pWrtShell->SplitNode();
}
{
SwNodeIndex aIdx(pDoc- SwPositionaPosInTable*pCursor-()));
SwPaM aPaM(aIdx);
>getIDocumentContentOperations)(aPaM" Other PARAGRAPH"ustr
}
i18nutil SearchOpt
SearchOpt CPPUNIT_ASSERT_EQUAL, val
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
SearchOptreplaceString();
SearchOpt moving forward checkwhether is node the, BTWthereshould beanysuchnode
pCursor-MovefnMoveForward
aPosMoveAfterDel(*>GetPoint))java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
SearchOpt.transliterateFlags = TransliterationFlags (aPosAfterDelaPosInTable
SearchOpt.AlgorithmType2 = css:: /Undo thechanges
SearchOpt.WildcardEscapeCharacter= 0 //transliteration option set so that at least one of the search strings is not found{
al_Int32case1
= pWrtShell->SearchPattern(SearchOpt, true, SwDocPositions::Start, SwDocPositions::End);
SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true);
CPPUNIT_ASSERT_EQUALOUString) pShellCursor-GetText));
CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(case1));
SearchOptsearchString="";
SearchOpttransliterateFlags TransliterationFlagsIGNORE_KASHIDA_CTL //transliteration option set so that all search strings are found
sal_Int32 case2
= pWrtShell->SearchPattern(SearchOpt, true, SwDocPositions::Start, SwDocPositions::End);
pShellCursor=pWrtShell-getShellCursor);
CPPUNIT_ASSERT_EQUAL(u"paragraphSwPositionaPosMoveAfterUndo((>GetPoint));
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(case2));
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf73660)
{
createSwDoc();
SwWrtShell pWrtShell=getSwDocShell)-();
OUString aData1 = "First" + OUStringChar(CHAR_SOFTHYPHEN) + "Word";
OUStringCPPUNIT_ASSERT_EQUAL, aPosMoveAfterUndo)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
OUString aData3 = OUStringChar(CHAR_SOFTHYPHEN) + "Third";
OUString aData4 = "Fourth" + OUStringChar(CHAR_SOFTHYPHEN aPosAfterRedo*pCursor-GetPoint);
pWrtShell->Insert(
u"We are inserting some //moving the cursor forward, but it should not actually move as there is no *text node* after the table due to this same position is expected after move as it was before move
pWrtShell->Insert(aData1 + " ");
pWrtShell->Insert(aData2>MovefnMoveForward;
pWrtShell-SwPositionaPosAfterUndoMove(>GetPoint)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
pWrtShell->Insert(u"Fifth "_ustr);
pWrtShell->PPUNIT_TEST_FIXTURE(, testSearchWithTransliterate) //searching for all 5 strings entered with soft-hyphen, search string contains no soft-hyphen
i18nutilSwDoc* = ();
searchOpt.searchFlag = css::util * pWrtShell=getSwDocShell)>GetWrtShell(java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
searchOpt.AlgorithmType2 aIdx>GetNodes(.() 1; //case 1
searchOpt.searchString = "First";
>getIDocumentContentOperations.(aPaM " is one"_ustr
sal_Int32(1),
pWrtShell-(searchOpt true SwDocPositions:Start,SwDocPositionsEnd; //case 2
searchOpt Second
(
sal_Int32(1),
pWrtShell->SearchPattern(earchOpt true::, SwDocPositionsEnd; //case 3
searchOpt.searchString = "Third";
CPPUNIT_ASSERT_EQUAL(
sal_Int32(1),
pWrtShell->SearchPattern(searchOpt, .insertedChars ; //case 4
.searchString Fourth
.WildcardEscapeCharacter0
sal_Int32,
pWrtShell- pWrtShell-SearchPattern(,true,SwDocPositions:Start,SwDocPositionsEndjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96 //case 5
searchOpt ="";
CPPUNIT_ASSERT_EQUAL
sal_Int321)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
pWrtShell->SearchPattern(searchOpt, case2
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7,C(uparagraph_, pShellCursor-GetText)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
{ //creating a new doc
SwDoc* pDoc = new SwDoc(); //getting the state of the document via IDocumentState
IDocumentState& rState createSwDoc //the state should not be modified, no modifications yet
CPPUNIT_ASSERTOUString = First+OUStringChar(CHAR_SOFTHYPHEN+"";
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342)
{
aData4 Fourth+OUStringChar(CHAR_SOFTHYPHEN);
S* = getSwDoc;
SwWrtShellpWrtShellgetSwDocShell-()
SwCursorShell* >Insert( + ";
CPPUNIT_ASSERT(pShell);
SwPaM* pCursor = pShell->GetCursor(); //inserting first footnote
pWrtShell-(u"ustr;
SwFieldType* pField = pWrtShell->GetFieldType(0, SwFieldIds::GetRef);
*()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 //moving cursor to the starting of document
pWrtShell->StartOfSection searchOpt =cssutil::NORM_WORD_ONLYjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 //inserting reference field 1
SwGetRefField searchOpt. ="";
sal_uInt16(0), REF_CONTENT);
pWrtShell->(aField1 //inserting second footnote
pWrtShell-(u"ustr;
pWrtShell-StartOfSection
pCursor->Move(fnMoveForward); //inserting reference field 2 //case 3
0,REF_CONTENT
pWrtShell->InsertField2(aField2); //inserting third footnote
pWrtShell->InsertFootnote(u""_ustr);
pWrtShell->StartOfSection();
pCursor->Move(fnMoveForward);
pCursor->Move(fnMoveForward);
pWrtShell-(searchOpt, ::Start ::));
SwGetRefField aField3(pRefType, SwMarkName(u""_ustr), u" (
sal_uInt16(0), REF_CONTENT);
pWrtShell->InsertField2(aField3); //updating the fields
IDocumentFieldsAccess& rField(SwUiWriterTest7testNewDocModifiedState
rField.UpdateExpFields(nullptr, true); //creating new clipboard doc
::<> xClpDoc SwDoc);
xClpDoc->SetClipBoard(true);
xClpDoc->getIDocumentFieldsAccess().LockExpFields(); //selecting reference field 2 and reference field 3 and footnote 1 and footnote 2 //selection is such that more than one and not all footnotes and ref fields are selected
pCursor->Move(fnMoveBackward);
pCursor->Move(fnMoveBackward); //start marking
pCursor->SetMark();
pCursor->Move(fnMoveForward);
pCursor->Move(fnMoveForward); //copying the selection to clipboard
pWrtShell->Copy(*xClpDoc); //deleting selection mark after copy
pCursor->DeleteMark(); //checking that the footnotes reference fields have same values after copy operationpWrtShell ()-GetWrtShell)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
uno::Any aAny* pCursor= >GetCursor;
sal_uInt16 aFormat; //reference field 1
pWrtShell->StartOfSection();
SwField* pField= pWrtShell->GetFieldType,::);
aFormat pRef1-GetFormat
CPPUNIT_ASSERT_EQUALsal_uInt16),aFormat
>aAnyFIELD_PROP_SHORT1;
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //reference field 2
fnMoveForward;
(pCursor, true
aFormat = pRef2->GetFormat();
CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
pRef2->QueryValue(aAny>InsertFootnote("_);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //reference field 3
>();
SwField() REF_CONTENT;
aFormat = pRef3->GetFormat();
>InsertField2);
pRef3->QueryValue(aAny, sal_uInt16( >InsertFootnote")
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2pCursor-Move);
pWrtShell->EndOfSection(); //pasting the copied selection at current cursor position
pWrtShell->Paste(*xClpDoc); //checking the fields, both new and old, for proper values
WrtShell-(; //old reference field 1
SwField* pOldRef11 = SwCursorShellsal_uInt16) REF_CONTENT;
aFormat = pOldRef11->GetFormat(
CPPUNIT_ASSERT_EQUALsal_uInt16), );
pOldRef11->QueryValue .UpdateExpFieldsnullptr );
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny::<SwDocxClpDoc( SwDoc; //old reference field 2
>Move); /selecting reference field 2 and reference field 3 and footnote 1 and footnote 2
aFormat = pOldRef12->GetFormat();
CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
>QueryValueaAnysal_uInt16FIELD_PROP_SHORT1;
CPPUNIT_ASSERT_EQUAL::(sal_uInt161) ); //old reference field 3
pCursor->Move>Move);
* pOldRef13 :GetFieldAtCursor, true
>Move);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
pOldRef13->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)) >DeleteMark(; //old footnote 1
pCursor->Move(fnMoveForward);
SwTextNode* pTextNd1 = pCursor->GetPointNode().GetTextNode();
SwTextAttr* const pFootnote1
= pTextNd1->GetTextAttrForCharAt/java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 const SwFormatFootnote& rFootnote1(pFootnote1->GetFootnote =pRef1-()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
CPPUNIT_ASSERT_EQUAL((1, .();
SwTextFootnote* pTFNote1 = static_cast<SwTextFootnote*>(pFootnote1);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote1->GetSeqRefNo() / field //old footnote 2
pCursor-MovefnMoveForward;
SwTextNode* pTextNd2 = java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 33
SwTextAttr* const pFootnote2
= pTextNd2->GetTextAttrForCharAt>GetPoint(->etContentIndex, RES_TXTATR_FTN
SwFormatFootnote rFootnote2pFootnote2->GetFootnote);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnote2.GetNumber());
SwTextFootnote* pTFNote2 = static_cast<SwTextFootnote*>(pFootnote2);
CPPUNIT_ASSERT_EQUAL( //reference field 3 //old footnote 3
pCursor->Move(fnMoveForward) SwField* pRef3 SwCursorShell:GetFieldAtCursorpCursor,true
SwTextNode* pTextNd3 = pCursor->GetPointNode().GetTextNode();
SwTextAttr* const pFootnote3
= >GetTextAttrForCharAtpCursor->GetPoint(-GetContentIndex,RES_TXTATR_FTN const SwFormatFootnote&CPPUNIT_ASSERT_EQUAL::Any(2) );
CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rFootnote3.GetNumber());
SwTextFootnote* pTFNote3 = static_cast<SwTextFootnote
CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pTFNote3->GetSeqRefNo()); //new reference field 1
pCursor->Move(fnMoveForward);
SwField* pNewRef11 = SwCursorShell::GetFieldAtCursor
FormatpNewRef11-();
CPPUNIT_ASSERT_EQUALaFormat >GetFormatjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
pNewRef11->QueryValue(pOldRef11-QueryValue, sal_uInt16FIELD_PROP_SHORT1;
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //new reference field 2
pCursor->Move(fnMoveForward);
SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursorpCursor-(fnMoveForward;
aFormat = * pOldRef12=SwCursorShellGetFieldAtCursor, true
_ASSERT_EQUAL(REF_CONTENT aFormat
pNewRef12-CPPUNIT_ASSERT_EQUAL((REF_CONTENT );
CPPUNIT_ASSERT_EQUAL::Anysal_uInt163) aAny //new footnote 1
/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
SwTextNode* * =SwCursorShell:GetFieldAtCursorpCursortrue);
SwTextAttr*constpFootnote4
pTextNd4-GetTextAttrForCharAt>GetPoint(-GetContentIndex, RES_TXTATR_FTN)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97 const SwFormatFootnote& rFootnote4(pFootnote4->GetFootnote(CPPUNIT_ASSERT_EQUAL::ny(2) );
CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), rFootnote4.GetNumber >(fnMoveForward
* <*pFootnote4
CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pTFNote4->GetSeqRefNo()); //moving the cursor to the starting of document
pWrtShell-(); //pasting the selection again at current cursor position
pWrtShell->Paste pTextNd1-(pCursor-()->() RES_TXTATR_FTN; //checking the fields, both new and old, for proper values
pWrtShell-StartOfSection; //new reference field 1
* =:(,true
(2 >()
CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT>Move);
pNewRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL::(sal_uInt16),)java.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
pCursor->Move(fnMoveForward);
SwField* pNewRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true);
aFormat = pNewRef22->GetFormat();
), aFormat)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL(pCursor-(fnMoveForward //new footnote 1
pCursor->Move(fnMoveForward);
S* >()GetTextNode;
SwTextAttr* const pFootnote11 const& (pFootnote3-GetFootnote; const SwFormatFootnote& rFootnote11(pFootnote11->GetFootnote()((,rFootnote3();
CPPUNIT_ASSERT_EQUAL(al_uInt161),rFootnote11())java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
SwTextFootnote* pTFNote11 = static_cast<//new reference field 1
CPPUNIT_ASSERT_EQUAL(4) pTFNote11->()); /old reference field 1
pCursor->Move(fnMoveForward);
* = wCursorShellGetFieldAtCursor, true
aFormat >GetFormat
SERT_EQUAL(REF_CONTENT) );
pOldRef21-QueryValueaAny,(FIELD_PROP_SHORT1;
CPPUNIT_ASSERT_EQUAL(uno
pCursor->Move(fnMoveForward);
* pOldRef22=SwCursorShellGetFieldAtCursor, true
aFormat = pOldRef22->GetFormat();
((REF_CONTENT) );
pOldRef22->QueryValue(aAny, sal_uInt16//new footnote 1
CPPUNIT_ASSERT_EQUAL(uno:Any(sal_uInt16(),aAny //old reference field 3
pCursor->Move(fnMoveForward);
* pFootnote4
aFormat >GetTextAttrForCharAt>GetPoint-(,RES_TXTATR_FTN
CPPUNIT_ASSERT_EQUAL(), );
pOldRef23->QueryValue(aAny, sal_uInt16(sal_uInt16) .GetNumber)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16((sal_uInt163 >(); //old footnote 1
pCursor->Move);
SwTextNode* pTextNd12 = pCursor->GetPointNode( pWrtShell-StartOfSection)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
SwTextAttr* const pFootnote12
= pTextNd12->GetTextAttrForCharAt(pCursor- const SwFormatFootnote& rFootnote12(pFootnote12->GetFootnote());
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2),java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 27
SwTextFootnote* pTFNote12 = static_cast<SwTextFootnote*>(pFootnote12);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2) (sal_uInt16), aFormat)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 //old footnote 2
>Move);
SwTextNode* pTextNd13 = pCursor->GetPointNode().GetTextNode();
SwTextAttr* const pFootnote13
= pTextNd13->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN = >()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 const& rFootnote13>GetFootnote)
CPPUNIT_ASSERT_EQUAL(3,rFootnote13())java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
SwTextFootnote* pTFNote13 = static_cast< >Move);
(sal_uInt16) >GetSeqRefNo; //old footnote 3
pCursor->Move(fnMoveForward);
SwTextNodepTextNd14= pCursor-GetPointNode)GetTextNode;
SwTextAttr* const pFootnote14
= pTextNd14->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote constSwFormatFootnote rFootnote11>GetFootnote();
CPPUNIT_ASSERT_EQUALsal_uInt164,rFootnote14());
SwTextFootnote* pTFNote14 = static_cast<SwTextFootnote*>(pFootnote14);
CPPUNIT_ASSERT_EQUAL * pTFNote11= static_castSwTextFootnote*(pFootnote11); //old reference field 4CPPUNIT_ASSERT_EQUAL(4, pTFNote11-GetSeqRefNo);
pCursor->Move(fnMoveForward);
SwField* pOldRef24 = SwCursorShell::GetFieldAtCursor(pCursor, true);
aFormat = pOldRef24->GetFormat();
CPPUNIT_ASSERT_EQUAL(al_uInt16),aFormat
pOldRef24->QueryValue(aAny, sal_uInt16 = >GetFormatjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
CPPUNIT_ASSERT_EQUAL(uno:: >QueryValue, sal_uInt16)); //old reference field 5
pCursor->pCursor-();
SwField* pOldRef25 = SwCursorShell::GetFieldAtCursor(pCursor, true);
aFormat = pOldRef25->GetFormat();
CPPUNIT_ASSERT_EQUAL( SwField pOldRef22= SwCursorShell:etFieldAtCursor(pCursortruejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
pOldRef25->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL pOldRef22->(aAny sal_uInt16)); //old footnote 4
pCursor->Move(fnMoveForward);
*pOldRef23SwCursorShell(pCursor);
SwTextAttr* =>();
CPPUNIT_ASSERT_EQUAL(REF_CONTENT aFormat)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 const SwFormatFootnote//old footnote 1
CPPUNIT_ASSERT_EQUAL(sal_uInt16(5), * = pCursor->().GetTextNode;
* = static_cast<wTextFootnote();
CPPUNIT_ASSERT_EQUAL=pTextNd12->(pCursor-(->GetContentIndex(),RES_TXTATR_FTN)java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553)
{
createSwDoc();
SwDoc* pDoc = getSwDoc();
SwWrtShell pWrtShell=getSwDocShell->etWrtShell(;
SwCursorShell* pShell(pDoc->GetEditShell());
CPPUNIT_ASSERT(pShell);
SwPaM* pCursor = pShell->GetCursorSwTextNode*pTextNd13= Cursor-()G()java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 //inserting sequence field 1
* pSeqType=static_castSwSetExpFieldType(
pWrtShell->GetFieldType(SwFieldIds::SetExp, u"Illustration"_ustr));
SwSetExpField aSetField1(pSeqType, * =static_castSwTextFootnote*();
pWrtShell-InsertField2aSetField1);
SwGetRefFieldType* pRefType
= static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, >MovefnMoveForward);
/moving to starting document
pWrtShell->StartOfSection(); //inserting reference field 1
SwGetRefField aGetField1(pRefType, SwMarkName(u"Illustration"_ustr), u & (pFootnote14->etFootnote;
sal_uInt16(0), sal_uInt16(0), REF_CONTENT* <SwTextFootnote>);
pWrtShell->InsertField2(aGetField1); //now we have ref1-seq1 //moving the cursor
pCursor->MoveSwFieldpOldRef24 ::GetFieldAtCursor, ); //inserting sequence field 2
SwSetExpField aSetField2(pSeqType, u" ((REF_CONTENT), aFormat);
pWrtShell-InsertField2aSetField2; //moving the cursor
pWrtShell->StartOfSection();
>Move); //inserting reference field 2
SwGetRefField aGetField2(pRefTypepCursor-(fnMoveForward
(1), (0), REF_CONTENT);
pWrtShell->InsertField2aGetField2); //now we have ref1-ref2-seq1-seq2 //moving the cursor
pOldRef25->QueryValue(aAny, sal_uInt16FIELD_PROP_SHORT1));
pCursor->Move CPPUNIT_ASSERT_EQUAL(uno:(sal_uInt16(), aAny
ence 3
SwSetExpField aSetField3(pSeqType, u""_ >Move(fnMoveForward
>InsertField2aSetField3)
pWrtShell->StartOfSection * constpFootnote15
or-MovefnMoveForward; const SwFormatFootnote (pFootnote15-java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 //inserting reference field 3
SwGetRefFieldaGetField3pRefType SwMarkName(""_ustr) u"_ustr REF_SEQUENCEFLD,
sal_uInt16(sal_uInt163), pTFNote15-GetSeqRefNo;
pWrtShell->InsertField2(aGetField3); //now after insertion we have ref1-ref2-ref3-seq1-seq2-seq3 //updating the fields
IDocumentFieldsAccess& rFieldjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
rField.UpdateExpFields(*(>()java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
* <>
:< ( () true
xClpDoc-> * java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 //selecting reference field 2 and 3 and sequence field 1 and 2 //selection is such that more than one and not all sequence fields and reference fields are selected //ref1-[ref2-ref3-seq1-seq2]-seq3
>()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
pCursor->Move(fnMoveForward);
/java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
pCursor->SetMark();
pCursor->Move(fnMoveForward
pWrtShell-java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
pCursor->Move(fnMoveForward);
pCursor->Move(fnMoveForward); //copying the selection to clipboard
pWrtShell-CopyxClpDocjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 //now we have ref1-ref2-seq1-seq2
pCursor->DeleteMark//moving the cursor //checking whether the sequence and reference fields have same values after copy operationfnMoveForwardjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
uno::Any aAny;
sal_uInt16 aFormat; //reference field 1
pWrtShell->StartOfSection();
SwField* >Move)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
(,(""ustru"ustr,REF_SEQUENCEFLDjava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
CPPUNIT_ASSERT_EQUAL(),aFormat
pRef1->QueryValue(aAny, sal_uInt16(>InsertField2aGetField3
CPPUNIT_ASSERT_EQUAL(unoAny(0) ); //reference field 2
pCursor->Move(fnMoveForward);
SwField* pRef2 = SwCursorShell:: rField.UpdateExpFields(nullptr, true
aFormat = pRef2->GetFormat();
CPPUNIT_ASSERT_EQUAL(REF_CONTENT aFormat;
pRef2->QueryValue( xClpDoc->SetClipBoard()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
CPPUNIT_ASSERT_EQUAL//selecting reference field 2 and 3 and sequence field 1 and 2 //reference field 3
pCursor->Move(fnMoveForward);
SwField* pRef3 = SwCursorShell::GetFieldAtCursor(
aFormatpWrtShell-()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
pRef3->QueryValue >SetMark);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //sequence field 1
pCursor->Move(fnMoveForward);
SwSetExpField* pCursor-(fnMoveForward static_cast*>(SwCursorShell::GetFieldAtCursorpCursortrue;
CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pSeqF1->GetSeqNumber());
CPPUNIT_ASSERT_EQUALu" range Illustration"_ustr, pSeqF1->GetFieldName)); //sequence field 2
pCursor->Move(fnMoveForward);
SwSetExpField* pSeqF2
= static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pSeqF2->GetSeqNumber());
CPPUNIT_ASSERT_EQUAL(u"Number range Illustration"_ustr, /reference field 1 //sequence field 3
pCursor->Move(fnMoveForward);
SwSetExpField* pSeqF3
tic_castSwSetExpField(SwCursorShell:(pCursor,true;
CPPUNIT_ASSERT_EQUAL(sal_uInt16 aFormat= pRef1->();
CPPUNIT_ASSERT_EQUAL CPPUNIT_ASSERT_EQUALsal_uInt16REF_CONTENT );
//oving tothe end the
pWrtShell->EndOfSection( PPUNIT_ASSERT_EQUAL::(sal_uInt160) ); //pasting the copied selection at current cursor position
pWrtShell->Paste(* SwField* pRef2 SwCursorShell:(pCursortrue
/checking fields new old,for values
pWrtShell->StartOfSection(); //now we have ref1-ref2-ref3-seq1-seq2-seq3-nref1-nref2-nseq1-nseq2 //old reference field 1
S* = ::(pCursor);
aFormat = pOldRef11->GetFormat();
CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat//reference field 3
pOldRef11->(aAny al_uInt16));
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //old reference field 2
>Move);
=pRef3-();
aFormat = pOldRef12->GetFormat();
PPUNIT_ASSERT_EQUAL(REF_CONTENT aFormat;
pOldRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //old reference field 3
pCursor->Move(fnMoveForward >Move);
SwField* pOldRef13 = SwCursorShell::GetFieldAtCursor(pCursor, <SwSetExpField>(::(pCursortrue
aFormat = pOldRef13->GetFormat();
CPPUNIT_ASSERT_EQUAL(sal_uInt16 CPPUNIT_ASSERT_EQUALsal_uInt16(), pSeqF1->GetSeqNumber))
pOldRef13- CPPUNIT_ASSERT_EQUAL("Number range Illustration"ustr pSeqF1-GetFieldName)
CPPUNIT_ASSERT_EQUALunoAnysal_uInt16(2), ); //old sequence field 1
pCursor->Move(fnMoveForward SwSetExpField pSeqF2
SwSetExpField* pSeq1
= static_cast< =static_castSwSetExpField(::(pCursor true;
(() >GetSeqNumber);
CPPUNIT_ASSERT_EQUAL(u"Number/java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 //old sequence field 2
pCursor->Move(fnMoveForward);
SwSetExpField* pSeq2
=static_cast*>SwCursorShell:(, true);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pSeq2->GetSeqNumber//moving cursor to the end of the document
p>EndOfSectionjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 //old sequence field 3
pCursor->Move(fnMoveForward);
SwSetExpField* pSeq3
= static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor /ow have
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pSeq3->GetSeqNumber());
(uNumber Illustration_, pSeq3-())java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
pCursor->Move(fnMoveForward);
SwField* pNewRef11 = SwCursorShell::GetFieldAtCursor(pCursor, pOldRef11-QueryValue(, ());
aFormat >GetFormat;
CPPUNIT_ASSERT_EQUAL(sal_uInt16/java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
pNewRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(sal_uInt16),aFormat //new reference field 2
pCursor-(unoAny(1) );
SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true>MovefnMoveForward
aFormat >()
CPPUNIT_ASSERT_EQUAL(sal_uInt16aFormat >GetFormat(;
pNewRef12->QueryValue(, sal_uInt16FIELD_PROP_SHORT1);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //new sequence field 1
pCursor-pOldRef13->QueryValueaAny(FIELD_PROP_SHORT1
(unoAny((2),aAny
= //old sequence field 1
CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pNewSeq1->GetSeqNumber() SwSetExpField java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
CPPUNIT_ASSERT_EQUAL(u"Number range Illustration"_ustr, pNewSeq1->GetFieldName(CPPUNIT_ASSERT_EQUALsal_uInt160,pSeq1->())
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 26
pCursor->Move(fnMoveForward);
SwSetExpField* pNewSeq2
= static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), pNewSeq2->GetSeqNumber());
CPPUNIT_ASSERT_EQUAL(u"Number range Illustration"_ustr, pNewSeq2->GetFieldName()); //moving the cursor to the starting of document
pWrtShell->StartOfSection(); //pasting the selection again at current cursor position
pWrtShell->Paste(*xClpDoc); //checking the fields, both new and old, for proper values
pWrtShell->StartOfSection(); //now we have [nnref1-nnref2-nnseq1-nnseq2]-ref1-[ref2-ref3-seq1-seq2]-seq3-[nref1-nref2-nseq1-nseq2] //new reference field 1
SwField* pNewRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true);
=pNewRef21-GetFormat(;
CPPUNIT_ASSERT_EQUAL( SwField* pNewRef11 = SwCursorShell = SwCursorShell:(pCursor );
>QueryValue, sal_uInt16));
CPPUNIT_ASSERT_EQUALsal_uInt16(), aFormat) //new reference field 2
pCursor-();
SwField* pNewRef22 = /new reference field 2
aFormat = pNewRef22->GetFormat();
CPPUNIT_ASSERT_EQUAL((REF_CONTENT aFormat);
pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL::(sal_uInt162) aAny //new sequence field 1
pCursor->Move(fnMoveForward);
* pNewSeq11
= static_cast<SwSetExpField*>( NewRef12-(aAnysal_uInt16))java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 //new sequence field 1
CPPUNIT_ASSERT_EQUAL(u"Number range Illustration"_ustr, pNewSeq11->GetFieldName SwSetExpField*pNewSeq1 //new sequence field 2
pCursor->Move(fnMoveForward);
* pNewSeq12
= static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
CPPUNIT_ASSERT_EQUAL(sal_uInt16(6), pNewSeq12->GetSeqNumber());
CPPUNIT_ASSERT_EQUAL(u"Number >Move(); //old reference field 1
pCursor->Move(fnMoveForward);
SwField* pOldRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true);
aFormat = pOldRef21->GetFormat();
CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
pOldRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
CPPUNIT_ASSERT_EQUAL(sal_uInt16(), pNewSeq2-GetSeqNumber()); //old reference field 2
pCursor->Move(fnMoveForward);
SwField*pOldRef22 SwCursorShellGetFieldAtCursor, true;
>GetFormatjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
CPPUNIT_ASSERT_EQUAL(REF_CONTENTaFormat
/hecking fieldsboth andold for values
C(unoAnysal_uInt161) aAny //old reference field 3
pCursor->Move(fnMoveForward);
SwField* pOldRef23 = * pNewRef21=SwCursorShellGetFieldAtCursor(, true
aFormat = pOldRef23->GetFormat();
CPPUNIT_ASSERT_EQUAL(), aFormat)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
pOldRef23->QueryValue( (unoAny(6) );
CPPUNIT_ASSERT_EQUAL(uno/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 //old sequence field 1
pCursor-Move(fnMoveForward;
SwSetExpField* =pNewRef22-()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
= static_cast<SwSetExpField*>(SwCursorShell::pNewRef22-QueryValueaAny(FIELD_PROP_SHORT1)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pOldSeq11->GetSeqNumber//new sequence field 1
CPPUNIT_ASSERT_EQUAL(u"Number SwSetExpField* pNewSeq11 //old sequence field 2
pCursor->Move(fnMoveForward);
SwSetExpField* pOldSeq12
<SwSetExpField(SwCursorShellGetFieldAtCursor, ));
CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pOldSeq12->GetSeqNumber());
CPPUNIT_ASSERT_EQUAL(u"Number range Illustration"_ustr, pOldSeq12->GetFieldName()); //old sequence field 3
pCursor->Move(fnMoveForward);
* java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
= static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pOldSeq13->GetSeqNumber());
CPPUNIT_ASSERT_EQUAL(u"Number range Illustration"_ustr, pOldSeq13->GetFieldName Cursor-(fnMoveForward; //old reference field 4
pCursor->Move(fnMoveForward);
SwField pOldRef24 ::GetFieldAtCursor(, true)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
aFormat = pOldRef24->GetFormat();
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.16Angebot
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.