Coder Social home page Coder Social logo

Comments (6)

accforaus avatar accforaus commented on August 23, 2024

TestMakingTable.java 참고 하시고,

ControlField 인스턴스 생성하시구 원하시는 설정이나 문자열 입력하셔서 문단의 컨트롤 리스트에 추가하시고 저장 하시면 될거 같아요

from hwplib.

neolord0 avatar neolord0 commented on August 23, 2024

네..
누름틀은 누름틀 시작 필드 컨트롤과 누름틀 끝 필드 컨트롤 사이에 텍스트가 저장되는 구조로 되어 있습니다. 일반 컨트롤은 컨트롤 내부에 텍스트가 저장되어 있는데, 이 부분에서 다른 컨트롤과 다름니다.

ControlFinder를 사용해서 원하는 누름틀 시작 ControlField를 찾은 후에 ,
누름틀 시작 필드와 끝 필드 사이에 있는 텍스트를 수정하면 될 거 같습니다.

ControlFinder를 사용하는 예제는 TestFindControl.java를 참고하시면 될 거 같고요..
누름틀 텍스트 빼오는 부분이 kr.dogfoot.hwplib.objectfinder.forField.getFieldText() 이 부분 입니다.
이 부분을 참고하시면 될 거 같습니다.

해 보시고.. 궁금한 점 있으시면 질문 주세요..

from hwplib.

musasin84 avatar musasin84 commented on August 23, 2024

해보겠습니다. 감사합니다.

from hwplib.

musasin84 avatar musasin84 commented on August 23, 2024

ControlField를 찾았는 데 누름틀 시작필드와 끝 필드 접근하여 텍스트를 수정하려면
어떻게 접근해야할까요?
막 해봐도 잘 이해가 안되서요.
TestFindControl.java로 ControlField 까지는 찾았어요.
(기존에 있는 hwp파일의 누름틀에 문자열을 넣고 다른이름(hwp)파일로 저장하려는 의도에요)

from hwplib.

neolord0 avatar neolord0 commented on August 23, 2024

필드 컨트롤를 포함하는 Paragaraph(문단) 객체를 구한 다음에.. Paragaraph안에 ParaText라는 객체에서 문단에 포함된 텍스트를 잘라내야 합니다. 이 ParaText에는 문자열이 있는 문자들을 하나의 객체로 만들어 표현합니다. HWPChar객체의 리스트로요.. 이 객체는 일반적인 문자를 표현하는 HWPCharNormal 객체도 있지만, 문단에서 컨트롤의 위치를 나타내는 HWPCharControlChar, HWPCharControlExtend, HWPCharControlInline 객체도 포함합니다.

HWPChar객체의 리스트에서 필드 컨트롤의 시작과 끝을 구해야 합니다. 시작과 끝을 구했다면, 그 사이에 HWPCharNormal 객체를 변경해 주면.. 필드의 텍스트가 변경될 것 입니다.

이 부분은 kr.dogfoot.hwplib.objectfinder.forField.getFieldText() 을 참고 하시면 될 거 같습니다.

from hwplib.

musasin84 avatar musasin84 commented on August 23, 2024

네 답변 감사드려요. 다시 집중해볼게요. ㅎㅎ

from hwplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.