Kaydet (Commit) 7b72e505 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Access code under test via gb_Library_use_library_objects

Change-Id: Ib92dc55827b69cf33a04fe4084cf296049efc9c6
üst 7d10da21
...@@ -18,7 +18,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,filter_pict_test, \ ...@@ -18,7 +18,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,filter_pict_test, \
)) ))
$(eval $(call gb_CppunitTest_use_libraries,filter_pict_test, \ $(eval $(call gb_CppunitTest_use_libraries,filter_pict_test, \
ipt \ basegfx \
sal \ sal \
test \ test \
tl \ tl \
...@@ -27,6 +27,10 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_pict_test, \ ...@@ -27,6 +27,10 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_pict_test, \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
)) ))
$(eval $(call gb_CppunitTest_use_library_objects,filter_pict_test, \
ipt \
))
$(eval $(call gb_CppunitTest_use_api,filter_pict_test,\ $(eval $(call gb_CppunitTest_use_api,filter_pict_test,\
udkapi \ udkapi \
offapi \ offapi \
......
...@@ -1913,6 +1913,16 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) ...@@ -1913,6 +1913,16 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
if (pPict->GetError()) pPict->Seek(nOrigPos); if (pPict->GetError()) pPict->Seek(nOrigPos);
} }
namespace pict {
void ReadPictFile(SvStream &rStreamPict, GDIMetaFile& rGDIMetaFile)
{
PictReader aPictReader;
aPictReader.ReadPict(rStreamPict, rGDIMetaFile);
}
}
//================== GraphicImport - the exported function ================ //================== GraphicImport - the exported function ================
// this needs to be kept in sync with // this needs to be kept in sync with
...@@ -1926,10 +1936,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL ...@@ -1926,10 +1936,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL
GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem* ) GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem* )
{ {
GDIMetaFile aMTF; GDIMetaFile aMTF;
PictReader aPictReader;
bool bRet = false; bool bRet = false;
aPictReader.ReadPict( rIStm, aMTF ); pict::ReadPictFile( rIStm, aMTF );
if ( !rIStm.GetError() ) if ( !rIStm.GetError() )
{ {
...@@ -1940,14 +1949,4 @@ GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem* ) ...@@ -1940,14 +1949,4 @@ GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem* )
return bRet; return bRet;
} }
namespace pict {
void ReadPictFile(SvStream &rStreamPict, GDIMetaFile& rGDIMetaFile)
{
PictReader aPictReader;
aPictReader.ReadPict(rStreamPict, rGDIMetaFile);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -13,19 +13,13 @@ ...@@ -13,19 +13,13 @@
#include <sal/config.h> #include <sal/config.h>
#include <sal/types.h> #include <sal/types.h>
#if defined PCT_DLLIMPLEMENTATION
#define PCT_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
#define PCT_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
class GDIMetaFile; class GDIMetaFile;
class SvStream; class SvStream;
namespace pict { namespace pict {
/// Function to access PictReader::ReadPict for unit testing. /// Function to access PictReader::ReadPict for unit testing.
PCT_DLLPUBLIC void ReadPictFile(SvStream &rStreamPict, GDIMetaFile& rGDIMetaFile); void ReadPictFile(SvStream &rStreamPict, GDIMetaFile& rGDIMetaFile);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment