mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-17 13:25:58 +08:00
Compare commits
9 Commits
core-windo
...
core/devel
| Author | SHA1 | Date | |
|---|---|---|---|
| dce0b43c11 | |||
| d7a981a84e | |||
| bb52ddba2b | |||
| a82814d565 | |||
| bab37e1634 | |||
| 06dea5685a | |||
| 105a23d5bc | |||
| ef69fc4b34 | |||
| f925e5cae9 |
@ -0,0 +1,621 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
6967B0881E279D8D00A129E2 /* PPTFormatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0071E279D8D00A129E2 /* PPTFormatLib.cpp */; };
|
||||
6967B0891E279D8D00A129E2 /* Converter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B00A1E279D8D00A129E2 /* Converter.cpp */; };
|
||||
6967B08A1E279D8D00A129E2 /* ShapeWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B00D1E279D8D00A129E2 /* ShapeWriter.cpp */; };
|
||||
6967B08B1E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0151E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp */; };
|
||||
6967B08C1E279D8D00A129E2 /* ReadStructures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0191E279D8D00A129E2 /* ReadStructures.cpp */; };
|
||||
6967B08D1E279D8D00A129E2 /* Records.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B01B1E279D8D00A129E2 /* Records.cpp */; };
|
||||
6967B08E1E279D8D00A129E2 /* SlidePersist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B01F1E279D8D00A129E2 /* SlidePersist.cpp */; };
|
||||
6967B08F1E279D8D00A129E2 /* AnimationTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0241E279D8D00A129E2 /* AnimationTypes.cpp */; };
|
||||
6967B0901E279D8D00A129E2 /* ArtBlip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0311E279D8D00A129E2 /* ArtBlip.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
6967AFF91E279D3900A129E2 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
6967AFFB1E279D3900A129E2 /* libPPTFormatLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPPTFormatLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6967B0071E279D8D00A129E2 /* PPTFormatLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PPTFormatLib.cpp; path = ../../PPTFormatLib.cpp; sourceTree = "<group>"; };
|
||||
6967B0081E279D8D00A129E2 /* PPTFormatLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPTFormatLib.h; path = ../../PPTFormatLib.h; sourceTree = "<group>"; };
|
||||
6967B00A1E279D8D00A129E2 /* Converter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Converter.cpp; sourceTree = "<group>"; };
|
||||
6967B00B1E279D8D00A129E2 /* Converter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Converter.h; sourceTree = "<group>"; };
|
||||
6967B00C1E279D8D00A129E2 /* ImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageManager.h; sourceTree = "<group>"; };
|
||||
6967B00D1E279D8D00A129E2 /* ShapeWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeWriter.cpp; sourceTree = "<group>"; };
|
||||
6967B00E1E279D8D00A129E2 /* ShapeWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeWriter.h; sourceTree = "<group>"; };
|
||||
6967B00F1E279D8D00A129E2 /* StylesWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StylesWriter.h; sourceTree = "<group>"; };
|
||||
6967B0111E279D8D00A129E2 /* AudioOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioOverlay.h; sourceTree = "<group>"; };
|
||||
6967B0121E279D8D00A129E2 /* ClassesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassesAtom.h; sourceTree = "<group>"; };
|
||||
6967B0131E279D8D00A129E2 /* CommonZLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonZLib.h; sourceTree = "<group>"; };
|
||||
6967B0141E279D8D00A129E2 /* PPTDocumentInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTDocumentInfo.h; sourceTree = "<group>"; };
|
||||
6967B0151E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPTDocumentInfoOneUser.cpp; sourceTree = "<group>"; };
|
||||
6967B0161E279D8D00A129E2 /* PPTDocumentInfoOneUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTDocumentInfoOneUser.h; sourceTree = "<group>"; };
|
||||
6967B0171E279D8D00A129E2 /* PPTFileDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTFileDefines.h; sourceTree = "<group>"; };
|
||||
6967B0181E279D8D00A129E2 /* PPTFileReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTFileReader.h; sourceTree = "<group>"; };
|
||||
6967B0191E279D8D00A129E2 /* ReadStructures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadStructures.cpp; sourceTree = "<group>"; };
|
||||
6967B01A1E279D8D00A129E2 /* ReadStructures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadStructures.h; sourceTree = "<group>"; };
|
||||
6967B01B1E279D8D00A129E2 /* Records.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Records.cpp; sourceTree = "<group>"; };
|
||||
6967B01C1E279D8D00A129E2 /* Records.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Records.h; sourceTree = "<group>"; };
|
||||
6967B01D1E279D8D00A129E2 /* Slide.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slide.h; sourceTree = "<group>"; };
|
||||
6967B01E1E279D8D00A129E2 /* SlideInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideInfo.h; sourceTree = "<group>"; };
|
||||
6967B01F1E279D8D00A129E2 /* SlidePersist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlidePersist.cpp; sourceTree = "<group>"; };
|
||||
6967B0201E279D8D00A129E2 /* SlidePersist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidePersist.h; sourceTree = "<group>"; };
|
||||
6967B0221E279D8D00A129E2 /* AnimationInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0241E279D8D00A129E2 /* AnimationTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationTypes.cpp; sourceTree = "<group>"; };
|
||||
6967B0251E279D8D00A129E2 /* AnimationTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationTypes.h; sourceTree = "<group>"; };
|
||||
6967B0261E279D8D00A129E2 /* BlipEntityAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipEntityAtom.h; sourceTree = "<group>"; };
|
||||
6967B0271E279D8D00A129E2 /* BookmarkEntityAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarkEntityAtom.h; sourceTree = "<group>"; };
|
||||
6967B0281E279D8D00A129E2 /* BookmarkSeedAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarkSeedAtom.h; sourceTree = "<group>"; };
|
||||
6967B0291E279D8D00A129E2 /* ColorSchemeAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorSchemeAtom.h; sourceTree = "<group>"; };
|
||||
6967B02A1E279D8D00A129E2 /* CString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CString.h; sourceTree = "<group>"; };
|
||||
6967B02B1E279D8D00A129E2 /* CurrentUserAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurrentUserAtom.h; sourceTree = "<group>"; };
|
||||
6967B02C1E279D8D00A129E2 /* DocRoutingSlipAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocRoutingSlipAtom.h; sourceTree = "<group>"; };
|
||||
6967B02D1E279D8D00A129E2 /* DocumentAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentAtom.h; sourceTree = "<group>"; };
|
||||
6967B02E1E279D8D00A129E2 /* DocumentRecords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentRecords.h; sourceTree = "<group>"; };
|
||||
6967B02F1E279D8D00A129E2 /* DocumentTextInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTextInfo.h; sourceTree = "<group>"; };
|
||||
6967B0311E279D8D00A129E2 /* ArtBlip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArtBlip.cpp; sourceTree = "<group>"; };
|
||||
6967B0321E279D8D00A129E2 /* ArtBlip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArtBlip.h; sourceTree = "<group>"; };
|
||||
6967B0331E279D8D00A129E2 /* BlipStoreContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipStoreContainer.h; sourceTree = "<group>"; };
|
||||
6967B0341E279D8D00A129E2 /* BlipStoreEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipStoreEntry.h; sourceTree = "<group>"; };
|
||||
6967B0351E279D8D00A129E2 /* ChildAnchor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildAnchor.h; sourceTree = "<group>"; };
|
||||
6967B0361E279D8D00A129E2 /* ClientAnchor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientAnchor.h; sourceTree = "<group>"; };
|
||||
6967B0371E279D8D00A129E2 /* DrawingContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingContainer.h; sourceTree = "<group>"; };
|
||||
6967B0381E279D8D00A129E2 /* DrawingGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingGroup.h; sourceTree = "<group>"; };
|
||||
6967B0391E279D8D00A129E2 /* DrawingRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingRecord.h; sourceTree = "<group>"; };
|
||||
6967B03A1E279D8D00A129E2 /* GroupShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupShape.h; sourceTree = "<group>"; };
|
||||
6967B03B1E279D8D00A129E2 /* GroupShapeContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupShapeContainer.h; sourceTree = "<group>"; };
|
||||
6967B03C1E279D8D00A129E2 /* RegGroupItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegGroupItems.h; sourceTree = "<group>"; };
|
||||
6967B03D1E279D8D00A129E2 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
|
||||
6967B03E1E279D8D00A129E2 /* ShapeContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeContainer.h; sourceTree = "<group>"; };
|
||||
6967B03F1E279D8D00A129E2 /* ShapeProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeProperties.h; sourceTree = "<group>"; };
|
||||
6967B0401E279D8D00A129E2 /* TextBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBox.h; sourceTree = "<group>"; };
|
||||
6967B0411E279D8D00A129E2 /* EndDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EndDocument.h; sourceTree = "<group>"; };
|
||||
6967B0421E279D8D00A129E2 /* ExCDAudioContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExCDAudioContainer.h; sourceTree = "<group>"; };
|
||||
6967B0431E279D8D00A129E2 /* ExControlAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExControlAtom.h; sourceTree = "<group>"; };
|
||||
6967B0441E279D8D00A129E2 /* ExHyperlinkAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExHyperlinkAtom.h; sourceTree = "<group>"; };
|
||||
6967B0451E279D8D00A129E2 /* ExMediaAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExMediaAtom.h; sourceTree = "<group>"; };
|
||||
6967B0461E279D8D00A129E2 /* ExMIDIAudioContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExMIDIAudioContainer.h; sourceTree = "<group>"; };
|
||||
6967B0471E279D8D00A129E2 /* ExObjListAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExObjListAtom.h; sourceTree = "<group>"; };
|
||||
6967B0481E279D8D00A129E2 /* ExObjListContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExObjListContainer.h; sourceTree = "<group>"; };
|
||||
6967B0491E279D8D00A129E2 /* ExObjRefAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExObjRefAtom.h; sourceTree = "<group>"; };
|
||||
6967B04A1E279D8D00A129E2 /* ExOleEmbedAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExOleEmbedAtom.h; sourceTree = "<group>"; };
|
||||
6967B04B1E279D8D00A129E2 /* ExOleLinkAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExOleLinkAtom.h; sourceTree = "<group>"; };
|
||||
6967B04C1E279D8D00A129E2 /* ExOleObjAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExOleObjAtom.h; sourceTree = "<group>"; };
|
||||
6967B04D1E279D8D00A129E2 /* ExVideoContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExVideoContainer.h; sourceTree = "<group>"; };
|
||||
6967B04E1E279D8D00A129E2 /* ExWAVAudioEmbeddedContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExWAVAudioEmbeddedContainer.h; sourceTree = "<group>"; };
|
||||
6967B04F1E279D8D00A129E2 /* ExWAVAudioLinkContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExWAVAudioLinkContainer.h; sourceTree = "<group>"; };
|
||||
6967B0501E279D8D00A129E2 /* FontEntityAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontEntityAtom.h; sourceTree = "<group>"; };
|
||||
6967B0511E279D8D00A129E2 /* GridSpacing10Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridSpacing10Atom.h; sourceTree = "<group>"; };
|
||||
6967B0521E279D8D00A129E2 /* GuideAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GuideAtom.h; sourceTree = "<group>"; };
|
||||
6967B0531E279D8D00A129E2 /* HeadersFootersAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeadersFootersAtom.h; sourceTree = "<group>"; };
|
||||
6967B0541E279D8D00A129E2 /* InteractiveInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractiveInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0551E279D8D00A129E2 /* KinsokuAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KinsokuAtom.h; sourceTree = "<group>"; };
|
||||
6967B0561E279D8D00A129E2 /* MasterPersistAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterPersistAtom.h; sourceTree = "<group>"; };
|
||||
6967B0571E279D8D00A129E2 /* MasterTextPropAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterTextPropAtom.h; sourceTree = "<group>"; };
|
||||
6967B0581E279D8D00A129E2 /* MetafileBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MetafileBlob.h; sourceTree = "<group>"; };
|
||||
6967B0591E279D8D00A129E2 /* MouseTextInteractiveInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MouseTextInteractiveInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B05A1E279D8D00A129E2 /* NamedShowSlidesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedShowSlidesAtom.h; sourceTree = "<group>"; };
|
||||
6967B05B1E279D8D00A129E2 /* NormalViewSetInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NormalViewSetInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B05C1E279D8D00A129E2 /* NotesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotesAtom.h; sourceTree = "<group>"; };
|
||||
6967B05D1E279D8D00A129E2 /* NotesPersistAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotesPersistAtom.h; sourceTree = "<group>"; };
|
||||
6967B05E1E279D8D00A129E2 /* NoZoomViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoZoomViewInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B05F1E279D8D00A129E2 /* OutlineTextRefAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutlineTextRefAtom.h; sourceTree = "<group>"; };
|
||||
6967B0601E279D8D00A129E2 /* PersistDirectoryAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistDirectoryAtom.h; sourceTree = "<group>"; };
|
||||
6967B0611E279D8D00A129E2 /* PlaceHolderAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaceHolderAtom.h; sourceTree = "<group>"; };
|
||||
6967B0621E279D8D00A129E2 /* RecordsIncluder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordsIncluder.h; sourceTree = "<group>"; };
|
||||
6967B0631E279D8D00A129E2 /* RoundTripColorMappingAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripColorMappingAtom.h; sourceTree = "<group>"; };
|
||||
6967B0641E279D8D00A129E2 /* RoundTripCompositeMainMasterId12Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripCompositeMainMasterId12Atom.h; sourceTree = "<group>"; };
|
||||
6967B0651E279D8D00A129E2 /* RoundTripNewPlaceholderId12Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripNewPlaceholderId12Atom.h; sourceTree = "<group>"; };
|
||||
6967B0661E279D8D00A129E2 /* RoundTripOriginalMainMasterId12Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripOriginalMainMasterId12Atom.h; sourceTree = "<group>"; };
|
||||
6967B0671E279D8D00A129E2 /* RoundTripThemeAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripThemeAtom.h; sourceTree = "<group>"; };
|
||||
6967B0681E279D8D00A129E2 /* ShapeFlags10Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeFlags10Atom.h; sourceTree = "<group>"; };
|
||||
6967B0691E279D8D00A129E2 /* ShapeFlagsAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeFlagsAtom.h; sourceTree = "<group>"; };
|
||||
6967B06A1E279D8D00A129E2 /* SlideAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideAtom.h; sourceTree = "<group>"; };
|
||||
6967B06B1E279D8D00A129E2 /* SlideColorSchemeAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideColorSchemeAtom.h; sourceTree = "<group>"; };
|
||||
6967B06C1E279D8D00A129E2 /* SlideContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideContainer.h; sourceTree = "<group>"; };
|
||||
6967B06D1E279D8D00A129E2 /* SlideListWithText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideListWithText.h; sourceTree = "<group>"; };
|
||||
6967B06E1E279D8D00A129E2 /* SlidePersistAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidePersistAtom.h; sourceTree = "<group>"; };
|
||||
6967B06F1E279D8D00A129E2 /* SlideViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideViewInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0701E279D8D00A129E2 /* SoundCollAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundCollAtom.h; sourceTree = "<group>"; };
|
||||
6967B0711E279D8D00A129E2 /* SoundCollectionContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundCollectionContainer.h; sourceTree = "<group>"; };
|
||||
6967B0721E279D8D00A129E2 /* SoundContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundContainer.h; sourceTree = "<group>"; };
|
||||
6967B0731E279D8D00A129E2 /* SoundDataBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundDataBlob.h; sourceTree = "<group>"; };
|
||||
6967B0741E279D8D00A129E2 /* SSDocInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSDocInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0751E279D8D00A129E2 /* SSlideLayoutAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSlideLayoutAtom.h; sourceTree = "<group>"; };
|
||||
6967B0761E279D8D00A129E2 /* SSSlideInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSSlideInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0771E279D8D00A129E2 /* StyleTextPropAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleTextPropAtom.h; sourceTree = "<group>"; };
|
||||
6967B0781E279D8D00A129E2 /* TextBookmarkAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBookmarkAtom.h; sourceTree = "<group>"; };
|
||||
6967B0791E279D8D00A129E2 /* TextBytesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBytesAtom.h; sourceTree = "<group>"; };
|
||||
6967B07A1E279D8D00A129E2 /* TextCFExceptionAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCFExceptionAtom.h; sourceTree = "<group>"; };
|
||||
6967B07B1E279D8D00A129E2 /* TextCharsAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCharsAtom.h; sourceTree = "<group>"; };
|
||||
6967B07C1E279D8D00A129E2 /* TextFullSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextFullSettings.h; sourceTree = "<group>"; };
|
||||
6967B07D1E279D8D00A129E2 /* TextHeaderAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextHeaderAtom.h; sourceTree = "<group>"; };
|
||||
6967B07E1E279D8D00A129E2 /* TextInteractiveInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInteractiveInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B07F1E279D8D00A129E2 /* TextMasterStyleAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextMasterStyleAtom.h; sourceTree = "<group>"; };
|
||||
6967B0801E279D8D00A129E2 /* TextPFExceptionAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPFExceptionAtom.h; sourceTree = "<group>"; };
|
||||
6967B0811E279D8D00A129E2 /* TextRulerAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextRulerAtom.h; sourceTree = "<group>"; };
|
||||
6967B0821E279D8D00A129E2 /* TextSIExceptionAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextSIExceptionAtom.h; sourceTree = "<group>"; };
|
||||
6967B0831E279D8D00A129E2 /* TextSpecInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextSpecInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0841E279D8D00A129E2 /* UserEditAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserEditAtom.h; sourceTree = "<group>"; };
|
||||
6967B0851E279D8D00A129E2 /* VBAInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VBAInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0861E279D8D00A129E2 /* ViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewInfoAtom.h; sourceTree = "<group>"; };
|
||||
6967B0871E279D8D00A129E2 /* ZoomViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZoomViewInfoAtom.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
6967AFF81E279D3900A129E2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
6967AFF21E279D3900A129E2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFFD1E279D3900A129E2 /* PPTFormatLib */,
|
||||
6967AFFC1E279D3900A129E2 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967AFFC1E279D3900A129E2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFFB1E279D3900A129E2 /* libPPTFormatLib.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967AFFD1E279D3900A129E2 /* PPTFormatLib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0071E279D8D00A129E2 /* PPTFormatLib.cpp */,
|
||||
6967B0081E279D8D00A129E2 /* PPTFormatLib.h */,
|
||||
6967B0091E279D8D00A129E2 /* PPTXWriter */,
|
||||
6967B0101E279D8D00A129E2 /* Reader */,
|
||||
6967B0211E279D8D00A129E2 /* Records */,
|
||||
);
|
||||
path = PPTFormatLib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0091E279D8D00A129E2 /* PPTXWriter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B00A1E279D8D00A129E2 /* Converter.cpp */,
|
||||
6967B00B1E279D8D00A129E2 /* Converter.h */,
|
||||
6967B00C1E279D8D00A129E2 /* ImageManager.h */,
|
||||
6967B00D1E279D8D00A129E2 /* ShapeWriter.cpp */,
|
||||
6967B00E1E279D8D00A129E2 /* ShapeWriter.h */,
|
||||
6967B00F1E279D8D00A129E2 /* StylesWriter.h */,
|
||||
);
|
||||
name = PPTXWriter;
|
||||
path = ../../PPTXWriter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0101E279D8D00A129E2 /* Reader */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0111E279D8D00A129E2 /* AudioOverlay.h */,
|
||||
6967B0121E279D8D00A129E2 /* ClassesAtom.h */,
|
||||
6967B0131E279D8D00A129E2 /* CommonZLib.h */,
|
||||
6967B0141E279D8D00A129E2 /* PPTDocumentInfo.h */,
|
||||
6967B0151E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp */,
|
||||
6967B0161E279D8D00A129E2 /* PPTDocumentInfoOneUser.h */,
|
||||
6967B0171E279D8D00A129E2 /* PPTFileDefines.h */,
|
||||
6967B0181E279D8D00A129E2 /* PPTFileReader.h */,
|
||||
6967B0191E279D8D00A129E2 /* ReadStructures.cpp */,
|
||||
6967B01A1E279D8D00A129E2 /* ReadStructures.h */,
|
||||
6967B01B1E279D8D00A129E2 /* Records.cpp */,
|
||||
6967B01C1E279D8D00A129E2 /* Records.h */,
|
||||
6967B01D1E279D8D00A129E2 /* Slide.h */,
|
||||
6967B01E1E279D8D00A129E2 /* SlideInfo.h */,
|
||||
6967B01F1E279D8D00A129E2 /* SlidePersist.cpp */,
|
||||
6967B0201E279D8D00A129E2 /* SlidePersist.h */,
|
||||
);
|
||||
name = Reader;
|
||||
path = ../../Reader;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0211E279D8D00A129E2 /* Records */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0221E279D8D00A129E2 /* AnimationInfoAtom.h */,
|
||||
6967B0231E279D8D00A129E2 /* Animations */,
|
||||
6967B0261E279D8D00A129E2 /* BlipEntityAtom.h */,
|
||||
6967B0271E279D8D00A129E2 /* BookmarkEntityAtom.h */,
|
||||
6967B0281E279D8D00A129E2 /* BookmarkSeedAtom.h */,
|
||||
6967B0291E279D8D00A129E2 /* ColorSchemeAtom.h */,
|
||||
6967B02A1E279D8D00A129E2 /* CString.h */,
|
||||
6967B02B1E279D8D00A129E2 /* CurrentUserAtom.h */,
|
||||
6967B02C1E279D8D00A129E2 /* DocRoutingSlipAtom.h */,
|
||||
6967B02D1E279D8D00A129E2 /* DocumentAtom.h */,
|
||||
6967B02E1E279D8D00A129E2 /* DocumentRecords.h */,
|
||||
6967B02F1E279D8D00A129E2 /* DocumentTextInfo.h */,
|
||||
6967B0301E279D8D00A129E2 /* Drawing */,
|
||||
6967B0411E279D8D00A129E2 /* EndDocument.h */,
|
||||
6967B0421E279D8D00A129E2 /* ExCDAudioContainer.h */,
|
||||
6967B0431E279D8D00A129E2 /* ExControlAtom.h */,
|
||||
6967B0441E279D8D00A129E2 /* ExHyperlinkAtom.h */,
|
||||
6967B0451E279D8D00A129E2 /* ExMediaAtom.h */,
|
||||
6967B0461E279D8D00A129E2 /* ExMIDIAudioContainer.h */,
|
||||
6967B0471E279D8D00A129E2 /* ExObjListAtom.h */,
|
||||
6967B0481E279D8D00A129E2 /* ExObjListContainer.h */,
|
||||
6967B0491E279D8D00A129E2 /* ExObjRefAtom.h */,
|
||||
6967B04A1E279D8D00A129E2 /* ExOleEmbedAtom.h */,
|
||||
6967B04B1E279D8D00A129E2 /* ExOleLinkAtom.h */,
|
||||
6967B04C1E279D8D00A129E2 /* ExOleObjAtom.h */,
|
||||
6967B04D1E279D8D00A129E2 /* ExVideoContainer.h */,
|
||||
6967B04E1E279D8D00A129E2 /* ExWAVAudioEmbeddedContainer.h */,
|
||||
6967B04F1E279D8D00A129E2 /* ExWAVAudioLinkContainer.h */,
|
||||
6967B0501E279D8D00A129E2 /* FontEntityAtom.h */,
|
||||
6967B0511E279D8D00A129E2 /* GridSpacing10Atom.h */,
|
||||
6967B0521E279D8D00A129E2 /* GuideAtom.h */,
|
||||
6967B0531E279D8D00A129E2 /* HeadersFootersAtom.h */,
|
||||
6967B0541E279D8D00A129E2 /* InteractiveInfoAtom.h */,
|
||||
6967B0551E279D8D00A129E2 /* KinsokuAtom.h */,
|
||||
6967B0561E279D8D00A129E2 /* MasterPersistAtom.h */,
|
||||
6967B0571E279D8D00A129E2 /* MasterTextPropAtom.h */,
|
||||
6967B0581E279D8D00A129E2 /* MetafileBlob.h */,
|
||||
6967B0591E279D8D00A129E2 /* MouseTextInteractiveInfoAtom.h */,
|
||||
6967B05A1E279D8D00A129E2 /* NamedShowSlidesAtom.h */,
|
||||
6967B05B1E279D8D00A129E2 /* NormalViewSetInfoAtom.h */,
|
||||
6967B05C1E279D8D00A129E2 /* NotesAtom.h */,
|
||||
6967B05D1E279D8D00A129E2 /* NotesPersistAtom.h */,
|
||||
6967B05E1E279D8D00A129E2 /* NoZoomViewInfoAtom.h */,
|
||||
6967B05F1E279D8D00A129E2 /* OutlineTextRefAtom.h */,
|
||||
6967B0601E279D8D00A129E2 /* PersistDirectoryAtom.h */,
|
||||
6967B0611E279D8D00A129E2 /* PlaceHolderAtom.h */,
|
||||
6967B0621E279D8D00A129E2 /* RecordsIncluder.h */,
|
||||
6967B0631E279D8D00A129E2 /* RoundTripColorMappingAtom.h */,
|
||||
6967B0641E279D8D00A129E2 /* RoundTripCompositeMainMasterId12Atom.h */,
|
||||
6967B0651E279D8D00A129E2 /* RoundTripNewPlaceholderId12Atom.h */,
|
||||
6967B0661E279D8D00A129E2 /* RoundTripOriginalMainMasterId12Atom.h */,
|
||||
6967B0671E279D8D00A129E2 /* RoundTripThemeAtom.h */,
|
||||
6967B0681E279D8D00A129E2 /* ShapeFlags10Atom.h */,
|
||||
6967B0691E279D8D00A129E2 /* ShapeFlagsAtom.h */,
|
||||
6967B06A1E279D8D00A129E2 /* SlideAtom.h */,
|
||||
6967B06B1E279D8D00A129E2 /* SlideColorSchemeAtom.h */,
|
||||
6967B06C1E279D8D00A129E2 /* SlideContainer.h */,
|
||||
6967B06D1E279D8D00A129E2 /* SlideListWithText.h */,
|
||||
6967B06E1E279D8D00A129E2 /* SlidePersistAtom.h */,
|
||||
6967B06F1E279D8D00A129E2 /* SlideViewInfoAtom.h */,
|
||||
6967B0701E279D8D00A129E2 /* SoundCollAtom.h */,
|
||||
6967B0711E279D8D00A129E2 /* SoundCollectionContainer.h */,
|
||||
6967B0721E279D8D00A129E2 /* SoundContainer.h */,
|
||||
6967B0731E279D8D00A129E2 /* SoundDataBlob.h */,
|
||||
6967B0741E279D8D00A129E2 /* SSDocInfoAtom.h */,
|
||||
6967B0751E279D8D00A129E2 /* SSlideLayoutAtom.h */,
|
||||
6967B0761E279D8D00A129E2 /* SSSlideInfoAtom.h */,
|
||||
6967B0771E279D8D00A129E2 /* StyleTextPropAtom.h */,
|
||||
6967B0781E279D8D00A129E2 /* TextBookmarkAtom.h */,
|
||||
6967B0791E279D8D00A129E2 /* TextBytesAtom.h */,
|
||||
6967B07A1E279D8D00A129E2 /* TextCFExceptionAtom.h */,
|
||||
6967B07B1E279D8D00A129E2 /* TextCharsAtom.h */,
|
||||
6967B07C1E279D8D00A129E2 /* TextFullSettings.h */,
|
||||
6967B07D1E279D8D00A129E2 /* TextHeaderAtom.h */,
|
||||
6967B07E1E279D8D00A129E2 /* TextInteractiveInfoAtom.h */,
|
||||
6967B07F1E279D8D00A129E2 /* TextMasterStyleAtom.h */,
|
||||
6967B0801E279D8D00A129E2 /* TextPFExceptionAtom.h */,
|
||||
6967B0811E279D8D00A129E2 /* TextRulerAtom.h */,
|
||||
6967B0821E279D8D00A129E2 /* TextSIExceptionAtom.h */,
|
||||
6967B0831E279D8D00A129E2 /* TextSpecInfoAtom.h */,
|
||||
6967B0841E279D8D00A129E2 /* UserEditAtom.h */,
|
||||
6967B0851E279D8D00A129E2 /* VBAInfoAtom.h */,
|
||||
6967B0861E279D8D00A129E2 /* ViewInfoAtom.h */,
|
||||
6967B0871E279D8D00A129E2 /* ZoomViewInfoAtom.h */,
|
||||
);
|
||||
name = Records;
|
||||
path = ../../Records;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0231E279D8D00A129E2 /* Animations */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0241E279D8D00A129E2 /* AnimationTypes.cpp */,
|
||||
6967B0251E279D8D00A129E2 /* AnimationTypes.h */,
|
||||
);
|
||||
path = Animations;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0301E279D8D00A129E2 /* Drawing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0311E279D8D00A129E2 /* ArtBlip.cpp */,
|
||||
6967B0321E279D8D00A129E2 /* ArtBlip.h */,
|
||||
6967B0331E279D8D00A129E2 /* BlipStoreContainer.h */,
|
||||
6967B0341E279D8D00A129E2 /* BlipStoreEntry.h */,
|
||||
6967B0351E279D8D00A129E2 /* ChildAnchor.h */,
|
||||
6967B0361E279D8D00A129E2 /* ClientAnchor.h */,
|
||||
6967B0371E279D8D00A129E2 /* DrawingContainer.h */,
|
||||
6967B0381E279D8D00A129E2 /* DrawingGroup.h */,
|
||||
6967B0391E279D8D00A129E2 /* DrawingRecord.h */,
|
||||
6967B03A1E279D8D00A129E2 /* GroupShape.h */,
|
||||
6967B03B1E279D8D00A129E2 /* GroupShapeContainer.h */,
|
||||
6967B03C1E279D8D00A129E2 /* RegGroupItems.h */,
|
||||
6967B03D1E279D8D00A129E2 /* Shape.h */,
|
||||
6967B03E1E279D8D00A129E2 /* ShapeContainer.h */,
|
||||
6967B03F1E279D8D00A129E2 /* ShapeProperties.h */,
|
||||
6967B0401E279D8D00A129E2 /* TextBox.h */,
|
||||
);
|
||||
path = Drawing;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
6967AFFA1E279D3900A129E2 /* PPTFormatLib */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6967B0041E279D3900A129E2 /* Build configuration list for PBXNativeTarget "PPTFormatLib" */;
|
||||
buildPhases = (
|
||||
6967AFF71E279D3900A129E2 /* Sources */,
|
||||
6967AFF81E279D3900A129E2 /* Frameworks */,
|
||||
6967AFF91E279D3900A129E2 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = PPTFormatLib;
|
||||
productName = PPTFormatLib;
|
||||
productReference = 6967AFFB1E279D3900A129E2 /* libPPTFormatLib.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
6967AFF31E279D3900A129E2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = OnlyOffce;
|
||||
TargetAttributes = {
|
||||
6967AFFA1E279D3900A129E2 = {
|
||||
CreatedOnToolsVersion = 8.2;
|
||||
DevelopmentTeam = 2WH24U26GJ;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 6967AFF61E279D3900A129E2 /* Build configuration list for PBXProject "PPTFormatLib" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 6967AFF21E279D3900A129E2;
|
||||
productRefGroup = 6967AFFC1E279D3900A129E2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
6967AFFA1E279D3900A129E2 /* PPTFormatLib */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
6967AFF71E279D3900A129E2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6967B08F1E279D8D00A129E2 /* AnimationTypes.cpp in Sources */,
|
||||
6967B08E1E279D8D00A129E2 /* SlidePersist.cpp in Sources */,
|
||||
6967B0891E279D8D00A129E2 /* Converter.cpp in Sources */,
|
||||
6967B0881E279D8D00A129E2 /* PPTFormatLib.cpp in Sources */,
|
||||
6967B08D1E279D8D00A129E2 /* Records.cpp in Sources */,
|
||||
6967B08A1E279D8D00A129E2 /* ShapeWriter.cpp in Sources */,
|
||||
6967B08C1E279D8D00A129E2 /* ReadStructures.cpp in Sources */,
|
||||
6967B08B1E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp in Sources */,
|
||||
6967B0901E279D8D00A129E2 /* ArtBlip.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
6967B0021E279D3900A129E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6967B0031E279D3900A129E2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
6967B0051E279D3900A129E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
BUILD_CONFIG_FULL_VERSION,
|
||||
_SVG_CONVERT_TO_IMAGE_,
|
||||
_PRESENTATION_WRITER_,
|
||||
ENABLE_PPT_TO_PPTX_CONVERT,
|
||||
PPT_DEF,
|
||||
PPTX_DEF,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/xml/libxml2/include",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6967B0061E279D3900A129E2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
BUILD_CONFIG_FULL_VERSION,
|
||||
_SVG_CONVERT_TO_IMAGE_,
|
||||
_PRESENTATION_WRITER_,
|
||||
ENABLE_PPT_TO_PPTX_CONVERT,
|
||||
PPT_DEF,
|
||||
PPTX_DEF,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/xml/libxml2/include",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
6967AFF61E279D3900A129E2 /* Build configuration list for PBXProject "PPTFormatLib" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6967B0021E279D3900A129E2 /* Debug */,
|
||||
6967B0031E279D3900A129E2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
6967B0041E279D3900A129E2 /* Build configuration list for PBXNativeTarget "PPTFormatLib" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6967B0051E279D3900A129E2 /* Debug */,
|
||||
6967B0061E279D3900A129E2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 6967AFF31E279D3900A129E2 /* Project object */;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:PPTFormatLib.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
1
ASCOfficePPTFile/PPTFormatLib/Mac/PPTFormatLib/NOTE.txt
Normal file
1
ASCOfficePPTFile/PPTFormatLib/Mac/PPTFormatLib/NOTE.txt
Normal file
@ -0,0 +1 @@
|
||||
DO NOT REMOVE FOLDER FOR XCODE
|
||||
@ -288,7 +288,9 @@ namespace NSPresentationEditor
|
||||
strRels += strHyperlink + L"\"/>";
|
||||
|
||||
m_oWriter.WriteString(strRels);
|
||||
}
|
||||
|
||||
return strRid;
|
||||
}
|
||||
|
||||
AVSINLINE CString WriteHyperlinkImage(const std::wstring& strImage, bool bExternal = true)
|
||||
{
|
||||
|
||||
@ -0,0 +1,368 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
6967AFD41E2798DB00A129E2 /* ConvertDocx2Txt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFCC1E2798DB00A129E2 /* ConvertDocx2Txt.cpp */; };
|
||||
6967AFD51E2798DB00A129E2 /* ConvertTxt2Docx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFCE1E2798DB00A129E2 /* ConvertTxt2Docx.cpp */; };
|
||||
6967AFD61E2798DB00A129E2 /* TxtXmlFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFD21E2798DB00A129E2 /* TxtXmlFile.cpp */; };
|
||||
6967AFE81E279C6F00A129E2 /* Encoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFE11E279C6F00A129E2 /* Encoding.cpp */; };
|
||||
6967AFE91E279C6F00A129E2 /* ToString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFE51E279C6F00A129E2 /* ToString.cpp */; };
|
||||
6967AFF01E279C7700A129E2 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFEB1E279C7700A129E2 /* File.cpp */; };
|
||||
6967AFF11E279C7700A129E2 /* TxtFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFED1E279C7700A129E2 /* TxtFile.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
6967AFBD1E2798B900A129E2 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
6967AFBF1E2798B900A129E2 /* libTxtXmlFormatLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTxtXmlFormatLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6967AFCC1E2798DB00A129E2 /* ConvertDocx2Txt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConvertDocx2Txt.cpp; path = ../../../Source/ConvertDocx2Txt.cpp; sourceTree = "<group>"; };
|
||||
6967AFCD1E2798DB00A129E2 /* ConvertDocx2Txt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConvertDocx2Txt.h; path = ../../../Source/ConvertDocx2Txt.h; sourceTree = "<group>"; };
|
||||
6967AFCE1E2798DB00A129E2 /* ConvertTxt2Docx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConvertTxt2Docx.cpp; path = ../../../Source/ConvertTxt2Docx.cpp; sourceTree = "<group>"; };
|
||||
6967AFCF1E2798DB00A129E2 /* ConvertTxt2Docx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConvertTxt2Docx.h; path = ../../../Source/ConvertTxt2Docx.h; sourceTree = "<group>"; };
|
||||
6967AFD11E2798DB00A129E2 /* TxtXmlEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TxtXmlEvent.h; path = ../../../Source/TxtXmlEvent.h; sourceTree = "<group>"; };
|
||||
6967AFD21E2798DB00A129E2 /* TxtXmlFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TxtXmlFile.cpp; path = ../../../Source/TxtXmlFile.cpp; sourceTree = "<group>"; };
|
||||
6967AFD31E2798DB00A129E2 /* TxtXmlFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TxtXmlFile.h; path = ../../../Source/TxtXmlFile.h; sourceTree = "<group>"; };
|
||||
6967AFE11E279C6F00A129E2 /* Encoding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Encoding.cpp; sourceTree = "<group>"; };
|
||||
6967AFE21E279C6F00A129E2 /* Encoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Encoding.h; sourceTree = "<group>"; };
|
||||
6967AFE31E279C6F00A129E2 /* precompiled_utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = precompiled_utility.h; sourceTree = "<group>"; };
|
||||
6967AFE41E279C6F00A129E2 /* StlUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StlUtils.h; sourceTree = "<group>"; };
|
||||
6967AFE51E279C6F00A129E2 /* ToString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToString.cpp; sourceTree = "<group>"; };
|
||||
6967AFE61E279C6F00A129E2 /* ToString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToString.h; sourceTree = "<group>"; };
|
||||
6967AFE71E279C6F00A129E2 /* Utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utility.h; sourceTree = "<group>"; };
|
||||
6967AFEB1E279C7700A129E2 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = "<group>"; };
|
||||
6967AFEC1E279C7700A129E2 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = "<group>"; };
|
||||
6967AFED1E279C7700A129E2 /* TxtFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TxtFile.cpp; sourceTree = "<group>"; };
|
||||
6967AFEE1E279C7700A129E2 /* TxtFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TxtFile.h; sourceTree = "<group>"; };
|
||||
6967AFEF1E279C7700A129E2 /* TxtFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TxtFormat.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
6967AFBC1E2798B900A129E2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
6967AFB61E2798B900A129E2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFC11E2798B900A129E2 /* TxtXmlFormatLib */,
|
||||
6967AFC01E2798B900A129E2 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967AFC01E2798B900A129E2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFBF1E2798B900A129E2 /* libTxtXmlFormatLib.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967AFC11E2798B900A129E2 /* TxtXmlFormatLib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFEA1E279C7700A129E2 /* TxtFormat */,
|
||||
6967AFE01E279C6F00A129E2 /* Common */,
|
||||
6967AFCC1E2798DB00A129E2 /* ConvertDocx2Txt.cpp */,
|
||||
6967AFCD1E2798DB00A129E2 /* ConvertDocx2Txt.h */,
|
||||
6967AFCE1E2798DB00A129E2 /* ConvertTxt2Docx.cpp */,
|
||||
6967AFCF1E2798DB00A129E2 /* ConvertTxt2Docx.h */,
|
||||
6967AFD11E2798DB00A129E2 /* TxtXmlEvent.h */,
|
||||
6967AFD21E2798DB00A129E2 /* TxtXmlFile.cpp */,
|
||||
6967AFD31E2798DB00A129E2 /* TxtXmlFile.h */,
|
||||
);
|
||||
path = TxtXmlFormatLib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967AFE01E279C6F00A129E2 /* Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFE11E279C6F00A129E2 /* Encoding.cpp */,
|
||||
6967AFE21E279C6F00A129E2 /* Encoding.h */,
|
||||
6967AFE31E279C6F00A129E2 /* precompiled_utility.h */,
|
||||
6967AFE41E279C6F00A129E2 /* StlUtils.h */,
|
||||
6967AFE51E279C6F00A129E2 /* ToString.cpp */,
|
||||
6967AFE61E279C6F00A129E2 /* ToString.h */,
|
||||
6967AFE71E279C6F00A129E2 /* Utility.h */,
|
||||
);
|
||||
name = Common;
|
||||
path = ../../../Source/Common;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967AFEA1E279C7700A129E2 /* TxtFormat */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967AFEB1E279C7700A129E2 /* File.cpp */,
|
||||
6967AFEC1E279C7700A129E2 /* File.h */,
|
||||
6967AFED1E279C7700A129E2 /* TxtFile.cpp */,
|
||||
6967AFEE1E279C7700A129E2 /* TxtFile.h */,
|
||||
6967AFEF1E279C7700A129E2 /* TxtFormat.h */,
|
||||
);
|
||||
name = TxtFormat;
|
||||
path = ../../../Source/TxtFormat;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
6967AFBE1E2798B900A129E2 /* TxtXmlFormatLib */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6967AFC81E2798B900A129E2 /* Build configuration list for PBXNativeTarget "TxtXmlFormatLib" */;
|
||||
buildPhases = (
|
||||
6967AFBB1E2798B900A129E2 /* Sources */,
|
||||
6967AFBC1E2798B900A129E2 /* Frameworks */,
|
||||
6967AFBD1E2798B900A129E2 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = TxtXmlFormatLib;
|
||||
productName = TxtXmlFormatLib;
|
||||
productReference = 6967AFBF1E2798B900A129E2 /* libTxtXmlFormatLib.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
6967AFB71E2798B900A129E2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = OnlyOffce;
|
||||
TargetAttributes = {
|
||||
6967AFBE1E2798B900A129E2 = {
|
||||
CreatedOnToolsVersion = 8.2;
|
||||
DevelopmentTeam = 2WH24U26GJ;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 6967AFBA1E2798B900A129E2 /* Build configuration list for PBXProject "TxtXmlFormatLib" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 6967AFB61E2798B900A129E2;
|
||||
productRefGroup = 6967AFC01E2798B900A129E2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
6967AFBE1E2798B900A129E2 /* TxtXmlFormatLib */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
6967AFBB1E2798B900A129E2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6967AFE91E279C6F00A129E2 /* ToString.cpp in Sources */,
|
||||
6967AFE81E279C6F00A129E2 /* Encoding.cpp in Sources */,
|
||||
6967AFF11E279C7700A129E2 /* TxtFile.cpp in Sources */,
|
||||
6967AFD61E2798DB00A129E2 /* TxtXmlFile.cpp in Sources */,
|
||||
6967AFF01E279C7700A129E2 /* File.cpp in Sources */,
|
||||
6967AFD51E2798DB00A129E2 /* ConvertTxt2Docx.cpp in Sources */,
|
||||
6967AFD41E2798DB00A129E2 /* ConvertDocx2Txt.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
6967AFC61E2798B900A129E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6967AFC71E2798B900A129E2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
6967AFC91E2798B900A129E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
"$(PROJECT_DIR)/../../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/xml/libxml2/include",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/freetype-2.5.2/include",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6967AFCA1E2798B900A129E2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
"$(PROJECT_DIR)/../../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/xml/libxml2/include",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/freetype-2.5.2/include",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
6967AFBA1E2798B900A129E2 /* Build configuration list for PBXProject "TxtXmlFormatLib" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6967AFC61E2798B900A129E2 /* Debug */,
|
||||
6967AFC71E2798B900A129E2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
6967AFC81E2798B900A129E2 /* Build configuration list for PBXNativeTarget "TxtXmlFormatLib" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6967AFC91E2798B900A129E2 /* Debug */,
|
||||
6967AFCA1E2798B900A129E2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 6967AFB71E2798B900A129E2 /* Project object */;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:TxtXmlFormatLib.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1 @@
|
||||
DO NOT REMOVE FOLDER FOR XCODE
|
||||
@ -750,6 +750,8 @@
|
||||
#define ASC_COAUTH_EVENT_TYPE_PARTICIPANTS_CHANGED 20101
|
||||
#define ASC_COAUTH_EVENT_TYPE_LOST_CONNECTION 20102
|
||||
#define ASC_COAUTH_EVENT_TYPE_DROP_CONNECTION 20103
|
||||
#define ASC_COAUTH_EVENT_TYPE_WORKBOOK_LOCKED 20104
|
||||
#define ASC_COAUTH_EVENT_TYPE_WORKSHEET_LOCKED 20105
|
||||
|
||||
#define ASC_COAUTH_EVENT_TYPE_INSERT_URL_IMAGE 21000
|
||||
#define ASC_COAUTH_EVENT_TYPE_LOAD_URL_IMAGE 21001
|
||||
|
||||
@ -768,7 +768,7 @@ namespace NSDoctRenderer
|
||||
_LOGGING_ERROR_(L"change", strException);
|
||||
|
||||
char buffer[50];
|
||||
sprintf(buffer, "index=\"%d\"", pNative->m_nCurrentChangesNumber);
|
||||
sprintf(buffer, "index=\"%d\"", pNative->m_nCurrentChangesNumber - 1);
|
||||
std::string s(buffer);
|
||||
strError = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)s.c_str(), (LONG)s.length());
|
||||
bIsBreak = true;
|
||||
|
||||
1594
DocxRenderer/DocxRenderer.cpp
Normal file
1594
DocxRenderer/DocxRenderer.cpp
Normal file
File diff suppressed because it is too large
Load Diff
209
DocxRenderer/DocxRenderer.h
Normal file
209
DocxRenderer/DocxRenderer.h
Normal file
@ -0,0 +1,209 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#ifndef _PDF_WRITER_PDFRENDERER_H
|
||||
#define _PDF_WRITER_PDFRENDERER_H
|
||||
|
||||
#include "../DesktopEditor/graphics/IRenderer.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifndef DOCXRENDERER_USE_DYNAMIC_LIBRARY
|
||||
#define DOCXRENDERER_DECL_EXPORT
|
||||
#else
|
||||
#include "../DesktopEditor/common/base_export.h"
|
||||
#define DOCXRENDERER_DECL_EXPORT Q_DECL_EXPORT
|
||||
#endif
|
||||
|
||||
class CFontManager;
|
||||
class CApplicationFonts;
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
enum TextAssociationType
|
||||
{
|
||||
TextAssociationTypeDefault = 0,
|
||||
TextAssociationTypeLine = 1,
|
||||
TextAssociationTypeNoFrames = 2,
|
||||
TextAssociationTypeBlock = 3
|
||||
};
|
||||
}
|
||||
|
||||
class DOCXRENDERER_DECL_EXPORT CDocxRenderer : public IRenderer
|
||||
{
|
||||
public:
|
||||
CDocxRenderer(CApplicationFonts* pAppFonts);
|
||||
~CDocxRenderer();
|
||||
|
||||
void CreateFile(const std::wstring& wsPath);
|
||||
void Close();
|
||||
|
||||
void SetTextAssociationType(const NSDocxRenderer::TextAssociationType& eType);
|
||||
|
||||
void SetTempFolder(const std::wstring& wsPath);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Тип рендерера
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT get_Type(LONG* lType);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для работы со страницей
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT NewPage();
|
||||
virtual HRESULT get_Height(double* dHeight);
|
||||
virtual HRESULT put_Height(const double& dHeight);
|
||||
virtual HRESULT get_Width(double* dWidth);
|
||||
virtual HRESULT put_Width(const double& dWidth);
|
||||
virtual HRESULT get_DpiX(double* dDpiX);
|
||||
virtual HRESULT get_DpiY(double* dDpiY);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для работы с Pen
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT get_PenColor(LONG* lColor);
|
||||
virtual HRESULT put_PenColor(const LONG& lColor);
|
||||
virtual HRESULT get_PenAlpha(LONG* lAlpha);
|
||||
virtual HRESULT put_PenAlpha(const LONG& lAlpha);
|
||||
virtual HRESULT get_PenSize(double* dSize);
|
||||
virtual HRESULT put_PenSize(const double& dSize);
|
||||
virtual HRESULT get_PenDashStyle(BYTE* nDashStyle);
|
||||
virtual HRESULT put_PenDashStyle(const BYTE& nDashStyle);
|
||||
virtual HRESULT get_PenLineStartCap(BYTE* nCapStyle);
|
||||
virtual HRESULT put_PenLineStartCap(const BYTE& nCapStyle);
|
||||
virtual HRESULT get_PenLineEndCap(BYTE* nCapStyle);
|
||||
virtual HRESULT put_PenLineEndCap(const BYTE& nCapStyle);
|
||||
virtual HRESULT get_PenLineJoin(BYTE* nJoinStyle);
|
||||
virtual HRESULT put_PenLineJoin(const BYTE& nJoinStyle);
|
||||
virtual HRESULT get_PenDashOffset(double* dOffset);
|
||||
virtual HRESULT put_PenDashOffset(const double& dOffset);
|
||||
virtual HRESULT get_PenAlign(LONG* lAlign);
|
||||
virtual HRESULT put_PenAlign(const LONG& lAlign);
|
||||
virtual HRESULT get_PenMiterLimit(double* dMiter);
|
||||
virtual HRESULT put_PenMiterLimit(const double& dMiter);
|
||||
virtual HRESULT PenDashPattern(double* pPattern, LONG lCount);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для работы с Brush
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT get_BrushType(LONG* lType);
|
||||
virtual HRESULT put_BrushType(const LONG& lType);
|
||||
virtual HRESULT get_BrushColor1(LONG* lColor);
|
||||
virtual HRESULT put_BrushColor1(const LONG& lColor);
|
||||
virtual HRESULT get_BrushAlpha1(LONG* lAlpha);
|
||||
virtual HRESULT put_BrushAlpha1(const LONG& lAlpha);
|
||||
virtual HRESULT get_BrushColor2(LONG* lColor);
|
||||
virtual HRESULT put_BrushColor2(const LONG& lColor);
|
||||
virtual HRESULT get_BrushAlpha2(LONG* lAlpha);
|
||||
virtual HRESULT put_BrushAlpha2(const LONG& lAlpha);
|
||||
virtual HRESULT get_BrushTexturePath(std::wstring* wsPath);
|
||||
virtual HRESULT put_BrushTexturePath(const std::wstring& wsPath);
|
||||
virtual HRESULT get_BrushTextureMode(LONG* lMode);
|
||||
virtual HRESULT put_BrushTextureMode(const LONG& lMode);
|
||||
virtual HRESULT get_BrushTextureAlpha(LONG* lAlpha);
|
||||
virtual HRESULT put_BrushTextureAlpha(const LONG& lAlpha);
|
||||
virtual HRESULT get_BrushLinearAngle(double* dAngle);
|
||||
virtual HRESULT put_BrushLinearAngle(const double& dAngle);
|
||||
virtual HRESULT BrushRect(const INT& nVal, const double& dLeft, const double& dTop, const double& dWidth, const double& dHeight);
|
||||
virtual HRESULT BrushBounds(const double& dLeft, const double& dTop, const double& dWidth, const double& dHeight);
|
||||
virtual HRESULT put_BrushGradientColors(LONG* pColors, double* pPositions, LONG lCount);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для работы со шрифтами
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT get_FontName(std::wstring* wsName);
|
||||
virtual HRESULT put_FontName(const std::wstring& wsName);
|
||||
virtual HRESULT get_FontPath(std::wstring* wsPath);
|
||||
virtual HRESULT put_FontPath(const std::wstring& wsPath);
|
||||
virtual HRESULT get_FontSize(double* dSize);
|
||||
virtual HRESULT put_FontSize(const double& dSize);
|
||||
virtual HRESULT get_FontStyle(LONG* lStyle);
|
||||
virtual HRESULT put_FontStyle(const LONG& lStyle);
|
||||
virtual HRESULT get_FontStringGID(INT* bGid);
|
||||
virtual HRESULT put_FontStringGID(const INT& bGid);
|
||||
virtual HRESULT get_FontCharSpace(double* dSpace);
|
||||
virtual HRESULT put_FontCharSpace(const double& dSpace);
|
||||
virtual HRESULT get_FontFaceIndex(int* lFaceIndex);
|
||||
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для вывода текста
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT CommandDrawTextCHAR (const LONG& lUnicode, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT CommandDrawTextExCHAR(const LONG& lUnicode, const LONG& lGid, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT CommandDrawText (const std::wstring& wsUnicodeText, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT CommandDrawTextEx (const std::wstring& wsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Маркеры команд
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT BeginCommand(const DWORD& lType);
|
||||
virtual HRESULT EndCommand(const DWORD& lType);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для работы с патом
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT PathCommandMoveTo(const double& dX, const double& dY);
|
||||
virtual HRESULT PathCommandLineTo(const double& dX, const double& dY);
|
||||
virtual HRESULT PathCommandLinesTo(double* pPoints, const int& nCount);
|
||||
virtual HRESULT PathCommandCurveTo(const double& dX1, const double& dY1, const double& dX2, const double& dY2, const double& dXe, const double& dYe);
|
||||
virtual HRESULT PathCommandCurvesTo(double* pPoints, const int& nCount);
|
||||
virtual HRESULT PathCommandArcTo(const double& dX, const double& dY, const double& dW, const double& dH, const double& dStartAngle, const double& dSweepAngle);
|
||||
virtual HRESULT PathCommandClose();
|
||||
virtual HRESULT PathCommandEnd();
|
||||
virtual HRESULT DrawPath(const LONG& lType);
|
||||
virtual HRESULT PathCommandStart();
|
||||
virtual HRESULT PathCommandGetCurrentPoint(double* dX, double* dY);
|
||||
virtual HRESULT PathCommandTextCHAR (const LONG& lUnicode, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT PathCommandTextExCHAR(const LONG& lUnicode, const LONG& lGid, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT PathCommandText (const std::wstring& wsUnicodeText, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT PathCommandTextEx (const std::wstring& wsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для вывода изображений
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT DrawImage(IGrObject* pImage, const double& dX, const double& dY, const double& dW, const double& dH);
|
||||
virtual HRESULT DrawImageFromFile(const std::wstring& wsImagePath, const double& dX, const double& dY, const double& dW, const double& dH, const BYTE& nAlpha = 255);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Функции для выставления преобразования
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT SetTransform(const double& dM11, const double& dM12, const double& dM21, const double& dM22, const double& dX, const double& dY);
|
||||
virtual HRESULT GetTransform(double* dM11, double* dM12, double* dM21, double* dM22, double* dX, double* dY);
|
||||
virtual HRESULT ResetTransform();
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Тип клипа
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT get_ClipMode(LONG* lMode);
|
||||
virtual HRESULT put_ClipMode(const LONG& lMode);
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Дополнительные функции
|
||||
//----------------------------------------------------------------------------------------
|
||||
virtual HRESULT CommandLong(const LONG& lType, const LONG& lCommand);
|
||||
virtual HRESULT CommandDouble(const LONG& lType, const double& dCommand);
|
||||
virtual HRESULT CommandString(const LONG& lType, const std::wstring& sCommand);
|
||||
|
||||
private:
|
||||
CDocxRenderer_Private* m_pInternal;
|
||||
};
|
||||
|
||||
#endif // _PDF_WRITER_PDFRENDERER_H
|
||||
53
DocxRenderer/DocxRenderer.pro
Normal file
53
DocxRenderer/DocxRenderer.pro
Normal file
@ -0,0 +1,53 @@
|
||||
QT -= core gui
|
||||
|
||||
VERSION = 1.0.0.4
|
||||
TARGET = DocxRenderer
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include(../Common/base.pri)
|
||||
|
||||
DEFINES += DOCXRENDERER_USE_DYNAMIC_LIBRARY
|
||||
|
||||
CONFIG += build_all_zlib build_zlib_as_sources
|
||||
include(../OfficeUtils/OfficeUtils.pri)
|
||||
|
||||
CONFIG += build_cximage_zlib_disable
|
||||
include(../DesktopEditor/Qt_build/graphics/project/graphics.pri)
|
||||
include(../DesktopEditor/xml/build/qt/libxml2.pri)
|
||||
|
||||
#UnicodeConverter
|
||||
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter
|
||||
|
||||
core_windows {
|
||||
|
||||
LIBS += -lgdi32 \
|
||||
-ladvapi32 \
|
||||
-luser32 \
|
||||
-lshell32
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
src/resources/resources.h
|
||||
|
||||
HEADERS += \
|
||||
src/logic/Common.h \
|
||||
src/logic/Document.h \
|
||||
src/logic/ElementImage.h \
|
||||
src/logic/ElementParagraph.h \
|
||||
src/logic/ElementShape.h \
|
||||
src/logic/FontManager.h \
|
||||
src/logic/FontManagerBase.h \
|
||||
src/logic/Page.h
|
||||
|
||||
HEADERS += \
|
||||
DocxRenderer.h
|
||||
|
||||
SOURCES += \
|
||||
DocxRenderer.cpp
|
||||
518
DocxRenderer/src/logic/Common.h
Normal file
518
DocxRenderer/src/logic/Common.h
Normal file
@ -0,0 +1,518 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef AVSINLINE
|
||||
#if defined(_MSC_VER)
|
||||
#define AVSINLINE __forceinline
|
||||
#else
|
||||
#define AVSINLINE inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../../Common/TemporaryCS.h"
|
||||
#include "../Graphics/Matrix.h"
|
||||
#include "../Graphics/Structures.h"
|
||||
#include "StringWriter.h"
|
||||
#include "CalculatorCRC32.h"
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
AVSINLINE LONG ConvertColor(LONG lBGR)
|
||||
{
|
||||
return (0x00FFFFFF & (((lBGR & 0xFF) << 16) | (lBGR & 0x0000FF00) | ((lBGR >> 16) & 0xFF)));
|
||||
}
|
||||
|
||||
AVSINLINE void CorrectString(CString& strValue)
|
||||
{
|
||||
strValue.Replace(_T("&"), _T("&"));
|
||||
strValue.Replace(_T("'"), _T("'"));
|
||||
strValue.Replace(_T("<"), _T("<"));
|
||||
strValue.Replace(_T(">"), _T(">"));
|
||||
strValue.Replace(_T("\""), _T("""));
|
||||
}
|
||||
|
||||
class CBaseItem
|
||||
{
|
||||
public:
|
||||
enum ElemType
|
||||
{
|
||||
etParagraph = 0,
|
||||
etImage = 1,
|
||||
etShape = 2
|
||||
};
|
||||
|
||||
ElemType m_eType;
|
||||
|
||||
CBaseItem()
|
||||
{
|
||||
m_eType = etShape;
|
||||
}
|
||||
|
||||
virtual void ToXml(NSDocxRenderer::CStringWriter& oWriter) = 0;
|
||||
};
|
||||
|
||||
class CImageManager
|
||||
{
|
||||
public:
|
||||
CAtlMap<CString, CImageInfo> m_mapImagesFile;
|
||||
CAtlMap<DWORD, CImageInfo> m_mapImageData;
|
||||
|
||||
CString m_strDstMedia;
|
||||
|
||||
LONG m_lMaxSizeImage;
|
||||
LONG m_lNextIDImage;
|
||||
|
||||
CCalculatorCRC32 m_oCRC;
|
||||
|
||||
public:
|
||||
|
||||
CImageManager()
|
||||
{
|
||||
m_strDstMedia = _T("");
|
||||
m_lMaxSizeImage = 800;
|
||||
m_lNextIDImage = 0;
|
||||
}
|
||||
|
||||
AVSINLINE void NewDocument()
|
||||
{
|
||||
m_strDstMedia = _T("");
|
||||
m_lMaxSizeImage = 800;
|
||||
m_lNextIDImage = 0;
|
||||
|
||||
m_mapImageData.RemoveAll();
|
||||
m_mapImagesFile.RemoveAll();
|
||||
}
|
||||
|
||||
public:
|
||||
CImageInfo WriteImage(IUnknown* punkImage, double& x, double& y, double& width, double& height)
|
||||
{
|
||||
if (height < 0)
|
||||
{
|
||||
FlipY(punkImage);
|
||||
height = -height;
|
||||
y -= height;
|
||||
}
|
||||
|
||||
return GenerateImageID(punkImage);
|
||||
}
|
||||
CImageInfo WriteImage(CString& strFile, double& x, double& y, double& width, double& height)
|
||||
{
|
||||
return GenerateImageID(strFile);
|
||||
}
|
||||
|
||||
protected:
|
||||
inline void CopyFile(CString& strFileSrc, CString& strFileDst)
|
||||
{
|
||||
CDirectory::CopyFile(strFileSrc, strFileDst, NULL, NULL);
|
||||
}
|
||||
void SaveImage(CString& strFileSrc, CImageInfo& oInfo)
|
||||
{
|
||||
CString strLoadXml = _T("<transforms><ImageFile-LoadImage sourcepath=\"") + strFileSrc + _T("\"/></transforms>");
|
||||
|
||||
ImageStudio::IImageTransforms* pTransform = NULL;
|
||||
CoCreateInstance(ImageStudio::CLSID_ImageTransforms, NULL, CLSCTX_INPROC_SERVER, ImageStudio::IID_IImageTransforms, (void**)&pTransform);
|
||||
|
||||
VARIANT_BOOL vbRes = VARIANT_FALSE;
|
||||
BSTR bsLoad = strLoadXml.AllocSysString();
|
||||
pTransform->SetXml(bsLoad, &vbRes);
|
||||
SysFreeString(bsLoad);
|
||||
|
||||
pTransform->Transform(&vbRes);
|
||||
|
||||
VARIANT var;
|
||||
var.punkVal = NULL;
|
||||
pTransform->GetResult(0, &var);
|
||||
|
||||
if (NULL == var.punkVal)
|
||||
{
|
||||
RELEASEINTERFACE(pTransform);
|
||||
return;
|
||||
}
|
||||
|
||||
MediaCore::IAVSUncompressedVideoFrame* pFrame = NULL;
|
||||
var.punkVal->QueryInterface(MediaCore::IID_IAVSUncompressedVideoFrame, (void**)&pFrame);
|
||||
|
||||
RELEASEINTERFACE((var.punkVal));
|
||||
|
||||
if (NULL == pFrame)
|
||||
{
|
||||
RELEASEINTERFACE(pTransform);
|
||||
return;
|
||||
}
|
||||
|
||||
LONG lWidth = 0;
|
||||
LONG lHeight = 0;
|
||||
pFrame->get_Width(&lWidth);
|
||||
pFrame->get_Height(&lHeight);
|
||||
|
||||
oInfo.m_eType = GetImageType(pFrame);
|
||||
|
||||
RELEASEINTERFACE(pFrame);
|
||||
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("\\image%d."), oInfo.m_lID);
|
||||
if (itJPG == oInfo.m_eType)
|
||||
{
|
||||
strSaveItem = _T("<ImageFile-SaveAsJpeg destinationpath=\"") + m_strDstMedia + strSaveItem + _T("jpg\" format=\"888\"/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
strSaveItem = _T("<ImageFile-SaveAsPng destinationpath=\"") + m_strDstMedia + strSaveItem + _T("png\" format=\"888\"/>");
|
||||
}
|
||||
|
||||
CString strXml = _T("");
|
||||
|
||||
if ((lWidth <= m_lMaxSizeImage) && (lHeight <= m_lMaxSizeImage))
|
||||
{
|
||||
strXml = _T("<transforms>") + strSaveItem + _T("</transforms>");
|
||||
}
|
||||
else
|
||||
{
|
||||
LONG lW = 0;
|
||||
LONG lH = 0;
|
||||
double dAspect = (double)lWidth / lHeight;
|
||||
|
||||
if (lWidth >= lHeight)
|
||||
{
|
||||
lW = m_lMaxSizeImage;
|
||||
lH = (LONG)((double)lW / dAspect);
|
||||
}
|
||||
else
|
||||
{
|
||||
lH = m_lMaxSizeImage;
|
||||
lW = (LONG)(dAspect * lH);
|
||||
}
|
||||
|
||||
CString strResize = _T("");
|
||||
strResize.Format(_T("<ImageTransform-TransformResize width=\"%d\" height=\"%d\"/>"), lW, lH);
|
||||
|
||||
strXml = _T("<transforms>") + strResize + strSaveItem + _T("</transforms>");
|
||||
}
|
||||
|
||||
VARIANT_BOOL vbSuccess = VARIANT_FALSE;
|
||||
BSTR bsXml = strXml.AllocSysString();
|
||||
pTransform->SetXml(bsXml, &vbSuccess);
|
||||
SysFreeString(bsXml);
|
||||
|
||||
pTransform->Transform(&vbSuccess);
|
||||
|
||||
RELEASEINTERFACE(pTransform);
|
||||
}
|
||||
void SaveImage(IUnknown* punkImage, CImageInfo& oInfo)
|
||||
{
|
||||
MediaCore::IAVSUncompressedVideoFrame* pFrame = NULL;
|
||||
punkImage->QueryInterface(MediaCore::IID_IAVSUncompressedVideoFrame, (void**)&pFrame);
|
||||
|
||||
if (NULL == pFrame)
|
||||
return;
|
||||
|
||||
LONG lWidth = 0;
|
||||
LONG lHeight = 0;
|
||||
pFrame->get_Width(&lWidth);
|
||||
pFrame->get_Height(&lHeight);
|
||||
|
||||
oInfo.m_eType = GetImageType(pFrame);
|
||||
|
||||
RELEASEINTERFACE(pFrame);
|
||||
|
||||
ImageStudio::IImageTransforms* pTransform = NULL;
|
||||
CoCreateInstance(ImageStudio::CLSID_ImageTransforms, NULL ,CLSCTX_INPROC_SERVER, ImageStudio::IID_IImageTransforms, (void**)&pTransform);
|
||||
|
||||
VARIANT var;
|
||||
var.vt = VT_UNKNOWN;
|
||||
var.punkVal = punkImage;
|
||||
pTransform->SetSource(0, var);
|
||||
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("\\image%d."), oInfo.m_lID);
|
||||
if (itJPG == oInfo.m_eType)
|
||||
{
|
||||
strSaveItem = _T("<ImageFile-SaveAsJpeg destinationpath=\"") + m_strDstMedia + strSaveItem + _T("jpg\" format=\"888\"/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
strSaveItem = _T("<ImageFile-SaveAsPng destinationpath=\"") + m_strDstMedia + strSaveItem + _T("png\" format=\"888\"/>");
|
||||
}
|
||||
|
||||
CString strXml = _T("");
|
||||
if ((lWidth <= m_lMaxSizeImage) && (lHeight <= m_lMaxSizeImage))
|
||||
{
|
||||
strXml = _T("<transforms>") + strSaveItem + _T("</transforms>");
|
||||
}
|
||||
else
|
||||
{
|
||||
LONG lW = 0;
|
||||
LONG lH = 0;
|
||||
double dAspect = (double)lWidth / lHeight;
|
||||
|
||||
if (lWidth >= lHeight)
|
||||
{
|
||||
lW = m_lMaxSizeImage;
|
||||
lH = (LONG)((double)lW / dAspect);
|
||||
}
|
||||
else
|
||||
{
|
||||
lH = m_lMaxSizeImage;
|
||||
lW = (LONG)(dAspect * lH);
|
||||
}
|
||||
|
||||
CString strResize = _T("");
|
||||
strResize.Format(_T("<ImageTransform-TransformResize width=\"%d\" height=\"%d\"/>"), lW, lH);
|
||||
|
||||
strXml = _T("<transforms>") + strResize + strSaveItem + _T("</transforms>");
|
||||
}
|
||||
|
||||
VARIANT_BOOL vbSuccess = VARIANT_FALSE;
|
||||
BSTR bsXml = strXml.AllocSysString();
|
||||
pTransform->SetXml(bsXml, &vbSuccess);
|
||||
SysFreeString(bsXml);
|
||||
|
||||
pTransform->Transform(&vbSuccess);
|
||||
|
||||
RELEASEINTERFACE(pTransform);
|
||||
}
|
||||
|
||||
CImageInfo GenerateImageID(IUnknown* punkData)
|
||||
{
|
||||
CImageInfo oInfo;
|
||||
|
||||
if (NULL == punkData)
|
||||
return oInfo;
|
||||
|
||||
MediaCore::IAVSUncompressedVideoFrame* pFrame = NULL;
|
||||
punkData->QueryInterface(MediaCore::IID_IAVSUncompressedVideoFrame, (void**)&pFrame);
|
||||
|
||||
BYTE* pBuffer = NULL;
|
||||
LONG lLen = 0;
|
||||
|
||||
pFrame->get_Buffer(&pBuffer);
|
||||
pFrame->get_BufferSize(&lLen);
|
||||
|
||||
DWORD dwSum = m_oCRC.Calc(pBuffer, lLen);
|
||||
|
||||
CAtlMap<DWORD, CImageInfo>::CPair* pPair = m_mapImageData.Lookup(dwSum);
|
||||
if (NULL == pPair)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
++m_lNextIDImage;
|
||||
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
SaveImage(punkData, oInfo);
|
||||
m_mapImageData.SetAt(dwSum, oInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
oInfo = pPair->m_value;
|
||||
}
|
||||
|
||||
RELEASEINTERFACE(pFrame);
|
||||
|
||||
return oInfo;
|
||||
}
|
||||
|
||||
CImageInfo GenerateImageID(CString& strFileName)
|
||||
{
|
||||
CImageInfo oInfo;
|
||||
CAtlMap<CString, CImageInfo>::CPair* pPair = m_mapImagesFile.Lookup(strFileName);
|
||||
|
||||
if (NULL == pPair)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
++m_lNextIDImage;
|
||||
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
SaveImage(strFileName, oInfo);
|
||||
m_mapImagesFile.SetAt(strFileName, oInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
oInfo = pPair->m_value;
|
||||
}
|
||||
|
||||
return oInfo;
|
||||
}
|
||||
|
||||
ImageType GetImageType(MediaCore::IAVSUncompressedVideoFrame* pFrame)
|
||||
{
|
||||
LONG lWidth = 0;
|
||||
LONG lHeight = 0;
|
||||
BYTE* pBuffer = NULL;
|
||||
|
||||
pFrame->get_Width(&lWidth);
|
||||
pFrame->get_Height(&lHeight);
|
||||
pFrame->get_Buffer(&pBuffer);
|
||||
|
||||
BYTE* pBufferMem = pBuffer + 3;
|
||||
LONG lCountPix = lWidth * lHeight;
|
||||
|
||||
for (LONG i = 0; i < lCountPix; ++i, pBufferMem += 4)
|
||||
{
|
||||
if (255 != *pBufferMem)
|
||||
return itPNG;
|
||||
}
|
||||
return itJPG;
|
||||
}
|
||||
|
||||
void FlipY(IUnknown* punkImage)
|
||||
{
|
||||
if (NULL == punkImage)
|
||||
return;
|
||||
|
||||
MediaCore::IAVSUncompressedVideoFrame* pFrame = NULL;
|
||||
punkImage->QueryInterface(MediaCore::IID_IAVSUncompressedVideoFrame, (void**)&pFrame);
|
||||
|
||||
if (NULL == pFrame)
|
||||
return;
|
||||
|
||||
BYTE* pBuffer = NULL;
|
||||
LONG lWidth = 0;
|
||||
LONG lHeight = 0;
|
||||
LONG lStride = 0;
|
||||
|
||||
pFrame->get_Buffer(&pBuffer);
|
||||
pFrame->get_Width(&lWidth);
|
||||
pFrame->get_Height(&lHeight);
|
||||
pFrame->get_Stride(0, &lStride);
|
||||
|
||||
if (lStride < 0)
|
||||
lStride = -lStride;
|
||||
|
||||
if ((lWidth * 4) != lStride)
|
||||
{
|
||||
RELEASEINTERFACE(pFrame);
|
||||
return;
|
||||
}
|
||||
|
||||
BYTE* pBufferMem = new BYTE[lStride];
|
||||
|
||||
BYTE* pBufferEnd = pBuffer + lStride * (lHeight - 1);
|
||||
|
||||
LONG lCountV = lHeight / 2;
|
||||
|
||||
for (LONG lIndexV = 0; lIndexV < lCountV; ++lIndexV)
|
||||
{
|
||||
memcpy(pBufferMem, pBuffer, lStride);
|
||||
memcpy(pBuffer, pBufferEnd, lStride);
|
||||
memcpy(pBufferEnd, pBufferMem, lStride);
|
||||
|
||||
pBuffer += lStride;
|
||||
pBufferEnd -= lStride;
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(pBufferMem);
|
||||
RELEASEINTERFACE(pFrame);
|
||||
}
|
||||
|
||||
void FlipX(IUnknown* punkImage)
|
||||
{
|
||||
if (NULL == punkImage)
|
||||
return;
|
||||
|
||||
MediaCore::IAVSUncompressedVideoFrame* pFrame = NULL;
|
||||
punkImage->QueryInterface(MediaCore::IID_IAVSUncompressedVideoFrame, (void**)&pFrame);
|
||||
|
||||
if (NULL == pFrame)
|
||||
return;
|
||||
|
||||
BYTE* pBuffer = NULL;
|
||||
LONG lWidth = 0;
|
||||
LONG lHeight = 0;
|
||||
LONG lStride = 0;
|
||||
|
||||
pFrame->get_Buffer(&pBuffer);
|
||||
pFrame->get_Width(&lWidth);
|
||||
pFrame->get_Height(&lHeight);
|
||||
pFrame->get_Stride(0, &lStride);
|
||||
|
||||
if (lStride < 0)
|
||||
lStride = -lStride;
|
||||
|
||||
if ((lWidth * 4) != lStride)
|
||||
{
|
||||
RELEASEINTERFACE(pFrame);
|
||||
return;
|
||||
}
|
||||
|
||||
DWORD* pBufferDWORD = (DWORD*)pBuffer;
|
||||
|
||||
LONG lW2 = lWidth / 2;
|
||||
for (LONG lIndexV = 0; lIndexV < lHeight; ++lIndexV)
|
||||
{
|
||||
DWORD* pMem1 = pBufferDWORD;
|
||||
DWORD* pMem2 = pBufferDWORD + lWidth - 1;
|
||||
|
||||
LONG lI = 0;
|
||||
while (lI < lW2)
|
||||
{
|
||||
DWORD dwMem = *pMem1;
|
||||
*pMem1++ = *pMem2;
|
||||
*pMem2-- = dwMem;
|
||||
}
|
||||
}
|
||||
|
||||
RELEASEINTERFACE(pFrame);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
// 2-byte number
|
||||
inline short little_endian_2_big_endian( short s )
|
||||
{
|
||||
return ( ( s >> 8) & 0xff ) + ( ( s << 8 ) & 0xff00 );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
// 4-byte number
|
||||
inline int little_endian_2_big_endian( int i )
|
||||
{
|
||||
return ( ( i & 0xff ) << 24 ) + ( ( i & 0xff00 ) << 8 ) + ( ( i & 0xff0000 ) >> 8 ) + ( ( i >> 24 ) & 0xff );
|
||||
}
|
||||
|
||||
AVSINLINE CString ToHexString( unsigned int ui )
|
||||
{
|
||||
CString strRes = _T("");
|
||||
strRes.Format(_T("%08X"), ui);
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
AVSINLINE CString ToHexString( short s )
|
||||
{
|
||||
CString strRes = _T("");
|
||||
strRes.Format(_T("%04X"), s);
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
AVSINLINE CString ToHexString( unsigned short us )
|
||||
{
|
||||
CString strRes = _T("");
|
||||
strRes.Format(_T("%04X"), us);
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
AVSINLINE CString ToHexString( char c )
|
||||
{
|
||||
CString strRes = _T("");
|
||||
strRes.Format(_T("%02X"), c);
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
AVSINLINE CString ToHexString( BYTE uc )
|
||||
{
|
||||
CString strRes = _T("");
|
||||
strRes.Format(_T("%02X"), uc);
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
}
|
||||
1107
DocxRenderer/src/logic/Document.h
Normal file
1107
DocxRenderer/src/logic/Document.h
Normal file
File diff suppressed because it is too large
Load Diff
87
DocxRenderer/src/logic/ElementImage.h
Normal file
87
DocxRenderer/src/logic/ElementImage.h
Normal file
@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
#include "Common.h"
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
static _bstr_t g_bstr_image_1 = L"<w:r><w:pict><v:shape id=\"\" type=\"\" style=\"position:absolute;";
|
||||
static _bstr_t g_bstr_image_2 = L"z-index:-1;mso-position-horizontal-relative:page;mso-position-vertical-relative:page\" filled=\"f\">";
|
||||
static _bstr_t g_bstr_image_3 = L"</v:shape></w:pict></w:r>";
|
||||
|
||||
static CString g_string_image_position = _T("margin-left:%.2lfmm;margin-top:%.2lfmm;width:%.2lfmm;height:%.2lfmm;");
|
||||
static CString g_string_image_position_rotate = _T("margin-left:%.2lfmm;margin-top:%.2lfmm;width:%.2lfmm;height:%.2lfmm;rotation:%d;");
|
||||
static CString g_string_image_rid = _T("<v:imagedata r:id=\"rId%d\" o:title=\"\"/>");
|
||||
|
||||
class CImage : public CBaseItem
|
||||
{
|
||||
public:
|
||||
CString m_strPath;
|
||||
LONG m_lID;
|
||||
|
||||
double m_dLeft;
|
||||
double m_dTop;
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
double m_dRotate;
|
||||
|
||||
public:
|
||||
CImage()
|
||||
{
|
||||
m_eType = etImage;
|
||||
m_strPath = _T("");
|
||||
m_lID = -1;
|
||||
}
|
||||
CImage(const CImage& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CImage(const CImageInfo& oInfo, const CString& strDstMedia)
|
||||
{
|
||||
m_eType = etImage;
|
||||
m_strPath = strDstMedia;
|
||||
m_lID = oInfo.m_lID;
|
||||
}
|
||||
CImage& operator=(const CImage& oSrc)
|
||||
{
|
||||
m_eType = etImage;
|
||||
m_strPath = oSrc.m_strPath;
|
||||
m_lID = oSrc.m_lID;
|
||||
|
||||
m_dLeft = oSrc.m_dLeft;
|
||||
m_dTop = oSrc.m_dTop;
|
||||
m_dWidth = oSrc.m_dWidth;
|
||||
m_dHeight = oSrc.m_dHeight;
|
||||
|
||||
m_dRotate = oSrc.m_dRotate;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual void ToXml(NSDocxRenderer::CStringWriter& oWriter)
|
||||
{
|
||||
oWriter.WriteString(g_bstr_image_1);
|
||||
|
||||
if (0.0 == m_dRotate)
|
||||
{
|
||||
CString strPosition = _T("");
|
||||
strPosition.Format(g_string_image_position, m_dLeft, m_dTop, m_dWidth, m_dHeight);
|
||||
oWriter.WriteString(strPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
CString strPosition = _T("");
|
||||
strPosition.Format(g_string_image_position_rotate, m_dLeft, m_dTop, m_dWidth, m_dHeight, (int)m_dRotate);
|
||||
oWriter.WriteString(strPosition);
|
||||
}
|
||||
|
||||
oWriter.WriteString(g_bstr_image_2);
|
||||
|
||||
CString strRid = _T("");
|
||||
strRid.Format(g_string_image_rid, 10 + m_lID);
|
||||
|
||||
oWriter.WriteString(strRid);
|
||||
|
||||
oWriter.WriteString(g_bstr_image_3);
|
||||
}
|
||||
};
|
||||
}
|
||||
669
DocxRenderer/src/logic/ElementParagraph.h
Normal file
669
DocxRenderer/src/logic/ElementParagraph.h
Normal file
@ -0,0 +1,669 @@
|
||||
#pragma once
|
||||
#include "Common.h"
|
||||
|
||||
//#include "../../Common/DocxFormat/Source/DocxFormat/Logic/Paragraph.h"
|
||||
#include "FontManager.h"
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
const double c_dMMToDx = 72 * 20 / 25.4;
|
||||
|
||||
// <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> T <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> IsBigger, IsBiggerOrEqual
|
||||
template<typename T>
|
||||
void SortElements(CAtlArray<T*>& oArray)
|
||||
{
|
||||
int nSize = (int)oArray.GetCount();
|
||||
|
||||
// handle 0, 1 and 2 elements
|
||||
if (nSize <= 1)
|
||||
return;
|
||||
if (nSize == 2)
|
||||
{
|
||||
if (oArray[0]->IsBigger(oArray[1]))
|
||||
{
|
||||
T* pTemp = oArray[0];
|
||||
oArray[0] = oArray[1];
|
||||
oArray[1] = pTemp;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
T* tTemp;
|
||||
|
||||
// arrange elements as tree with greater elements appearing first
|
||||
int nIndex = (nSize >> 1) - 1, nCurr = 0, nNext = 0;
|
||||
int nLast = nSize - 1;
|
||||
int nHalf = nSize >> 1;
|
||||
do
|
||||
{
|
||||
// save element at start of chain
|
||||
tTemp = oArray[nIndex];
|
||||
|
||||
nCurr = nIndex;
|
||||
while (nCurr < nHalf)
|
||||
{
|
||||
nNext = (nCurr << 1) + 1;
|
||||
if (nNext < nLast && (oArray[nNext + 1]->IsBigger(oArray[nNext])))
|
||||
nNext++;
|
||||
if (tTemp->IsBiggerOrEqual(oArray[nNext]))
|
||||
break;
|
||||
|
||||
// promote element in chain
|
||||
oArray[nCurr] = oArray[nNext];
|
||||
nCurr = nNext;
|
||||
}
|
||||
|
||||
// restore element at end of chain
|
||||
oArray[nCurr] = tTemp;
|
||||
}
|
||||
while (nIndex--);
|
||||
|
||||
// sequentially reduce tree size by removing maximum element and rebalancing
|
||||
nIndex = nSize;
|
||||
while (--nIndex)
|
||||
{
|
||||
// save element at start of chain
|
||||
tTemp = oArray[nIndex];
|
||||
oArray[nIndex] = oArray[0];
|
||||
|
||||
nCurr = 0;
|
||||
nLast = nIndex - 1;
|
||||
nHalf = nIndex >> 1;
|
||||
while (nCurr < nHalf)
|
||||
{
|
||||
nNext = (nCurr << 1) + 1;
|
||||
if (nNext < nLast && (oArray[nNext + 1]->IsBigger(oArray[nNext])))
|
||||
nNext++;
|
||||
if (tTemp->IsBiggerOrEqual(oArray[nNext]))
|
||||
break;
|
||||
|
||||
// promote element in chain
|
||||
oArray[nCurr] = oArray[nNext];
|
||||
nCurr = nNext;
|
||||
}
|
||||
|
||||
// restore element at end of chain
|
||||
oArray[nCurr] = tTemp;
|
||||
}
|
||||
}
|
||||
|
||||
static _bstr_t g_bstr_text_run_Start = L"<w:r><w:rPr>";
|
||||
static _bstr_t g_bstr_text_run_PropEnd = L"</w:rPr>";
|
||||
static _bstr_t g_bstr_text_run_End = L"</w:r>";
|
||||
|
||||
static _bstr_t g_bstr_text_run_text1 = L"<w:t xml:space=\"preserve\">";
|
||||
static _bstr_t g_bstr_text_run_text2 = L"</w:t>";
|
||||
|
||||
static _bstr_t g_bstr_text_bold_true = L"<w:b w:val=\"true\"/>";
|
||||
static _bstr_t g_bstr_text_italic_true = L"<w:i w:val=\"true\"/>";
|
||||
|
||||
static CString g_string_text_font_size = _T("<w:sz w:val=\"%d\"/><w:szCs w:val=\"%d\"/>");
|
||||
static CString g_string_text_font_name = _T("<w:rFonts w:ascii=\"%s\" w:hAnsi=\"%s\" w:cs=\"%s\"/>");
|
||||
|
||||
static CString g_string_text_color = _T("<w:color w:val=\"%06x\"/>");
|
||||
|
||||
static CString g_string_text_paragraph_noframes = _T("<w:pPr><w:spacing w:before=\"%d\" w:line=\"%d\" w:lineRule=\"exact\"/><w:ind w:left=\"%d\"/></w:pPr>");
|
||||
static _bstr_t g_bstr_text_par_start = L"<w:p>";
|
||||
static _bstr_t g_bstr_text_par_end = L"</w:p>";
|
||||
|
||||
static CString g_string_spacing_character = _T("<w:spacing w:val=\"%d\"/>");
|
||||
static CString g_string_spacing_character2 = _T("<w:spacing w:val=\"%.3lfpt\"/>");
|
||||
|
||||
static CString g_string_par_props_mode2 = _T("<w:pPr><w:framePr w:hAnchor=\"page\" w:vAnchor=\"page\" w:x=\"%d\" w:y=\"%d\"/></w:pPr>");
|
||||
|
||||
AVSINLINE void DeleteSpaces(CString& strText)
|
||||
{
|
||||
int nLen = strText.GetLength();
|
||||
int nStart = 0;
|
||||
|
||||
while ((nStart < nLen) && (TCHAR(' ') == strText[nStart]))
|
||||
++nStart;
|
||||
|
||||
if (nStart == nLen)
|
||||
{
|
||||
strText = _T("");
|
||||
return;
|
||||
}
|
||||
|
||||
int nEnd = nLen - 1;
|
||||
while ((nEnd > nStart) && (TCHAR(' ') == strText[nEnd]))
|
||||
--nEnd;
|
||||
|
||||
strText = strText.Mid(nStart, nEnd - nStart + 1);
|
||||
}
|
||||
|
||||
class CContText
|
||||
{
|
||||
public:
|
||||
NSStructures::CFont m_oFont;
|
||||
NSStructures::CBrush m_oBrush;
|
||||
|
||||
CString m_strPickFontName;
|
||||
LONG m_lPickFontStyle;
|
||||
|
||||
CString m_strText;
|
||||
CString m_strGidText;
|
||||
|
||||
double m_dX;
|
||||
double m_dY;
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
double m_dWidthWithoutSpaces;
|
||||
double m_dLeftWithoutSpaces;
|
||||
|
||||
double m_dPosition;
|
||||
double m_dSpaceWidthMM;
|
||||
|
||||
double m_dCalculateWidth;
|
||||
|
||||
public:
|
||||
CContText()
|
||||
{
|
||||
m_strText = _T("");
|
||||
m_strGidText = _T("");
|
||||
|
||||
m_strPickFontName = _T("");
|
||||
m_lPickFontStyle = 0;
|
||||
|
||||
m_dX = 0;
|
||||
m_dY = 0;
|
||||
m_dWidth = 0;
|
||||
m_dHeight = 0;
|
||||
|
||||
m_dWidthWithoutSpaces = 0;
|
||||
m_dLeftWithoutSpaces = 0;
|
||||
|
||||
m_dPosition = 0;
|
||||
m_dSpaceWidthMM = 0;
|
||||
|
||||
m_dCalculateWidth = 0;
|
||||
}
|
||||
~CContText()
|
||||
{
|
||||
}
|
||||
|
||||
AVSINLINE void Clear()
|
||||
{
|
||||
}
|
||||
|
||||
CContText(const CContText& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CContText& operator=(const CContText& oSrc)
|
||||
{
|
||||
m_oFont = oSrc.m_oFont;
|
||||
m_oBrush = oSrc.m_oBrush;
|
||||
|
||||
m_strText = oSrc.m_strText;
|
||||
m_strGidText = oSrc.m_strGidText;
|
||||
|
||||
m_strPickFontName = oSrc.m_strPickFontName;
|
||||
m_lPickFontStyle = oSrc.m_lPickFontStyle;
|
||||
|
||||
m_dX = oSrc.m_dX;
|
||||
m_dY = oSrc.m_dY;
|
||||
m_dWidth = oSrc.m_dWidth;
|
||||
m_dHeight = oSrc.m_dHeight;
|
||||
|
||||
m_dWidthWithoutSpaces = oSrc.m_dWidthWithoutSpaces;
|
||||
m_dLeftWithoutSpaces = oSrc.m_dLeftWithoutSpaces;
|
||||
|
||||
m_dPosition = oSrc.m_dPosition;
|
||||
m_dSpaceWidthMM = oSrc.m_dSpaceWidthMM;
|
||||
|
||||
m_dCalculateWidth = oSrc.m_dCalculateWidth;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
AVSINLINE bool IsBigger(const CContText* oSrc)
|
||||
{
|
||||
return (m_dX > oSrc->m_dX) ? true : false;
|
||||
}
|
||||
AVSINLINE bool IsBiggerOrEqual(const CContText* oSrc)
|
||||
{
|
||||
return (m_dX >= oSrc->m_dX) ? true : false;
|
||||
}
|
||||
|
||||
AVSINLINE void Write(NSDocxRenderer::CStringWriter& oWriter, CFontManagerLight* pManagerLight, bool bIsAddSpace = false)
|
||||
{
|
||||
oWriter.WriteString(g_bstr_text_run_Start);
|
||||
|
||||
if (m_dWidth != m_dWidthWithoutSpaces)
|
||||
{
|
||||
DeleteSpaces(m_strText);
|
||||
m_dWidth = m_dWidthWithoutSpaces;
|
||||
}
|
||||
|
||||
if (_T("") == m_strPickFontName)
|
||||
{
|
||||
if (m_oFont.Bold)
|
||||
oWriter.WriteString(g_bstr_text_bold_true);
|
||||
if (m_oFont.Italic)
|
||||
oWriter.WriteString(g_bstr_text_italic_true);
|
||||
|
||||
if (bIsAddSpace)
|
||||
{
|
||||
m_dWidth += m_dSpaceWidthMM;
|
||||
m_strText += _T(" ");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0x01 == (0x01 & m_lPickFontStyle))
|
||||
oWriter.WriteString(g_bstr_text_bold_true);
|
||||
if (0x02 == (0x02 & m_lPickFontStyle))
|
||||
oWriter.WriteString(g_bstr_text_italic_true);
|
||||
|
||||
if (bIsAddSpace)
|
||||
{
|
||||
m_dWidth += pManagerLight->GetSpaceWidth();
|
||||
m_strText += _T(" ");
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
||||
double ___dSize = (double)((LONG)(m_oFont.Size * 2)) / 2;
|
||||
pManagerLight->LoadFont(m_strPickFontName, m_lPickFontStyle, ___dSize, FALSE);
|
||||
double dWidth = pManagerLight->MeasureStringWidth(m_strText);
|
||||
|
||||
if (fabs(dWidth - m_dWidth) > 2)
|
||||
{
|
||||
double dSpacing = (m_dWidth - dWidth) / (m_strText.GetLength() + 1);
|
||||
dSpacing *= c_dMMToDx;
|
||||
|
||||
CString strSpacing = _T("");
|
||||
strSpacing.Format(g_string_spacing_character, (LONG)dSpacing);
|
||||
oWriter.WriteString(strSpacing);
|
||||
}
|
||||
}
|
||||
|
||||
CString strSize = _T("");
|
||||
LONG lSize = (LONG)(2 * m_oFont.Size);
|
||||
strSize.Format(g_string_text_font_size, lSize, lSize);
|
||||
oWriter.WriteString(strSize);
|
||||
|
||||
CString strName = _T("");
|
||||
|
||||
if (_T("") == m_strPickFontName)
|
||||
strName.Format(g_string_text_font_name, m_oFont.Name, m_oFont.Name, m_oFont.Name);
|
||||
else
|
||||
strName.Format(g_string_text_font_name, m_strPickFontName, m_strPickFontName, m_strPickFontName);
|
||||
|
||||
oWriter.WriteString(strName);
|
||||
|
||||
CString strColor = _T("");
|
||||
strColor.Format(g_string_text_color, ConvertColor(m_oBrush.Color1));
|
||||
oWriter.WriteString(strColor);
|
||||
|
||||
oWriter.WriteString(g_bstr_text_run_PropEnd);
|
||||
|
||||
oWriter.WriteString(g_bstr_text_run_text1);
|
||||
|
||||
CString strText = m_strText;
|
||||
CorrectString(strText);
|
||||
|
||||
oWriter.WriteString(strText);
|
||||
oWriter.WriteString(g_bstr_text_run_text2);
|
||||
|
||||
oWriter.WriteString(g_bstr_text_run_End);
|
||||
}
|
||||
|
||||
AVSINLINE void WriteTo(double dSpacingMM, NSDocxRenderer::CStringWriter& oWriter, CFontManagerLight* pManagerLight)
|
||||
{
|
||||
oWriter.WriteString(g_bstr_text_run_Start);
|
||||
|
||||
double dSpaceMMSize = m_dSpaceWidthMM;
|
||||
if (_T("") == m_strPickFontName)
|
||||
{
|
||||
if (m_oFont.Bold)
|
||||
oWriter.WriteString(g_bstr_text_bold_true);
|
||||
if (m_oFont.Italic)
|
||||
oWriter.WriteString(g_bstr_text_italic_true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0x01 == (0x01 & m_lPickFontStyle))
|
||||
oWriter.WriteString(g_bstr_text_bold_true);
|
||||
if (0x02 == (0x02 & m_lPickFontStyle))
|
||||
oWriter.WriteString(g_bstr_text_italic_true);
|
||||
|
||||
dSpaceMMSize = pManagerLight->GetSpaceWidth();
|
||||
}
|
||||
|
||||
CString strSize = _T("");
|
||||
LONG lSize = (LONG)(2 * m_oFont.Size);
|
||||
strSize.Format(g_string_text_font_size, lSize, lSize);
|
||||
oWriter.WriteString(strSize);
|
||||
|
||||
CString strName = _T("");
|
||||
|
||||
if (_T("") == m_strPickFontName)
|
||||
strName.Format(g_string_text_font_name, m_oFont.Name, m_oFont.Name, m_oFont.Name);
|
||||
else
|
||||
strName.Format(g_string_text_font_name, m_strPickFontName, m_strPickFontName, m_strPickFontName);
|
||||
|
||||
oWriter.WriteString(strName);
|
||||
|
||||
CString strColor = _T("");
|
||||
strColor.Format(g_string_text_color, ConvertColor(m_oBrush.Color1));
|
||||
oWriter.WriteString(strColor);
|
||||
|
||||
LONG lSpacing = (LONG)((dSpacingMM - dSpaceMMSize) * c_dMMToDx);
|
||||
CString strSpacing = _T("");
|
||||
strSpacing.Format(g_string_spacing_character, lSpacing);
|
||||
oWriter.WriteString(strSpacing);
|
||||
|
||||
oWriter.WriteString(g_bstr_text_run_PropEnd);
|
||||
|
||||
oWriter.WriteString(g_bstr_text_run_text1);
|
||||
|
||||
CString strText = _T(" ");
|
||||
oWriter.WriteString(strText);
|
||||
oWriter.WriteString(g_bstr_text_run_text2);
|
||||
|
||||
oWriter.WriteString(g_bstr_text_run_End);
|
||||
}
|
||||
};
|
||||
|
||||
class CTextLine
|
||||
{
|
||||
public:
|
||||
CAtlArray<CContText*> m_arConts;
|
||||
|
||||
double m_dBaselinePos;
|
||||
double m_dBaselineOffset;
|
||||
|
||||
double m_dX;
|
||||
double m_dY;
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
public:
|
||||
CTextLine() : m_arConts()
|
||||
{
|
||||
m_dBaselinePos = 0;
|
||||
|
||||
m_dX = 0;
|
||||
m_dY = 0;
|
||||
m_dWidth = 0;
|
||||
m_dHeight = 0;
|
||||
}
|
||||
AVSINLINE void Clear()
|
||||
{
|
||||
size_t nCount = m_arConts.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CContText* pText = m_arConts[i];
|
||||
RELEASEOBJECT(pText);
|
||||
}
|
||||
m_arConts.RemoveAll();
|
||||
}
|
||||
|
||||
~CTextLine()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
CTextLine(const CTextLine& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CTextLine& operator=(const CTextLine& oSrc)
|
||||
{
|
||||
Clear();
|
||||
size_t nCount = oSrc.m_arConts.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
m_arConts.Add(new CContText(*oSrc.m_arConts[i]));
|
||||
}
|
||||
|
||||
m_dBaselinePos = oSrc.m_dBaselinePos;
|
||||
m_dX = oSrc.m_dX;
|
||||
m_dY = oSrc.m_dY;
|
||||
m_dWidth = oSrc.m_dWidth;
|
||||
m_dHeight = oSrc.m_dHeight;
|
||||
}
|
||||
|
||||
AVSINLINE void AddCont(CContText* pCont, double dBaselineOffset)
|
||||
{
|
||||
if (0 == m_arConts.GetCount())
|
||||
m_dBaselineOffset = dBaselineOffset;
|
||||
|
||||
if ( ( pCont->m_dX > 0 ) && ( ( m_dX == 0 ) || ( pCont->m_dX < m_dX ) ) )
|
||||
m_dX = pCont->m_dX;
|
||||
|
||||
if (m_dHeight < pCont->m_dHeight)
|
||||
m_dHeight = pCont->m_dHeight;
|
||||
|
||||
m_arConts.Add(pCont);
|
||||
}
|
||||
|
||||
AVSINLINE bool IsBigger(const CTextLine* oSrc)
|
||||
{
|
||||
return (m_dBaselinePos > oSrc->m_dBaselinePos) ? true : false;
|
||||
}
|
||||
AVSINLINE bool IsBiggerOrEqual(const CTextLine* oSrc)
|
||||
{
|
||||
return (m_dBaselinePos >= oSrc->m_dBaselinePos) ? true : false;
|
||||
}
|
||||
|
||||
AVSINLINE void SortConts()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> m_dX
|
||||
SortElements(m_arConts);
|
||||
}
|
||||
|
||||
void Merge(CTextLine* pTextLine)
|
||||
{
|
||||
size_t nCount = pTextLine->m_arConts.GetCount();
|
||||
if (0 != nCount)
|
||||
{
|
||||
if (pTextLine->m_dX < m_dX)
|
||||
{
|
||||
m_dX = pTextLine->m_dX;
|
||||
}
|
||||
if (pTextLine->m_dBaselinePos < m_dBaselinePos)
|
||||
{
|
||||
m_dHeight = (m_dBaselinePos - pTextLine->m_dBaselinePos + pTextLine->m_dHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dHeight = (pTextLine->m_dBaselinePos - m_dBaselinePos + m_dHeight);
|
||||
}
|
||||
|
||||
double dSubPosition = m_dBaselinePos - pTextLine->m_dBaselinePos;
|
||||
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
pTextLine->m_arConts[i]->m_dPosition = dSubPosition;
|
||||
m_arConts.Add(pTextLine->m_arConts[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToXml(NSDocxRenderer::CStringWriter& oWriter, CFontManagerLight* pManagerLight)
|
||||
{
|
||||
size_t nCountConts = m_arConts.GetCount();
|
||||
|
||||
if (0 == nCountConts)
|
||||
return;
|
||||
|
||||
CContText* pPrev = m_arConts[0];
|
||||
double dDelta = 0;
|
||||
|
||||
for (size_t i = 1; i < nCountConts; ++i)
|
||||
{
|
||||
CContText* pCurrent = m_arConts[i];
|
||||
|
||||
if (0 == pCurrent->m_dWidthWithoutSpaces)
|
||||
continue;
|
||||
|
||||
dDelta = pCurrent->m_dLeftWithoutSpaces - (pPrev->m_dLeftWithoutSpaces + pPrev->m_dWidthWithoutSpaces);
|
||||
|
||||
if (dDelta < 0.5)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (font/brush)
|
||||
pPrev->Write(oWriter, pManagerLight);
|
||||
pPrev = pCurrent;
|
||||
}
|
||||
//else if (dDelta < 2 * pPrev->m_dSpaceWidthMM)
|
||||
//{
|
||||
// // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
// pPrev->Write(oWriter, pManagerLight, true);
|
||||
// pPrev = pCurrent;
|
||||
//}
|
||||
else
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
pPrev->Write(oWriter, pManagerLight);
|
||||
pPrev->WriteTo(dDelta, oWriter, pManagerLight);
|
||||
pPrev = pCurrent;
|
||||
}
|
||||
}
|
||||
|
||||
pPrev->Write(oWriter, pManagerLight);
|
||||
}
|
||||
};
|
||||
|
||||
class CParagraph : public CBaseItem
|
||||
{
|
||||
public:
|
||||
// text frame properties
|
||||
bool m_bIsTextFrameProperties;
|
||||
|
||||
// geometry paragraph
|
||||
double m_dLeft;
|
||||
double m_dTop;
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
CFontManagerLight* m_pManagerLight;
|
||||
|
||||
double m_dSpaceBefore;
|
||||
TextAssociationType m_eTextAssociationType;
|
||||
|
||||
CAtlArray<CTextLine*> m_arLines;
|
||||
|
||||
public:
|
||||
CParagraph(const TextAssociationType& eType) : m_arLines()
|
||||
{
|
||||
m_eType = etParagraph;
|
||||
|
||||
m_bIsTextFrameProperties = false;
|
||||
|
||||
m_dLeft = 0.0;
|
||||
m_dTop = 0.0;
|
||||
m_dWidth = 0.0;
|
||||
m_dHeight = 0.0;
|
||||
|
||||
m_dSpaceBefore = 0.0;
|
||||
|
||||
m_pManagerLight = NULL;
|
||||
m_eTextAssociationType = eType;
|
||||
}
|
||||
CParagraph(const CParagraph& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
~CParagraph()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
AVSINLINE void Clear()
|
||||
{
|
||||
size_t nCount = m_arLines.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pText = m_arLines[i];
|
||||
RELEASEOBJECT(pText);
|
||||
}
|
||||
m_arLines.RemoveAll();
|
||||
|
||||
m_pManagerLight = NULL;
|
||||
}
|
||||
|
||||
CParagraph& operator=(const CParagraph& oSrc)
|
||||
{
|
||||
m_eType = etParagraph;
|
||||
|
||||
m_bIsTextFrameProperties = oSrc.m_bIsTextFrameProperties;
|
||||
|
||||
m_dLeft = oSrc.m_dLeft;
|
||||
m_dTop = oSrc.m_dTop;
|
||||
m_dWidth = oSrc.m_dWidth;
|
||||
m_dHeight = oSrc.m_dHeight;
|
||||
|
||||
m_dSpaceBefore = oSrc.m_dSpaceBefore;
|
||||
|
||||
m_eTextAssociationType = oSrc.m_eTextAssociationType;
|
||||
|
||||
Clear();
|
||||
size_t nCount = oSrc.m_arLines.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
m_arLines.Add(new CTextLine(*oSrc.m_arLines[i]));
|
||||
}
|
||||
|
||||
m_pManagerLight = oSrc.m_pManagerLight;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual void ToXml(NSDocxRenderer::CStringWriter& oWriter)
|
||||
{
|
||||
oWriter.WriteString(g_bstr_text_par_start);
|
||||
|
||||
switch (m_eTextAssociationType)
|
||||
{
|
||||
case TextAssociationTypeDefault:
|
||||
case TextAssociationTypeLine:
|
||||
{
|
||||
LONG lX = (LONG)(m_dLeft * c_dMMToDx);
|
||||
LONG lY = (LONG)(m_dTop * c_dMMToDx);
|
||||
|
||||
CString strTextProps = _T("");
|
||||
strTextProps.Format(g_string_par_props_mode2, lX, lY);
|
||||
oWriter.WriteString(strTextProps);
|
||||
break;
|
||||
}
|
||||
case TextAssociationTypeBlock:
|
||||
{
|
||||
LONG lX = (LONG)(m_dLeft * c_dMMToDx);
|
||||
LONG lY = (LONG)(m_dTop * c_dMMToDx);
|
||||
|
||||
CString strTextProps = _T("");
|
||||
strTextProps.Format(g_string_par_props_mode2, lX, lY);
|
||||
oWriter.WriteString(strTextProps);
|
||||
break;
|
||||
}
|
||||
case TextAssociationTypeNoFrames:
|
||||
{
|
||||
LONG lSpaceBefore = (LONG)(m_dSpaceBefore * c_dMMToDx);
|
||||
LONG lHeight = (LONG)(m_dHeight * c_dMMToDx);
|
||||
LONG lLeft = (LONG)(m_dLeft * c_dMMToDx);
|
||||
|
||||
CString strParProperties = _T("");
|
||||
strParProperties.Format(g_string_text_paragraph_noframes, lSpaceBefore, lHeight, lLeft);
|
||||
|
||||
oWriter.WriteString(strParProperties);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
size_t nCount = m_arLines.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pTextLine = m_arLines[i];
|
||||
pTextLine->SortConts();
|
||||
pTextLine->ToXml(oWriter, m_pManagerLight);
|
||||
}
|
||||
|
||||
oWriter.WriteString(g_bstr_text_par_end);
|
||||
}
|
||||
};
|
||||
}
|
||||
385
DocxRenderer/src/logic/ElementShape.h
Normal file
385
DocxRenderer/src/logic/ElementShape.h
Normal file
@ -0,0 +1,385 @@
|
||||
#pragma once
|
||||
#include "Common.h"
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
static _bstr_t g_vml_bstr_ClosePath = L"x";
|
||||
static _bstr_t g_vml_bstr_EndPath = L"e";
|
||||
static _bstr_t g_vml_bstr_NoFill = L"nf";
|
||||
static _bstr_t g_vml_bstr_NoStroke = L"ns";
|
||||
static CString g_vml_string_MoveTo = _T("m%d,%d");
|
||||
static CString g_vml_string_LineTo = _T("l%d,%d");
|
||||
static CString g_vml_string_CurveTo = _T("c%d,%d %d,%d %d,%d");
|
||||
|
||||
static _bstr_t g_bstr_shape1 = L"<w:r><w:pict><v:shape id=\"\" o:spid=\"\" style=\"position:absolute;";
|
||||
static _bstr_t g_bstr_shape2 = L"z-index:-1;mso-position-horizontal-relative:page;mso-position-vertical-relative:page;\"";
|
||||
static CString g_string_shape_position = _T("margin-left:%.2lfmm;margin-top:%.2lfmm;width:%.2lfmm;height:%.2lfmm;");
|
||||
|
||||
static CString g_string_shape_geometry = _T(" coordsize=\"%d,%d\" path=\"%s\" fillcolor=\"#%06x\" strokecolor=\"#%06x\" strokeweight=\"%.2lfmm\">");
|
||||
|
||||
static CString g_string_tx_rid = _T("<v:imagedata r:id=\"rId%d\" o:title=\"\"/>");
|
||||
static CString g_string_fill_opacity = _T("<v:fill opacity=\"%.2lf\"/>");
|
||||
static CString g_string_stroke_opacity = _T("<v:stroke opacity=\"%.2lf\"/>");
|
||||
|
||||
static _bstr_t g_bstr_shape3 = L"<w10:wrap anchorx=\"page\" anchory=\"page\"/></v:shape></w:pict></w:r>";
|
||||
|
||||
class CVectorGraphics
|
||||
{
|
||||
public:
|
||||
double* m_pData;
|
||||
size_t m_lSize;
|
||||
|
||||
double* m_pDataCur;
|
||||
size_t m_lSizeCur;
|
||||
|
||||
public:
|
||||
double m_dLeft;
|
||||
double m_dTop;
|
||||
double m_dRight;
|
||||
double m_dBottom;
|
||||
|
||||
public:
|
||||
CVectorGraphics()
|
||||
{
|
||||
m_pData = NULL;
|
||||
m_lSize = 0;
|
||||
|
||||
m_pDataCur = m_pData;
|
||||
m_lSizeCur = m_lSize;
|
||||
|
||||
End();
|
||||
}
|
||||
~CVectorGraphics()
|
||||
{
|
||||
RELEASEMEM(m_pData);
|
||||
}
|
||||
|
||||
AVSINLINE void AddSize(size_t nSize)
|
||||
{
|
||||
if (NULL == m_pData)
|
||||
{
|
||||
m_lSize = max(nSize, 500);
|
||||
m_pData = (double*)malloc(m_lSize * sizeof(double));
|
||||
|
||||
m_lSizeCur = 0;
|
||||
m_pDataCur = m_pData;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((m_lSizeCur + nSize) > m_lSize)
|
||||
{
|
||||
while ((m_lSizeCur + nSize) > m_lSize)
|
||||
{
|
||||
m_lSize *= 2;
|
||||
}
|
||||
|
||||
double* pRealloc = (double*)realloc(m_pData, m_lSize * sizeof(double));
|
||||
if (NULL != pRealloc)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_pData = pRealloc;
|
||||
m_pDataCur = m_pData + m_lSizeCur;
|
||||
}
|
||||
else
|
||||
{
|
||||
double* pMalloc = (double*)malloc(m_lSize * sizeof(double));
|
||||
memcpy(pMalloc, m_pData, m_lSizeCur * sizeof(double));
|
||||
|
||||
free(m_pData);
|
||||
m_pData = pMalloc;
|
||||
m_pDataCur = m_pData + m_lSizeCur;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE void MoveTo(const double& x1, const double& y1)
|
||||
{
|
||||
AddSize(3);
|
||||
*m_pDataCur = 0; ++m_pDataCur;
|
||||
|
||||
*m_pDataCur = x1; ++m_pDataCur;
|
||||
*m_pDataCur = y1; ++m_pDataCur;
|
||||
|
||||
m_lSizeCur += 3;
|
||||
|
||||
CheckPoint(x1, y1);
|
||||
}
|
||||
AVSINLINE void LineTo(const double& x1, const double& y1)
|
||||
{
|
||||
AddSize(3);
|
||||
*m_pDataCur = 1; ++m_pDataCur;
|
||||
|
||||
*m_pDataCur = x1; ++m_pDataCur;
|
||||
*m_pDataCur = y1; ++m_pDataCur;
|
||||
|
||||
m_lSizeCur += 3;
|
||||
|
||||
CheckPoint(x1, y1);
|
||||
}
|
||||
AVSINLINE void CurveTo(const double& x1, const double& y1, const double& x2, const double& y2, const double& x3, const double& y3)
|
||||
{
|
||||
AddSize(7);
|
||||
*m_pDataCur = 2; ++m_pDataCur;
|
||||
|
||||
*m_pDataCur = x1; ++m_pDataCur;
|
||||
*m_pDataCur = y1; ++m_pDataCur;
|
||||
*m_pDataCur = x2; ++m_pDataCur;
|
||||
*m_pDataCur = y2; ++m_pDataCur;
|
||||
*m_pDataCur = x3; ++m_pDataCur;
|
||||
*m_pDataCur = y3; ++m_pDataCur;
|
||||
|
||||
m_lSizeCur += 7;
|
||||
|
||||
CheckPoint(x1, y1);
|
||||
CheckPoint(x2, y2);
|
||||
CheckPoint(x3, y3);
|
||||
}
|
||||
AVSINLINE void Close()
|
||||
{
|
||||
AddSize(1);
|
||||
*m_pDataCur = 3; ++m_pDataCur;
|
||||
|
||||
m_lSizeCur += 1;
|
||||
}
|
||||
|
||||
AVSINLINE size_t GetCurSize()
|
||||
{
|
||||
return m_lSizeCur;
|
||||
}
|
||||
|
||||
AVSINLINE void Clear()
|
||||
{
|
||||
RELEASEMEM(m_pData);
|
||||
|
||||
m_pData = NULL;
|
||||
m_lSize = 0;
|
||||
|
||||
m_pDataCur = m_pData;
|
||||
m_lSizeCur = 0;
|
||||
}
|
||||
AVSINLINE void ClearNoAttack()
|
||||
{
|
||||
m_pDataCur = m_pData;
|
||||
m_lSizeCur = 0;
|
||||
}
|
||||
|
||||
AVSINLINE void End()
|
||||
{
|
||||
ClearNoAttack();
|
||||
|
||||
m_dLeft = 0xFFFFFF;
|
||||
m_dTop = 0xFFFFFF;
|
||||
m_dRight = -0xFFFFFF;
|
||||
m_dBottom = -0xFFFFFF;
|
||||
}
|
||||
|
||||
AVSINLINE void CheckPoint(const double& x, const double& y)
|
||||
{
|
||||
if (m_dLeft > x)
|
||||
m_dLeft = x;
|
||||
if (m_dRight < x)
|
||||
m_dRight = x;
|
||||
if (m_dTop > y)
|
||||
m_dTop = y;
|
||||
if (m_dBottom < y)
|
||||
m_dBottom = y;
|
||||
}
|
||||
};
|
||||
|
||||
class CShape : public CBaseItem
|
||||
{
|
||||
public:
|
||||
CString m_strPath;
|
||||
NSStructures::CBrush m_oBrush;
|
||||
NSStructures::CPen m_oPen;
|
||||
|
||||
double m_dLeft;
|
||||
double m_dTop;
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
bool m_bIsFill;
|
||||
bool m_bIsStroke;
|
||||
|
||||
LONG m_lCoordSizeX;
|
||||
LONG m_lCoordSizeY;
|
||||
|
||||
LONG m_lTxId;
|
||||
|
||||
public:
|
||||
CShape()
|
||||
{
|
||||
m_dLeft = 0;
|
||||
m_dTop = 0;
|
||||
m_dWidth = 0;
|
||||
m_dHeight = 0;
|
||||
|
||||
m_bIsFill = false;
|
||||
m_bIsStroke = false;
|
||||
|
||||
m_lCoordSizeX = 100000;
|
||||
m_lCoordSizeY = 100000;
|
||||
|
||||
m_lTxId = -1;
|
||||
}
|
||||
|
||||
CShape(const CShape& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
|
||||
CShape& operator=(const CShape& oSrc)
|
||||
{
|
||||
m_eType = etShape;
|
||||
m_strPath = oSrc.m_strPath;
|
||||
|
||||
m_oBrush = oSrc.m_oBrush;
|
||||
m_oPen = oSrc.m_oPen;
|
||||
|
||||
m_dLeft = oSrc.m_dLeft;
|
||||
m_dTop = oSrc.m_dTop;
|
||||
m_dWidth = oSrc.m_dWidth;
|
||||
m_dHeight = oSrc.m_dHeight;
|
||||
|
||||
m_bIsFill = oSrc.m_bIsFill;
|
||||
m_bIsStroke = oSrc.m_bIsStroke;
|
||||
|
||||
m_lTxId = oSrc.m_lTxId;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void CreateFromVectorData(CVectorGraphics* pVector, NSDocxRenderer::CStringWriter& oWriter, const LONG& lCoordSize, LONG lType)
|
||||
{
|
||||
m_dLeft = pVector->m_dLeft;
|
||||
m_dTop = pVector->m_dTop;
|
||||
m_dWidth = pVector->m_dRight - m_dLeft;
|
||||
m_dHeight = pVector->m_dBottom - m_dTop;
|
||||
|
||||
m_lCoordSizeX = lCoordSize;
|
||||
m_lCoordSizeY = lCoordSize;
|
||||
|
||||
size_t nCount = pVector->GetCurSize();
|
||||
double* pData = pVector->m_pData;
|
||||
while (nCount > 0)
|
||||
{
|
||||
double dType = *pData++;
|
||||
if (0 == dType)
|
||||
{
|
||||
LONG lX = (LONG)((*pData - m_dLeft) * lCoordSize / m_dWidth);
|
||||
++pData;
|
||||
LONG lY = (LONG)((*pData - m_dTop) * lCoordSize / m_dHeight);
|
||||
++pData;
|
||||
|
||||
CString strPath = _T("");
|
||||
strPath.Format(g_vml_string_MoveTo, lX, lY);
|
||||
|
||||
oWriter.WriteString(strPath);
|
||||
|
||||
nCount -= 3;
|
||||
}
|
||||
else if (1 == dType)
|
||||
{
|
||||
LONG lX = (LONG)((*pData - m_dLeft) * lCoordSize / m_dWidth);
|
||||
++pData;
|
||||
LONG lY = (LONG)((*pData - m_dTop) * lCoordSize / m_dHeight);
|
||||
++pData;
|
||||
|
||||
CString strPath = _T("");
|
||||
strPath.Format(g_vml_string_LineTo, lX, lY);
|
||||
|
||||
oWriter.WriteString(strPath);
|
||||
|
||||
nCount -= 3;
|
||||
}
|
||||
else if (2 == dType)
|
||||
{
|
||||
LONG lX1 = (LONG)((*pData - m_dLeft) * lCoordSize / m_dWidth);
|
||||
++pData;
|
||||
LONG lY1 = (LONG)((*pData - m_dTop) * lCoordSize / m_dHeight);
|
||||
++pData;
|
||||
|
||||
LONG lX2 = (LONG)((*pData - m_dLeft) * lCoordSize / m_dWidth);
|
||||
++pData;
|
||||
LONG lY2 = (LONG)((*pData - m_dTop) * lCoordSize / m_dHeight);
|
||||
++pData;
|
||||
|
||||
LONG lX3 = (LONG)((*pData - m_dLeft) * lCoordSize / m_dWidth);
|
||||
++pData;
|
||||
LONG lY3 = (LONG)((*pData - m_dTop) * lCoordSize / m_dHeight);
|
||||
++pData;
|
||||
|
||||
CString strPath = _T("");
|
||||
strPath.Format(g_vml_string_CurveTo, lX1, lY1, lX2, lY2, lX3, lY3);
|
||||
|
||||
oWriter.WriteString(strPath);
|
||||
|
||||
nCount -= 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
oWriter.WriteString(g_vml_bstr_ClosePath);
|
||||
--nCount;
|
||||
}
|
||||
}
|
||||
|
||||
if (0x00 == (lType & 0x01))
|
||||
oWriter.WriteString(g_vml_bstr_NoStroke);
|
||||
if (0x00 == (lType >> 8))
|
||||
oWriter.WriteString(g_vml_bstr_NoFill);
|
||||
|
||||
oWriter.WriteString(g_vml_bstr_EndPath);
|
||||
|
||||
m_strPath = oWriter.GetData();
|
||||
oWriter.ClearNoAttack();
|
||||
}
|
||||
|
||||
virtual void ToXml(NSDocxRenderer::CStringWriter& oWriter)
|
||||
{
|
||||
oWriter.WriteString(g_bstr_shape1);
|
||||
|
||||
CString strPosition = _T("");
|
||||
strPosition.Format(g_string_shape_position, m_dLeft, m_dTop, m_dWidth, m_dHeight);
|
||||
oWriter.WriteString(strPosition);
|
||||
|
||||
oWriter.WriteString(strPosition);
|
||||
oWriter.WriteString(g_bstr_shape2);
|
||||
|
||||
CString strStyle = _T("");
|
||||
strStyle.Format(g_string_shape_geometry, m_lCoordSizeX, m_lCoordSizeY, m_strPath, ConvertColor(m_oBrush.Color1), ConvertColor(m_oPen.Color), m_oPen.Size);
|
||||
oWriter.WriteString(strStyle);
|
||||
|
||||
if (c_BrushTypeTexture == m_oBrush.Type)
|
||||
{
|
||||
CString strImage = _T("");
|
||||
strImage.Format(g_string_tx_rid, 10 + m_lTxId);
|
||||
oWriter.WriteString(strImage);
|
||||
|
||||
if (0xFF != m_oBrush.TextureAlpha)
|
||||
{
|
||||
CString strFillOpacity = _T("");
|
||||
strFillOpacity.Format(g_string_fill_opacity, (double)m_oBrush.TextureAlpha / 255.0);
|
||||
oWriter.WriteString(strFillOpacity);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0xFF != m_oBrush.Alpha1)
|
||||
{
|
||||
CString strFillOpacity = _T("");
|
||||
strFillOpacity.Format(g_string_fill_opacity, (double)m_oBrush.Alpha1 / 255.0);
|
||||
oWriter.WriteString(strFillOpacity);
|
||||
}
|
||||
if (0xFF != m_oPen.Alpha)
|
||||
{
|
||||
CString strPenOpacity = _T("");
|
||||
strPenOpacity.Format(g_string_stroke_opacity, (double)m_oPen.Alpha / 255.0);
|
||||
oWriter.WriteString(strPenOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
oWriter.WriteString(g_bstr_shape3);
|
||||
}
|
||||
};
|
||||
}
|
||||
354
DocxRenderer/src/logic/FontManager.h
Normal file
354
DocxRenderer/src/logic/FontManager.h
Normal file
@ -0,0 +1,354 @@
|
||||
#pragma once
|
||||
#include "Common.h"
|
||||
#include "FontManagerBase.h"
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
using namespace NSFontManager;
|
||||
|
||||
const double c_dDpiX = 72.0;
|
||||
const double c_dDpiY = 72.0;
|
||||
|
||||
enum TextAssociationType
|
||||
{
|
||||
TextAssociationTypeDefault = 0,
|
||||
TextAssociationTypeLine = 1,
|
||||
TextAssociationTypeNoFrames = 2,
|
||||
TextAssociationTypeBlock = 3
|
||||
};
|
||||
|
||||
class CFontTableEntry
|
||||
{
|
||||
public:
|
||||
CString m_strFamilyName;
|
||||
CString m_strPANOSE;
|
||||
LONG m_lStyle;
|
||||
CAtlArray<DWORD> m_arSignature;
|
||||
bool m_bIsFixedWidth;
|
||||
|
||||
public:
|
||||
CFontTableEntry() : m_arSignature()
|
||||
{
|
||||
m_strFamilyName = _T("");
|
||||
m_strPANOSE = _T("");
|
||||
m_lStyle = 0;
|
||||
m_bIsFixedWidth = false;
|
||||
}
|
||||
~CFontTableEntry()
|
||||
{
|
||||
}
|
||||
CFontTableEntry(const CFontTableEntry& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CFontTableEntry& operator =(const CFontTableEntry& oSrc)
|
||||
{
|
||||
m_strFamilyName = oSrc.m_strFamilyName;
|
||||
m_strPANOSE = oSrc.m_strPANOSE;
|
||||
m_lStyle = oSrc.m_lStyle;
|
||||
m_arSignature.Copy(oSrc.m_arSignature);
|
||||
m_bIsFixedWidth = oSrc.m_bIsFixedWidth;
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class CFontTable
|
||||
{
|
||||
public:
|
||||
CAtlMap<CString, CFontTableEntry> m_mapTable;
|
||||
|
||||
public:
|
||||
CFontTable() : m_mapTable()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class CFontManager : public CFontManagerBase
|
||||
{
|
||||
public:
|
||||
NSStructures::CFont* m_pFont;
|
||||
NSDocxRenderer::CMatrix* m_pTransform;
|
||||
double m_dSpaceWidthMM;
|
||||
|
||||
public:
|
||||
CFontTable m_oFontTable;
|
||||
|
||||
public:
|
||||
CFontManager() : m_pFont(NULL), CFontManagerBase()
|
||||
{
|
||||
m_pTransform = NULL;
|
||||
|
||||
m_dSpaceWidthMM = 0;
|
||||
}
|
||||
virtual ~CFontManager()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE void Init()
|
||||
{
|
||||
m_oFontTable.m_mapTable.RemoveAll();
|
||||
}
|
||||
AVSINLINE void AddFontToMap()
|
||||
{
|
||||
CAtlMap<CString, CFontTableEntry>::CPair* pPair = m_oFontTable.m_mapTable.Lookup(m_oFont.m_strFamilyName);
|
||||
if (NULL == pPair)
|
||||
{
|
||||
CFontTableEntry oEntry;
|
||||
oEntry.m_strFamilyName = m_oFont.m_strFamilyName;
|
||||
oEntry.m_strPANOSE = m_oFont.m_strPANOSE;
|
||||
oEntry.m_lStyle = m_oFont.m_lStyle;
|
||||
oEntry.m_bIsFixedWidth = m_oFont.m_bIsFixedWidth;
|
||||
oEntry.m_arSignature.Copy(m_oFont.m_arSignature);
|
||||
|
||||
m_oFontTable.m_mapTable.SetAt(m_oFont.m_strFamilyName, oEntry);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void LoadFont(long lFaceIndex = 0, bool bNeedAddToMap = true)
|
||||
{
|
||||
if (NULL == m_pManager)
|
||||
return;
|
||||
|
||||
double dSize = m_pFont->Size;
|
||||
double dSizeFont = dSize * ((m_pTransform->m_agg_mtx.sx + m_pTransform->m_agg_mtx.sy) / 2);
|
||||
|
||||
double dPix = m_pFont->CharSpace / c_dPixToMM;
|
||||
|
||||
m_pFont->Size = dSizeFont;
|
||||
|
||||
if (m_pFont->IsEqual2(&m_oFont.m_oFont))
|
||||
{
|
||||
m_pFont->Size = dSize;
|
||||
m_pManager->SetCharSpacing(dPix);
|
||||
m_pManager->SetStringGID(m_oFont.m_oFont.StringGID);
|
||||
return;
|
||||
}
|
||||
|
||||
m_oFont.m_oFont = *m_pFont;
|
||||
m_pFont->Size = dSize;
|
||||
|
||||
bool bIsPath = false;
|
||||
|
||||
if (_T("") == m_pFont->Path)
|
||||
{
|
||||
CFontManagerBase::LoadFontByName(m_oFont.m_oFont.Name, m_oFont.m_oFont.Size, m_oFont.m_oFont.GetStyle(), c_dDpiX, c_dDpiY);
|
||||
}
|
||||
else
|
||||
{
|
||||
CFontManagerBase::LoadFontByFile(m_oFont.m_oFont.Path, m_oFont.m_oFont.Size, c_dDpiX, c_dDpiY, lFaceIndex);
|
||||
|
||||
m_pFont->SetStyle(m_oFont.m_lStyle);
|
||||
m_oFont.m_oFont.SetStyle(m_oFont.m_lStyle);
|
||||
|
||||
bIsPath = true;
|
||||
}
|
||||
|
||||
long lGid = 0;
|
||||
m_pManager->GetStringGID(&lGid);
|
||||
m_pManager->SetStringGID(FALSE);
|
||||
|
||||
m_pManager->LoadString(L" ", 0, 0);
|
||||
float _x = 0;
|
||||
float _y = 0;
|
||||
float _w = 0;
|
||||
float _h = 0;
|
||||
|
||||
m_pManager->MeasureString2(&_x, &_y, &_w, &_h);
|
||||
|
||||
m_dSpaceWidthMM = (double)_w * c_dPixToMM;
|
||||
if (0 >= m_dSpaceWidthMM)
|
||||
{
|
||||
m_dSpaceWidthMM = 1.0;
|
||||
}
|
||||
|
||||
m_pManager->SetStringGID(lGid);
|
||||
|
||||
LoadFontMetrics();
|
||||
LoadFontParams(bIsPath);
|
||||
|
||||
if (bNeedAddToMap)
|
||||
AddFontToMap();
|
||||
}
|
||||
|
||||
AVSINLINE void MeasureString(const CString& strText, double x, double y, double& dBoxX, double& dBoxY, double& dBoxWidth, double& dBoxHeight, MeasureType measureType)
|
||||
{
|
||||
BSTR bsText = strText.AllocSysString();
|
||||
MeasureString(bsText, x, y, dBoxX, dBoxY, dBoxWidth, dBoxHeight, measureType);
|
||||
SysFreeString(bsText);
|
||||
}
|
||||
AVSINLINE void MeasureStringUNICODE(const CString& strText, double x, double y, double& dBoxX, double& dBoxY, double& dBoxWidth, double& dBoxHeight, MeasureType measureType)
|
||||
{
|
||||
m_pManager->SetStringGID(FALSE);
|
||||
MeasureString(strText, x, y, dBoxX, dBoxY, dBoxWidth, dBoxHeight, measureType);
|
||||
m_pManager->SetStringGID(TRUE);
|
||||
}
|
||||
AVSINLINE void MeasureStringUNICODE(BSTR strText, double x, double y, double& dBoxX, double& dBoxY, double& dBoxWidth, double& dBoxHeight, MeasureType measureType)
|
||||
{
|
||||
m_pManager->SetStringGID(FALSE);
|
||||
MeasureString(strText, x, y, dBoxX, dBoxY, dBoxWidth, dBoxHeight, measureType);
|
||||
m_pManager->SetStringGID(TRUE);
|
||||
}
|
||||
void MeasureString(BSTR bsText, double x, double y, double& dBoxX, double& dBoxY, double& dBoxWidth, double& dBoxHeight, MeasureType measureType)
|
||||
{
|
||||
LoadFont();
|
||||
|
||||
dBoxX = 0;
|
||||
dBoxY = 0;
|
||||
dBoxWidth = 0;
|
||||
dBoxHeight = 0;
|
||||
|
||||
if (NULL == m_pManager)
|
||||
return;
|
||||
|
||||
m_pManager->LoadString(bsText, (float)x, (float)y);
|
||||
|
||||
float fx = 0;
|
||||
float fy = 0;
|
||||
float fwidth = 0;
|
||||
float fheight = 0;
|
||||
|
||||
if (MeasureTypeGlyph == measureType)
|
||||
{
|
||||
m_pManager->MeasureString(&fx, &fy, &fwidth, &fheight);
|
||||
}
|
||||
else if (MeasureTypePosition == measureType)
|
||||
{
|
||||
m_pManager->MeasureString2(&fx, &fy, &fwidth, &fheight);
|
||||
}
|
||||
|
||||
dBoxX = (double)fx;
|
||||
dBoxY = (double)fy;
|
||||
dBoxWidth = (double)fwidth;
|
||||
dBoxHeight = (double)fheight;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
dBoxX *= c_dPixToMM;
|
||||
dBoxY *= c_dPixToMM;
|
||||
dBoxWidth *= c_dPixToMM;
|
||||
dBoxHeight *= c_dPixToMM;
|
||||
}
|
||||
|
||||
|
||||
__forceinline double GetBaseLineOffset()
|
||||
{
|
||||
LoadFont();
|
||||
|
||||
double d1 = 3 * (m_oFont.m_dLineSpacing - m_oFont.m_dDescent) - m_oFont.m_dAscent;
|
||||
d1 /= 2.0;
|
||||
|
||||
d1 *= (m_oFont.m_oFont.Size / m_oFont.m_dEmHeight);
|
||||
return d1;
|
||||
}
|
||||
|
||||
__forceinline double GetFontHeight()
|
||||
{
|
||||
return c_dPtToMM * (m_oFont.m_dLineSpacing * m_oFont.m_oFont.Size ) / m_oFont.m_dEmHeight;
|
||||
}
|
||||
|
||||
__forceinline void SetStringGid(const LONG& lGid)
|
||||
{
|
||||
if (NULL != m_pManager)
|
||||
m_pManager->SetStringGID(lGid);
|
||||
}
|
||||
|
||||
__forceinline void GenerateFontName2(CString& strText)
|
||||
{
|
||||
bool bIsNeedAddToMap = CFontManagerBase::GenerateFontName(strText);
|
||||
|
||||
if (bIsNeedAddToMap)
|
||||
{
|
||||
CAtlMap<CString, CFontTableEntry>::CPair* pPair = m_oFontTable.m_mapTable.Lookup(m_strCurrentPickFont);
|
||||
if (NULL == pPair)
|
||||
{
|
||||
CFontTableEntry oEntry;
|
||||
oEntry.m_strFamilyName = m_strCurrentPickFont;
|
||||
oEntry.m_strPANOSE = m_oFont.m_strPANOSE;
|
||||
oEntry.m_lStyle = m_oFont.m_lStyle;
|
||||
oEntry.m_bIsFixedWidth = m_oFont.m_bIsFixedWidth;
|
||||
oEntry.m_arSignature.Copy(m_oFont.m_arSignature);
|
||||
|
||||
m_oFontTable.m_mapTable.SetAt(m_oFont.m_oFont.Path, oEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class CFontManagerLight
|
||||
{
|
||||
private:
|
||||
CString m_strFontName;
|
||||
LONG m_lFontStyle;
|
||||
double m_dSize;
|
||||
|
||||
double m_dSpaceWidth;
|
||||
|
||||
AVSGraphics::IASCFontManager* m_pManager;
|
||||
|
||||
public:
|
||||
CFontManagerLight()
|
||||
{
|
||||
m_strFontName = _T("");
|
||||
m_lFontStyle = 0;
|
||||
m_dSize = 0;
|
||||
m_dSpaceWidth = 0;
|
||||
|
||||
m_pManager = NULL;
|
||||
CoCreateInstance(AVSGraphics::CLSID_CASCFontManager, NULL, CLSCTX_ALL, AVSGraphics::IID_IASCFontManager, (void**)&m_pManager);
|
||||
|
||||
m_pManager->Initialize(L"");
|
||||
m_pManager->SetDefaultFont(L"Arial");
|
||||
}
|
||||
~CFontManagerLight()
|
||||
{
|
||||
RELEASEINTERFACE(m_pManager);
|
||||
}
|
||||
|
||||
AVSINLINE double GetSpaceWidth()
|
||||
{
|
||||
return m_dSpaceWidth;
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE void LoadFont(CString& strFontName, LONG& lStyle, double& dSize, const BOOL& bIsGID)
|
||||
{
|
||||
if ((strFontName == m_strFontName) && (lStyle == m_lFontStyle) && (dSize == m_dSize))
|
||||
{
|
||||
m_pManager->SetStringGID(bIsGID);
|
||||
return;
|
||||
}
|
||||
|
||||
m_strFontName = strFontName;
|
||||
m_lFontStyle = lStyle;
|
||||
m_dSize = dSize;
|
||||
|
||||
BSTR bsName = m_strFontName.AllocSysString();
|
||||
m_pManager->LoadFontByName(bsName, (float)m_dSize, m_lFontStyle, c_dDpiX, c_dDpiY);
|
||||
SysFreeString(bsName);
|
||||
|
||||
CString strSpace = _T(" ");
|
||||
m_dSpaceWidth = MeasureStringWidth(strSpace);
|
||||
|
||||
m_pManager->SetStringGID(bIsGID);
|
||||
}
|
||||
|
||||
AVSINLINE double MeasureStringWidth(CString& sText)
|
||||
{
|
||||
BSTR bsText = sText.AllocSysString();
|
||||
m_pManager->LoadString(bsText, (float)0, (float)0);
|
||||
SysFreeString(bsText);
|
||||
|
||||
float fx = 0;
|
||||
float fy = 0;
|
||||
float fwidth = 0;
|
||||
float fheight = 0;
|
||||
|
||||
m_pManager->MeasureString2(&fx, &fy, &fwidth, &fheight);
|
||||
|
||||
return fwidth * c_dPixToMM;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
1374
DocxRenderer/src/logic/FontManagerBase.h
Normal file
1374
DocxRenderer/src/logic/FontManagerBase.h
Normal file
File diff suppressed because it is too large
Load Diff
762
DocxRenderer/src/logic/Page.h
Normal file
762
DocxRenderer/src/logic/Page.h
Normal file
@ -0,0 +1,762 @@
|
||||
#pragma once
|
||||
#include "ElementShape.h"
|
||||
#include "ElementParagraph.h"
|
||||
#include "ElementImage.h"
|
||||
|
||||
namespace NSDocxRenderer
|
||||
{
|
||||
const double STANDART_STRING_HEIGHT_MM = 4.2333333333333334;
|
||||
const double THE_SAME_STRING_Y_PRECISION_MM = 0.01;
|
||||
|
||||
static _bstr_t g_bstr_sectStart = L"<w:p><w:pPr><w:sectPr>";
|
||||
static _bstr_t g_bstr_lastSect = L"<w:type w:val=\"continuous\"/>";
|
||||
static _bstr_t g_bstr_sectEnd = L"<w:pgMar w:top=\"0\" w:right=\"0\" w:bottom=\"0\" w:left=\"0\"/></w:sectPr><w:spacing w:line=\"1\" w:lineRule=\"exact\"/></w:pPr></w:p>";
|
||||
static CString g_string_sectSizeVer = _T("<w:pgSz w:w=\"%d\" w:h=\"%d\" w:orient=\"portrait\"/>");
|
||||
static CString g_string_sectSizeHor = _T("<w:pgSz w:w=\"%d\" w:h=\"%d\" w:orient=\"landscape\"/>");
|
||||
|
||||
static _bstr_t g_bstr_drawingParStart = L"<w:p><w:pPr><w:spacing w:line=\"1\" w:lineRule=\"exact\"/></w:pPr>";
|
||||
static _bstr_t g_bstr_ParEnd = L"</w:p>";
|
||||
|
||||
static CString g_bstr_lastsection1 = L"<w:sectPr>";
|
||||
static CString g_bstr_lastsection2 = L"<w:pgMar w:top=\"0\" w:right=\"0\" w:bottom=\"0\" w:left=\"0\" w:header=\"0\" w:footer=\"0\" w:gutter=\"0\"/></w:sectPr>";
|
||||
|
||||
AVSINLINE bool IsUnicodeSymbol( WCHAR symbol )
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if ( ( 0x0009 == symbol ) || ( 0x000A == symbol ) || ( 0x000D == symbol ) ||
|
||||
( ( 0x0020 <= symbol ) && ( 0xD7FF >= symbol ) ) || ( ( 0xE000 <= symbol ) && ( symbol <= 0xFFFD ) ) ||
|
||||
( ( 0x10000 <= symbol ) && symbol ) )
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
class CPage
|
||||
{
|
||||
public:
|
||||
NSStructures::CFont* m_pFont;
|
||||
NSStructures::CPen* m_pPen;
|
||||
NSStructures::CBrush* m_pBrush;
|
||||
NSStructures::CShadow* m_pShadow;
|
||||
NSStructures::CEdgeText* m_pEdgeText;
|
||||
|
||||
NSDocxRenderer::CMatrix* m_pTransform;
|
||||
AVSGraphics::IASCGraphicSimpleComverter* m_pSimpleGraphicsConverter;
|
||||
|
||||
CVectorGraphics m_oVector;
|
||||
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
LONG m_lCurrentCommand;
|
||||
|
||||
CAtlArray<CBaseItem*> m_arGraphicItems;
|
||||
CAtlArray<CParagraph*> m_arParagraphs;
|
||||
|
||||
CAtlArray<CTextLine*> m_arTextLine;
|
||||
CTextLine* m_pCurrentLine;
|
||||
|
||||
CFontManager m_oManager;
|
||||
CFontManagerLight m_oManagerLight;
|
||||
|
||||
TextAssociationType m_eTextAssociationType;
|
||||
|
||||
NSDocxRenderer::CStringWriter m_oWriterVML;
|
||||
|
||||
bool m_bIsDeleteTextClipPage;
|
||||
|
||||
public:
|
||||
CPage() : m_oManager(), m_oManagerLight()
|
||||
{
|
||||
m_pFont = NULL;
|
||||
m_pBrush = NULL;
|
||||
m_pPen = NULL;
|
||||
m_pShadow = NULL;
|
||||
m_pEdgeText = NULL;
|
||||
|
||||
m_pTransform = NULL;
|
||||
m_pSimpleGraphicsConverter = NULL;
|
||||
|
||||
m_dWidth = 0;
|
||||
m_dHeight = 0;
|
||||
|
||||
m_pCurrentLine = NULL;
|
||||
m_eTextAssociationType = TextAssociationTypeNoFrames;
|
||||
|
||||
m_bIsDeleteTextClipPage = true;
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE void Init(NSStructures::CFont* pFont, NSStructures::CPen* pPen, NSStructures::CBrush* pBrush,
|
||||
NSStructures::CShadow* pShadow, NSStructures::CEdgeText* pEdge, NSDocxRenderer::CMatrix* pMatrix, AVSGraphics::IASCGraphicSimpleComverter* pSimple)
|
||||
{
|
||||
m_pFont = pFont;
|
||||
m_pPen = pPen;
|
||||
m_pBrush = pBrush;
|
||||
m_pShadow = pShadow;
|
||||
m_pEdgeText = pEdge;
|
||||
|
||||
m_pTransform = pMatrix;
|
||||
m_pSimpleGraphicsConverter = pSimple;
|
||||
|
||||
m_oManager.m_pFont = m_pFont;
|
||||
m_oManager.m_pTransform = m_pTransform;
|
||||
|
||||
m_pCurrentLine = NULL;
|
||||
|
||||
m_oWriterVML.AddSize(1000, 1000);
|
||||
}
|
||||
|
||||
AVSINLINE void Clear()
|
||||
{
|
||||
size_t nCount = 0;
|
||||
|
||||
nCount = m_arTextLine.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pTemp = m_arTextLine[i];
|
||||
RELEASEOBJECT(pTemp);
|
||||
}
|
||||
m_arTextLine.RemoveAll();
|
||||
|
||||
nCount = m_arGraphicItems.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CBaseItem* pTemp = m_arGraphicItems[i];
|
||||
RELEASEOBJECT(pTemp);
|
||||
}
|
||||
m_arGraphicItems.RemoveAll();
|
||||
|
||||
nCount = m_arParagraphs.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CParagraph* pTemp = m_arParagraphs[i];
|
||||
RELEASEOBJECT(pTemp);
|
||||
}
|
||||
m_arParagraphs.RemoveAll();
|
||||
|
||||
m_pCurrentLine = NULL;
|
||||
|
||||
m_oWriterVML.ClearNoAttack();
|
||||
}
|
||||
|
||||
~CPage()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
AVSINLINE void SetCurrentLineByBaseline(const double& dBaseLinePos)
|
||||
{
|
||||
if ((NULL == m_pCurrentLine) || (TextAssociationTypeDefault == m_eTextAssociationType))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_pCurrentLine = new CTextLine();
|
||||
|
||||
m_pCurrentLine->m_dBaselinePos = dBaseLinePos;
|
||||
m_arTextLine.Add(m_pCurrentLine);
|
||||
return;
|
||||
}
|
||||
if (fabs(m_pCurrentLine->m_dBaselinePos - dBaseLinePos) <= THE_SAME_STRING_Y_PRECISION_MM)
|
||||
{
|
||||
return;
|
||||
}
|
||||
size_t nCount = m_arTextLine.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
if (fabs(m_arTextLine[i]->m_dBaselinePos - dBaseLinePos) <= THE_SAME_STRING_Y_PRECISION_MM)
|
||||
{
|
||||
m_pCurrentLine = m_arTextLine[i];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><> <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_pCurrentLine = new CTextLine();
|
||||
m_pCurrentLine->m_dBaselinePos = dBaseLinePos;
|
||||
m_arTextLine.Add(m_pCurrentLine);
|
||||
return;
|
||||
}
|
||||
|
||||
// image commands
|
||||
AVSINLINE void WriteImage(CImageInfo& oInfo, double& fX, double& fY, double& fWidth, double& fHeight)
|
||||
{
|
||||
CImage* pImage = new CImage(oInfo, _T(""));
|
||||
|
||||
double dRotation = m_pTransform->z_Rotation();
|
||||
|
||||
if (fabs(dRotation) < 5.0)
|
||||
{
|
||||
double x1 = fX;
|
||||
double y1 = fY;
|
||||
double x2 = fX + fWidth;
|
||||
double y2 = fY + fHeight;
|
||||
|
||||
m_pTransform->TransformPoint(x1, y1);
|
||||
m_pTransform->TransformPoint(x2, y2);
|
||||
|
||||
if (x1 <= x2)
|
||||
{
|
||||
pImage->m_dLeft = x1;
|
||||
pImage->m_dWidth = x2 - x1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pImage->m_dLeft = x2;
|
||||
pImage->m_dWidth = x1 - x2;
|
||||
}
|
||||
|
||||
if (y1 <= y2)
|
||||
{
|
||||
pImage->m_dTop = y1;
|
||||
pImage->m_dHeight = y2 - y1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pImage->m_dTop = y2;
|
||||
pImage->m_dHeight = y1 - y2;
|
||||
}
|
||||
|
||||
pImage->m_dRotate = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
double x1 = fX;
|
||||
double y1 = fY;
|
||||
double x2 = fX + fWidth;
|
||||
double y2 = fY + fHeight;
|
||||
|
||||
NSDocxRenderer::CMatrix oTemp = *m_pTransform;
|
||||
|
||||
double dCx = (x1 + x2) / 2;
|
||||
double dCy = (y1 + y2) / 2;
|
||||
m_pTransform->TransformPoint(dCx, dCy);
|
||||
oTemp.RotateAt(-dRotation, dCx, dCy, Aggplus::MatrixOrderAppend);
|
||||
|
||||
oTemp.TransformPoint(x1, y1);
|
||||
oTemp.TransformPoint(x2, y2);
|
||||
|
||||
if (x1 <= x2)
|
||||
{
|
||||
pImage->m_dLeft = x1;
|
||||
pImage->m_dWidth = x2 - x1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pImage->m_dLeft = x2;
|
||||
pImage->m_dWidth = x1 - x2;
|
||||
}
|
||||
|
||||
if (y1 <= y2)
|
||||
{
|
||||
pImage->m_dTop = y1;
|
||||
pImage->m_dHeight = y2 - y1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pImage->m_dTop = y2;
|
||||
pImage->m_dHeight = y1 - y2;
|
||||
}
|
||||
|
||||
pImage->m_dRotate = dRotation;
|
||||
}
|
||||
|
||||
m_arGraphicItems.Add(pImage);
|
||||
}
|
||||
|
||||
// path commands
|
||||
AVSINLINE void MoveTo(double& dX, double& dY)
|
||||
{
|
||||
m_pTransform->TransformPoint(dX, dY);
|
||||
m_oVector.MoveTo(dX, dY);
|
||||
|
||||
}
|
||||
AVSINLINE void LineTo(double& dX, double& dY)
|
||||
{
|
||||
m_pTransform->TransformPoint(dX, dY);
|
||||
m_oVector.LineTo(dX, dY);
|
||||
}
|
||||
AVSINLINE void CurveTo(double& x1, double& y1, double& x2, double& y2, double& x3, double& y3)
|
||||
{
|
||||
m_pTransform->TransformPoint(x1, y1);
|
||||
m_pTransform->TransformPoint(x2, y2);
|
||||
m_pTransform->TransformPoint(x3, y3);
|
||||
|
||||
m_oVector.CurveTo(x1, y1, x2, y2, x3, y3);
|
||||
}
|
||||
AVSINLINE void Start()
|
||||
{
|
||||
}
|
||||
AVSINLINE void End()
|
||||
{
|
||||
m_oVector.End();
|
||||
m_oWriterVML.ClearNoAttack();
|
||||
}
|
||||
AVSINLINE void Close()
|
||||
{
|
||||
m_oVector.Close();
|
||||
}
|
||||
AVSINLINE void DrawPath(LONG lType, LONG lTxId)
|
||||
{
|
||||
if ((m_oVector.m_dLeft <= m_oVector.m_dRight) && (m_oVector.m_dTop <= m_oVector.m_dBottom))
|
||||
{
|
||||
CShape* pShape = new CShape();
|
||||
|
||||
pShape->m_lTxId = lTxId;
|
||||
|
||||
pShape->m_oPen = *m_pPen;
|
||||
pShape->m_oBrush = *m_pBrush;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
double dScaleTransform = (m_pTransform->m_agg_mtx.sx + m_pTransform->m_agg_mtx.sy) / 2.0;
|
||||
pShape->m_oPen.Size *= dScaleTransform;
|
||||
|
||||
if ((lType & 0x01) == 0x00)
|
||||
{
|
||||
if ((fabs(m_oVector.m_dLeft - m_oVector.m_dRight) < 0.3) || (fabs(m_oVector.m_dTop - m_oVector.m_dBottom) < 0.3))
|
||||
{
|
||||
lType = 0x01;
|
||||
pShape->m_bIsStroke = true;
|
||||
pShape->m_oPen.Color = m_pBrush->Color1;
|
||||
pShape->m_oPen.Alpha = m_pBrush->Alpha1;
|
||||
//pShape->m_oPen.Size = max(pShape->m_oPen.Size, 1);
|
||||
}
|
||||
}
|
||||
|
||||
pShape->CreateFromVectorData(&m_oVector, m_oWriterVML, 100000, lType);
|
||||
m_arGraphicItems.Add(pShape);
|
||||
}
|
||||
}
|
||||
|
||||
AVSINLINE void WriteText(BSTR bsText, BSTR bsGid, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset, bool bIsPDFAnalyzer)
|
||||
{
|
||||
double dTextX = fX;
|
||||
double dTextY = fY;
|
||||
double dTextR = fX + fWidth;
|
||||
double dTextB = fY + fHeight;
|
||||
|
||||
m_pTransform->TransformPoint(dTextX, dTextY);
|
||||
m_pTransform->TransformPoint(dTextR, dTextB);
|
||||
|
||||
double dTextW = dTextR - dTextX;
|
||||
double dTextH = dTextB - dTextY;
|
||||
|
||||
CString strText = _T("");
|
||||
|
||||
if ((bsText != NULL) && (bsGid != NULL))
|
||||
{
|
||||
UINT lLen = SysStringLen(bsText);
|
||||
for (unsigned int i = 0; i < lLen; ++i)
|
||||
{
|
||||
if ( IsUnicodeSymbol( bsText[i] ) )
|
||||
{
|
||||
strText += bsText[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
strText += _T(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strText = (CString)bsText;
|
||||
}
|
||||
|
||||
bool bIsPath = ((NULL == bsGid) && !bIsPDFAnalyzer) ? false : true;
|
||||
|
||||
m_oManager.LoadFont(0, !bIsPath);
|
||||
|
||||
if (bIsPath)
|
||||
m_oManager.GenerateFontName2(strText);
|
||||
|
||||
if ((0 == dTextW) || (dTextW > 5 * m_oManager.m_dSpaceWidthMM))
|
||||
{
|
||||
double _x = 0;
|
||||
double _y = 0;
|
||||
double _w = 0;
|
||||
double _h = 0;
|
||||
|
||||
if (NULL != bsGid)
|
||||
{
|
||||
m_oManager.SetStringGid(1);
|
||||
m_oManager.MeasureString(bsGid, dTextX, dTextY, _x, _y, _w, _h, CFontManager::MeasureTypePosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> xps)
|
||||
m_oManager.SetStringGid(0);
|
||||
m_oManager.MeasureString(bsText, dTextX, dTextY, _x, _y, _w, _h, CFontManager::MeasureTypePosition);
|
||||
}
|
||||
|
||||
dTextW = _w;
|
||||
//dTextW *= c_dPixToMM;
|
||||
}
|
||||
|
||||
double dBaseLinePos = dTextY + fBaseLineOffset;
|
||||
dTextH = m_oManager.GetFontHeight();
|
||||
|
||||
SetCurrentLineByBaseline(dBaseLinePos);
|
||||
|
||||
CContText* pLastCont = NULL;
|
||||
size_t nCountConts = m_pCurrentLine->m_arConts.GetCount();
|
||||
if (nCountConts != 0)
|
||||
pLastCont = m_pCurrentLine->m_arConts[nCountConts - 1];
|
||||
|
||||
if (NULL == pLastCont)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
CContText* pCont = new CContText();
|
||||
|
||||
pCont->m_dX = dTextX;
|
||||
pCont->m_dY = dBaseLinePos;
|
||||
|
||||
pCont->m_dWidth = dTextW;
|
||||
pCont->m_dHeight = dTextH;
|
||||
|
||||
if (_T(" ") == strText)
|
||||
{
|
||||
pCont->m_dWidthWithoutSpaces = 0;
|
||||
pCont->m_dLeftWithoutSpaces = dTextX + dTextW;
|
||||
}
|
||||
else
|
||||
{
|
||||
pCont->m_dWidthWithoutSpaces = dTextW;
|
||||
pCont->m_dLeftWithoutSpaces = dTextX;
|
||||
}
|
||||
|
||||
pCont->m_strText = strText;
|
||||
|
||||
pCont->m_oFont = m_oManager.m_oFont.m_oFont;
|
||||
pCont->m_oBrush = *m_pBrush;
|
||||
|
||||
if (bIsPath)
|
||||
{
|
||||
pCont->m_strPickFontName = m_oManager.m_strCurrentPickFont;
|
||||
pCont->m_lPickFontStyle = m_oManager.m_lCurrentPictFontStyle;
|
||||
}
|
||||
|
||||
pCont->m_dSpaceWidthMM = m_oManager.m_dSpaceWidthMM;
|
||||
|
||||
m_pCurrentLine->AddCont(pCont, m_oManager.m_oFont.m_dBaselineOffset);
|
||||
return;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
//if (m_lCurrentCommand == c_nTextType && pLastCont->m_oFont.IsEqual(&m_oManager.m_oFontOld) && pLastCont->m_oBrush.IsEqual(m_pBrush))
|
||||
//{
|
||||
// // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// pLastCont->m_strText += strText;
|
||||
// pLastCont->m_dWidth = (dTextX + dTextW - pLastCont->m_dX);
|
||||
// return;
|
||||
//}
|
||||
|
||||
double dRight = pLastCont->m_dX + pLastCont->m_dWidth;
|
||||
|
||||
if (pLastCont->m_oFont.IsEqual(&m_oManager.m_oFont.m_oFont) && pLastCont->m_oBrush.IsEqual(m_pBrush))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (fabs(dRight - dTextX) < 0.5)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
pLastCont->m_strText += strText;
|
||||
pLastCont->m_dWidth = (dTextX + dTextW - pLastCont->m_dX);
|
||||
|
||||
if (_T(" ") != strText)
|
||||
{
|
||||
if (0 == pLastCont->m_dWidthWithoutSpaces)
|
||||
pLastCont->m_dLeftWithoutSpaces = dTextX;
|
||||
|
||||
pLastCont->m_dWidthWithoutSpaces = dTextX + dTextW - pLastCont->m_dLeftWithoutSpaces;
|
||||
}
|
||||
else if (0 == pLastCont->m_dWidthWithoutSpaces)
|
||||
{
|
||||
pLastCont->m_dLeftWithoutSpaces = dTextX + dTextW;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if ((dRight < dTextX) && ((dTextX - dRight) < m_oManager.m_dSpaceWidthMM))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
pLastCont->m_strText += (_T(" ") + strText);
|
||||
pLastCont->m_dWidth = (dTextX + dTextW - pLastCont->m_dX);
|
||||
|
||||
if (_T(" ") != strText)
|
||||
{
|
||||
if (0 == pLastCont->m_dWidthWithoutSpaces)
|
||||
pLastCont->m_dLeftWithoutSpaces = dTextX;
|
||||
|
||||
pLastCont->m_dWidthWithoutSpaces = dTextX + dTextW - pLastCont->m_dLeftWithoutSpaces;
|
||||
}
|
||||
else if (0 == pLastCont->m_dWidthWithoutSpaces)
|
||||
{
|
||||
pLastCont->m_dLeftWithoutSpaces = dTextX + dTextW;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> (<28><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>)
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
CContText* pCont = new CContText();
|
||||
|
||||
pCont->m_dX = dTextX;
|
||||
pCont->m_dY = dBaseLinePos;
|
||||
|
||||
pCont->m_dWidth = dTextW;
|
||||
pCont->m_dHeight = dTextH;
|
||||
|
||||
if (_T(" ") == strText)
|
||||
{
|
||||
pCont->m_dWidthWithoutSpaces = 0;
|
||||
pCont->m_dLeftWithoutSpaces = dTextX + dTextW;
|
||||
}
|
||||
else
|
||||
{
|
||||
pCont->m_dWidthWithoutSpaces = dTextW;
|
||||
pCont->m_dLeftWithoutSpaces = dTextX;
|
||||
}
|
||||
|
||||
pCont->m_strText = strText;
|
||||
|
||||
pCont->m_oFont = m_oManager.m_oFont.m_oFont;
|
||||
pCont->m_oBrush = *m_pBrush;
|
||||
|
||||
if (bIsPath)
|
||||
{
|
||||
pCont->m_strPickFontName = m_oManager.m_strCurrentPickFont;
|
||||
pCont->m_lPickFontStyle = m_oManager.m_lCurrentPictFontStyle;
|
||||
}
|
||||
|
||||
pCont->m_dSpaceWidthMM = m_oManager.m_dSpaceWidthMM;
|
||||
|
||||
m_pCurrentLine->AddCont(pCont, m_oManager.m_oFont.m_dBaselineOffset);
|
||||
}
|
||||
|
||||
void Build()
|
||||
{
|
||||
if (m_bIsDeleteTextClipPage)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
size_t nCount = m_arTextLine.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pTextLine = m_arTextLine[i];
|
||||
|
||||
double _top = pTextLine->m_dBaselinePos - pTextLine->m_dHeight;
|
||||
double _bottom = pTextLine->m_dBaselinePos;
|
||||
|
||||
if (_top >= m_dHeight || _bottom <= 0)
|
||||
{
|
||||
m_arTextLine.RemoveAt(i);
|
||||
--i;
|
||||
--nCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (m_eTextAssociationType)
|
||||
{
|
||||
case TextAssociationTypeDefault:
|
||||
case TextAssociationTypeLine:
|
||||
{
|
||||
size_t nCount = m_arTextLine.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pTextLine = m_arTextLine[i];
|
||||
|
||||
CParagraph* pParagraph = new CParagraph(m_eTextAssociationType);
|
||||
pParagraph->m_pManagerLight = &m_oManagerLight;
|
||||
pParagraph->m_bIsTextFrameProperties = true;
|
||||
|
||||
pParagraph->m_dLeft = pTextLine->m_dX;
|
||||
pParagraph->m_dTop = pTextLine->m_dBaselinePos - pTextLine->m_dHeight + pTextLine->m_dBaselineOffset;
|
||||
|
||||
pParagraph->m_arLines.Add(pTextLine);
|
||||
|
||||
m_arParagraphs.Add(pParagraph);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_arTextLine.RemoveAll();
|
||||
break;
|
||||
}
|
||||
case TextAssociationTypeBlock:
|
||||
{
|
||||
size_t nCount = m_arTextLine.GetCount();
|
||||
|
||||
if (0 == nCount)
|
||||
break;
|
||||
|
||||
CTextLine* pFirstLine = m_arTextLine[0];
|
||||
|
||||
CParagraph* pParagraph = new CParagraph(m_eTextAssociationType);
|
||||
pParagraph->m_pManagerLight = &m_oManagerLight;
|
||||
pParagraph->m_bIsTextFrameProperties = true;
|
||||
|
||||
pParagraph->m_dLeft = pFirstLine->m_dX;
|
||||
pParagraph->m_dTop = pFirstLine->m_dBaselinePos - pFirstLine->m_dHeight + pFirstLine->m_dBaselineOffset;
|
||||
|
||||
pParagraph->m_arLines.Add(pFirstLine);
|
||||
|
||||
m_arParagraphs.Add(pParagraph);
|
||||
|
||||
for (size_t i = 1; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pTextLine = m_arTextLine[i];
|
||||
|
||||
CParagraph* pParagraph = new CParagraph(m_eTextAssociationType);
|
||||
pParagraph->m_pManagerLight = &m_oManagerLight;
|
||||
pParagraph->m_bIsTextFrameProperties = true;
|
||||
|
||||
if (((fabs(pTextLine->m_dBaselinePos - pTextLine->m_dHeight - pFirstLine->m_dBaselinePos) > STANDART_STRING_HEIGHT_MM) && (pTextLine->m_dX == pFirstLine->m_dX)) ||
|
||||
((pTextLine->m_dX != pFirstLine->m_dX) && (pTextLine->m_dBaselinePos != pFirstLine->m_dBaselinePos)))
|
||||
{
|
||||
pParagraph->m_dLeft = pTextLine->m_dX;
|
||||
pParagraph->m_dTop = pTextLine->m_dBaselinePos - pTextLine->m_dHeight + pTextLine->m_dBaselineOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
pParagraph->m_dLeft = pFirstLine->m_dX;
|
||||
pParagraph->m_dTop = pFirstLine->m_dBaselinePos - pFirstLine->m_dHeight + pFirstLine->m_dBaselineOffset;
|
||||
}
|
||||
|
||||
pFirstLine = pTextLine;
|
||||
|
||||
pParagraph->m_arLines.Add(pTextLine);
|
||||
m_arParagraphs.Add(pParagraph);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_arTextLine.RemoveAll();
|
||||
break;
|
||||
}
|
||||
case TextAssociationTypeNoFrames:
|
||||
{
|
||||
SortElements(m_arTextLine);
|
||||
Merge(STANDART_STRING_HEIGHT_MM / 3);
|
||||
|
||||
double previousStringOffset = 0;
|
||||
size_t nCount = m_arTextLine.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pTextLine = m_arTextLine[i];
|
||||
|
||||
CParagraph* pParagraph = new CParagraph(m_eTextAssociationType);
|
||||
pParagraph->m_pManagerLight = &m_oManagerLight;
|
||||
pParagraph->m_bIsTextFrameProperties = false;
|
||||
|
||||
pParagraph->m_dLeft = pTextLine->m_dX;
|
||||
|
||||
double dBeforeSpacing = (pTextLine->m_dBaselinePos - previousStringOffset - pTextLine->m_dHeight + pTextLine->m_dBaselineOffset);
|
||||
|
||||
pParagraph->m_dSpaceBefore = max(dBeforeSpacing, 0);
|
||||
|
||||
double dHeight = 1;
|
||||
if (pTextLine->m_dHeight != 0)
|
||||
{
|
||||
dHeight = pTextLine->m_dHeight;
|
||||
|
||||
if (dBeforeSpacing < 0)
|
||||
dHeight += dBeforeSpacing;
|
||||
}
|
||||
|
||||
pParagraph->m_dHeight = dHeight;
|
||||
|
||||
previousStringOffset = pTextLine->m_dBaselinePos + pTextLine->m_dBaselineOffset;
|
||||
|
||||
pParagraph->m_arLines.Add(pTextLine);
|
||||
m_arParagraphs.Add(pParagraph);
|
||||
}
|
||||
|
||||
m_arTextLine.RemoveAll();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Merge(double dAffinity)
|
||||
{
|
||||
size_t nCount = m_arTextLine.GetCount();
|
||||
if (1 < nCount)
|
||||
{
|
||||
CTextLine* pPrev = m_arTextLine[0];
|
||||
for (size_t i = 1; i < nCount; ++i)
|
||||
{
|
||||
CTextLine* pNext = m_arTextLine[i];
|
||||
|
||||
if (fabs(pNext->m_dBaselinePos - pPrev->m_dBaselinePos) < dAffinity)
|
||||
{
|
||||
pPrev->Merge(pNext);
|
||||
|
||||
pNext->m_arConts.RemoveAll();
|
||||
RELEASEOBJECT(pNext);
|
||||
|
||||
m_arTextLine.RemoveAt(i);
|
||||
--i;
|
||||
--nCount;
|
||||
continue;
|
||||
}
|
||||
pPrev = pNext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Write(NSDocxRenderer::CStringWriter& oWriter)
|
||||
{
|
||||
// drawings
|
||||
size_t nCountDrawings = m_arGraphicItems.GetCount();
|
||||
if (0 != nCountDrawings)
|
||||
{
|
||||
oWriter.WriteString(g_bstr_drawingParStart);
|
||||
|
||||
for (size_t i = 0; i < nCountDrawings; ++i)
|
||||
{
|
||||
m_arGraphicItems[i]->ToXml(oWriter);
|
||||
}
|
||||
|
||||
oWriter.WriteString(g_bstr_ParEnd);
|
||||
}
|
||||
|
||||
size_t nCountParagraphs = m_arParagraphs.GetCount();
|
||||
for (size_t i = 0; i < nCountParagraphs; ++i)
|
||||
{
|
||||
m_arParagraphs[i]->ToXml(oWriter);
|
||||
}
|
||||
}
|
||||
|
||||
AVSINLINE void WriteSectionToFile(bool bLastPage, NSDocxRenderer::CStringWriter& oWriter)
|
||||
{
|
||||
// section
|
||||
LONG lWidthDx = (LONG)(m_dWidth * c_dMMToDx);
|
||||
LONG lHeightDx = (LONG)(m_dHeight * c_dMMToDx);
|
||||
|
||||
if (!bLastPage)
|
||||
oWriter.WriteString(g_bstr_sectStart);
|
||||
else
|
||||
oWriter.WriteString(g_bstr_lastsection1);
|
||||
|
||||
if (lWidthDx >= lHeightDx)
|
||||
{
|
||||
CString strSize = _T("");
|
||||
strSize.Format(g_string_sectSizeHor, lWidthDx, lHeightDx);
|
||||
oWriter.WriteString(strSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
CString strSize = _T("");
|
||||
strSize.Format(g_string_sectSizeVer, lWidthDx, lHeightDx);
|
||||
oWriter.WriteString(strSize);
|
||||
}
|
||||
|
||||
if (!bLastPage)
|
||||
oWriter.WriteString(g_bstr_sectEnd);
|
||||
else
|
||||
oWriter.WriteString(g_bstr_lastsection2);
|
||||
}
|
||||
};
|
||||
}
|
||||
15
DocxRenderer/src/resources/resources.h
Normal file
15
DocxRenderer/src/resources/resources.h
Normal file
File diff suppressed because one or more lines are too long
851
DocxRenderer/src/tmp/ASCDocxRenderer.cpp
Normal file
851
DocxRenderer/src/tmp/ASCDocxRenderer.cpp
Normal file
@ -0,0 +1,851 @@
|
||||
// AVSDocxRenderer.cpp : Implementation of CAVSDocxRenderer
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ASCDocxRenderer.h"
|
||||
|
||||
|
||||
// CAVSDocxRenderer
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_Type(LONG* lType)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::NewPage()
|
||||
{
|
||||
return m_oDocument.NewPage();
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_Height(double* dHeight)
|
||||
{
|
||||
return m_oDocument.get_Height(dHeight);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_Height(double dHeight)
|
||||
{
|
||||
return m_oDocument.put_Height(dHeight);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_Width(double* dWidth)
|
||||
{
|
||||
return m_oDocument.get_Width(dWidth);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_Width(double dWidth)
|
||||
{
|
||||
return m_oDocument.put_Width(dWidth);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_DpiX(double* dDpiX)
|
||||
{
|
||||
return m_oDocument.get_DpiX(dDpiX);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_DpiY(double* dDpiY)
|
||||
{
|
||||
return m_oDocument.get_DpiY(dDpiY);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetPen(BSTR bsXML)
|
||||
{
|
||||
return m_oDocument.SetPen(bsXML);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenColor(LONG* lColor)
|
||||
{
|
||||
return m_oDocument.get_PenColor(lColor);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenColor(LONG lColor)
|
||||
{
|
||||
return m_oDocument.put_PenColor(lColor);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenAlpha(LONG* lAlpha)
|
||||
{
|
||||
return m_oDocument.get_PenAlpha(lAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenAlpha(LONG lAlpha)
|
||||
{
|
||||
return m_oDocument.put_PenAlpha(lAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenSize(double* dSize)
|
||||
{
|
||||
return m_oDocument.get_PenSize(dSize);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenSize(double dSize)
|
||||
{
|
||||
return m_oDocument.put_PenSize(dSize);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenDashStyle(BYTE* val)
|
||||
{
|
||||
return m_oDocument.get_PenDashStyle(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenDashStyle(BYTE val)
|
||||
{
|
||||
return m_oDocument.put_PenDashStyle(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenLineStartCap(BYTE* val)
|
||||
{
|
||||
return m_oDocument.get_PenLineStartCap(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenLineStartCap(BYTE val)
|
||||
{
|
||||
return m_oDocument.put_PenLineStartCap(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenLineEndCap(BYTE* val)
|
||||
{
|
||||
return m_oDocument.get_PenLineEndCap(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenLineEndCap(BYTE val)
|
||||
{
|
||||
return m_oDocument.put_PenLineEndCap(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenLineJoin(BYTE* val)
|
||||
{
|
||||
return m_oDocument.get_PenLineJoin(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenLineJoin(BYTE val)
|
||||
{
|
||||
return m_oDocument.put_PenLineJoin(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenDashOffset(double* val)
|
||||
{
|
||||
return m_oDocument.get_PenDashOffset(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenDashOffset(double val)
|
||||
{
|
||||
return m_oDocument.put_PenDashOffset(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenAlign(LONG* val)
|
||||
{
|
||||
return m_oDocument.get_PenAlign(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenAlign(LONG val)
|
||||
{
|
||||
return m_oDocument.put_PenAlign(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_PenMiterLimit(double* val)
|
||||
{
|
||||
return m_oDocument.get_PenMiterLimit(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_PenMiterLimit(double val)
|
||||
{
|
||||
return m_oDocument.put_PenMiterLimit(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PenDashPattern(SAFEARRAY* pPattern)
|
||||
{
|
||||
return m_oDocument.PenDashPattern(pPattern);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetBrush(BSTR bsXML)
|
||||
{
|
||||
return m_oDocument.SetBrush(bsXML);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushType(LONG* lType)
|
||||
{
|
||||
return m_oDocument.get_BrushType(lType);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushType(LONG lType)
|
||||
{
|
||||
return m_oDocument.put_BrushType(lType);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushColor1(LONG* lColor)
|
||||
{
|
||||
return m_oDocument.get_BrushColor1(lColor);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushColor1(LONG lColor)
|
||||
{
|
||||
return m_oDocument.put_BrushColor1(lColor);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushAlpha1(LONG* lAlpha)
|
||||
{
|
||||
return m_oDocument.get_BrushAlpha1(lAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushAlpha1(LONG lAlpha)
|
||||
{
|
||||
return m_oDocument.put_BrushAlpha1(lAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushColor2(LONG* lColor)
|
||||
{
|
||||
return m_oDocument.get_BrushColor2(lColor);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushColor2(LONG lColor)
|
||||
{
|
||||
return m_oDocument.put_BrushColor2(lColor);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushAlpha2(LONG* lAlpha)
|
||||
{
|
||||
return m_oDocument.get_BrushAlpha2(lAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushAlpha2(LONG lAlpha)
|
||||
{
|
||||
return m_oDocument.put_BrushAlpha2(lAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushTexturePath(BSTR* bsPath)
|
||||
{
|
||||
return m_oDocument.get_BrushTexturePath(bsPath);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushTexturePath(BSTR bsPath)
|
||||
{
|
||||
return m_oDocument.put_BrushTexturePath(bsPath);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushTextureMode(LONG* lMode)
|
||||
{
|
||||
return m_oDocument.get_BrushTextureMode(lMode);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushTextureMode(LONG lMode)
|
||||
{
|
||||
return m_oDocument.put_BrushTextureMode(lMode);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushTextureAlpha(LONG* lTxAlpha)
|
||||
{
|
||||
return m_oDocument.get_BrushTextureAlpha(lTxAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushTextureAlpha(LONG lTxAlpha)
|
||||
{
|
||||
return m_oDocument.put_BrushTextureAlpha(lTxAlpha);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_BrushLinearAngle(double* dAngle)
|
||||
{
|
||||
return m_oDocument.get_BrushLinearAngle(dAngle);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_BrushLinearAngle(double dAngle)
|
||||
{
|
||||
return m_oDocument.put_BrushLinearAngle(dAngle);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::BrushRect(BOOL val, double left, double top, double width, double height)
|
||||
{
|
||||
return m_oDocument.BrushRect(val, left, top, width, height);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetFont(BSTR bsXML)
|
||||
{
|
||||
return m_oDocument.SetFont(bsXML);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_FontName(BSTR* bsName)
|
||||
{
|
||||
return m_oDocument.get_FontName(bsName);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_FontName(BSTR bsName)
|
||||
{
|
||||
return m_oDocument.put_FontName(bsName);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_FontPath(BSTR* bsName)
|
||||
{
|
||||
return m_oDocument.get_FontPath(bsName);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_FontPath(BSTR bsName)
|
||||
{
|
||||
return m_oDocument.put_FontPath(bsName);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_FontSize(double* dSize)
|
||||
{
|
||||
return m_oDocument.get_FontSize(dSize);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_FontSize(double dSize)
|
||||
{
|
||||
return m_oDocument.put_FontSize(dSize);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_FontStyle(LONG* lStyle)
|
||||
{
|
||||
return m_oDocument.get_FontStyle(lStyle);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_FontStyle(LONG lStyle)
|
||||
{
|
||||
return m_oDocument.put_FontStyle(lStyle);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_FontStringGID(BOOL* bGID)
|
||||
{
|
||||
return m_oDocument.get_FontStringGID(bGID);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_FontStringGID(BOOL bGID)
|
||||
{
|
||||
return m_oDocument.put_FontStringGID(bGID);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_FontCharSpace(double* dSpace)
|
||||
{
|
||||
return m_oDocument.get_FontCharSpace(dSpace);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_FontCharSpace(double dSpace)
|
||||
{
|
||||
return m_oDocument.put_FontCharSpace(dSpace);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetShadow(BSTR bsXML)
|
||||
{
|
||||
return m_oDocument.SetShadow(bsXML);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ShadowDistanceX(double* val)
|
||||
{
|
||||
return m_oDocument.get_ShadowDistanceX(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ShadowDistanceX(double val)
|
||||
{
|
||||
return m_oDocument.put_ShadowDistanceX(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ShadowDistanceY(double* val)
|
||||
{
|
||||
return m_oDocument.get_ShadowDistanceY(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ShadowDistanceY(double val)
|
||||
{
|
||||
return m_oDocument.put_ShadowDistanceY(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ShadowBlurSize(double* val)
|
||||
{
|
||||
return m_oDocument.get_ShadowBlurSize(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ShadowBlurSize(double val)
|
||||
{
|
||||
return m_oDocument.put_ShadowBlurSize(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ShadowColor(LONG* val)
|
||||
{
|
||||
return m_oDocument.get_ShadowColor(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ShadowColor(LONG val)
|
||||
{
|
||||
return m_oDocument.put_ShadowColor(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ShadowAlpha(LONG* val)
|
||||
{
|
||||
return m_oDocument.get_ShadowAlpha(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ShadowAlpha(LONG val)
|
||||
{
|
||||
return m_oDocument.put_ShadowAlpha(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ShadowVisible(BOOL* val)
|
||||
{
|
||||
return m_oDocument.get_ShadowVisible(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ShadowVisible(BOOL val)
|
||||
{
|
||||
return m_oDocument.put_ShadowVisible(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetEdgeText(BSTR bsXML)
|
||||
{
|
||||
return m_oDocument.SetEdgeText(bsXML);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_EdgeVisible(LONG* val)
|
||||
{
|
||||
return m_oDocument.get_EdgeVisible(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_EdgeVisible(LONG val)
|
||||
{
|
||||
return m_oDocument.put_EdgeVisible(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_EdgeColor(LONG* val)
|
||||
{
|
||||
return m_oDocument.get_EdgeColor(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_EdgeColor(LONG val)
|
||||
{
|
||||
return m_oDocument.put_EdgeColor(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_EdgeAlpha(LONG* val)
|
||||
{
|
||||
return m_oDocument.get_EdgeAlpha(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_EdgeAlpha(LONG val)
|
||||
{
|
||||
return m_oDocument.put_EdgeAlpha(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_EdgeDist(double* val)
|
||||
{
|
||||
return m_oDocument.get_EdgeDist(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_EdgeDist(double val)
|
||||
{
|
||||
return m_oDocument.put_EdgeDist(val);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::CommandDrawText(BSTR bsText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset)
|
||||
{
|
||||
return m_oDocument.CommandDrawText(bsText, fX, fY, fWidth, fHeight, fBaseLineOffset);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::CommandDrawTextEx(BSTR bsUnicodeText, BSTR bsGidText, BSTR bsSourceCodeText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset, DWORD lFlags)
|
||||
{
|
||||
return m_oDocument.CommandDrawTextEx(bsUnicodeText, bsGidText, bsSourceCodeText, fX, fY, fWidth, fHeight, fBaseLineOffset, lFlags);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::BeginCommand(DWORD lType)
|
||||
{
|
||||
return m_oDocument.BeginCommand(lType);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::EndCommand(DWORD lType)
|
||||
{
|
||||
return m_oDocument.EndCommand(lType);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandMoveTo(double fX, double fY)
|
||||
{
|
||||
return m_oDocument.PathCommandMoveTo(fX, fY);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandLineTo(double fX, double fY)
|
||||
{
|
||||
return m_oDocument.PathCommandLineTo(fX, fY);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandLinesTo(SAFEARRAY* pPoints)
|
||||
{
|
||||
return m_oDocument.PathCommandLinesTo(pPoints);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandCurveTo(double fX1, double fY1, double fX2, double fY2, double fX3, double fY3)
|
||||
{
|
||||
return m_oDocument.PathCommandCurveTo(fX1, fY1, fX2, fY2, fX3, fY3);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandCurvesTo(SAFEARRAY* pPoints)
|
||||
{
|
||||
return m_oDocument.PathCommandCurvesTo(pPoints);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandArcTo(double fX, double fY, double fWidth, double fHeight, double fStartAngle, double fSweepAngle)
|
||||
{
|
||||
return m_oDocument.PathCommandArcTo(fX, fY, fWidth, fHeight, fStartAngle, fSweepAngle);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandClose()
|
||||
{
|
||||
return m_oDocument.PathCommandClose();
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandEnd()
|
||||
{
|
||||
return m_oDocument.PathCommandEnd();
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::DrawPath(long nType)
|
||||
{
|
||||
return m_oDocument.DrawPath(nType);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandStart()
|
||||
{
|
||||
return m_oDocument.PathCommandStart();
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandGetCurrentPoint(double* fX, double* fY)
|
||||
{
|
||||
return m_oDocument.PathCommandGetCurrentPoint( fX, fY );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::GetCommandParams(double* dAngle, double* dLeft, double* dTop, double* dWidth, double* dHeight, DWORD* lFlags)
|
||||
{
|
||||
return m_oDocument.GetCommandParams( dAngle, dLeft, dTop, dWidth, dHeight, lFlags );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetCommandParams(double dAngle, double dLeft, double dTop, double dWidth, double dHeight, DWORD lFlags)
|
||||
{
|
||||
return m_oDocument.SetCommandParams( dAngle, dLeft, dTop, dWidth, dHeight, lFlags );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::DrawImage(IUnknown* pInterface, double fX, double fY, double fWidth, double fHeight)
|
||||
{
|
||||
return m_oDocument.DrawImage( pInterface, fX, fY, fWidth, fHeight);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::DrawImageFromFile(BSTR bstrVal, double fX, double fY, double fWidth, double fHeight)
|
||||
{
|
||||
return m_oDocument.DrawImageFromFile( bstrVal, fX, fY, fWidth, fHeight);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetAdditionalParam(BSTR ParamName, VARIANT ParamValue)
|
||||
{
|
||||
CString sParamName = ParamName;
|
||||
if ( _T("SourceRendererType") == sParamName && VT_I4 == ParamValue.vt )
|
||||
{
|
||||
m_oDocument.m_bIsNeedPDFTextAnalyzer = ( ParamValue.lVal == c_nPDFWriter ? true : false );
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::GetAdditionalParam(BSTR ParamName, VARIANT* ParamValue)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::SetTransform(double dA, double dB, double dC, double dD, double dE, double dF)
|
||||
{
|
||||
return m_oDocument.SetTransform( dA, dB, dC, dD, dE, dF );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF)
|
||||
{
|
||||
return m_oDocument.GetTransform( pdA, pdB, pdC, pdD, pdE, pdF );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::ResetTransform(void)
|
||||
{
|
||||
return m_oDocument.ResetTransform();
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::get_ClipMode(LONG* plMode)
|
||||
{
|
||||
return m_oDocument.get_ClipMode(plMode);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::put_ClipMode(LONG lMode)
|
||||
{
|
||||
return m_oDocument.put_ClipMode(lMode);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandText(BSTR bsText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset)
|
||||
{
|
||||
return m_oDocument.PathCommandText(bsText, fX, fY, fWidth, fHeight, fBaseLineOffset);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::PathCommandTextEx(BSTR bsUnicodeText, BSTR bsGidText, BSTR bsSourceCodeText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset, DWORD lFlags)
|
||||
{
|
||||
return m_oDocument.PathCommandTextEx( bsUnicodeText, bsGidText, bsSourceCodeText, fX, fY, fWidth, fHeight, fBaseLineOffset, lFlags );
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::Initialize(BSTR bsXMLOptions)
|
||||
{
|
||||
BaseInitialize(bsXMLOptions);
|
||||
|
||||
IUnknown* punkRenderer = NULL;
|
||||
this->QueryInterface(IID_IUnknown, (void**)&punkRenderer);
|
||||
|
||||
m_oDocument.CreateDocument(punkRenderer, m_strTempFileDir);
|
||||
|
||||
RELEASEINTERFACE(punkRenderer);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::Save()
|
||||
{
|
||||
m_oDocument.Close();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::CreateOfficeFile(BSTR bsXMLOptions)
|
||||
{
|
||||
BaseInitialize(bsXMLOptions);
|
||||
|
||||
IUnknown* punkRenderer = NULL;
|
||||
this->QueryInterface(IID_IUnknown, (void**)&punkRenderer);
|
||||
|
||||
m_oDocument.CreateDocument(punkRenderer, m_strTempFileDir);
|
||||
|
||||
RELEASEINTERFACE(punkRenderer);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
STDMETHODIMP CAVSDocxRenderer::CloseFile()
|
||||
{
|
||||
m_oDocument.Close();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
239
DocxRenderer/src/tmp/ASCDocxRenderer.h
Normal file
239
DocxRenderer/src/tmp/ASCDocxRenderer.h
Normal file
@ -0,0 +1,239 @@
|
||||
// AVSDocxRenderer.h : Declaration of the CAVSDocxRenderer
|
||||
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "Logic/Document.h"
|
||||
|
||||
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
|
||||
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
|
||||
#endif
|
||||
|
||||
// IAVSDocxRenderer
|
||||
[object, uuid("5BEC40F1-CA4F-4275-BCC8-D4ABF47D896D"), dual, pointer_default(unique)]
|
||||
__interface IAVSDocxRenderer : IASCRenderer
|
||||
{
|
||||
[id(11001)] HRESULT Initialize([in]BSTR bsXMLOptions);
|
||||
[id(11002)] HRESULT Save();
|
||||
};
|
||||
|
||||
[object, uuid("84411C25-B8A1-4f16-A37A-9C142FBE8D26"), dual, pointer_default(unique)]
|
||||
__interface IAVSDocxRenderer2 : IDispatch
|
||||
{
|
||||
[id(12001)] HRESULT CreateOfficeFile([in]BSTR bstrFileName);
|
||||
[id(12002)] HRESULT CloseFile();
|
||||
};
|
||||
|
||||
// CAVSDocxRenderer
|
||||
[coclass, default(IAVSDocxRenderer), threading(apartment), vi_progid("AVSOfficeDocxRenderer.AVSDocxRenderer"), progid("AVSOfficeDocxRenderer.AVSDocxRenderer.1"), version(1.0), uuid("77B37E21-16F0-4BCC-8901-DFD89B962174")]
|
||||
class ATL_NO_VTABLE CAVSDocxRenderer :
|
||||
public IAVSDocxRenderer,
|
||||
public IAVSDocxRenderer2
|
||||
{
|
||||
public:
|
||||
CAVSDocxRenderer()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
m_strDstFilePath = _T("");
|
||||
m_strTempFileDir = _T("");
|
||||
m_strTempFileName = _T("");
|
||||
|
||||
InitializeCriticalSection(&m_oCS);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
CloseFile();
|
||||
DeleteCriticalSection(&m_oCS);
|
||||
}
|
||||
|
||||
public:
|
||||
// IASCRenderer Methods
|
||||
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-----------------------------------------------------------------------------
|
||||
STDMETHOD(get_Type)(LONG* lType);
|
||||
|
||||
//-------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------------------------
|
||||
STDMETHOD(NewPage)();
|
||||
STDMETHOD(get_Height)(double* dHeight);
|
||||
STDMETHOD(put_Height)(double dHeight);
|
||||
STDMETHOD(get_Width)(double* dWidth);
|
||||
STDMETHOD(put_Width)(double dWidth);
|
||||
STDMETHOD(get_DpiX)(double* dDpiX);
|
||||
STDMETHOD(get_DpiY)(double* dDpiY);
|
||||
//-------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------
|
||||
STDMETHOD(SetPen)(BSTR bsXML);
|
||||
|
||||
STDMETHOD(get_PenColor)(LONG* lColor);
|
||||
STDMETHOD(put_PenColor)(LONG lColor);
|
||||
STDMETHOD(get_PenAlpha)(LONG* lAlpha);
|
||||
STDMETHOD(put_PenAlpha)(LONG lAlpha);
|
||||
STDMETHOD(get_PenSize)(double* dSize);
|
||||
STDMETHOD(put_PenSize)(double dSize);
|
||||
STDMETHOD(get_PenDashStyle)(BYTE* val);
|
||||
STDMETHOD(put_PenDashStyle)(BYTE val);
|
||||
STDMETHOD(get_PenLineStartCap)(BYTE* val);
|
||||
STDMETHOD(put_PenLineStartCap)(BYTE val);
|
||||
STDMETHOD(get_PenLineEndCap)(BYTE* val);
|
||||
STDMETHOD(put_PenLineEndCap)(BYTE val);
|
||||
STDMETHOD(get_PenLineJoin)(BYTE* val);
|
||||
STDMETHOD(put_PenLineJoin)(BYTE val);
|
||||
STDMETHOD(get_PenDashOffset)(double* val);
|
||||
STDMETHOD(put_PenDashOffset)(double val);
|
||||
STDMETHOD(get_PenAlign)(LONG* val);
|
||||
STDMETHOD(put_PenAlign)(LONG val);
|
||||
STDMETHOD(get_PenMiterLimit)(double* val);
|
||||
STDMETHOD(put_PenMiterLimit)(double val);
|
||||
STDMETHOD(PenDashPattern)(SAFEARRAY* pPattern);
|
||||
|
||||
STDMETHOD(SetBrush)(BSTR bsXML);
|
||||
|
||||
STDMETHOD(get_BrushType)(LONG* lType);
|
||||
STDMETHOD(put_BrushType)(LONG lType);
|
||||
STDMETHOD(get_BrushColor1)(LONG* lColor);
|
||||
STDMETHOD(put_BrushColor1)(LONG lColor);
|
||||
STDMETHOD(get_BrushAlpha1)(LONG* lAlpha);
|
||||
STDMETHOD(put_BrushAlpha1)(LONG lAlpha);
|
||||
STDMETHOD(get_BrushColor2)(LONG* lColor);
|
||||
STDMETHOD(put_BrushColor2)(LONG lColor);
|
||||
STDMETHOD(get_BrushAlpha2)(LONG* lAlpha);
|
||||
STDMETHOD(put_BrushAlpha2)(LONG lAlpha);
|
||||
STDMETHOD(get_BrushTexturePath)(BSTR* bsPath);
|
||||
STDMETHOD(put_BrushTexturePath)(BSTR bsPath);
|
||||
STDMETHOD(get_BrushTextureMode)(LONG* lMode);
|
||||
STDMETHOD(put_BrushTextureMode)(LONG lMode);
|
||||
STDMETHOD(get_BrushTextureAlpha)(LONG* lTxAlpha);
|
||||
STDMETHOD(put_BrushTextureAlpha)(LONG lTxAlpha);
|
||||
STDMETHOD(get_BrushLinearAngle)(double* dAngle);
|
||||
STDMETHOD(put_BrushLinearAngle)(double dAngle);
|
||||
STDMETHOD(BrushRect)(BOOL val, double left, double top, double width, double height);
|
||||
|
||||
STDMETHOD(SetFont)(BSTR bsXML);
|
||||
|
||||
STDMETHOD(get_FontName)(BSTR* bsName);
|
||||
STDMETHOD(put_FontName)(BSTR bsName);
|
||||
STDMETHOD(get_FontPath)(BSTR* bsName);
|
||||
STDMETHOD(put_FontPath)(BSTR bsName);
|
||||
STDMETHOD(get_FontSize)(double* dSize);
|
||||
STDMETHOD(put_FontSize)(double dSize);
|
||||
STDMETHOD(get_FontStyle)(LONG* lStyle);
|
||||
STDMETHOD(put_FontStyle)(LONG lStyle);
|
||||
STDMETHOD(get_FontStringGID)(BOOL* bGID);
|
||||
STDMETHOD(put_FontStringGID)(BOOL bGID);
|
||||
STDMETHOD(get_FontCharSpace)(double* dSpace);
|
||||
STDMETHOD(put_FontCharSpace)(double dSpace);
|
||||
|
||||
STDMETHOD(SetShadow)(BSTR bsXML);
|
||||
|
||||
STDMETHOD(get_ShadowDistanceX)(double* val);
|
||||
STDMETHOD(put_ShadowDistanceX)(double val);
|
||||
STDMETHOD(get_ShadowDistanceY)(double* val);
|
||||
STDMETHOD(put_ShadowDistanceY)(double val);
|
||||
STDMETHOD(get_ShadowBlurSize)(double* val);
|
||||
STDMETHOD(put_ShadowBlurSize)(double val);
|
||||
STDMETHOD(get_ShadowColor)(LONG* val);
|
||||
STDMETHOD(put_ShadowColor)(LONG val);
|
||||
STDMETHOD(get_ShadowAlpha)(LONG* val);
|
||||
STDMETHOD(put_ShadowAlpha)(LONG val);
|
||||
STDMETHOD(get_ShadowVisible)(BOOL* val);
|
||||
STDMETHOD(put_ShadowVisible)(BOOL val);
|
||||
|
||||
STDMETHOD(SetEdgeText)(BSTR bsXML);
|
||||
|
||||
STDMETHOD(get_EdgeVisible)(LONG* val);
|
||||
STDMETHOD(put_EdgeVisible)(LONG val);
|
||||
STDMETHOD(get_EdgeColor)(LONG* val);
|
||||
STDMETHOD(put_EdgeColor)(LONG val);
|
||||
STDMETHOD(get_EdgeAlpha)(LONG* val);
|
||||
STDMETHOD(put_EdgeAlpha)(LONG val);
|
||||
STDMETHOD(get_EdgeDist)(double* val);
|
||||
STDMETHOD(put_EdgeDist)(double val);
|
||||
|
||||
//-------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------------------------------
|
||||
STDMETHOD(CommandDrawText)(BSTR bsText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset);
|
||||
STDMETHOD(CommandDrawTextEx)(BSTR bsUnicodeText, BSTR bsGidText, BSTR bsSourceCodeText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset, DWORD lFlags);
|
||||
//-------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---------------------------------------------------------------
|
||||
STDMETHOD(BeginCommand)(DWORD lType);
|
||||
STDMETHOD(EndCommand)(DWORD lType);
|
||||
//-------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Graphics Path -----------------------------------------------
|
||||
STDMETHOD(PathCommandMoveTo)(double fX, double fY);
|
||||
STDMETHOD(PathCommandLineTo)(double fX, double fY);
|
||||
STDMETHOD(PathCommandLinesTo)(SAFEARRAY* pPoints);
|
||||
STDMETHOD(PathCommandCurveTo)(double fX1, double fY1, double fX2, double fY2, double fX3, double fY3);
|
||||
STDMETHOD(PathCommandCurvesTo)(SAFEARRAY* pPoints);
|
||||
STDMETHOD(PathCommandArcTo)(double fX, double fY, double fWidth, double fHeight, double fStartAngle, double fSweepAngle);
|
||||
STDMETHOD(PathCommandClose)();
|
||||
STDMETHOD(PathCommandEnd)();
|
||||
STDMETHOD(DrawPath)(long nType);
|
||||
STDMETHOD(PathCommandStart)();
|
||||
STDMETHOD(PathCommandGetCurrentPoint)(double* fX, double* fY);
|
||||
|
||||
STDMETHOD(PathCommandText)(BSTR bsText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset);
|
||||
STDMETHOD(PathCommandTextEx)(BSTR bsUnicodeText, BSTR bsGidText, BSTR bsSourceCodeText, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset, DWORD lFlags);
|
||||
|
||||
STDMETHOD(GetCommandParams)(double* dAngle, double* dLeft, double* dTop, double* dWidth, double* dHeight, DWORD* lFlags);
|
||||
STDMETHOD(SetCommandParams)(double dAngle, double dLeft, double dTop, double dWidth, double dHeight, DWORD lFlags);
|
||||
//-------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------------------------
|
||||
STDMETHOD(DrawImage)(IUnknown* pInterface, double fX, double fY, double fWidth, double fHeight);
|
||||
STDMETHOD(DrawImageFromFile)(BSTR bstrVal, double fX, double fY, double fWidth, double fHeight);
|
||||
//------------------------------------------------------------------------------------------
|
||||
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue);
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue);
|
||||
|
||||
STDMETHOD(SetTransform)(double dA, double dB, double dC, double dD, double dE, double dF);
|
||||
STDMETHOD(GetTransform)(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF);
|
||||
STDMETHOD(ResetTransform)(void);
|
||||
STDMETHOD(get_ClipMode)(LONG* plMode);
|
||||
STDMETHOD(put_ClipMode)(LONG lMode);
|
||||
|
||||
public:
|
||||
//IAVSDocxRenderer Methods
|
||||
STDMETHOD(Initialize)(BSTR bsXMLOptions);
|
||||
STDMETHOD(Save)();
|
||||
|
||||
public:
|
||||
//IAVSDocxRenderer2 Methods
|
||||
STDMETHOD(CreateOfficeFile)(BSTR bsFileName);
|
||||
STDMETHOD(CloseFile)();
|
||||
|
||||
private:
|
||||
AVSGraphics::IASCFontManager* m_pFontManager;
|
||||
|
||||
NSDocxRenderer::CDocument m_oDocument;
|
||||
|
||||
CRITICAL_SECTION m_oCS;
|
||||
|
||||
CString m_strDstFilePath;
|
||||
CString m_strTempFileDir;
|
||||
CString m_strTempFileName;
|
||||
|
||||
void BaseInitialize(BSTR bsXMLOptions)
|
||||
{
|
||||
m_oDocument.m_oCurrentPage.m_eTextAssociationType = NSDocxRenderer::TextAssociationTypeNoFrames;
|
||||
XmlUtils::CXmlReader oXmlReader;
|
||||
|
||||
if( TRUE == oXmlReader.OpenFromXmlString( bsXMLOptions ) )
|
||||
{
|
||||
if( TRUE == oXmlReader.ReadRootNode( _T( "DocxRenderer" ) ) )
|
||||
{
|
||||
m_strTempFileDir = oXmlReader.ReadNodeAttributeOrValue( _T( "destinationpath" ) );
|
||||
|
||||
CString textFormatting = oXmlReader.ReadNodeAttributeOrValue( _T( "textformatting" ) );
|
||||
|
||||
if ( !textFormatting.IsEmpty() )
|
||||
{
|
||||
m_oDocument.m_oCurrentPage.m_eTextAssociationType = (NSDocxRenderer::TextAssociationType)XmlUtils::GetInteger(textFormatting);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
286
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.pbxproj
Normal file
286
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,286 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
6967B0CB1E27A25D00A129E2 /* HtmlFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0C91E27A25D00A129E2 /* HtmlFile.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
6967B0BB1E27A22E00A129E2 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
6967B0BD1E27A22E00A129E2 /* libHtmlFile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHtmlFile.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6967B0C91E27A25D00A129E2 /* HtmlFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HtmlFile.cpp; path = ../../../HtmlFile.cpp; sourceTree = "<group>"; };
|
||||
6967B0CA1E27A25D00A129E2 /* HtmlFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HtmlFile.h; path = ../../../HtmlFile.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
6967B0BA1E27A22E00A129E2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
6967B0B41E27A22E00A129E2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0BF1E27A22E00A129E2 /* HtmlFile */,
|
||||
6967B0BE1E27A22E00A129E2 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0BE1E27A22E00A129E2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0BD1E27A22E00A129E2 /* libHtmlFile.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6967B0BF1E27A22E00A129E2 /* HtmlFile */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6967B0C91E27A25D00A129E2 /* HtmlFile.cpp */,
|
||||
6967B0CA1E27A25D00A129E2 /* HtmlFile.h */,
|
||||
);
|
||||
path = HtmlFile;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
6967B0BC1E27A22E00A129E2 /* HtmlFile */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6967B0C61E27A22E00A129E2 /* Build configuration list for PBXNativeTarget "HtmlFile" */;
|
||||
buildPhases = (
|
||||
6967B0B91E27A22E00A129E2 /* Sources */,
|
||||
6967B0BA1E27A22E00A129E2 /* Frameworks */,
|
||||
6967B0BB1E27A22E00A129E2 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = HtmlFile;
|
||||
productName = HtmlFile;
|
||||
productReference = 6967B0BD1E27A22E00A129E2 /* libHtmlFile.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
6967B0B51E27A22E00A129E2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = OnlyOffce;
|
||||
TargetAttributes = {
|
||||
6967B0BC1E27A22E00A129E2 = {
|
||||
CreatedOnToolsVersion = 8.2;
|
||||
DevelopmentTeam = 2WH24U26GJ;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 6967B0B81E27A22E00A129E2 /* Build configuration list for PBXProject "HtmlFile" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 6967B0B41E27A22E00A129E2;
|
||||
productRefGroup = 6967B0BE1E27A22E00A129E2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
6967B0BC1E27A22E00A129E2 /* HtmlFile */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
6967B0B91E27A22E00A129E2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6967B0CB1E27A25D00A129E2 /* HtmlFile.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
6967B0C41E27A22E00A129E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6967B0C51E27A22E00A129E2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
6967B0C71E27A22E00A129E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
NOMINMAX,
|
||||
_IOS,
|
||||
LINUX,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6967B0C81E27A22E00A129E2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
NOMINMAX,
|
||||
_IOS,
|
||||
LINUX,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
6967B0B81E27A22E00A129E2 /* Build configuration list for PBXProject "HtmlFile" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6967B0C41E27A22E00A129E2 /* Debug */,
|
||||
6967B0C51E27A22E00A129E2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
6967B0C61E27A22E00A129E2 /* Build configuration list for PBXNativeTarget "HtmlFile" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6967B0C71E27A22E00A129E2 /* Debug */,
|
||||
6967B0C81E27A22E00A129E2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 6967B0B51E27A22E00A129E2 /* Project object */;
|
||||
}
|
||||
7
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:HtmlFile.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
1
HtmlFile/Mac/HtmlFile/HtmlFile/NOTE.txt
Normal file
1
HtmlFile/Mac/HtmlFile/HtmlFile/NOTE.txt
Normal file
@ -0,0 +1 @@
|
||||
DO NOT REMOVE FOLDER FOR XCODE
|
||||
@ -669,6 +669,26 @@ namespace NExtractTools
|
||||
NSFile::CFileBinary::Remove(sPdfBinFile);
|
||||
return nRes;
|
||||
}
|
||||
std::wstring getExtentionByRasterFormat(int format)
|
||||
{
|
||||
std::wstring sExt;
|
||||
switch(format)
|
||||
{
|
||||
case 1:
|
||||
sExt = L".bmp";
|
||||
break;
|
||||
case 2:
|
||||
sExt = L".gif";
|
||||
break;
|
||||
case 3:
|
||||
sExt = L".jpg";
|
||||
break;
|
||||
default:
|
||||
sExt = L".png";
|
||||
break;
|
||||
}
|
||||
return sExt;
|
||||
}
|
||||
//doct_bin -> image
|
||||
int doct_bin2image(NSDoctRenderer::DoctRendererFormat::FormatFile eFromType, const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params)
|
||||
{
|
||||
@ -731,9 +751,7 @@ namespace NExtractTools
|
||||
{
|
||||
sThumbnailDir = sTemp + FILE_SEPARATOR_STR + L"thumbnails";
|
||||
FileSystem::Directory::CreateDirectory(sThumbnailDir);
|
||||
std::wstring::size_type pos = sTo.find_last_of('.');
|
||||
std::wstring sExt = std::wstring::npos == pos ? L"" : sTo.substr(pos);
|
||||
imageWriter.m_sFileName = sThumbnailDir + FILE_SEPARATOR_STR + L"image" + sExt;
|
||||
imageWriter.m_sFileName = sThumbnailDir + FILE_SEPARATOR_STR + L"image" + getExtentionByRasterFormat(imageWriter.m_nRasterFormat);
|
||||
}
|
||||
BYTE* pData;
|
||||
DWORD nBytesCount;
|
||||
@ -1747,9 +1765,7 @@ namespace NExtractTools
|
||||
{
|
||||
sThumbnailDir = sTemp + FILE_SEPARATOR_STR + L"thumbnails";
|
||||
FileSystem::Directory::CreateDirectory(sThumbnailDir);
|
||||
std::wstring::size_type pos = sTo.find_last_of('.');
|
||||
|
||||
sFileToExt = std::wstring::npos == pos ? L"" : sTo.substr(pos);
|
||||
sFileToExt = getExtentionByRasterFormat(nRasterFormat);
|
||||
}
|
||||
int nPagesCount = pReader->GetPagesCount();
|
||||
if (bIsOnlyFirst)
|
||||
@ -1879,7 +1895,7 @@ namespace NExtractTools
|
||||
NSDoctRenderer::DoctRendererFormat::FormatFile eFromType = NSDoctRenderer::DoctRendererFormat::FormatFile::DOCT;
|
||||
nRes = doct_bin2pdf(eFromType, sFrom, sTo, sTemp, bPaid, sThemeDir, params);
|
||||
}
|
||||
else if(AVS_OFFICESTUDIO_FILE_IMAGE == nFormatTo)
|
||||
else if(0 != (AVS_OFFICESTUDIO_FILE_IMAGE & nFormatTo))
|
||||
{
|
||||
NSDoctRenderer::DoctRendererFormat::FormatFile eFromType = NSDoctRenderer::DoctRendererFormat::FormatFile::DOCT;
|
||||
nRes = doct_bin2image(eFromType, sFrom, sTo, sTemp, bPaid, sThemeDir, params);
|
||||
@ -2047,7 +2063,7 @@ namespace NExtractTools
|
||||
NSDoctRenderer::DoctRendererFormat::FormatFile eFromType = NSDoctRenderer::DoctRendererFormat::FormatFile::XLST;
|
||||
nRes = doct_bin2pdf(eFromType, sFrom, sTo, sTemp, bPaid, sThemeDir, params);
|
||||
}
|
||||
else if(AVS_OFFICESTUDIO_FILE_IMAGE == nFormatTo)
|
||||
else if(0 != (AVS_OFFICESTUDIO_FILE_IMAGE & nFormatTo))
|
||||
{
|
||||
NSDoctRenderer::DoctRendererFormat::FormatFile eFromType = NSDoctRenderer::DoctRendererFormat::FormatFile::XLST;
|
||||
nRes = doct_bin2image(eFromType, sFrom, sTo, sTemp, bPaid, sThemeDir, params);
|
||||
@ -2176,7 +2192,7 @@ namespace NExtractTools
|
||||
NSDoctRenderer::DoctRendererFormat::FormatFile eFromType = NSDoctRenderer::DoctRendererFormat::FormatFile::PPTT;
|
||||
nRes = doct_bin2pdf(eFromType, sFrom, sTo, sTemp, bPaid, sThemeDir, params);
|
||||
}
|
||||
else if(AVS_OFFICESTUDIO_FILE_IMAGE == nFormatTo)
|
||||
else if(0 != (AVS_OFFICESTUDIO_FILE_IMAGE & nFormatTo))
|
||||
{
|
||||
NSDoctRenderer::DoctRendererFormat::FormatFile eFromType = NSDoctRenderer::DoctRendererFormat::FormatFile::PPTT;
|
||||
nRes = doct_bin2image(eFromType, sFrom, sTo, sTemp, bPaid, sThemeDir, params);
|
||||
@ -2306,7 +2322,7 @@ namespace NExtractTools
|
||||
oHtmlRenderer.CloseFile();
|
||||
RELEASEOBJECT(pReader);
|
||||
}
|
||||
else if(AVS_OFFICESTUDIO_FILE_IMAGE == nFormatTo)
|
||||
else if(0 != (AVS_OFFICESTUDIO_FILE_IMAGE & nFormatTo))
|
||||
{
|
||||
IOfficeDrawingFile* pReader = NULL;
|
||||
nRes = PdfDjvuXpsToImage(&pReader, sFrom, nFormatFrom, sTo, sTemp, params, &oApplicationFonts);
|
||||
|
||||
@ -293,6 +293,10 @@ namespace NExtractTools
|
||||
}
|
||||
oBuilder.WriteString(_T("</Changes>"));
|
||||
oBuilder.WriteString(sMailMerge);
|
||||
if (NULL != params.m_oThumbnail && (NULL == params.m_oThumbnail->first || true == *params.m_oThumbnail->first))
|
||||
{
|
||||
oBuilder.WriteString(_T("<OnlyOnePage>1</OnlyOnePage>"));
|
||||
}
|
||||
oBuilder.WriteString(_T("</Settings>"));
|
||||
return oBuilder.GetData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user