openoffice/libreoffice API를 사용하여 ODT 문서를 생성 중이며 매번 MD5 비교를 통해 파일이 100 % 동일하게 나오길 바랍니다.API를 사용하여 ODF 루트 RSID를 재정의하는 방법
이 시점에서 나는 서로 다른 시간에 생성 된 두 파일의 압축을 풀고 zip 파일 내의 모든 파일을 검사 할 수 있으며 두 가지 고유 한 차이 (둘 다 관련된 RSID)가있는 Settings.xml을 제외하고 모두 100 %와 일치합니다.
<config:config-item config:name="RsidRoot" config:type="int">1835643</config:config-item>
<config:config-item config:name="Rsid" config:type="int">1835643</config:config-item>
및
나는이 병합 원본 문서에 다시 추적하기 위해 사용 된 것으로, 배웠지 만 나는하지 않는 한 나는 그들에게 내가 제어 고정 값을되고 싶어 어쨌든 이들을 병합 할 계획이지만 이러한 속성을 설정할 위치를 찾을 수는 없습니다.나는 (아래) 몇 가지 옵션을 시도하고 속성을 출력했지만 지금까지 찾을 수 없었습니다. 거기에 RSID를 재정의 할 수있는 방법이 있는데, 파일을 압축 해제하지 않고 XML을 수정하지 않고도이 작업을 계속 찾고 있습니다.
// Looking for RSID in all the wrong places - test 1
XPropertySet xSettings = (XPropertySet) xRemoteServiceManager.createInstanceWithContext("com.sun.star.document.Settings", componentContext);
// Looking for RSID in all the wrong places - test 2
Object configProvider = xRemoteServiceManager.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", componentContext);
XMultiServiceFactory xConfigProvider = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, configProvider);
PropertyValue[] lParams = new PropertyValue[1];
lParams[0] = new PropertyValue();
lParams[0].Name = "nodepath";
lParams[0].Value = "/";
Object xAccess = xConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess" , lParams);
XNameAccess xNameAccess = (com.sun.star.container.XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xAccess);
그래, 내 첫 번째 해결 방법이기도하고 괜찮 았어. 나는 패키지를 수정하는 과정을 피할 수 있기를 바랬다. 나는 UUID/UIID 식별자의 가능성에 대해 몰랐지만, 아직 언급하지는 않았다. 그러나 그 부분을 조사하고 이것이 저에게 영향을 줄지 알아봐야 할 것이다. –