Aspose::Slides::IFontData::get_FontName() Throws NullReferenceException
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <memory> | |
#include <glog/logging.h> | |
#include <boost/filesystem.hpp> | |
#include <DOM/NullableBool.h> | |
#include <DOM/DocumentProperties.h> | |
#include <system/io/directory.h> | |
#include <Util/License.h> | |
#include <system/console.h> | |
#include <system/exception.h> | |
#include <Export/SaveFormat.h> | |
#include <DOM/Presentation.h> | |
#include <system/string.h> | |
#include <drawing/imaging/image_format.h> | |
#include <drawing/point.h> | |
#include <drawing/point_f.h> | |
#include <drawing/color.h> | |
#include <DOM/ISection.h> | |
#include <DOM/ISectionCollection.h> | |
#include <DOM/ISectionSlideCollection.h> | |
#include <DOM/ISlide.h> | |
#include <DOM/ISlideCollection.h> | |
#include <DOM/ILayoutSlide.h> | |
#include <DOM/IGlobalLayoutSlideCollection.h> | |
#include <DOM/ILayoutSlideCollection.h> | |
#include <DOM/IMasterLayoutSlideCollection.h> | |
#include <DOM/IMasterSlide.h> | |
#include <DOM/IMasterSlideCollection.h> | |
#include <DOM/IDocumentProperties.h> | |
#include <DOM/IProtectionManager.h> | |
#include <DOM/ITextStyle.h> | |
#include <DOM/ITextStyleEffectiveData.h> | |
#include <DOM/IParagraphFormat.h> | |
#include <DOM/IParagraphFormatEffectiveData.h> | |
#include <DOM/IBulletFormat.h> | |
#include <DOM/IBulletFormatEffectiveData.h> | |
#include <DOM/IFontData.h> | |
#include <DOM/IColorFormat.h> | |
#include <DOM/ISlidesPicture.h> | |
#include <DOM/IPPImage.h> | |
#include <DOM/IPortionFormat.h> | |
#include <DOM/IComment.h> | |
#include <DOM/ICommentAuthor.h> | |
#include <iostream> | |
#include <exception> | |
using namespace Aspose::Slides; | |
using SaveFormat = Aspose::Slides::Export::SaveFormat; | |
int main () | |
{ | |
try { | |
System::SharedPtr<Aspose::Slides::License> lic = System::MakeObject<Aspose::Slides::License>(); | |
lic->SetLicense(System::String("Aspose.Slides.C++.lic")); | |
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(); | |
System::SharedPtr<IMasterSlideCollection> cols = pres->get_Masters(); | |
for (auto i=0; i< cols->get_Count(); ++i) { | |
System::SharedPtr<IMasterSlide> s = cols->idx_get(i); | |
System::SharedPtr<IFontData> ifont = s->get_TitleStyle()->get_DefaultParagraphFormat()->get_Bullet()->get_Font(); | |
std::cerr << "Got Font" << std::endl; | |
System::String p1 = ifont->get_FontName(); | |
} | |
} | |
catch(std::exception& e) { | |
std::cerr << "Error " << e.what() << std::endl; | |
} | |
catch(...) { | |
std::cerr << "Unknown Error " << std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment