Kaydet (Commit) bb406680 authored tarafından Mike Kaganski's avatar Mike Kaganski

Put definition of _CRT_RAND_S into bin/update_pch

so it doesn't get removed again from sal/inc/pch/precompiled_sal.hxx
(see commit 4af9612f).

Also make necessary changes to some of the files that start to fail
building after running bin/update_pch.sh, so that the patch is
self-contained and leaves the tree in fully functional state.

tools namespace had to be prepended with :: to disambiguate from
drawinglayer::tools

vcl/inc/window.h includes were amended, because ExtTextInputAttr is
from vcl/commandevent.hxx, and enum class ShowTrackFlags is from
vcl/window.hxx

Change-Id: I47179622350754cba2f95d26a1bafd3dfbbc935b
Reviewed-on: https://gerrit.libreoffice.org/42559Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst ca8a4c81
......@@ -744,6 +744,17 @@ def generate(includes, libname, filename, module):
f.write('\n If after updating build fails, use the following command to locate conflicting headers:\n ./bin/update_pch_bisect {} "make {}.build" --find-conflicts\n*/\n'.format(
filename, module))
# sal needs this for rand_s()
if module == 'sal' and libname == 'sal':
sal_define = """
#if defined(_WIN32)
#if !defined _CRT_RAND_S
#define _CRT_RAND_S
#endif
#endif
"""
f.write(sal_define)
# svx needs this (sendreportw32.cxx)
if module == 'svx' and libname == 'svx':
svx_define = """
......
......@@ -56,7 +56,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maTopLeft = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maTopLeft.Crop(
tools::Rectangle(Point(0, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
::tools::Rectangle(Point(0, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
}
return maTopLeft;
......@@ -69,7 +69,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maTop = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maTop.Crop(
tools::Rectangle(Point((nQuarter * 2) + 1, 0), Size(1, nQuarter)));
::tools::Rectangle(Point((nQuarter * 2) + 1, 0), Size(1, nQuarter)));
}
return maTop;
......@@ -82,7 +82,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maTopRight = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maTopRight.Crop(
tools::Rectangle(Point((nQuarter * 2) + 2, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
::tools::Rectangle(Point((nQuarter * 2) + 2, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
}
return maTopRight;
......@@ -95,7 +95,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maRight = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maRight.Crop(
tools::Rectangle(Point((nQuarter * 3) + 3, (nQuarter * 2) + 1), Size(nQuarter, 1)));
::tools::Rectangle(Point((nQuarter * 3) + 3, (nQuarter * 2) + 1), Size(nQuarter, 1)));
}
return maRight;
......@@ -108,7 +108,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maBottomRight = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maBottomRight.Crop(
tools::Rectangle(Point((nQuarter * 2) + 2, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
::tools::Rectangle(Point((nQuarter * 2) + 2, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
}
return maBottomRight;
......@@ -121,7 +121,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maBottom = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maBottom.Crop(
tools::Rectangle(Point((nQuarter * 2) + 1, (nQuarter * 3) + 3), Size(1, nQuarter)));
::tools::Rectangle(Point((nQuarter * 2) + 1, (nQuarter * 3) + 3), Size(1, nQuarter)));
}
return maBottom;
......@@ -134,7 +134,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maBottomLeft = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maBottomLeft.Crop(
tools::Rectangle(Point(0, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
::tools::Rectangle(Point(0, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1)));
}
return maBottomLeft;
......@@ -147,7 +147,7 @@ namespace drawinglayer
const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
const_cast< DiscreteShadow* >(this)->maLeft = getBitmapEx();
const_cast< DiscreteShadow* >(this)->maLeft.Crop(
tools::Rectangle(Point(0, (nQuarter * 2) + 1), Size(nQuarter, 1)));
::tools::Rectangle(Point(0, (nQuarter * 2) + 1), Size(nQuarter, 1)));
}
return maLeft;
......
......@@ -237,7 +237,7 @@ namespace drawinglayer
if (aMask.IsEmpty())
{
const Point aEmpty;
const tools::Rectangle aRect(aEmpty, maVirtualDeviceMask->GetOutputSizePixel());
const ::tools::Rectangle aRect(aEmpty, maVirtualDeviceMask->GetOutputSizePixel());
const Wallpaper aWallpaper(COL_BLACK);
maVirtualDeviceMask->DrawWallpaper(aRect, aWallpaper);
}
......@@ -260,7 +260,7 @@ namespace drawinglayer
if (aMask.IsEmpty())
{
const tools::Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel());
const ::tools::Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel());
maVirtualDeviceMask->SetFillColor(COL_BLACK);
maVirtualDeviceMask->SetLineColor();
maVirtualDeviceMask->DrawRect(aRect);
......
......@@ -73,7 +73,7 @@ namespace drawinglayer
if(!xRetval.empty())
{
// get target size
const tools::Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize());
const ::tools::Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize());
// create transformation
basegfx::B2DHomMatrix aAdaptedTransform;
......
......@@ -290,7 +290,7 @@ namespace drawinglayer
if(nTextLength)
{
tools::Rectangle aRect;
::tools::Rectangle aRect;
mrDevice.GetTextBoundRect(
aRect,
......@@ -324,7 +324,7 @@ namespace drawinglayer
}
void TextLayouterDevice::addTextRectActions(
const tools::Rectangle& rRectangle,
const ::tools::Rectangle& rRectangle,
const OUString& rText,
DrawTextFlags nStyle,
GDIMetaFile& rGDIMetaFile) const
......
......@@ -176,7 +176,7 @@ namespace
{
if (bClear)
{
pRetval->Erase(tools::Rectangle(0, 0, rSizePixel.getWidth(), rSizePixel.getHeight()));
pRetval->Erase(::tools::Rectangle(0, 0, rSizePixel.getWidth(), rSizePixel.getHeight()));
}
}
else
......@@ -258,11 +258,11 @@ namespace drawinglayer
{
basegfx::B2DRange aRangePixel(rRange);
aRangePixel.transform(mrOutDev.GetViewTransformation());
const tools::Rectangle aRectPixel(
const ::tools::Rectangle aRectPixel(
(sal_Int32)floor(aRangePixel.getMinX()), (sal_Int32)floor(aRangePixel.getMinY()),
(sal_Int32)ceil(aRangePixel.getMaxX()), (sal_Int32)ceil(aRangePixel.getMaxY()));
const Point aEmptyPoint;
maDestPixel = tools::Rectangle(aEmptyPoint, mrOutDev.GetOutputSizePixel());
maDestPixel = ::tools::Rectangle(aEmptyPoint, mrOutDev.GetOutputSizePixel());
maDestPixel.Intersection(aRectPixel);
if(isVisible())
......
......@@ -38,7 +38,7 @@ namespace drawinglayer
VclPtr<VirtualDevice> mpContent;
VclPtr<VirtualDevice> mpMask;
VclPtr<VirtualDevice> mpAlpha;
tools::Rectangle maDestPixel;
::tools::Rectangle maDestPixel;
public:
impBufferDevice(
......
......@@ -234,7 +234,7 @@ namespace drawinglayer
{
namespace processor2d
{
tools::Rectangle VclMetafileProcessor2D::impDumpToMetaFile(
::tools::Rectangle VclMetafileProcessor2D::impDumpToMetaFile(
const primitive2d::Primitive2DContainer& rContent,
GDIMetaFile& o_rContentMetafile)
{
......@@ -246,7 +246,7 @@ namespace drawinglayer
// transform primitive range with current transformation (e.g shadow offset)
aPrimitiveRange.transform(maCurrentTransformation);
const tools::Rectangle aPrimitiveRectangle(
const ::tools::Rectangle aPrimitiveRectangle(
basegfx::fround(aPrimitiveRange.getMinX()), basegfx::fround(aPrimitiveRange.getMinY()),
basegfx::fround(aPrimitiveRange.getMaxX()), basegfx::fround(aPrimitiveRange.getMaxY()));
ScopedVclPtrInstance< VirtualDevice > aContentVDev;
......@@ -801,12 +801,12 @@ namespace drawinglayer
const basegfx::B2DRange aCurrentRange(
aTranslate.getX(), aTranslate.getY(),
aTranslate.getX() + aScale.getX(), aTranslate.getY() + aScale.getY());
const tools::Rectangle aCurrentRect(
const ::tools::Rectangle aCurrentRect(
sal_Int32(floor(aCurrentRange.getMinX())), sal_Int32(floor(aCurrentRange.getMinY())),
sal_Int32(ceil(aCurrentRange.getMaxX())), sal_Int32(ceil(aCurrentRange.getMaxY())));
const GraphicAttr& rAttr = rGraphicPrimitive.getGraphicAttr();
// fdo#72530 don't pass empty Rectangle to EndGroup
tools::Rectangle aCropRect(aCurrentRect);
::tools::Rectangle aCropRect(aCurrentRect);
if(rAttr.IsCropped())
{
......@@ -839,7 +839,7 @@ namespace drawinglayer
aCropRange.expand(aCurrentRange.getMinimum() - basegfx::B2DPoint(rAttr.GetLeftCrop() * fFactorX, rAttr.GetTopCrop() * fFactorY));
aCropRange.expand(aCurrentRange.getMaximum() + basegfx::B2DPoint(rAttr.GetRightCrop() * fFactorX, rAttr.GetBottomCrop() * fFactorY));
aCropRect = tools::Rectangle(
aCropRect = ::tools::Rectangle(
sal_Int32(floor(aCropRange.getMinX())), sal_Int32(floor(aCropRange.getMinY())),
sal_Int32(ceil(aCropRange.getMaxX())), sal_Int32(ceil(aCropRange.getMaxY())));
}
......@@ -901,7 +901,7 @@ namespace drawinglayer
{
// still need to fill in the location (is a class Rectangle)
const basegfx::B2DRange aRangeLogic(rControlPrimitive.getB2DRange(getViewInformation2D()));
const tools::Rectangle aRectLogic(
const ::tools::Rectangle aRectLogic(
(sal_Int32)floor(aRangeLogic.getMinX()), (sal_Int32)floor(aRangeLogic.getMinY()),
(sal_Int32)ceil(aRangeLogic.getMaxX()), (sal_Int32)ceil(aRangeLogic.getMaxY()));
pPDFControl->Location = aRectLogic;
......@@ -1016,7 +1016,7 @@ namespace drawinglayer
{
// emulate data handling from ImpEditEngine::Paint
const basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D()));
const tools::Rectangle aRectLogic(
const ::tools::Rectangle aRectLogic(
(sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()),
(sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY()));
vcl::PDFExtOutDevBookmarkEntry aBookmark;
......@@ -1892,7 +1892,7 @@ namespace drawinglayer
// various content, create content-metafile
GDIMetaFile aContentMetafile;
const tools::Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile));
const ::tools::Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile));
// restore mfCurrentUnifiedTransparence; it may have been used
// while processing the sub-content in impDumpToMetaFile
......@@ -1955,7 +1955,7 @@ namespace drawinglayer
{
// various content, create content-metafile
GDIMetaFile aContentMetafile;
const tools::Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile));
const ::tools::Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile));
// re-create a VCL-gradient from FillGradientPrimitive2D
Gradient aVCLGradient;
......@@ -1983,10 +1983,10 @@ namespace drawinglayer
basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D()));
aViewRange.transform(maCurrentTransformation);
const tools::Rectangle aRectLogic(
const ::tools::Rectangle aRectLogic(
(sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()),
(sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY()));
const tools::Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic));
const ::tools::Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic));
Size aSizePixel(aRectPixel.GetSize());
const Point aEmptyPoint;
ScopedVclPtrInstance< VirtualDevice > aBufferDevice;
......
......@@ -72,7 +72,7 @@ namespace drawinglayer
{
private:
/// local helper(s)
tools::Rectangle impDumpToMetaFile(
::tools::Rectangle impDumpToMetaFile(
const primitive2d::Primitive2DContainer& rContent,
GDIMetaFile& o_rContentMetafile);
void impConvertFillGradientAttributeToVCLGradient(
......
......@@ -812,7 +812,7 @@ namespace drawinglayer
// create rectangle for fill
const basegfx::B2DRange& aViewport(getViewInformation2D().getDiscreteViewport());
const tools::Rectangle aRectangle(
const ::tools::Rectangle aRectangle(
(sal_Int32)floor(aViewport.getMinX()), (sal_Int32)floor(aViewport.getMinY()),
(sal_Int32)ceil(aViewport.getMaxX()), (sal_Int32)ceil(aViewport.getMaxY()));
mpOutputDevice->DrawRect(aRectangle);
......
......@@ -518,7 +518,7 @@ namespace drawinglayer
// prepare OutDev
const Point aEmptyPoint(0, 0);
const tools::Rectangle aVisiblePixel(aEmptyPoint, mpOutputDevice->GetOutputSizePixel());
const ::tools::Rectangle aVisiblePixel(aEmptyPoint, mpOutputDevice->GetOutputSizePixel());
const bool bWasEnabled(mpOutputDevice->IsMapModeEnabled());
mpOutputDevice->EnableMapMode(false);
......@@ -533,7 +533,7 @@ namespace drawinglayer
for(sal_Int32 nXPos((nPosY % 2) ? nBLeft - nBWidth + nOffsetX : nBLeft);
nXPos < nOLeft + nOWidth; nXPos += nBWidth)
{
const tools::Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel);
const ::tools::Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel);
if(aOutRectPixel.IsOver(aVisiblePixel))
{
......@@ -560,7 +560,7 @@ namespace drawinglayer
for(sal_Int32 nYPos((nPosX % 2) ? nBTop - nBHeight + nOffsetY : nBTop);
nYPos < nOTop + nOHeight; nYPos += nBHeight)
{
const tools::Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel);
const ::tools::Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel);
if(aOutRectPixel.IsOver(aVisiblePixel))
{
......@@ -1177,7 +1177,7 @@ namespace drawinglayer
if(!aRange.isEmpty())
{
const tools::Rectangle aRectangle(
const ::tools::Rectangle aRectangle(
(sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()),
(sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY()));
......
......@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_OOX_TOKEN_RELATIONSHIP_HXX
#define INCLUDED_OOX_TOKEN_RELATIONSHIP_HXX
#include <oox/dllapi.h>
#include <rtl/ustring.hxx>
......@@ -64,4 +67,6 @@ OUString OOX_DLLPUBLIC getRelationship(Relationship eRelationship);
}
#endif // INCLUDED_OOX_TOKEN_RELATIONSHIP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_SVX_INC_UIOBJECT_HXX
#define INCLUDED_SVX_INC_UIOBJECT_HXX
#include <memory>
#include <vcl/uitest/uiobject.hxx>
......@@ -32,4 +35,6 @@ protected:
OUString get_name() const override;
};
#endif // INCLUDED_SVX_INC_UIOBJECT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -25,7 +25,7 @@
#include <cppuhelper/queryinterface.hxx>
using namespace accessibility;
using namespace ::accessibility;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
......
......@@ -78,7 +78,7 @@ typedef ::cppu::WeakAggComponentImplHelper7<
class SvxGraphCtrlAccessibleContext:
private cppu::BaseMutex, public SvxGraphCtrlAccessibleContext_Base,
public SfxListener, public accessibility::IAccessibleViewForwarder
public SfxListener, public ::accessibility::IAccessibleViewForwarder
{
public:
friend class GraphCtrl;
......@@ -194,7 +194,7 @@ private:
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessible( const SdrObject* pObj );
accessibility::AccessibleShapeTreeInfo maTreeInfo;
::accessibility::AccessibleShapeTreeInfo maTreeInfo;
/// Reference to the parent object.
css::uno::Reference<css::accessibility::XAccessible> mxParent;
......@@ -209,7 +209,7 @@ private:
OUString msName;
/// map of accessible shapes
typedef ::std::map< const SdrObject*, rtl::Reference<accessibility::AccessibleShape> > ShapesMapType;
typedef ::std::map< const SdrObject*, rtl::Reference<::accessibility::AccessibleShape> > ShapesMapType;
ShapesMapType mxShapes;
VclPtr<GraphCtrl> mpControl;
......
......@@ -23,7 +23,9 @@
#include <sal/config.h>
#include <tools/fract.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/idle.hxx>
#include <vcl/window.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <list>
......@@ -31,10 +33,6 @@
#include <vector>
#include <set>
namespace vcl {
class Window;
}
class FixedText;
class VclSizeGroup;
class VirtualDevice;
......
......@@ -29,7 +29,6 @@
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
namespace xmlscript
......@@ -47,36 +46,36 @@ public:
}
// XInputStreamProvider
virtual Reference< io::XInputStream > SAL_CALL createInputStream() override;
virtual uno::Reference< io::XInputStream > SAL_CALL createInputStream() override;
};
Reference< io::XInputStream > InputStreamProvider::createInputStream()
uno::Reference< io::XInputStream > InputStreamProvider::createInputStream()
{
return ::xmlscript::createInputStream( _bytes );
}
Reference< io::XInputStreamProvider > SAL_CALL exportDialogModel(
Reference< container::XNameContainer > const & xDialogModel,
Reference< XComponentContext > const & xContext,
Reference< XModel > const & xDocument )
uno::Reference< io::XInputStreamProvider > SAL_CALL exportDialogModel(
uno::Reference< container::XNameContainer > const & xDialogModel,
uno::Reference< uno::XComponentContext > const & xContext,
uno::Reference< XModel > const & xDocument )
{
Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
std::vector<sal_Int8> aBytes;
xWriter->setOutputStream( createOutputStream( &aBytes ) );
Reference< xml::sax::XExtendedDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
uno::Reference< xml::sax::XExtendedDocumentHandler > xHandler(xWriter, uno::UNO_QUERY_THROW);
exportDialogModel( xHandler, xDialogModel, xDocument );
return new InputStreamProvider( aBytes );
}
void SAL_CALL importDialogModel(
Reference< io::XInputStream > const & xInput,
Reference< container::XNameContainer > const & xDialogModel,
Reference< XComponentContext > const & xContext,
Reference< XModel > const & xDocument )
uno::Reference< io::XInputStream > const & xInput,
uno::Reference< container::XNameContainer > const & xDialogModel,
uno::Reference< uno::XComponentContext > const & xContext,
uno::Reference< XModel > const & xDocument )
{
Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
// error handler, entity resolver omitted for this helper function
xParser->setDocumentHandler( importDialogModel( xDialogModel, xContext, xDocument ) );
......
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