/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
it != endIt;
++it )
{
- delete (*it).familyName;
+ delete[] (*it).familyName;
}
fontDescriptionRuns.Clear();
}
+void FreeEmbeddedItems( Vector<EmbeddedItem>& embeddedItem )
+{
+ for( Vector<EmbeddedItem>::Iterator it = embeddedItem.Begin(),
+ endIt = embeddedItem.End();
+ it != endIt;
+ ++it )
+ {
+ EmbeddedItem& item = *it;
+ delete[] item.url;
+ }
+
+ embeddedItem.Clear();
+}
+
LogicalModelPtr LogicalModel::New()
{
return LogicalModelPtr( new LogicalModel() );
mColorRuns,
removedColorRuns );
+ // Process the background color runs.
+ Vector<ColorRun> removedBackgroundColorRuns;
+ UpdateCharacterRuns<ColorRun>( index,
+ numberOfCharacters,
+ totalNumberOfCharacters,
+ mBackgroundColorRuns,
+ removedBackgroundColorRuns );
+
// Process the font description runs.
Vector<FontDescriptionRun> removedFontDescriptionRuns;
UpdateCharacterRuns<FontDescriptionRun>( index,
}
}
+void LogicalModel::ClearEmbeddedImages()
+{
+ FreeEmbeddedItems( mEmbeddedItems );
+}
+
LogicalModel::~LogicalModel()
{
ClearFontDescriptionRuns();
+ ClearEmbeddedImages();
}
LogicalModel::LogicalModel()