How To Set Justification Settings

Hi,
I'm trying to set the justification settings of a paragraph using IJustificationStyle's different setter mehods but the paragraph does not reflect the change that I set into the setter methods. I can see using the IJusificationStyle->GetWordspace method that the value was changed.
I tried recomposing the wax using IFramelistComposer->RecomposeThruNthFrame() method after setting the values but still the paragraph won't reflect the change in values.
Any help is highly appreciated, thanks!
-- Jeff

I wrote this code soemtime ago for CS4 it reverses the alignment of all the text in a textFrame but could easily be modified to operate on a paragraph.
//========================================================
// ReverseTextAlignment 
// Change the text alignment in the text frame from leftAlign to rightAlign or leftJustify to rightJustify.
//========================================================
void PageItemFlipper::ReverseTextAlignment(UIDRef textFrameRef)
    do {
        // get the text content UID
        UID textContentUID = kInvalidUID;
        InterfacePtr <IGraphicFrameData> frameData(textFrameRef, UseDefaultIID());
        if (frameData) {
            textContentUID = frameData->GetTextContentUID();
        IDataBase* database = textFrameRef.GetDataBase();
        InterfacePtr <IMultiColumnTextFrame> mctf(database, textContentUID, UseDefaultIID());
        if (mctf == nil) { this->logger->Error("Nil multi column text object."); break; }
        InterfacePtr <ITextModel> textModel(mctf->QueryTextModel());
        if (textModel == nil) { this->logger->Error("Nil text model object."); break; }
        // get the number of characters in the story. Theres always a terminating character so
        // if the character length is not greator than 1 say goodbye.
        int32 characterCount = textModel->GetPrimaryStoryThreadSpan();
        if (characterCount <= 1) { break; }
        // get the range of characters in the story
        int32 textSpan = mctf->TextSpan();
        TextIndex startIndex = mctf->TextStart();
        TextIndex endIndex = startIndex + textSpan;
        // Check if the frame displays the stories terminating character
        if (endIndex >= characterCount) {
            textSpan--;
            endIndex--;
        if (textSpan <= 0) { break; }
        RangeData tRange(startIndex, endIndex);
        InterfacePtr <IComposeScanner> composer(textModel, IID_ICOMPOSESCANNER);
        if (composer == nil) { this->logger->Error("Nil ComposeScanner object."); break; }
        IDrawingStyle* drawingStyle = composer->GetCompleteStyleAt(startIndex, &textSpan);
        if (drawingStyle == nil) { this->logger->Error("Nil DrawingStyle object."); break; }
        InterfacePtr <ICompositionStyle> compStyle(drawingStyle, IID_ICOMPOSITIONSTYLE);
        if (compStyle == nil) { this->logger->Error("Nil CompositionStyle object."); break; }
        // get the alignment applied to the text range
        ICompositionStyle::TextAlignment appliedAlignment = compStyle->GetParagraphAlignment();
        ICompositionStyle::TextAlignment newAlignment = this->GetNewAlignmentValue(appliedAlignment);
        // change the alignment (values see ICompositionStyle alignment enum)
        InterfacePtr <ITextAttrAlign> alignAttribute1(CreateObject2<ITextAttrAlign>(kTextAttrAlignmentBoss));
        InterfacePtr <ITextAttrAlign> alignAttribute2(CreateObject2<ITextAttrAlign>(kTextAttrAlignmentBoss));
        if (alignAttribute1 && alignAttribute2) {
            alignAttribute1->SetAlignment(newAlignment);
            alignAttribute2->SetAlignment(newAlignment);
            // create the command to set the alignment attribute
            InterfacePtr <ICommand> alignCmd(Utils<ITextAttrUtils>()->BuildApplyTextAttrCmd(textModel, startIndex, (uint)textSpan, alignAttribute1, kParaAttrStrandBoss));
            if (alignCmd == nil) { this->logger->Error("Nil alignment command."); break; }
            InterfacePtr <IApplyStyleData> cmdAtts(alignCmd, UseDefaultIID());
            cmdAtts->GrabOverrides()->ApplyAttribute(alignAttribute2);
            ErrorCode result = CmdUtils::ProcessCommand(alignCmd);
            if (result == kFailure) {
                this->logger->Error("Reversing alignment failed...");
    } while (kFalse);
Hope it helps.
mike

Similar Messages

  • How to set gprs settings in i phone 4

    Dear Sir
    How to set GPRS settings in i phone 4 pls send me the details
    Thanks

    See pages 11 and 135 of the iPhone User Manual:
    iPhone User Guide (For iOS 6.1 Software)

  • InDesign CS6 how to set justification for form text field?

    Hi everyone,
    I've been playing with the ability to create form for PDF file but I haven't figure out how to set a center justification for a text field.  By default it's left.  Same thing for font, the one selected in InDesign while creating the form isn't used when editing the form in Acrobat.
    Do I need to create a paragraph style with a specific name to preserve both attributes?
    Thanks.

    InDesign CS6's forms features are great, but you're looking as version 1.0 of the feature. Those features cannot be set in InDesign.
    Furthermore, if you try to pick a font other than the standard ones at the top of the menu, don't expect that your form users will be able to pick those fonts when they open up the form in Reader or Acrobat. I'm pretty sure that custom fonts are not stored in the PDF form.

  • How to set user settings insap

    how to set default settings

    n SAP Easy Access screen System -->User Profile -->Own Data. In which, in the defaults tab you can change the change the formats for the user and save the settings
    actually all time's we dont have authorizations to change those..
    and SU3 tcode is alos correct
    Regard points if useful
    Regards
    sas

  • Firefox 4 multi user environment in linux: How to set global settings?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/826921]</blockquote><br>
    Hi,
    We used to be able to change settings in all.js file in FF 3.x.x platform, for changing settings like, proxy, authentication, etc. We installed FF 4.0.1 in linux, but, I can't find the all.js file to change any of the global settings in FF 4.0.1.
    Could you please point me how to changeglobal settings in FF 4.x version?
    thanks in advance.

    Hi. A JDBC connection pool is a set of identical, interchangeable, pre-made
    connections, and the controls to make sure only one user uses a particular
    connection at any one time. If you want to have different DBMS users, you can
    have a separate pool for each DBMS user, which may contain as many or few
    connections as you want. Some applications has a pool for the accounting
    applications, and another for the sales applications etc. Some do have a
    separate pool for john, jane, joe etc, each with one connection. Pools
    can be created and destroyed dynamically using the dynamic pool API.
    Joe
    softstar wrote:
    >
    Hi all,
    I need to know how to set Multi User Environment in the weblogic 5.1
    properties file..
    Here my question is..:)
    1) I have a database with multiple users and having different privileges
    for the users.. and i need to use all the privileges when user aceess
    the database through weblogic server connectionPool.
    2)According to the user privileges i need access the database tables
    content and gives the frontEnd(jsp).
    3)How to modify dynamically weblogic.properties file in the weblogic
    5.1.
    If anybody having idea reg. this issues pl...help me..
    Thanks in advance
    Chandu([email protected],[email protected])

  • How o set envoirmental settings of OAS 10g (10.1.2.0.2)?

    Hi,
    I am first time installing the OAS 10g (having OSS and OID) on OEL 5.5 x86 , and after that I will go to integrate it with EBS (12.0.6) with database 10g.
    I have 3 machines:
    1: One for oracle Application server (EBS r12 (12.0.6)) ----> Red Hat Linux 4.6 x86 ---------> Install and functioning.
    2: Second for oracle database server (oracle 10g (10.2.0.3)) ---> Red Hat Linux 4.6 x86 ---------> Install and functioning.
    3: Third for OAS 10g(10.1.2.0.2) with "OAS Infrastructure" and "OAS Middle Tier" (On same machine with different ORACLE_HOME). ------> OEL 5.5 x86 ------> Not Installed .
    So, I had installed the "OAS Infrastructure" , but not install the "OAS Middle Tier",, and I restart the OS , after that my envoirnment is not loaded and I cannot startup the OAS services.
    Please guide me about my above plan is correct or any helpful suggessions from ur side, I will appretiate in advance?
    Please also guide me how to set the envoirnmental setting for OAS?
    Thanks.

    export STAGE_PATH=............
    export INFRA_INSTANCE=............
    export BIF_INSTANCE=................
    export ORACLE_BASE=/suo1/oracle/.....
    export ORACLE_HOME=/su01oracle/infra.......
    export ORACLE_SID=iasdb
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
    export DISPLAY=............
    PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
    PATH=$PATH:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin
    export PATH

  • Airport Express - How to set proxy settings?

    Hello all
    I have an AirPort Express in for testing at work.
    The internet access at work requires going through a proxy. This proxy gets set on domain clients via gpo.
    We have some devices we dont want to put on the domain (wont get the gpo) but we need them to have internet access.
    We could set the proxy on these devices manauly but theres a lot of them.
    I have been trying to find where in the Airports settings you can set proxy settings but cant find anything.
    Can you set proxy settings manualy in the device and if so, where abouts?
    I'm using windows for accessing the Airports settings.
    Thanks for any help someone can offer.

    unfortunately i have to use 1.4 which makes this a bit more tricky.
    my other idea was to use system.setProperties to set the 2 proxy fields and then afterwards set them back to what they were -- however in the case they were null I get an NPE when I try and set them back, so I'd need a workaround for that as well.

  • How to set print settings

    I have an Epson R260 printer and previously printed using photoshop Elements, with Elements managing the color. I am trying to figure out how to print using iPhoto.
    When I choose a photo and click the print button, I get a box that has 4 presets: "Photo on Photo paper", "Photo on Photo Paper - Fine", and 2 more for matte paper. I pick the Photo on Photo Paper - Fine preset and click the Print button. This gives me another print dialog, again with a Presets drop-down, but now with "Standard" available and preselected. Should I re-select the "Photo on Photo Paper - Fine" option here? Or leave it at Standard? There also is an "Advanced" button, which allows me to choose Print Settings -- once more allowing me to select a paper type and print quality, as well as color management, where I can set what looks like parameters for the Epson print driver -- Mode (Epson Vivid is preselected, but Standard and Adobe RGB are other selections) and Gamma (1.8 is preselected, but 1.5 and 2.2 are available).
    I've gone through 3 or 4 different tries at combinations and either get something rather garish, or too dark. Can someone help out?

    Jim:
    What I do is create a special setting for the printer while in PSE with the settings for the paper quailty and other items that you use for best prints and save with a custom name. Then go thru the print process in iPhoto selecting the printer and print size. Then in the last window you can select the custom setting that you developed earlier.
    You'll be able to use those settings from any application.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • How to set sequence settings & amorphic ?

    Hi all experts,
    In FCE4, the first thing I did was always to set the sequence settings to 1080 with 25 fps.
    And also after importing still pictures, I will set the Amorphic to ON.
    How do I do these two in FCPX ?
    Thanks

    OK, 16:9.
    You now have the choice of making it HD or SD.
    Select File>New Project and in the window that opens select  Custom.
    If it's HD choose these settings from the dropdown menus:-
    If it is SD I suppose you could use:-

  • How to set Environment Settings for J2EE?

    hi i don't know java but know a little vb6
    i would like make and compile this:
    http://java.sun.com/developer/technicalArticles/peer/
    i downloaded all components... but can't figure out how to do:
    Table 1: Environment Settings for Compiling and Running J2EE Applications
    thanks..
    Message was edited by:
    Hopelessone

    You can't enter sites in a list to make Firefox remember names and passwords for specific sites.
    If the password manager is enabled (remember passwords is check-marked) then Firefox will ask via a pop-up from the key icon that appears on the location bar whether you want to remember that name and password and that name will then appear in the list in the password manager window.
    *http://kb.mozillazine.org/Password_Manager
    *https://support.mozilla.org/kb/make-firefox-remember-usernames-and-passwords
    Websites can use autocomplete=off to prevent Firefox from saving the name and password.<br />
    You can remove autocomplete=off with a bookmarklet to make Firefox save the name and password in such a case.
    *http://kb.mozillazine.org/User_name_and_password_not_remembered

  • How to set chromakey settings so only my teeth show up white

    Greetings all,
    I'm using PREL 7 and I want to create an effect where my mouth fades into a green screen but I can't seem to get the settings right for proper contrast.  I made up my face to be green - the same color as my green screen - and I cropped it to show only my lips and teeth.  I was able to neutralize my lips but my teeth also have a green tint.
    From the Keying menu, I selected chromakey and used the eyedropper to select the green makeup on my face.  I've adjusted teh Similarity, Blend, Threshold, Cutoff, Smoothing.  On the Image Control setting, I adjusted Contrast and Saturation.
    I think there's a setting I'm missing but I don't know what will create contrast I'm looking for.   Any ideas?
    I've attached a jpg from the video so you can see for yourself.
    Thanks,
    Antoinette

    Once you have everything else set up, my might want to look at Track Matte Keying, on a duplicate of your face, to separate out your teeth.
    This TUTORIAL will give you some basic tips on doing this. You will need to "read-between-the-lines," as it is about "softening skin tones," but the principles are the same - just with your teeth, and you'll not likely be using the Gaussian Blur, that Curt used. Still, the general techniques are the same, just modified for your purposes.
    Hope that this helps, and good luck,
    Hunt
    PS - Steve should move this post out to the main forum area, so that more folk will likely see it, and can comment on other techniques, or correct me, if I misread your needs correctly.

  • How to set printer settings

    I have created report for purchase register.
    i am taking print this on epson printer.
    i have created my own page size as below
    width is 40 cms and height is 30 cms.
    how can i assign above width and height for my printer.

    Hi,
    Please check below strutures, It will help you to solve ur problem.
    ssfctrlop
    ssfcompop
    ssfcompin.
    DATA: gt_control TYPE ssfctrlop,
          gt_output  TYPE ssfcompop,
          gs_input TYPE ssfcompin.
      gs_input-device = 'PRINTER'.
      gs_input-tdpreview = 'X'.
      gs_input-tddest = 'LP01'.
      gs_input-dialog = ' '.
      CALL FUNCTION 'SSF_OPEN'
           EXPORTING
                input         = gs_input
                user_settings = 'X'
           EXCEPTIONS
                error         = 1
                OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *  gt_output-tdnewid = 'X'.
    *  gt_output-tddest = 'LP01'.
      gt_control-preview = 'X'.
      gt_control-no_dialog = 'X'.
      gt_control-no_open   = 'X'.
      gt_control-no_close  = 'X'.
      CALL FUNCTION gv_func_name
           EXPORTING
                order              = pa_order
                control_parameters = gt_control
                output_options     = gt_output
                user_settings      = space
           EXCEPTIONS
                formatting_error   = 1
                internal_error     = 2
                send_error         = 3
                user_canceled      = 4
                OTHERS             = 5.
      IF sy-subrc <> 0.
        WRITE: 'Sy-subrc:',sy-subrc,
               'Error occurred while calling smart form FM!'.
      ENDIF.
      CALL FUNCTION 'SSF_CLOSE'.
    Regards,
    Anversha

  • How to set publication settings to flash 10.1

    Hello,
    In the latest Flash Professional CC you can set the document to Flash 10.3 and further, but to upload a Flash-banner to advertisers, for example Google, it should be Flash 10.1 or lower.
    I do not see an option to downgrade my file to 10.1 or lower.
    What should I do to resolve this problem?
    Thanks in advance.
    Gr, Marco

    Hi,
    Please check this link with similar workaround
    Adding Flash Player 11 support to Flash Pro CS5 and CS5.5
    Regards,
    Devendra

  • How to set default settings to display record count in multi record block

    Hi All
    Whenever I query my multi record block, I get 1/? as record count at the console in standard Oracle Applications. Is there any setting so that it displays 1/50 (in case total record queried is 50). I don't want to set query all property of block as I don't have any control in standard Apps forms.
    Thanks in advance
    Navdeep

    Check out the next_navigation_item option for the get_item_property procedure. If you use this you can do the process without having to navigate from one item to the next.
    You can do something like this (untested) to move and resize the items (other than the first in the block):
    PROCEDURE move_and_resize(p_item IN ITEM, p_width IN PLS_INTEGER) IS
      prev_item ITEM := Get_Item_Property(p_item, PREVIOUS_NAVIGATION_ITEM);
    BEGIN
      Set_Item_Property(p_item, WIDTH, Get_Item_Property(p_item, WIDTH) + p_width);
      Set_Item_Property(p_item, X_POS, Get_Item_Property(prev_item, WIDTH) +
                                       Get_Item_Property(prev_item, X_POS));
    END move_and_resize;
    move_and_resize(myitem, -30);

  • How to set the settings

    for such a file:
    to get it out in the same size?
    ~Karl

    Thank you all who racked their brains about it, (sich den Kopf zerbrachen),
    and have nice Easter days,
    Karl

Maybe you are looking for

  • GR for purchase order with Account assignment E

    Hello All I am having a scenario where in the BOM structure is as under: A->B->C--->D, D is the raw material, C is the component produced in-house, B is the material which we procure through subcontracting, in the material master of C SPK:30 is used

  • Getting disabled screen on ipod not synced to a computer

    I have an ipod touch that was locked to the disabled screen since the wrong pass code  was entered. The ipod was never synced to a computer. The disabled screen tells me to connect to itunes. When I do that itunes tells me to enter the pass code. How

  • Can't uninstall itunes 5, help...

    I got my itunes 5 working after about a week, but problem arised afterward. It failed to launch, and I can't uninstalled it. I tried going into control panel and do the remove software, but that won't work either. What else I can do to uninstall it?

  • Inter Company Transactions Error

    Dear Experts, While posting an inter Company transaction, the following error is confronted with: A unique company code has not been assigned to company number XXXXXX Message no. GLT0001 Diagnosis Document breakdown is active in your system. In certa

  • Use of ValueType characteristic in BCS - redundant?

    At a former client they had "ValueType" (from R/3) characteristic in the BCS DataBasis. It seems redundant to me when version allows differentiation between actual and plan. I didn't have time to investigate the mapping from R/3 before moving on to a