2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-23 19:17:57 +02:00
|
|
|
#ifndef INCLUDED_EDITENG_PAPERINF_HXX
|
|
|
|
#define INCLUDED_EDITENG_PAPERINF_HXX
|
2007-04-11 15:05:08 +00:00
|
|
|
|
|
|
|
// INCLUDE ---------------------------------------------------------------
|
|
|
|
|
|
|
|
#include <vcl/print.hxx>
|
|
|
|
#include <vcl/mapmod.hxx>
|
2010-01-06 19:26:54 +01:00
|
|
|
#include <editeng/svxenum.hxx>
|
2013-11-09 14:13:31 -06:00
|
|
|
#include <editeng/editengdllapi.h>
|
2007-04-11 15:05:08 +00:00
|
|
|
|
|
|
|
// forward ---------------------------------------------------------------
|
|
|
|
|
|
|
|
class Printer;
|
|
|
|
class Size;
|
|
|
|
|
|
|
|
// class SvxPaperInfo -----------------------------------------------------
|
|
|
|
|
2010-01-06 19:26:54 +01:00
|
|
|
class EDITENG_DLLPUBLIC SvxPaperInfo
|
2007-04-11 15:05:08 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-09-20 16:41:39 +02:00
|
|
|
static Size GetDefaultPaperSize( MapUnit eUnit = MapUnit::MapTwip );
|
|
|
|
static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MapUnit::MapTwip );
|
2009-06-12 09:36:34 +00:00
|
|
|
static Size GetPaperSize( const Printer* pPrinter );
|
2016-12-02 16:34:40 +02:00
|
|
|
static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy );
|
2016-03-03 08:56:35 +02:00
|
|
|
static long GetSloppyPaperDimension( long nSize );
|
2013-09-06 15:44:12 +02:00
|
|
|
static OUString GetName( Paper ePaper );
|
2007-04-11 15:05:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// INLINE -----------------------------------------------------------------
|
|
|
|
|
|
|
|
inline Size &Swap(Size &rSize)
|
|
|
|
{
|
|
|
|
const long lVal = rSize.Width();
|
|
|
|
rSize.Width() = rSize.Height();
|
|
|
|
rSize.Height() = lVal;
|
|
|
|
return rSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline Size &LandscapeSwap(Size &rSize)
|
|
|
|
{
|
|
|
|
if ( rSize.Height() > rSize.Width() )
|
|
|
|
Swap( rSize );
|
|
|
|
return rSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|