Hi,<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>I need some guidance as am stuck at a place. <br>How should I replace 'erase' using guidelines given under <a href="https://wiki.documentfoundation.org/Development/String_Classes" target="_blank">https://wiki.documentfoundation.org/Development/String_Classes</a>.<br>

If I try to fit 'replaceAt' in place of 'erase' in the line bolded below:<br><br>SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const/home/elixir/lo/sd/source/core/stlsheet.cxx:429:73: <br>{<br>    String aRealStyle;<br>

    String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));<br>    SdStyleSheet* pRealStyle = NULL;<br>    SdDrawDocument* pDoc = ((SdStyleSheetPool*)pPool)->GetDoc();<br><br>    ::sd::DrawViewShell* pDrawViewShell = 0;<br>

<br>    ::sd::ViewShellBase* pBase = dynamic_cast< ::sd::ViewShellBase* >( SfxViewShell::Current() );<br>    if( pBase )<br>        pDrawViewShell = dynamic_cast< ::sd::DrawViewShell* >( pBase->GetMainViewShell().get() );<br>

<br>    if (pDrawViewShell && pDrawViewShell->GetDoc() == pDoc)<br>    {<br>        SdPage* pPage = pDrawViewShell->getCurrentPage();<br>        if( pPage )<br>        {<br>            aRealStyle = pPage->GetLayoutName();<br>

            // cut after seperator string<br><b>            aRealStyle.Erase(aRealStyle.Search(aSep) + aSep.Len());</b><br>        }<br>    }<br><br>it will give me error (if I do : <b>aRealStyle.replaceAt(aRealStyle.indexOf(aSep) + aSep.getLength());</b>)<br>

<br>Reason: <br><br>replaceAt defined as: rtl::OUString rtl::OUString::replaceAt(sal_Int32, sal_Int32, const rtl::OUString&) const<br>(candidate expects 3 arguments, 1 provided)<br>error: no matching function for call to ‘rtl::OUString::replaceAt(sal_Int32)<br>

<br>My question is, what should I pass inside the replaceAt() parameters/arguments?<br>Please guide me,  i am not getting a clue, trying it for a long time.<div class="im HOEnZb"><br><br>Thanks and Regards<br>Prashant Pandey<br>
<br><br><br><br>
<br><br> <br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_quote">On Sat, Feb 16, 2013 at 11:36 PM, Prashant Pandey <span dir="ltr"><<a href="mailto:prashant3.yishu@gmail.com" target="_blank">prashant3.yishu@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jean,<br><br>I really appreciate the help you provided me via these links. And, ya I definitely agree, its a Big one ! The more number, the sooner it finishes. <br>

<br>Hope to proceed in a good way and submit a patch soon !<br>
<br>Thanks and Regards<span><font color="#888888"><br>Prashant</font></span><div><div><br><br><br><br><br><div class="gmail_quote">On Sat, Feb 16, 2013 at 7:33 PM, Jean-Noël Rouvignac <span dir="ltr"><<a href="mailto:jn.rouvignac@gmail.com" target="_blank">jn.rouvignac@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_quote">2013/2/16 Prashant Pandey <span dir="ltr"><<a href="mailto:prashant3.yishu@gmail.com" target="_blank">prashant3.yishu@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Jean-Noel,<br><br>I am an undergrad student from India, new to the open source world, and trying contribute something good and productive to it. <br><br>I am happy to see you actively work on Patch 38838 :) and am also working on the same patch since last few days and trying hard to get touch with it comfortably. However, things are not going in their best way.<br>





<br>Can you help me with fixing the same bug and getting me more comfortable with it.<br>What is the way to replace String with OUString. Is it anywhere I see them, I just need to replace them or there are other factors also I need to take them under consideration?<br>





<br>I shall be grateful to you for being patient and helping/guiding me for the same :)<br>Waiting for your earliest reply <br><br>Thanks and Regards<span><font color="#888888"><br>Prashant Pandey<br>
</font></span></blockquote></div><br><br></div></div>Hi Prashant,<br><br>Welcome on board! The more people work on this bug the faster it will be solved and it is a big one.<br>I suggets you take a look at this page:<br>


<a href="https://wiki.documentfoundation.org/Development/String_Classes" target="_blank">https://wiki.documentfoundation.org/Development/String_Classes</a><br>

<br>It outlines how to replace String/UniString/XubString (the 2 latter are #define's of String) with OUString.<br>You
 can also take a look at the doc for OUString 
(<a href="http://api.libreoffice.org/docs/cpp/ref/classrtl_1_1_o_u_string.html" target="_blank">http://api.libreoffice.org/docs/cpp/ref/classrtl_1_1_o_u_string.html</a> ) 
and OUStringBuffer ( 
<a href="http://api.libreoffice.org/docs/cpp/ref/classrtl_1_1_o_u_string_buffer.html" target="_blank">http://api.libreoffice.org/docs/cpp/ref/classrtl_1_1_o_u_string_buffer.html</a>
 ).<br>Since OUString is immutable it is to be used when a String does 
not change or not much, while OUStringBuffer is to be used to build an 
OUString.<br><br>I suggest you read these pages and take a look at 
previous commits on <a href="http://cgit.freedesktop.org/libreoffice/core/log/" target="_blank">http://cgit.freedesktop.org/libreoffice/core/log/</a> 
where you can do queries to find the relevant commits.<br><br>Also I suggest you subscribe to the developer's mailing list and ask your questions regarding this bug there.<br><br>Thanks and good luck!<span><font color="#888888"><br>


Jean-Noël<br>

<br>
</font></span></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>