Kaydet (Commit) 0c4639fa authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Set PAPER_SCREEN_4_3 values back and use it as it was

It breaks things.

Change-Id: Ia28391aed27051e5f6a7e0996f30b23c46eb8269
üst afcfe477
......@@ -82,7 +82,7 @@ static const PageDesc aDinTab[] =
{ MM2MM100( 114 ), MM2MM100( 229 ), "EnvC65", NULL },
{ MM2MM100( 110 ), MM2MM100( 220 ), "EnvDL", "DL" },
{ MM2MM100( 180), MM2MM100( 270 ), NULL, NULL }, //Dia
{ MM2MM100( 280), MM2MM100( 210 ), NULL, NULL }, //Screen 4:3
{ MM2MM100( 210), MM2MM100( 280 ), NULL, NULL }, //Screen 4:3
{ IN2MM100( 17 ), IN2MM100( 22 ), "AnsiC", "CSheet" },
{ IN2MM100( 22 ), IN2MM100( 34 ), "AnsiD", "DSheet" },
{ IN2MM100( 34 ), IN2MM100( 44 ), "AnsiE", "ESheet" },
......
......@@ -39,12 +39,23 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
// attempt to make it appear as if it is on a piece of paper
INetURLObject aUrl(rURL);
PaperInfo aInfo(
RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, aUrl.getExtension())
? PAPER_SCREEN_4_3
: PaperInfo::getSystemDefaultPaper());
double ratio = double(nThumbnailSize) / double(std::max(aInfo.getWidth(), aInfo.getHeight()));
Size aThumbnailSize(aInfo.getWidth() * ratio, aInfo.getHeight() * ratio);
long nPaperHeight;
long nPaperWidth;
if( RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, aUrl.getExtension()) )
{
// Swap width and height (PAPER_SCREEN_4_3 definition make it needed)
PaperInfo aInfo(PAPER_SCREEN_4_3);
nPaperHeight = aInfo.getWidth();
nPaperWidth = aInfo.getHeight();
}
else
{
PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
nPaperHeight = aInfo.getHeight();
nPaperWidth = aInfo.getWidth();
}
double ratio = double(nThumbnailSize) / double(std::max(nPaperHeight, nPaperWidth));
Size aThumbnailSize(nPaperWidth * ratio, nPaperHeight * ratio);
if (aExtSize.Width() > aThumbnailSize.Width() || aExtSize.Height() > aThumbnailSize.Height())
{
......
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