office-gobmx/include/svx/dlgutil.hxx
Stephan Bergmann e261881452 Avoid unhelpful -Wunused-variable
...at least from "g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)" with
--disable-debug, when a namespace-scope const variable with a "complex"
initializer declared in an include file remains unused.

Avoid that warning via SAL_CONSTEXPR, which in turn requires large parts of
o3tl::is_typed_flags to be SAL_CONSTEXPR, which in turn requires a new
HAVE_CXX14_CONSTEXPR to allow assert in constexpr functions, which in turn
requires using -std=c++14 instead of -std=c++11 where available, which in turn
(a) requires to /not/ use -std=c++14 if it would run into a bug between Clang
and libstdc++ discussed at <https://llvm.org/bugs/show_bug.cgi?id=24115>
"llvm-nm fails to build with gcc 5.1's libstdc++" (and which hits us in
sfx2/source/control/thumbnailview.cxx), and (b) requires a new
HAVE_CXX14_SIZED_DEALLOCATION to work around GCC 5.1 -Werror=sized-deallocation
(where Clang >= 3.7 only supports C++14 sized deallocation when explictly
enabled via -fsized-deallocation, btw).

This effectively reverts ff6462e630 "avoid unused
variable warning:" again.

Change-Id: I424e3561452a3e6d8c8a9604d6c737cab49840c4
Reviewed-on: https://gerrit.libreoffice.org/18918
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-09-30 11:06:14 +00:00

41 lines
1.7 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#ifndef INCLUDED_SVX_DLGUTIL_HXX
#define INCLUDED_SVX_DLGUTIL_HXX
#include <svtools/unitconv.hxx>
#include <svx/svxdllapi.h>
// macro -----------------------------------------------------------------
// typedef ---------------------------------------------------------------
// Functions -------------------------------------------------------------
class SfxItemSet;
SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet& );
SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit();
SVX_DLLPUBLIC bool GetApplyCharUnit( const SfxItemSet& );
SAL_CONSTEXPR DrawModeFlags const OUTPUT_DRAWMODE_COLOR = DrawModeFlags::Default;
SAL_CONSTEXPR DrawModeFlags const OUTPUT_DRAWMODE_CONTRAST = DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */